Page 1 of 1

Linux Bridge/VLAN problem with InternalNetwork Mode Adapters

Posted: 22. Feb 2014, 13:12
by kartikeyan
Setup Details
=============
Win7x64 Host VirtualBox 4.3.6
3 ubuntu 12.04 guests U1, U2, U3

U1 has 2 network interfaces
-nic1=NAT (eth0 in Guest),
-nic2=InternalNetwork name=leftlan (eth1 in Guest)

U2 has 3 network interfaces
- nic1=NAT (eth0 in Guest),
- nic2=InternalNetwork name=leftlan (eth1 in Guest)
- nic3=InternalNetwork name=rightlan, (eth2 in guest)

U3 has 2 network interfaces
- nic1=NAT (eth0 in Guest)
- nic2=InteralNetwork name=rightlan (eth1 in guest)


Topology
===========
U1.nic2 <====leftlan=======> [U2.nic2 U2.nic3 ] <========= rightlan =======> U3.nic2

Inside U2 I have a bridge switch0 = (eth1 + eth2)
============================================
brctl addbr switch0
brctl addif switch0 eth1
brctl addif switch0 eth2
ifconfig eth1 up
ifconfig eth2 up
ifconfig switch0 up



U1 Network Setup
================

modprobe 8021q;
vconfig add eth1 100;
ifconfig eth1 1.1.1.1/24 up
ifconfig eth1.100 2.1.1.1/24 up


U3 Network Setup
======================
modprobe 8021q;
vconfig add eth1 100;
ifconfig eth1 1.1.1.2/24 up
ifconfig eth1.100 2.1.1.2/24 up



PROBLEM
===============
From U1 to U3

ping -I 1.1.1.1 1.1.1.2 ########## Works and packets reach U3 via U2's bridge switch0

ping -I 2.1.1.1 2.1.1.2 ########## Does not work (VLAN-ID=100)
ARP resolution is incomplete.
Even if static arp is configured it does not work.


Where am I going wrong ?
Can't I create a bridge between Internal network adapters with different Intnet's i.e (leftlan + rightlan) ?
I see packets from U1.nic2 (eth1) reaching U2.nic2 (eth1) but tcpdump on switch0 does not show the packets.

I even tried in U2 the following but still it did not work
==================
brctl addbr switch1
vconfig add eth1 100
ifconfig eth1.100 up
vconfig add eth2 100
ifconfig eth2.100 up
brctl addif switch1 eth1.100
brctl addif switch1 eth2.100
ifconfig switch1 up


=== Also ====
If I change U3 nic2=InternalNetwork adapter, name=leftlan (instead of previous rightlan) so that U1 and U3 directly talk to each other
both single VLAN tagged packets and double VLAN tagged packets works fine.
============