Re: tc filter for unmatched traffic

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

 



sting wrote:
The last line is supposed to send all unmatched traffic the band 2. However when trying to issue this command I get the following error (for me the parent is 1: and the class I want to send it to is 1:3):

 > tc filter add dev wlan0 protocol ip parent 1: prio 2 flowid 1:3
 > Unknown filter "flowid", hence option "1:3" is unparsable

To answer myself, I found two ways:

1/ Correct the tc filter command above to add a match that always matches (obviously), such as:

tc filter add dev wlan0 protocol ip parent 1: protocol ip prio 1 u32 match u32 0 0 flowid 1:3


You /have/ to provide 'handle' option for fw filter, so it knows about the mark, eg:

tc filter add dev eth0 protocol ip parent 1: handle 10 prio 2 fw flowid 1:3

In the above, handle will match packets mark == 10 . The idea in the (old!) lartc faq was to skip that and mark anything, but it doesn't work. Alternatively, you can use -j CLASSIFY in iptables to set it earlier. Also, some schedulers (such as hfsc) allow doing that in root qdisc.

If you're going to dwell into u32 filter, be sure to check (as LARTC faq is really outdated and inaccurate in this regard):

http://ace-host.stuart.id.au/russell/files/tc/doc/cls_u32.txt


--
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux