a networking question

Tapas Mishra mightydreams at gmail.com
Sun Jan 9 13:18:21 UTC 2011


On Sat, Jan 8, 2011 at 9:53 PM, stan <stanb at panix.com> wrote:
>> You need to enable ip forwarding on the machine where bridge is.
>> Correct entry for a bridge is as follows
>>
>> 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
>>
>> You can not have eth0 and br0 simultaneously at the same time.
>> The output of brctl show on my machine shows
>>
>> brctl show
>> bridge name   bridge id               STP enabled     interfaces
>> br0           8000.0026b9824238       no              eth2
>>                                                       vnet0
>>                                                       vnet1
>>                                                       vnet2
>>                                                       vnet3
>> Paste your outputs on paste.ubuntu.com here it becomes cluttered to read.
>
> I am still confused a bit. My setup is that I have  2 physical NIC's one
> goes to the corportae lan. The 2nd goes to an interanl lan. Tis is the lan
> that I also gave a bridge interface, so that I cna use VirtualBox on this
> machine. In addition, I want the 2nd interface to be able to use varos
> 192.168.x.x subnets. eth0 is the corporate LAN, and eth1 is the internal
> LAN.

You don't have to worry much.I have not used Virtual Box actively.
I have a setup with 4 NICs.Which has a few guest Operating Systems
running on this server.
How ever I am using only one NIC for  all the Virtual Machines and to
communicate with world outside
It acts as a bridge to 4 Guest Operating systems and connects them to internet.

In your case
1) Define a configuration file br0 as I posted in my previous mail
2) While giving parameters for networking in Virtual Box's console (or
some place in Virtual Box where you can specify a bridge to connect)
use this bridge
3) Create IPTABLES as how NIC1 will forward the packets to Bridge on NIC2


If you are have not seen this link then have a look
http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge
it is basics of bridged networking if this does not work then let me know.
Also for bridge to work NIC2 should be in promiscuous mode.
What you would be left with is to set up IPTABLES to communicate with
bridge and corporate network.




More information about the ubuntu-users mailing list