Gus Wirth wrote:
In order to test at home I'll need to figure out some way of generating 802.1Q packets and spewing them out an interface. Have any recommendations for that? Maybe I should learn about vconfig first. OpenWRT uses it in home routers to set up the switch but since it "just works" I haven't paid much attention to it.

You can setup an interface with vconfig and it will tag/untag the packets for you as they go in and out. So you can plug the switch into physical eth0 on the machine which you want to generate traffic and create an interface with vconfig like so:

vconfig add eth0.2 2

Now any traffic sent out of eth0.2 will have 802.1q tags on it for VLAN 2.

Make sure the switch port the machine is plugged into is in 802.1q trunking mode and has the vlan number in question enabled on that port

Then you can use another machine on the same physical network which is also plugged into a trunk port with that vlan enabled on it to receive the packets on the physical eth0 and use vconfig:

vconfig add eth0.2 2

and now if you use iptraf on eth0.2 you will get untagged packets.

If you don't have a fancy vlan capable switch at home where you want to do this testing you could probably just direct connect two machines with a crossover ethernet and send 802.1q tagged packets direct.

--
Tracy R Reed                  Read my blog at http://ultraviolet.org
Key fingerprint = D4A8 4860 535C ABF8 BA97  25A6 F4F2 1829 9615 02AD
Non-GPG signed mail gets read only if I can find it among the spam.


--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list

Reply via email to