filtering on destination MAC address

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi-

i've been trying to setup an outgoing queue that prioritizes traffic depending on whether it recognizes the MAC address the packet is destined to -- and i've not been having any luck. i think my ebtables rule is correct as the packet count when i do an --Lc is increasing in an expected way, but when i look at the tc statistics, i don't think the packets are going into the right queues.

i'm trying to work with eth2 as the interface, so first i create a bridge interface, br2, and attach eth2 to it. as i understand it, this is necessary because otherwise ebtables is not going to function on that interface.

brctl addbr br2
brctl stp br2 off
brctl addif br2 eth2
ifconfig br2 192.168.1.1 netmask 255.255.255.0 broadcast 192.168.1.255
ifconfig eth2 0.0.0.0
route add -net 192.168.1.0 netmask 255.255.255.0 br2


once i have that, i apply the following

tc qdisc add dev br2 root handle 3: htb default 11
tc class add dev br2 parent 3: classid 3:1 htb rate 10mbit
tc class add dev br2 parent 3:1 classid 3:10 htb rate 9990kbit ceil 10mbit
tc class add dev br2 parent 3:1 classid 3:11 htb rate 10kbit ceil 25kbit
tc qdisc add dev br2 parent 3:10 handle 30: sfq
tc qdisc add dev br2 parent 3:11 handle 31: sfq
tc filter add dev br2 protocol ip parent 3: handle 5 fw classid 3:10
ebtables -t nat -A POSTROUTING -o eth2 -p IPV4 -d 00:30:65:17:71:8f -j mark --set-mark 5


please note that the ebtables is being applied to eth2.

when i set this up, all traffic destined for 00:30:65:17:71:8f, i think, is being marked as the --Lc count is increasing. however, when i do a

tc -s qdisc show dev br2

it looks like all the packets are going into queue 11, which is the 10kbit class.

if somebody could shed some light on this problem, i would greatly appreciate it.

r

_______________________________________________
LARTC mailing list / LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux