I have 2 VLAN,VLAN 100 and 101 but only one subnet

i am trying to make this work with virtual machine so that VM will have two IP address in same subnet but will actually be in two VLAN.

steps followed:

created subinterface eth0.100 and eth0.101
Connected these subinterface to bridges br100 and br101
connected VNIC of VMs to these bridges

Since inside VM there is only one subnet how can i configure VM to use both VLANs.

I think the default routing table can be a problem as its not VLAN aware and the dev eth0

above rule in ip route show can be a problem,as for all traffic in it uses eth0 interface only,but some hosts that are in VLAN 101 may not work through eth0 with a tag of 100.

How can i make VM VLAN aware and use proper VLAN in same subnet?.

I dont have different subnets,(if i had i wouldnt have used VLAN instead use single bridge to solve this)


Do i need two bridges here??

the reason i created two bridges is if i add eth0.100 and eth0.101 to same bridge,how can the VNIC of VM be connnected to proper VLAN port,since Linux bridge doesnt support tag on bridge i thought it will not work.

Can someone please correct me.


  • 1
    What is the point? They are on the same subnet, so you don't need to bother with extra VLANs at all. Jul 17, 2014 at 13:55

2 Answers 2


It does not sound logical. If a node is trying to send a packet to an IP address that is in the same subnet as one of its IP addresses, it will send it out that interface (read: VLAN), and that is exactly what you are trying NOT to do.

You could use proxy ARP and have a host forward it to the other VLAN, but why all that extra work. Just put it into a different subnet and let the router (which is designed to do that type of forwarding) do it. The router could even firewall what it forwards!


Routing doesn't care about VLANs, it cares about IP networks / addresses.

Anyway: Why do you have one IP network spread across 2 VLANs? I havn't seen this up to now and it doesn't make sense to me. What do you want to achieve?

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .