Network Brigdes

Network bridges are handy when used with virtual machines, for example using virtualization software like Virtualbox.

How can you create a network bridge?


The following command line instructions create a bridge between the physical ethernet connector eth0 and a virtual host adapter vbox0 from Virtualbox:

sudo -i
apt-get install bridge-utils
ifconfig eth0 netmask
brctl addbr br0
ifconfig eth0 promisc
brctl addif br0 eth0
dhclient br0
brctl addif br0 vbox0
ifconfig vbox0 up

These instructions create a bridge called br0 and sets a static IP on the vbox0 adapter.

Windows XP

On Windows XP (I haven't and will never try it on other Windows versions) things are much easier:
Just select the two network adapters (f.ex. a physical and a host adapter from Virtualbox) that you want to connect from the network explorer, and click with the right mouse button over on of them.
You'll find a menu entry like Create Bridge.
After a while, a new icon appears, representing the new bridge which is fully operative.
If you want to unlink the adapters again, just delete the bridge icon.