Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I require a virtual network with VLAN be build between two virtual hosts - which can be (lxc/ vbox -ubuntu or win xp).
I tried with lxc and vbox with Ubuntu and was finding difficult to make it work without vlan, but was successful with vbox with xp.

vbox-xp1 --- br1 ---------------- br2 ---- vbox-xp2

The config is:

brctl addbr br1;     brctl addbr br2
ifconfig br1 up;     ifconfig br2 up
stp  br1 off;        stp  br2 off

ip link add name br1-br2-l0 type veth peer name br1-br2-l1
sudo brctl addif br1 br1-br2-l0
sudo brctl addif br2 br1-br2-l1

vbox - xp 1 and 2 with network ; bridged and br1 and br2 respectively.
The adapter is intel PRO/1000 MT Server and driver installed in guests.

  • Configured IPs and two hosts pinged!

VLAN config:

ip link add link br1 name br1-2.5 type vlan id 5
brctl addif br2 br1-2.5

create vlan 5 in xp 1 and 2 and assign ip address

Ping on with this config does not work. Wireshark trace on interface br1-br2-l1 / br1-2.5 shows that one ping results in ~240 ping packets and each growing by 4 bytes - first one being correct and 60,

ping does not reach other host as I see mac is not learnt[arp -a].

-- if br1-2.5 is not configured, I see untagged packets in br1-br2-l1/0, but still not reaching other host as mac is not learnt.

if br1-br2-l0/1 is made down, even if br1-2.5 is up, I count not see any packets.

I tried with ebtables, but still could not make a correct config to work.

-- If any one here are aware of any configuration, please let me know. I need to make a network of switches. Seems I have a very long way.

Sorry for a very long question.

Thanks and regards, vy

share|improve this question

Here is an example for VLAN bridging.

The example works exactly like I am doing this on real hardware: The vlans are added to the underlying network-devices. After that the network-devices with that vlan-id build up a bridge.

I do not think that this works the other way around.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.