Solved

Bridge network adapters on Linux (ET)

Posted on 2014-07-28
17
189 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
  • 9
  • 8
17 Comments
 
LVL 61

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 61

Expert Comment

by:gheist
ID: 40227454
Because your internet provides supplies you with single IP address?
0
 
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 61

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 61

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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 61

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 61

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 61

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 61

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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

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…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

746 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now