How filter Ack or SYN packets

1

I am trying to create a traffic shaping by tc filters.

In this traffic shaping , I have two class's . one of them is to control user's traffic and other which has more bandwidth rate is to Ack or SYN packets.

tc qdisc add dev eth0 handle 1: root

tc class add dev eth0 parent 1: classid 1:1 htb rate 1mbit
tc class add dev eth0 parent 1: classid 1:2 htb rate 20mbit

tc filter add dev eth0 protocol ip prio 10 parent 1:0 u32 match ip 192.168.0.0/16 flowid 1:1

But I don't know how can filter Ack or SYN packets .

How can i do it ? tanks

samie

Posted 2015-05-13T12:17:32.623

Reputation: 21

Answers

2

From what I learnt, the filtering features of tc aren't as flexible as the ones you can get with iptables (where you can specify filtering by SYN/ACK flag presence). You can use iptables to "mark" each packet using such filtering, then use let tc recognize those marks to classify & prioritize the packets.

See this tutorial, especially paragraph 15.10.2, for an example setup using this technique.

ris8_allo_zen0

Posted 2015-05-13T12:17:32.623

Reputation: 183