Skip to contentSkip to conversation

tc filter hash table

DISCUSSION Alan Goodman 2 participants 3 messages May 15, 2015

lore
Share & tools
lore
#0 lore raw

Stats you see are 'smoothed' in my experience. So percieved 'lag' of a few seconds is normal in my experience.

HTB does not drop unclassified packets when used with no default.

Alan

Quoted 26 lines · ravin goyal

I have seen unknown behaviour as
i have not setup default class for unclassified data still it is going thro seen from nowhere and i am still in doubt how is it possible ?

Another thing i observe ,sent bytes in classes for respective data comes after some delay for instance

as i have set class 1:20 for tcp port 80 when i test , bytes seen in class coming after some delay or lag

same for other class(udp port 53) except with icmp related class (it works just fine )

bytes come after some time when I ran dig or nslookup like I have to run tc -s -d class show dev wlan0 multiple time again and again to see the bytes reflected and after some time data comes seen through class

what could be the issue .Please go through this and suggest some corrections

Rav
--
To unsubscribe from this list: send the line "unsubscribe lartc" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#1 lore raw

I have setup tc filter hash table as below:

tc qdisc add dev wlan0 handle 1: root htb
tc class add dev wlan0 parent 1: classid 1:10 htb rate 1Mbps ceil 1Mbps tc class add dev wlan0 parent 1:10 classid 1:20 htb rate 512Kbps ceil 1Mbps quantum 3000
tc class add dev wlan0 parent 1:10 classid 1:30 htb rate 256Kbps ceil 1Mbps quantum 3000
tc class add dev wlan0 parent 1:10 classid 1:40 htb rate 128Kbps ceil 1Mbps quantum 3000

tc qdisc add dev wlan0 parent 1:20 sfq
tc qdisc add dev wlan0 parent 1:30 sfq
tc qdisc add dev wlan0 parent 1:40 sfq

tc filter add dev wlan0 parent 1: protocol ip u32 tc filter add dev wlan0 parent 1: handle 1: u32 divisor 1 tc filter add dev wlan0 parent 1: handle 2: u32 divisor 1 tc filter add dev wlan0 parent 1: handle 3: u32 divisor 1

tc filter add dev wlan0 parent 1: handle 0x2 u32 ht 800:0 match ip protocol 17 0xff link 2:
tc filter add dev wlan0 parent 1: handle 0x1 u32 ht 2:0 match tcp dst 0x35 0xffff flowid 1:40

tc filter add dev wlan0 parent 1: handle 0x3 u32 ht 800:0 match ip protocol 1 0xff link 3:
tc filter add dev wlan0 parent 1: handle 0x1 u32 ht 3:0 match ip dst 192.94.73.15 flowid 1:30

tc filter add dev wlan0 parent 1: handle 0x1 u32 ht 800:0 match ip protocol 6 0xff link 1:
tc filter add dev wlan0 parent 1: handle 0x1 u32 ht 1:0 match tcp dst 0x50 0xffff flowid 1:20

I have seen unknown behaviour as
i have not setup default class for unclassified data still it is going thro seen from nowhere and i am still in doubt how is it possible ?

Another thing i observe ,sent bytes in classes for respective data comes after some delay for instance

as i have set class 1:20 for tcp port 80 when i test , bytes seen in class coming after some delay or lag

same for other class(udp port 53) except with icmp related class (it works just fine )

bytes come after some time when I ran dig or nslookup like I have to run tc -s -d class show dev wlan0 multiple time again and again to see the bytes reflected and after some time data comes seen through class

what could be the issue .Please go through this and suggest some corrections

Rav

#2 lore raw
In reply to Alan Goodman

The lag/smoothing effect is seconds in correctly working setups.

I'm not familiar enough with the code to tell you how/whats of htb beyond that it doesnt drop unclassified traffic.

Most likely your filter section is missing the packets you are interested in, or something along those lines. Unfortunately I chose to never get my head around the u32 classifier as it didnt fit my usage case well. So hopefully someone else can help with that.

Alan

Quoted 7 lines · ravin goyal

Okay
What if this seconds lap sometime turns into couple of minutes how am supposed to do then there must be reason why is this happens? Isn't it And how does htb send unclassified data if no default class is set

Thanks
Rav