CBQ

Petr Plesnik plesnik_p na inetbrno.cz
Pátek Leden 26 16:52:14 CET 2001


# Sample configuration file: cbq-1280.My_first_shaper
#
# --------------------------------------------------------------------------
DEVICE=eth1,10Mbit,1Mbit
RATE=128Kbit
WEIGHT=10Kbit
PRIO=5
RULE=x.x.x.x/32
# --------------------------------------------------------------------------
#

a v logu je:

ip link

1: lo: <LOOPBACK,UP> mtu 3924 qdisc noqueue
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 100
    link/ether 00:4f:49:0b:ce:54 brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc cbq qlen 100
    link/ether 00:4f:49:0b:c4:cb brd ff:ff:ff:ff:ff:ff
4: eth2: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 100
    link/ether 00:00:21:67:3d:27 brd ff:ff:ff:ff:ff:ff
5: eth3: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 100
    link/ether 00:00:b4:c6:df:ba brd ff:ff:ff:ff:ff:ff
6: tunl0 na NONE: <NOARP> mtu 1480 qdisc noop
    link/ipip 0.0.0.0 brd 0.0.0.0
7: gre0 na NONE: <NOARP> mtu 1476 qdisc noop
    link/gre 0.0.0.0 brd 0.0.0.0
8: teql0: <NOARP> mtu 1500 qdisc noop qlen 100
    link/generic
9: eth4: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 100
    link/ether 00:4f:4c:04:2c:bb brd ff:ff:ff:ff:ff:ff

tc qdisc del dev eth1 root


tc qdisc add dev eth1 root handle 1:0 cbq bandwidth 10Mbit avpkt 1000 cell 8


tc class add dev eth1 parent 1:0 classid 1:1 cbq bandwidth 10Mbit rate
10Mbit weight 1Mbit
 prio 8 allot 1514 cell 8 maxburst 20 avpkt 1000

Illegal "weight"

tc class add dev eth1 parent 1:1 classid 1:1000 cbq bandwidth 10Mbit rate
64Kbit
 weight 6Kbit
 prio 5
 allot 1514 cell 8 maxburst 20 avpkt 1000 bounded

Illegal "rate"

tc qdisc add dev eth1 parent 1:1000 tbf rate 64Kbit
 buffer 10Kb/8 limit 15Kb mtu 1500

Illegal "rate"

tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip dst
62.168.57.64/32
 flowid 1:1000

Illegal "match"



Další informace o konferenci Linux