Setting up a Network Bridge on Linux VM (Windows 7 Host)
Posted
by
GrandAdmiral
on Super User
See other posts from Super User
or by GrandAdmiral
Published on 2013-10-28T21:08:06Z
Indexed on
2013/10/28
21:57 UTC
Read the original article
Hit count: 317
I would like to use NetEm to simulate a low bandwidth environment while testing an Internet-connected device. My plan is to setup a bridge in a Linux VM (Linux Mint 13) on a Windows 7 host. Unfortunately I'm having trouble setting up the bridge. Then I can use NetEm in the Linux VM to limit the bandwidth to an external device. I went with the following script:
ifconfig eth0 0.0.0.0 promisc up
ifconfig eth1 0.0.0.0 promisc up
Then create the bridge and bring it up:
brctl addbr br0
brctl setfd br0 0
brctl addif br0 eth0
brctl addif br0 eth1
dhclient br0
ifconfig br0 up
When I run that script, I see the following warning:
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service smbd reload
Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the reload(8) utility, e.g. reload smbd
The device connecting to the bridge is able to obtain an IP Address, but it can only ping the IP Address of the bridge (both are 10.2.32.xx). Then after a few minutes, other parts of our network go down. I'm not sure why, but once I kill the bridge the network is fine.
Is it possible to setup a network bridge in a Linux VM? Do I need to do something else with the dhclient br0
part of the script?
By the way, I'm using VirtualBox. The wired connection is eth0 and the wireless connection is eth1. The wired connection is connecting to the device and the wireless connection is going to the network. Both adapters are set up as bridged adapters with promiscuous mode set to "allow all".
© Super User or respective owner