>а вывод
>tc -d -s qdisc sh dev eth1
>tc -d -s class sh dev eth1
>что показывает ? [root@gate script]# tc -d -s qdisc sh dev eth1
qdisc htb 1: r2q 10 default 13 direct_packets_stat 0 ver 3.7
Sent 105000 bytes 228 pkts (dropped 18, overlimits 287)
backlog 73p
[root@gate script]# tc -d -s class sh dev eth1
class htb 1:11 parent 1:1 prio 0 quantum 1000 rate 4Kbit ceil 10Kbit burst 1604b/8 mpu 0b cburst 1611b/8 mpu 0b level 0
Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
lended: 0 borrowed: 0 giants: 0
tokens: 2567999 ctokens: 1031680
class htb 1:1 root rate 16Kbit ceil 16Kbit burst 1619b/8 mpu 0b cburst 1619b/8 mpu 0b level 7
Sent 125639 bytes 383 pkts (dropped 0, overlimits 0)
rate 1454bps 6pps
lended: 232 borrowed: 0 giants: 0
tokens: -662571 ctokens: -662571
class htb 1:10 parent 1:1 prio 0 quantum 1000 rate 4Kbit ceil 10Kbit burst 1604b/8 mpu 0b cburst 1611b/8 mpu 0b level 0
Sent 10298 bytes 10 pkts (dropped 0, overlimits 0)
rate 50bps
lended: 7 borrowed: 3 giants: 0
tokens: -2908353 ctokens: 439808
class htb 1:13 parent 1:1 prio 0 quantum 1000 rate 4Kbit ceil 16Kbit burst 1604b/8 mpu 0b cburst 1619b/8 mpu 0b level 0
Sent 115514 bytes 376 pkts (dropped 18, overlimits 0)
rate 1440bps 6pps backlog 3p
lended: 144 borrowed: 229 giants: 0
tokens: -3035329 ctokens: -662571
class htb 1:12 parent 1:1 prio 0 quantum 1000 rate 4Kbit ceil 16Kbit burst 1604b/8 mpu 0b cburst 1619b/8 mpu 0b level 0
Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
lended: 0 borrowed: 0 giants: 0
tokens: 2567999 ctokens: 647999
И при этом:
[root@gate script]# /sbin/tc qdisc add dev eth0 parent 1:10 handle 20: pfifo limit 5
RTNETLINK answers: No such file or directory
[root@gate script]# /sbin/tc qdisc add dev eth0 parent 1:10 handle 20: bfifo limit 1024
RTNETLINK answers: No such file or directory
[root@gate script]# /sbin/tc qdisc add dev eth0 parent 1:10 handle 20: sfq perturb 10
RTNETLINK answers: No such file or directory
[root@gate script]# /sbin/tc qdisc add dev eth0 parent 1:10 handle 20: pfifo_fast
RTNETLINK answers: No such file or directory
[root@gate script]#
Вот эта конструкция работает без проблем:
[root@gate script]# grep /tc /etc/rc.local
/sbin/tc qdisc add dev eth1 root sfq perturb 10
Но хочется похитрее сделать...
Дистрибутив: RH9
сетевушка:
[root@gate script]# ifconfig eth1
eth1 Link encap:Ethernet HWaddr 00:0A:E6:FE:8E:FD
inet addr:192.168.11.2 Bcast:192.168.11.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:386767 errors:0 dropped:0 overruns:0 frame:0
TX packets:402592 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:238683325 (227.6 Mb) TX bytes:237596228 (226.5 Mb)
Interrupt:10 Base address:0xd000