Skip to contentSkip to conversation

Any way to configure a vlan interface to grab ONLY untagged frames?

DISCUSSION Nathan Neulinger 2 participants 3 messages Sep 13, 2015 – Sep 14, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

It seems like running 'vconfig add IFACE 0' and using IFACE.0 would do this, but it doesn't actually seem to work that way.

If I capture on IFACE directly, I'd expect to get all traffic, including the tagged frames (with the tag intact). Looking to be able to bridge/capture/etc. and specifically only receive the untagged frames that haven't already been pulled out into a vlan specific interface.

Is there any way to accomplish this without using ebtables or other similar hacks?

-- Nathan

------------------------------------------------------------
Nathan Neulinger [email protected]
Neulinger Consulting (573) 612-1412

#1 lore raw
Quoted 9 lines · Nathan Neulinger

It seems like running 'vconfig add IFACE 0' and using IFACE.0 would do this, but it doesn't actually seem to work that way.

If I capture on IFACE directly, I'd expect to get all traffic, including the tagged frames (with the tag intact). Looking to be able to bridge/capture/etc. and specifically only receive the untagged frames that haven't already been pulled out into a vlan specific interface.

Is there any way to accomplish this without using ebtables or other similar hacks?

If you are dealing with a hw interface, any interface that supports vlan filtering will by default receive only untagged frames. Only when you put into promiscuous mode, will you receive all frames.

With bridge, you could configure your vlans adjacent to you bridge:

vlan0...N bridge

     |          |
     +-- eth0 --+

This way, configured vlan traffic will go to vlan devices, while all other traffic will got bridge. You can even limit this "all other traffic" further, by turning on vlan filtering on the bridge which will allow you to run eth0 in non-promiscuous mode thus enforcing HW vlan filters.

-vlad

Quoted 10 lines

-- Nathan

------------------------------------------------------------
Nathan Neulinger [email protected]
Neulinger Consulting (573) 612-1412

Signature · 3 lines
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#2 lore raw

That is a quite elegant solution. I will give that a try!

-- Nathan

Quoted 39 lines · Vlad Yasevich
Quoted 9 lines · Nathan Neulinger

It seems like running 'vconfig add IFACE 0' and using IFACE.0 would do this, but it doesn't actually seem to work that way.

If I capture on IFACE directly, I'd expect to get all traffic, including the tagged frames (with the tag intact). Looking to be able to bridge/capture/etc. and specifically only receive the untagged frames that haven't already been pulled out into a vlan specific interface.

Is there any way to accomplish this without using ebtables or other similar hacks?

If you are dealing with a hw interface, any interface that supports vlan filtering will by default receive only untagged frames. Only when you put into promiscuous mode, will you receive all frames.

With bridge, you could configure your vlans adjacent to you bridge:

    vlan0...N   bridge
      |          |
      +-- eth0 --+

This way, configured vlan traffic will go to vlan devices, while all other traffic will got bridge. You can even limit this "all other traffic" further, by turning on vlan filtering on the bridge which will allow you to run eth0 in non-promiscuous mode thus enforcing HW vlan filters.

-vlad

Quoted 10 lines

-- Nathan

------------------------------------------------------------
Nathan Neulinger [email protected]
Neulinger Consulting (573) 612-1412
--
To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 3 lines
------------------------------------------------------------
Nathan Neulinger                       [email protected]
Neulinger Consulting                   (573) 612-1412