Check packet vlan tag using Tap virtual interface

Posted by ankit on Server Fault See other posts from Server Fault or by ankit
Published on 2011-03-03T05:22:44Z Indexed on 2011/03/03 7:26 UTC
Read the original article Hit count: 314

Filed under:

Hi all,

I am trying to learn how to implement virtual interfaces using the Tap driver.

So far my understanding is that using the tap driver I can create a virtual interface and then have a userspace program attach to this interface to analyse the data coming into this device.

Now what if I attach a cisco switch to my LAN interface using a TRUNK link, forward all the packets coming into the LAN interface to the virtual tap interface and then in my program attached to this interface do some coding to analyze the vlan tag in the packet and only allow certain vlans to be forwarded to the WAN interface ?

Does this sound plausible or is there is flaw in my basic understanding ?

Thanks for the help!

© Server Fault or respective owner

Related posts about linux-networking

Related posts about interfaces