Skip to contentSkip to conversation

ebtables VLAN filtering

DISCUSSION Jonathan Tripathy 3 participants 3 messages Feb 7, 2011

lore
Share & tools
lore
#0 lore raw

Hi Everyone,

With ebtables, is it possible to filter via the VLAN interface (e.g. eth0.3 for VLAN3) using the normal -i and -o parameters? I'd like to filter via the interface rather than using the tag with --vlan-id if possible

Thanks

#1 lore raw
Quoted 4 lines · Jonathan Tripathy

With ebtables, is it possible to filter via the VLAN interface (e.g. eth0.3 for VLAN3) using the normal -i and -o parameters? I'd like to filter via the interface rather than using the tag with --vlan-id if possible

Yes it is.

(I am currently doing exactly that on a system with 30+ VLAN interfaces.)

It is my (mis)understanding that the --vlan-id is used to match traffic to/from a specific tagged VLAN on the /raw/ interface. (I don't know for sure b/c I never match on the raw interface. I always use the VLAN sub-interface.)

Grant. . . .

#2 lore raw
In reply to Jonathan Tripathy

Hello,

Quoted 5 lines · Jonathan Tripathy

With ebtables, is it possible to filter via the VLAN interface (e.g. eth0.3 for VLAN3) using the normal -i and -o parameters? I'd like to filter via the interface rather than using the tag with --vlan-id if possible

It depends whether you added the raw interface eth0 or the VLAN interface eth0.3 to the bridge. If you added the raw interface eth0, then the bridge and ebtables should see tagged frames in all VLANs from/to eth0. If you added the VLAN interface eth0.3, then the bridge and ebtables should see untagged frames in VLAN 3 from/to eth0.3.