I'm trying to use my debian as a switch... so as to test vlan config, and high availability.
I've seen plenty of doc about using vconfig to configure a 802.1Q interface, but I'd like to "put an interface into a vlan", without enabling trunking (802.1Q) on it.
what I want to finally have, is that the host connected to my box have no vlan config, and that their packets are tagged when they enter my box' interface. Here's a picture:
Machine1----------| tun1 (vlan1)
Machine2----------| tun2 (vlan1)
Machine3----------| tun3 (vlan2) Debian box tun0 (802.1Q)------------ Routeur
Machine4----------| tun4 (vlan2)
tunX are my NICs, as I use qemu to emulate all these machines.
all interfaces take part into a bridge, which works well without vlans.
My problem is that the incomming packets are not tagged. I would like that when they enter one of the tun interfaces, the Debian box tags the packets so that they become "member" of the vlan without having to configure vlan on each machine.
This is the way cisco (and other) switches work.... can linux perform it, how?
remark: some will say that this setup is unusable in real life... I agree, the interest is only to know how it works and then to test further things, like radius authentication with inscription in a vlan depending on the radius user profile...