how to setup a bridge with 2 NICs and few virtual machines

Posted by Bond on Server Fault See other posts from Server Fault or by Bond
Published on 2011-01-09T13:38:56Z Indexed on 2011/01/09 13:55 UTC
Read the original article Hit count: 278

Here is my situation. I have a server with 2 NICs. I have installed virtual box and I have created a few Guest Operating Systems on it. I want these Virtual Machines to be using a bridge.NIC2 would be used to setup this bridge and NIC1 would be connected to corporate network.I am not clear with how should I go on doing this. /etc/network/interfaces is the file which I am trying to modify etc. My approach is following

1) Define a configuration file /etc/network/interfaces
2) Create IPTABLES as how NIC1 will forward the packets to Bridge on NIC2

Now comes the problem I do not understand what is the meaning of following lines in the configuration file

auto lo
iface lo inet loopback

# The primary network interface
auto eth2
iface eth2 inet manual

auto br0
iface br0 inet static
       address 192.168.1.14
       netmask 255.255.255.0
       network 192.168.1.0
       broadcast 192.168.1.255
       gateway 192.168.1.10
       # dns-* options are implemented by the resolvconf package, if installed
       dns-nameservers 192.168.13.2
       dns-search myserver.net
       bridge_ports eth2
       bridge_fd 9
       bridge_hello 2
       bridge_maxage 12
       bridge_stp off

So any pointers to what should be the entries of /etc/network/interfaces file. So that I understand which parameter is to be used when and where that would help me.

© Server Fault or respective owner

Related posts about virtualization

Related posts about virtual-machines