Re: HFSC

Linux Advanced Routing and Traffic Control

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

 



Thanks, Patrick. That makes it a bit harder to manage from a remote machine. I'll have to be very careful with that. I'll try to figure out the implications of the default classification and send more email if I can't get it.

So I reordered the commands and changed them around. It looks like I am either doing something strange or I have found a bug. When I execute the following script, the UDP traffic on port 1234 continues for a few seconds and then stops. When I examine the tc data, it shows no change in the periods or amount of bytes flowing after the flow stops. I am enclosing the command and the output.

Thanks again!

Patrick McHardy wrote:
Lawrence MacIntyre wrote:

/usr/local/bin/tc qdisc add dev eth0 root handle 1: hfsc

/usr/local/bin/tc class add dev eth0 parent 1: classid 1:1 hfsc ul m1 30mbit d 0 m2 30mbit ls m1 30mbit d 0 m2 30mbit

When the second command is executed, the machine simply drops all packets going through it.


Unlike HTB, HFSC drops unclassified packets. You need to setup filters
or use the "default" classification.

Regards
Patrick

-- Lawrence MacIntyre 865.574.8696 lpz@xxxxxxxx Oak Ridge National Laboratory High Performance Information Infrastructure Technology Group
#!/bin/bash
/usr/local/bin/tc qdisc add dev eth0 root handle 1: hfsc 

/usr/local/bin/tc class add dev eth0 parent 1: classid 1:1 hfsc ul m1 80mbit d 500 m2 30mbit ls m1 80mbit d 500 m2 30mbit
/usr/local/bin/tc class add dev eth0 parent 1:1 classid 1:10 hfsc ls m1 50mbit d 500 m2 20mbit
/usr/local/bin/tc class add dev eth0 parent 1:1 classid 1:11 hfsc ls m1 20mbit d 500 m2 10mbit
/usr/local/bin/tc class add dev eth0 parent 1:1 classid 1:12 hfsc ls m1 10mbit d 500 m2 10mbit

/usr/local/bin/tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip dport 1234 0xffff flowid 1:10
/usr/local/bin/tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip dport 5001 0xffff flowid 1:11
/usr/local/bin/tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip dport 22 0xffff flowid 1:12
/usr/local/bin/tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip sport 22 0xffff flowid 1:12
[root@castor QoS]# ./tcshow.conf
class hfsc 1: root
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
 period 0 level 2
 
class hfsc 1:11 parent 1:1 ls m1 20Mbit d 500us m2 10Mbit
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
 period 0 level 0
 
class hfsc 1:1 parent 1: ls m1 80Mbit d 500us m2 30Mbit ul m1 80Mbit d 500us m2
30Mbit
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
 period 492 work 7280180 bytes level 1
 
class hfsc 1:10 parent 1:1 ls m1 50Mbit d 500us m2 20Mbit
 Sent 7280180 bytes 5314 pkts (dropped 0, overlimits 0)
 period 492 work 7280180 bytes level 0
 
class hfsc 1:12 parent 1:1 ls m1 10Mbit d 500us m2 10Mbit
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
 period 0 level 0
 
qdisc hfsc 1:
 Sent 7280180 bytes 5314 pkts (dropped 0, overlimits 6570)
filter parent 1: protocol ip pref 1 u32
filter parent 1: protocol ip pref 1 u32 fh 800: ht divisor 1
filter parent 1: protocol ip pref 1 u32 fh 800::800 order 2048 key ht 800 bkt 0
flowid 1:10
  match 000004d2/0000ffff at 20
filter parent 1: protocol ip pref 1 u32 fh 800::801 order 2049 key ht 800 bkt 0
flowid 1:11
  match 00001389/0000ffff at 20
filter parent 1: protocol ip pref 1 u32 fh 800::802 order 2050 key ht 800 bkt 0
flowid 1:12
  match 00000016/0000ffff at 20
filter parent 1: protocol ip pref 1 u32 fh 800::803 order 2051 key ht 800 bkt 0
flowid 1:12
  match 00160000/ffff0000 at 20
[root@castor QoS]# ./tcshow.conf
class hfsc 1: root
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
 period 0 level 2
 
class hfsc 1:11 parent 1:1 ls m1 20Mbit d 500us m2 10Mbit
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
 period 0 level 0
 
class hfsc 1:1 parent 1: ls m1 80Mbit d 500us m2 30Mbit ul m1 80Mbit d 500us m2
30Mbit
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
 period 965 work 14246630 bytes level 1
 
class hfsc 1:10 parent 1:1 ls m1 50Mbit d 500us m2 20Mbit
 Sent 14246630 bytes 10399 pkts (dropped 0, overlimits 0)
 period 965 work 14246630 bytes level 0
 
class hfsc 1:12 parent 1:1 ls m1 10Mbit d 500us m2 10Mbit
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
 period 0 level 0
 
qdisc hfsc 1:
 Sent 14246630 bytes 10399 pkts (dropped 32, overlimits 12895)
filter parent 1: protocol ip pref 1 u32
filter parent 1: protocol ip pref 1 u32 fh 800: ht divisor 1
filter parent 1: protocol ip pref 1 u32 fh 800::800 order 2048 key ht 800 bkt 0
flowid 1:10
  match 000004d2/0000ffff at 20
filter parent 1: protocol ip pref 1 u32 fh 800::801 order 2049 key ht 800 bkt 0
flowid 1:11
  match 00001389/0000ffff at 20
filter parent 1: protocol ip pref 1 u32 fh 800::802 order 2050 key ht 800 bkt 0
flowid 1:12
  match 00000016/0000ffff at 20
filter parent 1: protocol ip pref 1 u32 fh 800::803 order 2051 key ht 800 bkt 0
flowid 1:12
  match 00160000/ffff0000 at 20
[root@castor QoS]# ./tcshow.conf
class hfsc 1: root
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
 period 0 level 2
 
class hfsc 1:11 parent 1:1 ls m1 20Mbit d 500us m2 10Mbit
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
 period 0 level 0
 
class hfsc 1:1 parent 1: ls m1 80Mbit d 500us m2 30Mbit ul m1 80Mbit d 500us m2
30Mbit
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
 period 965 work 14246630 bytes level 1
 
class hfsc 1:10 parent 1:1 ls m1 50Mbit d 500us m2 20Mbit
 Sent 14246630 bytes 10399 pkts (dropped 0, overlimits 0)
 period 965 work 14246630 bytes level 0
 
class hfsc 1:12 parent 1:1 ls m1 10Mbit d 500us m2 10Mbit
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
 period 0 level 0
 
qdisc hfsc 1:
 Sent 14246630 bytes 10399 pkts (dropped 33, overlimits 12895)
filter parent 1: protocol ip pref 1 u32
filter parent 1: protocol ip pref 1 u32 fh 800: ht divisor 1
filter parent 1: protocol ip pref 1 u32 fh 800::800 order 2048 key ht 800 bkt 0
flowid 1:10
  match 000004d2/0000ffff at 20
filter parent 1: protocol ip pref 1 u32 fh 800::801 order 2049 key ht 800 bkt 0
flowid 1:11
  match 00001389/0000ffff at 20
filter parent 1: protocol ip pref 1 u32 fh 800::802 order 2050 key ht 800 bkt 0
flowid 1:12
  match 00000016/0000ffff at 20
filter parent 1: protocol ip pref 1 u32 fh 800::803 order 2051 key ht 800 bkt 0
flowid 1:12
  match 00160000/ffff0000 at 20
[root@castor QoS]# ./hfscdel.conf

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