2

Sometimes, I have to face such a situation that I need to quickly and explicitly know whether a full length VLAN packet can traverse between two RJ45 ports.

Yes, I mean 802.1Q ethernet frame with Etype=81 00 (diagram below).

VLAN packet format

What I can do now is: Get two Windows PCs, for each PC, intall Intel Gigabit NIC and Intel specific driver to create a virtual NIC, with VLAN ID=3 assigned.

enter image description here

Then connect the two PCs to each of the two RJ45 port.

Finally execute ping to generate a full-length ethernet packet.

ping -f -l 1472 <dest-IP>

This way, I can be sure that the sent packet has the maximum "IP data payload" of 1500 bytes(8 bytes of ICMP header and 1472 bytes of ICMP data).

ethernet payload

If the ping gets reply, I know that the ethernet channel support full-length VLAN packet.

From my experiment, some home switch or broad band routers(e.g. Linksys WRT54G) does not support full-length VLAN packet switching, so only ping -f -l 1468 succeeds.

You see, I have to use an expensive Intel NIC to carry on that test, quite inconvenient. You know, for most laptop today, they do not equip an Intel NIC, and, even it is an Intel NIC, Intel VLAN driver, Intel has limitations on the models on which VLAN driver can be installed.

So, my question is: Is there a small program that can let me send a full-length VLAN packet without installing a dedicated VLAN driver? Or better, the program has a stock feature that does the very job for my situation.

Windows programs preferred, Linux solution welcome. Simpler the program, the better. Thank you.

[EXTRA]

The Linksys router bought around year 2006 uses official firmware v7.00.6. (linksys web admin image)

[2012-11-09] This technique can be quite useful. The ethernet channel to check can be something more interesting, e.g., a 802.11 WDS bridge .

3

3 Answers 3

4
+50

if the NIC/driver is the limitation you can't do anything about it, even if the program allows you to send a bigger packet it will fragment.

Enabling VLAN tagging in linux is easy. you need to install vconfig (vlan package in ubuntu), then you could use the same ping test or maybe iperf.

1

I guess another option would be to use a packet sniffing software package like wireshark from http://www.wireshark.org/ to monitor the traffic at both ends, this way ensure you see the data coming through, though it won't allow you to create a full-size packet for the test.

If you coupled it with something like nemesis from http://nemesis.sourceforge.net/; this tool can be used to craft packets to inject but also to re-send captured packets so, in theory, you could use your method to generate the test packet, capture it, then re-use it with nemesis and monitor at the far end to see if it comes through, saving the hassle of installing and configuring a card capable of vlan tagging. If that worked you could quite easily build a script around the pre-captured packet and nemesis, then either listen for it at the far end with wire shark, or listen for an icmp response at the near end (if the far end is configured for VLANs).

This method is completely untested as I have never used nemesis, but it is listed on the wireshark site as a useful and fairly well supported packet injection tool.

0

With Andres' hint of vconfig on Linux and some spare time to try it out, I finally manage to do it.

My experiment box has the following stuff:

  1. A loptop computer running Windows XP with at least two free USB ports.
  2. Installing VMware Workstation 7.1 on Windows, creating two VMs both running openSUSE 12.2 .
  3. Two USB-ethernet dongles that support full-length VLAN packets. My choice is Z-TEK ZK011, which has chip Realtek RTL8150 .

RTL8150 is so good that openSUSE Linux(at least since SuSE 9.0) has built-in driver for it, and vconfig is also a pre-installed package. Once plugged into Linux, Linux creates a eth1 device for it.

Then, to create a vlan=30 interface on eth1,

vconfig add eth1 30

Now ifconfig will show a new nic device named eth1.30 .

Assign an IP to eth1.30 ,

ifconfig eth1.30 10.1.1.5 up

Do the above for the other Linux VM, but assigning a different IP.

Finally, connect the two dongles with ethernet cables via any hub/switch to examine.

Now, I can try to ping with max MTU.

ping -s 1472 -M do 10.1.1.6

Cheers!

The most uncertain factor here is, whether the USB-ethernet dongle itself support full-length VLAN packet. In order to verify it, I once used a cross-cable to connect the two dongles the ping each other.

BTW: Z-TEK ZE543(Moschip MCS7830) seems to not support full-length VLAN packets, at least with default Linux driver.

You must log in to answer this question.

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