VLAN tagging

Can it be done with the Ethernet Sheild and associated Library?

Can it be done with the Ethernet Sheild and associated Library?

Depends on what "it" is, which ethernet shield, and which library you are talking about.

The Arduino Ethernet Sheild and the Ethernet Library.

It's not something built in to any library I know. You'd have to write your own low-level, raw Ethernet frames.

What’s the problem you’re trying to solve?

I'm trying to implement vlan tagging?

Basically you're going to need to tell your router/switch that the Arduino's Ethernet port is a trunk port (or does trunk autosensing), then you're going to need to manually write your Ethernet frames to have an 802.1Q header before the Ethernet Type field:

and when you receive packets you'll need to manually decode the frames to pull out the vlan tags.

I don't think you'd be able to use the regular Ethernet library to do any of this; you'd have to write your own interface to the WS5100. I looked through the WS5100.cpp and .h files and didn't see anything about raw frames so I'm not sure it's even possible, but I didn't dig that deep so may have easily missed something.

In any event given the huge RAM etc. limitations on an Arduino I can't think of why this would be a good idea to try other than "because I can", but please let us know if you pull it off -- it would be very impressive.

Good luck!