Re: Problem with traffic scheduling using DRR with HTB or with TBF

Linux Advanced Routing and Traffic Control

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

 



Hi , the solution is:

# adding the root qdisc and assign Deficit Round Robin to it
tc qdisc add dev eth0 root handle 1: drr
#
# adding classes to the root qdisc , every class has a quantum of 1514
which represent the frame size

     tc class add dev eth0 parent 1: classid 1:1 drr quantum 1514
     tc class add dev eth0 parent 1: classid 1:2 drr quantum 1514
     tc class add dev eth0 parent 1: classid 1:3 drr quantum 1514
     tc class add dev eth0 parent 1: classid 1:4 drr quantum 1514
     tc class add dev eth0 parent 1: classid 1:5 drr quantum 1514
     tc class add dev eth0 parent 1: classid 1:6 drr quantum 1514
     tc class add dev eth0 parent 1: classid 1:7 drr quantum 1514
     tc class add dev eth0 parent 1: classid 1:8 drr quantum 1514
     tc class add dev eth0 parent 1: classid 1:9 drr quantum 1514
     tc class add dev eth0 parent 1: classid 1:10 drr quantum 1514
     tc class add dev eth0 parent 1: classid 1:11 drr quantum 1514
     tc class add dev eth0 parent 1: classid 1:12 drr quantum 1514
     tc class add dev eth0 parent 1: classid 1:13 drr quantum 1514

# assigning a pfifo dqisc with queue size of 256 packets  to every class
       tc qdisc add dev eth0 parent 1:1 handle 1001: pfifo limit 256
       tc qdisc add dev eth0 parent 1:2 handle 12: pfifo limit 256
       tc qdisc add dev eth0 parent 1:3 handle 13: pfifo limit 256
       tc qdisc add dev eth0 parent 1:4 handle 14: pfifo limit 256
       tc qdisc add dev eth0 parent 1:5 handle 15: pfifo limit 256
       tc qdisc add dev eth0 parent 1:6 handle 16: pfifo limit 256
       tc qdisc add dev eth0 parent 1:7 handle 17: pfifo limit 256
       tc qdisc add dev eth0 parent 1:8 handle 18: pfifo limit 256
       tc qdisc add dev eth0 parent 1:9 handle 19: pfifo limit 256
       tc qdisc add dev eth0 parent 1:10 handle 20: pfifo limit 256
       tc qdisc add dev eth0 parent 1:11 handle 21: pfifo limit 256
       tc qdisc add dev eth0 parent 1:12 handle 22: pfifo limit 256
       tc qdisc add dev eth0 parent 1:13 handle 23: pfifo limit 256
#
# every filter match the source ip of every packet and is directed to
the appropriate class
   #the arp filter is very important
  tc filter add dev eth0 protocol arp parent 1:0 prio 1 u32 match u32
0 0 flowid 1:11
#
  tc filter add dev eth0 parent 1:0 protocol ip prio 2 u32 match ip
src 192.168.1.115 classid 1:1
  tc filter add dev eth0 parent 1:0 protocol ip prio 3 u32 match ip
src 192.168.1.117 classid 1:2
  tc filter add dev eth0 parent 1:0 protocol ip prio 4 u32 match ip
src 192.168.1.120 classid 1:3
  tc filter add dev eth0 parent 1:0 protocol ip prio 5 u32 match ip
src 192.168.1.121 classid 1:4
  tc filter add dev eth0 parent 1:0 protocol ip prio 6 u32 match ip
src 192.168.1.122 classid 1:5
  tc filter add dev eth0 parent 1:0 protocol ip prio 7 u32 match ip
src 192.168.1.123 classid 1:6
  tc filter add dev eth0 parent 1:0 protocol ip prio 8 u32 match ip
src 192.168.1.124 classid 1:7
  tc filter add dev eth0 parent 1:0 protocol ip prio 9 u32 match ip
src 192.168.1.125 classid 1:8
  tc filter add dev eth0 parent 1:0 protocol ip prio 10 u32 match ip
src 192.168.1.126 classid 1:9
  tc filter add dev eth0 parent 1:0 protocol ip prio 11 u32 match ip
src 192.168.1.127 classid 1:10
  tc filter add dev eth0 parent 1:0 protocol ip prio 12 u32 match ip
dst 192.168.1.0/24 classid 1:12
  tc filter add dev eth0 parent 1:0 protocol ip prio 13 u32 match ip
dst 0.0.0.0/0 classid 1:13
#
I have tested it and is  working correctly.

Regards

On Thu, Feb 19, 2015 at 10:36 AM, rp-user <pinaroland@xxxxxxxxx> wrote:
> In this case the default qdisc must be 2:10 but which under drr handle 2:
> How can i configure this? What do think about the tbf which seems
> strange when after 50sec all bandwith are dropped.
> Regards
> On Thu, Feb 19, 2015 at 2:48 AM, Dave Taht <dave.taht@xxxxxxxxx> wrote:
>> at first glance, default 0 is wrong for htb. That sends all packets
>> through the default qdisc.
> --
> To unsubscribe from this list: send the line "unsubscribe lartc" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe lartc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




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