Skip to contentSkip to conversation

filtering

LARTC Grace Baldonasa 3 participants 3 messages Apr 25, 2005 – Apr 26, 2005

lore
Share & tools
lore
#1 lore raw
Quoted 3 lines · Grace Baldonasa

Hi,

Can I use mac address as classifiers in the filters?

Yes for dst mac A1:B2:C3:D4:E5:F6 it's

tc filter add dev eth0 parent 1:0 protocol ip prio 1 \
u32 match u16 0x0800 0xFFFF at -2 \
match u32 0xC3D4E5F6 0xFFFFFFFF at -12 \
match u16 0xA1B2 0xFFFF at -14 \
flowid 1:1

For src I assume you can just change the offsets - I've not tried it as there is an iptables match for src MAC.

Andy.

_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

#2 lore raw
In reply to Grace Baldonasa

Hi Grace,

I guess the best(most flexible) way is to use iptables(netfilter) to mark the packets and then use tc filter to match the marks.

"Traffic-Control-HOWTO" should answer most of your questions.
http://linux-ip.net/articles/Traffic-Control-HOWTO/index.html

Leo

Quoted 10 lines · Grace Baldonasa

Hi,

Can I use mac address as classifiers in the filters?

Grace
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc