Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Bridge network adapters on Linux (ET)

Posted on 2014-07-28
17
Medium Priority
?
210 Views
Last Modified: 2015-02-02
I installed a dual nic card into my Fedora Linux box. I am trying to bridge the two network adapters but i cannot get it working properly. So far it tried the following commands:

su -
brctl addbr br0
brctl addif br0 p1p1 p2p1
    (p1p1 and p2p1 are the names of my network adapters)

I also tried the commands on this page but not working either: http://tdistler.com/2011/06/10/netem-wan-emulation-how-to-setup-a-netem-box 

I did this a few months back and got it working but cannot remember what i did (should have wrote it down). I think i had to use the dhclient command but dont remember exactly how i used it. Can anyone lend a hand?
0
Comment
Question by:tabush
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 9
  • 8
17 Comments
 
LVL 62

Expert Comment

by:gheist
ID: 40225140
ifconfig up is missing.
0
 
LVL 2

Author Comment

by:tabush
ID: 40227444
The linux computer is connected to the internet but my windows pc (the bridged computer) cannot connect. When i do an 'ipconfig' its has an IP address however it cannot connect to the outside internet. Any idea why?
0
 
LVL 62

Expert Comment

by:gheist
ID: 40227454
Because your internet provides supplies you with single IP address?
0
Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

 
LVL 2

Author Comment

by:tabush
ID: 40227487
Can you explain further? Is there something else i need to do so this will work?
0
 
LVL 62

Expert Comment

by:gheist
ID: 40227636
How do you assign IPs to your computers?
0
 
LVL 2

Author Comment

by:tabush
ID: 40227739
DHCP
0
 
LVL 62

Expert Comment

by:gheist
ID: 40227868
provider's dhcp or your own dhcp server?
0
 
LVL 2

Author Comment

by:tabush
ID: 40229338
our own DHCP server.
0
 
LVL 62

Expert Comment

by:gheist
ID: 40229474
So you connect it to internet directly? and your provider has other dhcp server in same wire?
0
 
LVL 2

Author Comment

by:tabush
ID: 40231816
Not sure if i understand your question.
Linux box connects to internet through our firewall (DHCP is provided by a local server in our office). My windows PC is connected to 2nd nic on the linux box. Id like to bridge the connection from nic1 (connected to internet) to nic2 (connected to my windows pc).

Reason i'm doing this is i need to run some tests with limited bandwidth and increated latency. Once i setup that bridge i can simulate this.
0
 
LVL 62

Expert Comment

by:gheist
ID: 40231832
only missing thing is
ifconfig p1p1 up
ifconfig p2p1 up
0
 
LVL 2

Author Comment

by:tabush
ID: 40232392
nope that didnt help. When i run the dhclient command, should i run it for br0, p1p1(linux to internet), or p2p1 (linux to windows)?
0
 
LVL 62

Expert Comment

by:gheist
ID: 40232605
Where you have DHCP server?
To my understanding - you have one at providers, other in your network and now you bridge network.
If you run dhclient on br0 it will get IP from one or from other.
0
 
LVL 2

Author Comment

by:tabush
ID: 40232694
Our network has a static WAN IP (not dynamic IP). Then we have a DHCP server in our network giving out LAN IPs to all the computers in the network.
The linux computer is in my network, geting dhcp from the server. If we run dhclient it would get an IP from our DHCP server.
0
 
LVL 62

Expert Comment

by:gheist
ID: 40232746
network bridge does not need IP.
if at all br0 should be the right interface after bridge is configured.
0
 
LVL 2

Accepted Solution

by:
tabush earned 0 total points
ID: 40263179
Hi gheist,
Havent updated this in a little while however i still cannot get it working. Let me start from beginning and explain whole setup.

I'm in an office environment where DHCP is being given out by windows server.
default gateway: 192.168.37.1
subnet: 255.255.255.0

I would like to create a network bridge so i can simulate latency and low bandwidth to my zero client running a vmware view desktop.
I have a linux machine running fedora which i will use to create my network bridge (it will sit between the office network and the zero client). I installed a dual nic card on this machine.

On this linux machine i plug in the ethernet cable into port p1p1. Then i plug network cable from p2p1 (on linux machine) into my zero client. Now i run the following commands to create my bridge:

su -
ifconfig p1p1 0.0.0.0
ifconfig p2p1 0.0.0.0
brctl addbr br0
brctl addif p1p1 p2p1
ifconfig br0 up
ifconfig p1p1 up
ifconfig p2p1 up

Then i restart my zero client so it attempts to pick up an IP address however it cannot.

Appreciate any help you can give
0
 
LVL 2

Author Closing Comment

by:tabush
ID: 40583530
in the end we never solved it.
0

Featured Post

Python: Series & Data Frames With Pandas

Learn the basics of Python’s pandas library of series & data frames and how we can use these tools for data manipulation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question