Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 223
  • Last Modified:

Bridge network adapters on Linux (ET)

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
tabush
Asked:
tabush
  • 9
  • 8
1 Solution
 
gheistCommented:
ifconfig up is missing.
0
 
tabushAuthor Commented:
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
 
gheistCommented:
Because your internet provides supplies you with single IP address?
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
tabushAuthor Commented:
Can you explain further? Is there something else i need to do so this will work?
0
 
gheistCommented:
How do you assign IPs to your computers?
0
 
tabushAuthor Commented:
DHCP
0
 
gheistCommented:
provider's dhcp or your own dhcp server?
0
 
tabushAuthor Commented:
our own DHCP server.
0
 
gheistCommented:
So you connect it to internet directly? and your provider has other dhcp server in same wire?
0
 
tabushAuthor Commented:
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
 
gheistCommented:
only missing thing is
ifconfig p1p1 up
ifconfig p2p1 up
0
 
tabushAuthor Commented:
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
 
gheistCommented:
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
 
tabushAuthor Commented:
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
 
gheistCommented:
network bridge does not need IP.
if at all br0 should be the right interface after bridge is configured.
0
 
tabushAuthor Commented:
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
 
tabushAuthor Commented:
in the end we never solved it.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 9
  • 8
Tackle projects and never again get stuck behind a technical roadblock.
Join Now