找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 4253|回复: 6

上行带宽管制 突然失效!是怎么问题呢?

[复制链接]
发表于 2006-11-11 07:45:37 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

×
上行管制的端口 设置为ppp0 了  但 过了一段时间管制就失效了    我是ADSL拨号的!



发现问题是 只要ADSL短线 后再拨号  上行限制就不起作用    下行限制正常!
我应该如何修改一下代码 使重新拨号后  上行管制生效呢  谢谢
我的代码如下
在防火墙配置加上了如下代码
ptables -t mangle -A PREROUTING -s 192.168.1.2 -j MARK --set-mark 20
iptables -t mangle -A PREROUTING -s 192.168.1.3 -j MARK --set-mark 30
iptables -t mangle -A PREROUTING -s 192.168.1.4 -j MARK --set-mark 40
iptables -t mangle -A PREROUTING -s 192.168.1.5 -j MARK --set-mark 50
iptables -t mangle -A PREROUTING -s 192.168.1.6 -j MARK --set-mark 60
iptables -t mangle -A PREROUTING -s 192.168.1.7 -j MARK --set-mark 70
iptables -t mangle -A PREROUTING -s 192.168.1.8 -j MARK --set-mark 80
iptables -t mangle -A PREROUTING -s 192.168.1.9 -j MARK --set-mark 90
iptables -t mangle -A PREROUTING -s 192.168.1.10 -j MARK --set-mark 100
iptables -t mangle -A PREROUTING -s 192.168.1.11 -j MARK --set-mark 110
iptables -t mangle -A PREROUTING -s 192.168.1.12 -j MARK --set-mark 120
iptables -t mangle -A PREROUTING -s 192.168.1.13 -j MARK --set-mark 130
iptables -t mangle -A PREROUTING -s 192.168.1.14 -j MARK --set-mark 140
iptables -t mangle -A PREROUTING -s 192.168.1.15 -j MARK --set-mark 150
iptables -t mangle -A PREROUTING -s 192.168.1.16 -j MARK --set-mark 160
iptables -t mangle -A PREROUTING -s 192.168.1.17 -j MARK --set-mark 170
iptables -t mangle -A PREROUTING -s 192.168.1.18 -j MARK --set-mark 180
iptables -t mangle -A PREROUTING -s 192.168.1.19 -j MARK --set-mark 190
iptables -t mangle -A PREROUTING -s 192.168.1.20 -j MARK --set-mark 200
iptables -t mangle -A PREROUTING -s 192.168.1.21 -j MARK --set-mark 210
iptables -t mangle -A PREROUTING -s 192.168.1.22 -j MARK --set-mark 220
iptables -t mangle -A PREROUTING -s 192.168.1.23 -j MARK --set-mark 230
iptables -t mangle -A PREROUTING -s 192.168.1.24 -j MARK --set-mark 240
iptables -t mangle -A PREROUTING -s 192.168.1.25 -j MARK --set-mark 250
iptables -t mangle -A PREROUTING -s 192.168.1.26 -j MARK --set-mark 260
iptables -t mangle -A PREROUTING -s 192.168.1.27 -j MARK --set-mark 270
iptables -t mangle -A PREROUTING -s 192.168.1.28 -j MARK --set-mark 280
iptables -t mangle -A PREROUTING -s 192.168.1.29 -j MARK --set-mark 290
iptables -t mangle -A PREROUTING -s 192.168.1.30 -j MARK --set-mark 300
iptables -t mangle -A PREROUTING -s 192.168.1.31 -j MARK --set-mark 310
iptables -t mangle -A PREROUTING -s 192.168.1.32 -j MARK --set-mark 320
iptables -t mangle -A PREROUTING -s 192.168.1.33 -j MARK --set-mark 330


# downloads
# 下载方面

iptables -t mangle -A POSTROUTING -d 192.168.1.2 -j MARK --set-mark 20
iptables -t mangle -A POSTROUTING -d 192.168.1.3 -j MARK --set-mark 30
iptables -t mangle -A POSTROUTING -d 192.168.1.4 -j MARK --set-mark 40
iptables -t mangle -A POSTROUTING -d 192.168.1.5 -j MARK --set-mark 50
iptables -t mangle -A POSTROUTING -d 192.168.1.6 -j MARK --set-mark 60
iptables -t mangle -A POSTROUTING -d 192.168.1.7 -j MARK --set-mark 70
iptables -t mangle -A POSTROUTING -d 192.168.1.8 -j MARK --set-mark 80
iptables -t mangle -A POSTROUTING -d 192.168.1.9 -j MARK --set-mark 90
iptables -t mangle -A POSTROUTING -d 192.168.1.10 -j MARK --set-mark 100
iptables -t mangle -A POSTROUTING -d 192.168.1.11 -j MARK --set-mark 110
iptables -t mangle -A POSTROUTING -d 192.168.1.12 -j MARK --set-mark 120
iptables -t mangle -A POSTROUTING -d 192.168.1.13 -j MARK --set-mark 130
iptables -t mangle -A POSTROUTING -d 192.168.1.14 -j MARK --set-mark 140
iptables -t mangle -A POSTROUTING -d 192.168.1.15 -j MARK --set-mark 150
iptables -t mangle -A POSTROUTING -d 192.168.1.16 -j MARK --set-mark 160
iptables -t mangle -A POSTROUTING -d 192.168.1.17 -j MARK --set-mark 170
iptables -t mangle -A POSTROUTING -d 192.168.1.18 -j MARK --set-mark 180
iptables -t mangle -A POSTROUTING -d 192.168.1.19 -j MARK --set-mark 190
iptables -t mangle -A POSTROUTING -d 192.168.1.20 -j MARK --set-mark 200
iptables -t mangle -A POSTROUTING -d 192.168.1.21 -j MARK --set-mark 210
iptables -t mangle -A POSTROUTING -d 192.168.1.22 -j MARK --set-mark 220
iptables -t mangle -A POSTROUTING -d 192.168.1.23 -j MARK --set-mark 230
iptables -t mangle -A POSTROUTING -d 192.168.1.24 -j MARK --set-mark 240
iptables -t mangle -A POSTROUTING -d 192.168.1.25 -j MARK --set-mark 250
iptables -t mangle -A POSTROUTING -d 192.168.1.26 -j MARK --set-mark 260
iptables -t mangle -A POSTROUTING -d 192.168.1.27 -j MARK --set-mark 270
iptables -t mangle -A POSTROUTING -d 192.168.1.28 -j MARK --set-mark 280
iptables -t mangle -A POSTROUTING -d 192.168.1.29 -j MARK --set-mark 290
iptables -t mangle -A POSTROUTING -d 192.168.1.30 -j MARK --set-mark 300
iptables -t mangle -A POSTROUTING -d 192.168.1.31 -j MARK --set-mark 310
iptables -t mangle -A POSTROUTING -d 192.168.1.32 -j MARK --set-mark 320
iptables -t mangle -A POSTROUTING -d 192.168.1.33 -j MARK --set-mark 330


在  /etc/rc.d/rc.local 下入了如下代码:

#!/bin/sh
#
# Coyote local command init script

# 清除 eth1 所有队列规则
tc qdisc del dev ppp0 root 2>/dev/null

# 定义最顶层(根)队列规则,并指定 default 类别编号
tc qdisc add dev ppp0 root handle 10: htb default 340

# 定义第一层的 10:1 类别 (总频宽)
tc class add dev ppp0 parent 10: classid 10:1 htb rate 64kbps ceil 64kbps

# 定义第二层叶类别
# rate 保证频宽,ceil 最大频宽,prio 优先权

tc class add dev ppp0 parent 10:1 classid 10:20 htb rate 5kbps ceil 10kbps prio 1
tc class add dev ppp0 parent 10:1 classid 10:30 htb rate 5kbps ceil 10kbps prio 1
tc class add dev ppp0 parent 10:1 classid 10:40 htb rate 5kbps ceil 10kbps prio 1
tc class add dev ppp0 parent 10:1 classid 10:50 htb rate 5kbps ceil 10kbps prio 1
tc class add dev ppp0 parent 10:1 classid 10:60 htb rate 5kbps ceil 10kbps prio 1
tc class add dev ppp0 parent 10:1 classid 10:70 htb rate 5kbps ceil 10kbps prio 1
tc class add dev ppp0 parent 10:1 classid 10:80 htb rate 5kbps ceil 10kbps prio 1
tc class add dev ppp0 parent 10:1 classid 10:90 htb rate 5kbps ceil 10kbps prio 1
tc class add dev ppp0 parent 10:1 classid 10:100 htb rate 5kbps ceil 10kbps prio 1
tc class add dev ppp0 parent 10:1 classid 10:110 htb rate 5kbps ceil 10kbps prio 1
tc class add dev ppp0 parent 10:1 classid 10:120 htb rate 5kbps ceil 10kbps prio 1
tc class add dev ppp0 parent 10:1 classid 10:130 htb rate 5kbps ceil 10kbps prio 1
tc class add dev ppp0 parent 10:1 classid 10:140 htb rate 5kbps ceil 10kbps prio 1
tc class add dev ppp0 parent 10:1 classid 10:150 htb rate 5kbps ceil 10kbps prio 1
tc class add dev ppp0 parent 10:1 classid 10:160 htb rate 5kbps ceil 10kbps prio 1
tc class add dev ppp0 parent 10:1 classid 10:170 htb rate 5kbps ceil 10kbps prio 1
tc class add dev ppp0 parent 10:1 classid 10:180 htb rate 5kbps ceil 10kbps prio 1
tc class add dev ppp0 parent 10:1 classid 10:190 htb rate 5kbps ceil 10kbps prio 1
tc class add dev ppp0 parent 10:1 classid 10:200 htb rate 5kbps ceil 10kbps prio 1
tc class add dev ppp0 parent 10:1 classid 10:210 htb rate 5kbps ceil 10kbps prio 1
tc class add dev ppp0 parent 10:1 classid 10:220 htb rate 5kbps ceil 10kbps prio 1
tc class add dev ppp0 parent 10:1 classid 10:230 htb rate 5kbps ceil 10kbps prio 1
tc class add dev ppp0 parent 10:1 classid 10:240 htb rate 5kbps ceil 10kbps prio 1
tc class add dev ppp0 parent 10:1 classid 10:250 htb rate 5kbps ceil 10kbps prio 1
tc class add dev ppp0 parent 10:1 classid 10:260 htb rate 5kbps ceil 10kbps prio 1
tc class add dev ppp0 parent 10:1 classid 10:270 htb rate 5kbps ceil 10kbps prio 1
tc class add dev ppp0 parent 10:1 classid 10:280 htb rate 5kbps ceil 10kbps prio 1
tc class add dev ppp0 parent 10:1 classid 10:290 htb rate 5kbps ceil 10kbps prio 1
tc class add dev ppp0 parent 10:1 classid 10:300 htb rate 5kbps ceil 10kbps prio 1
tc class add dev ppp0 parent 10:1 classid 10:310 htb rate 5kbps ceil 10kbps prio 1
tc class add dev ppp0 parent 10:1 classid 10:320 htb rate 5kbps ceil 10kbps prio 1
tc class add dev ppp0 parent 10:1 classid 10:330 htb rate 5kbps ceil 10kbps prio 1
tc class add dev ppp0 parent 10:1 classid 10:340 htb rate 2kbps ceil 2kbps prio 1



# 定义各叶类别的队列规则
# parent 类别编号,handle 叶类别队列规则编号
# 由于采用 fw 过滤器,所以此处使用 pfifo 的队列规则即可
tc qdisc add dev ppp0 parent 10:20 handle 1002: pfifo
tc qdisc add dev ppp0 parent 10:30 handle 1003: pfifo
tc qdisc add dev ppp0 parent 10:40 handle 1004: pfifo
tc qdisc add dev ppp0 parent 10:50 handle 1005: pfifo
tc qdisc add dev ppp0 parent 10:60 handle 1006: pfifo
tc qdisc add dev ppp0 parent 10:70 handle 1007: pfifo
tc qdisc add dev ppp0 parent 10:80 handle 1008: pfifo
tc qdisc add dev ppp0 parent 10:90 handle 1009: pfifo
tc qdisc add dev ppp0 parent 10:100 handle 1010: pfifo
tc qdisc add dev ppp0 parent 10:110 handle 1011: pfifo
tc qdisc add dev ppp0 parent 10:120 handle 1012: pfifo
tc qdisc add dev ppp0 parent 10:130 handle 1013: pfifo
tc qdisc add dev ppp0 parent 10:140 handle 1014: pfifo
tc qdisc add dev ppp0 parent 10:150 handle 1015: pfifo
tc qdisc add dev ppp0 parent 10:160 handle 1016: pfifo
tc qdisc add dev ppp0 parent 10:170 handle 1017: pfifo
tc qdisc add dev ppp0 parent 10:180 handle 1018: pfifo
tc qdisc add dev ppp0 parent 10:190 handle 1019: pfifo
tc qdisc add dev ppp0 parent 10:200 handle 1020: pfifo
tc qdisc add dev ppp0 parent 10:210 handle 1021: pfifo
tc qdisc add dev ppp0 parent 10:220 handle 1022: pfifo
tc qdisc add dev ppp0 parent 10:230 handle 1023: pfifo
tc qdisc add dev ppp0 parent 10:240 handle 1024: pfifo
tc qdisc add dev ppp0 parent 10:250 handle 1025: pfifo
tc qdisc add dev ppp0 parent 10:260 handle 1026: pfifo
tc qdisc add dev ppp0 parent 10:270 handle 1027: pfifo
tc qdisc add dev ppp0 parent 10:280 handle 1028: pfifo
tc qdisc add dev ppp0 parent 10:290 handle 1029: pfifo
tc qdisc add dev ppp0 parent 10:300 handle 1030: pfifo
tc qdisc add dev ppp0 parent 10:310 handle 1031: pfifo
tc qdisc add dev ppp0 parent 10:320 handle 1032: pfifo
tc qdisc add dev ppp0 parent 10:330 handle 1033: pfifo
tc qdisc add dev ppp0 parent 10:340 handle 1034: pfifo


# 设定过滤器
# 指定贴有 10 标签 (handle) 的封包,归类到 10:10 类别,以此类推
tc filter add dev ppp0 parent 10: protocol ip prio 100 handle 20 fw classid 10:20
tc filter add dev ppp0 parent 10: protocol ip prio 100 handle 30 fw classid 10:30
tc filter add dev ppp0 parent 10: protocol ip prio 100 handle 40 fw classid 10:40
tc filter add dev ppp0 parent 10: protocol ip prio 100 handle 50 fw classid 10:50
tc filter add dev ppp0 parent 10: protocol ip prio 100 handle 60 fw classid 10:60
tc filter add dev ppp0 parent 10: protocol ip prio 100 handle 70 fw classid 10:70
tc filter add dev ppp0 parent 10: protocol ip prio 100 handle 80 fw classid 10:80
tc filter add dev ppp0 parent 10: protocol ip prio 100 handle 90 fw classid 10:90
tc filter add dev ppp0 parent 10: protocol ip prio 100 handle 100 fw classid 10:100
tc filter add dev ppp0 parent 10: protocol ip prio 100 handle 110 fw classid 10:110
tc filter add dev ppp0 parent 10: protocol ip prio 100 handle 120 fw classid 10:120
tc filter add dev ppp0 parent 10: protocol ip prio 100 handle 130 fw classid 10:130
tc filter add dev ppp0 parent 10: protocol ip prio 100 handle 140 fw classid 10:140
tc filter add dev ppp0 parent 10: protocol ip prio 100 handle 150 fw classid 10:150
tc filter add dev ppp0 parent 10: protocol ip prio 100 handle 160 fw classid 10:160
tc filter add dev ppp0 parent 10: protocol ip prio 100 handle 170 fw classid 10:170
tc filter add dev ppp0 parent 10: protocol ip prio 100 handle 180 fw classid 10:180
tc filter add dev ppp0 parent 10: protocol ip prio 100 handle 190 fw classid 10:190
tc filter add dev ppp0 parent 10: protocol ip prio 100 handle 200 fw classid 10:200
tc filter add dev ppp0 parent 10: protocol ip prio 100 handle 210 fw classid 10:210
tc filter add dev ppp0 parent 10: protocol ip prio 100 handle 220 fw classid 10:220
tc filter add dev ppp0 parent 10: protocol ip prio 100 handle 230 fw classid 10:230
tc filter add dev ppp0 parent 10: protocol ip prio 100 handle 240 fw classid 10:240
tc filter add dev ppp0 parent 10: protocol ip prio 100 handle 250 fw classid 10:250
tc filter add dev ppp0 parent 10: protocol ip prio 100 handle 260 fw classid 10:260
tc filter add dev ppp0 parent 10: protocol ip prio 100 handle 270 fw classid 10:270
tc filter add dev ppp0 parent 10: protocol ip prio 100 handle 280 fw classid 10:280
tc filter add dev ppp0 parent 10: protocol ip prio 100 handle 290 fw classid 10:290
tc filter add dev ppp0 parent 10: protocol ip prio 100 handle 300 fw classid 10:300
tc filter add dev ppp0 parent 10: protocol ip prio 100 handle 310 fw classid 10:310
tc filter add dev ppp0 parent 10: protocol ip prio 100 handle 320 fw classid 10:320
tc filter add dev ppp0 parent 10: protocol ip prio 100 handle 330 fw classid 10:330
tc filter add dev ppp0 parent 10: protocol ip prio 100 handle 340 fw classid 10:340


# QoS eth0  下载方面
#

# 清除 eth0所有队列规则
tc qdisc del dev eth0 root 2>/dev/null

# 定义最顶层(根)队列规则,并指定 default 类别编号
tc qdisc add dev eth0 root handle 10: htb default 340

# 定义第一层的 10:1 类别 (总频宽)
tc class add dev eth0 parent 10: classid 10:1 htb rate 410kbps ceil 410kbps

# 定义第二层叶类别
# rate 保证频宽,ceil 最大频宽,prio 优先权

tc class add dev eth0 parent 10:1 classid 10:20 htb rate 50kbps ceil 180kbps prio 1
tc class add dev eth0 parent 10:1 classid 10:30 htb rate 50kbps ceil 180kbps prio 1
tc class add dev eth0 parent 10:1 classid 10:40 htb rate 50kbps ceil 1800kbps prio 1
tc class add dev eth0 parent 10:1 classid 10:50 htb rate 50kbps ceil 1800kbps prio 1
tc class add dev eth0 parent 10:1 classid 10:60 htb rate 50kbps ceil 180kbps prio 1
tc class add dev eth0 parent 10:1 classid 10:70 htb rate 50kbps ceil 180kbps prio 1
tc class add dev eth0 parent 10:1 classid 10:80 htb rate 50kbps ceil 180kbps prio 1
tc class add dev eth0 parent 10:1 classid 10:90 htb rate 50kbps ceil 180kbps prio 1
tc class add dev eth0 parent 10:1 classid 10:100 htb rate 50kbps ceil 180kbps prio 1
tc class add dev eth0 parent 10:1 classid 10:110 htb rate 50kbps ceil 180kbps prio 1
tc class add dev eth0 parent 10:1 classid 10:120 htb rate 50kbps ceil 180kbps prio 1
tc class add dev eth0 parent 10:1 classid 10:130 htb rate 50kbps ceil 180kbps prio 1
tc class add dev eth0 parent 10:1 classid 10:140 htb rate 50kbps ceil 180kbps prio 1
tc class add dev eth0 parent 10:1 classid 10:150 htb rate 50kbps ceil 180kbps prio 1
tc class add dev eth0 parent 10:1 classid 10:160 htb rate 50kbps ceil 180kbps prio 1
tc class add dev eth0 parent 10:1 classid 10:170 htb rate 50kbps ceil 180kbps prio 1
tc class add dev eth0 parent 10:1 classid 10:180 htb rate 50kbps ceil 180kbps prio 1
tc class add dev eth0 parent 10:1 classid 10:190 htb rate 50kbps ceil 180kbps prio 1
tc class add dev eth0 parent 10:1 classid 10:200 htb rate 50kbps ceil 180kbps prio 1
tc class add dev eth0 parent 10:1 classid 10:210 htb rate 50kbps ceil 180kbps prio 1
tc class add dev eth0 parent 10:1 classid 10:220 htb rate 50kbps ceil 180kbps prio 1
tc class add dev eth0 parent 10:1 classid 10:230 htb rate 50kbps ceil 180kbps prio 1
tc class add dev eth0 parent 10:1 classid 10:240 htb rate 50kbps ceil 180kbps prio 1
tc class add dev eth0 parent 10:1 classid 10:250 htb rate 50kbps ceil 180kbps prio 1
tc class add dev eth0 parent 10:1 classid 10:260 htb rate 50kbps ceil 180kbps prio 1
tc class add dev eth0 parent 10:1 classid 10:270 htb rate 50kbps ceil 180kbps prio 1
tc class add dev eth0 parent 10:1 classid 10:280 htb rate 50kbps ceil 180kbps prio 1
tc class add dev eth0 parent 10:1 classid 10:290 htb rate 50kbps ceil 180kbps prio 1
tc class add dev eth0 parent 10:1 classid 10:300 htb rate 50kbps ceil 180kbps prio 1
tc class add dev eth0 parent 10:1 classid 10:310 htb rate 50kbps ceil 180kbps prio 1
tc class add dev eth0 parent 10:1 classid 10:320 htb rate 50kbps ceil 180kbps prio 1
tc class add dev eth0 parent 10:1 classid 10:330 htb rate 50kbps ceil 180kbps prio 1
tc class add dev eth0 parent 10:1 classid 10:340 htb rate 5kbps ceil 5kbps prio 1

# 定义各叶类别的队列规则
# parent 类别编号,handle 叶类别队列规则编号
tc qdisc add dev eth0 parent 10:20 handle 1002: pfifo
tc qdisc add dev eth0 parent 10:30 handle 1003: pfifo
tc qdisc add dev eth0 parent 10:40 handle 1004: pfifo
tc qdisc add dev eth0 parent 10:50 handle 1005: pfifo
tc qdisc add dev eth0 parent 10:60 handle 1006: pfifo
tc qdisc add dev eth0 parent 10:70 handle 1007: pfifo
tc qdisc add dev eth0 parent 10:80 handle 1008: pfifo
tc qdisc add dev eth0 parent 10:90 handle 1009: pfifo
tc qdisc add dev eth0 parent 10:100 handle 1010: pfifo
tc qdisc add dev eth0 parent 10:110 handle 1011: pfifo
tc qdisc add dev eth0 parent 10:120 handle 1012: pfifo
tc qdisc add dev eth0 parent 10:130 handle 1013: pfifo
tc qdisc add dev eth0 parent 10:140 handle 1014: pfifo
tc qdisc add dev eth0 parent 10:150 handle 1015: pfifo
tc qdisc add dev eth0 parent 10:160 handle 1016: pfifo
tc qdisc add dev eth0 parent 10:170 handle 1017: pfifo
tc qdisc add dev eth0 parent 10:180 handle 1018: pfifo
tc qdisc add dev eth0 parent 10:190 handle 1019: pfifo
tc qdisc add dev eth0 parent 10:200 handle 1020: pfifo
tc qdisc add dev eth0 parent 10:210 handle 1021: pfifo
tc qdisc add dev eth0 parent 10:220 handle 1022: pfifo
tc qdisc add dev eth0 parent 10:230 handle 1023: pfifo
tc qdisc add dev eth0 parent 10:240 handle 1024: pfifo
tc qdisc add dev eth0 parent 10:250 handle 1025: pfifo
tc qdisc add dev eth0 parent 10:260 handle 1026: pfifo
tc qdisc add dev eth0 parent 10:270 handle 1027: pfifo
tc qdisc add dev eth0 parent 10:280 handle 1028: pfifo
tc qdisc add dev eth0 parent 10:290 handle 1029: pfifo
tc qdisc add dev eth0 parent 10:300 handle 1030: pfifo
tc qdisc add dev eth0 parent 10:310 handle 1031: pfifo
tc qdisc add dev eth0 parent 10:320 handle 1032: pfifo
tc qdisc add dev eth0 parent 10:330 handle 1033: pfifo
tc qdisc add dev eth0 parent 10:340 handle 1034: pfifo


# 设定过滤器
tc filter add dev eth0 parent 10: protocol ip prio 100 handle 20 fw  classid 10:20
tc filter add dev eth0 parent 10: protocol ip prio 100 handle 30 fw  classid 10:30
tc filter add dev eth0 parent 10: protocol ip prio 100 handle 40 fw  classid 10:40
tc filter add dev eth0 parent 10: protocol ip prio 100 handle 50 fw  classid 10:50
tc filter add dev eth0 parent 10: protocol ip prio 100 handle 60 fw  classid 10:60
tc filter add dev eth0 parent 10: protocol ip prio 100 handle 70 fw  classid 10:70
tc filter add dev eth0 parent 10: protocol ip prio 100 handle 80 fw  classid 10:80
tc filter add dev eth0 parent 10: protocol ip prio 100 handle 90 fw  classid 10:90
tc filter add dev eth0 parent 10: protocol ip prio 100 handle 100 fw classid 10:100
tc filter add dev eth0 parent 10: protocol ip prio 100 handle 110 fw classid 10:110
tc filter add dev eth0 parent 10: protocol ip prio 100 handle 120 fw classid 10:120
tc filter add dev eth0 parent 10: protocol ip prio 100 handle 130 fw classid 10:130
tc filter add dev eth0 parent 10: protocol ip prio 100 handle 140 fw classid 10:140
tc filter add dev eth0 parent 10: protocol ip prio 100 handle 150 fw classid 10:150
tc filter add dev eth0 parent 10: protocol ip prio 100 handle 160 fw classid 10:160
tc filter add dev eth0 parent 10: protocol ip prio 100 handle 170 fw classid 10:170
tc filter add dev eth0 parent 10: protocol ip prio 100 handle 180 fw classid 10:180
tc filter add dev eth0 parent 10: protocol ip prio 100 handle 190 fw classid 10:190
tc filter add dev eth0 parent 10: protocol ip prio 100 handle 200 fw classid 10:200
tc filter add dev eth0 parent 10: protocol ip prio 100 handle 210 fw classid 10:210
tc filter add dev eth0 parent 10: protocol ip prio 100 handle 220 fw classid 10:220
tc filter add dev eth0 parent 10: protocol ip prio 100 handle 230 fw classid 10:230
tc filter add dev eth0 parent 10: protocol ip prio 100 handle 240 fw classid 10:240
tc filter add dev eth0 parent 10: protocol ip prio 100 handle 250 fw classid 10:250
tc filter add dev eth0 parent 10: protocol ip prio 100 handle 260 fw classid 10:260
tc filter add dev eth0 parent 10: protocol ip prio 100 handle 270 fw classid 10:270
tc filter add dev eth0 parent 10: protocol ip prio 100 handle 280 fw classid 10:280
tc filter add dev eth0 parent 10: protocol ip prio 100 handle 290 fw classid 10:290
tc filter add dev eth0 parent 10: protocol ip prio 100 handle 300 fw classid 10:300
tc filter add dev eth0 parent 10: protocol ip prio 100 handle 310 fw classid 10:310
tc filter add dev eth0 parent 10: protocol ip prio 100 handle 320 fw classid 10:320
tc filter add dev eth0 parent 10: protocol ip prio 100 handle 330 fw classid 10:330
tc filter add dev eth0 parent 10: protocol ip prio 100 handle 340 fw classid 10:340

[ 本帖最后由 ekinmagic 于 2006-11-11 09:28 编辑 ]
routeros
发表于 2006-11-11 09:46:46 | 显示全部楼层
剩余频宽  (可借用的频宽量) = 总频宽 - 保证频宽总和

最大下载 = 保证下载 + 下载剩余频宽
最大上传 = 保证上传 + 上传剩余频宽
------------------------------------------------------------------------------------------
你看看你保证带宽加起来是多少,怎么设置的,根本是不可能完成的任务嘛。

用tc -s class show dev ppp0看看ppp0有效没有。
routeros
回复

使用道具 举报

 楼主| 发表于 2006-11-11 10:07:27 | 显示全部楼层
这个问题应该与我设置上下行的 数据无关  因为 如果ADSL不断线   不重拨的话   上下行的 管制是正常的     只要ADSL重新拨号   上行的PPP0就管制不了   看了论坛的一些旧贴 说要 加段代码到PPP 那里   使他重新拨号是重新执行TC的管制   但怎么加  加到那里就不会了!  希望那位DX指点一下 谢谢!


用用tc -s class show dev ppp0看看ppp0   断线前 有生效        
重拨后 ppp0  全部没有了

[ 本帖最后由 ekinmagic 于 2006-11-11 10:24 编辑 ]
routeros
回复

使用道具 举报

发表于 2006-11-11 18:17:00 | 显示全部楼层
你试试删除所有队列,取消mangle标记。然后重新装载。
---------------------------
取消mangle标记
iptables -t mangle -F
取消队列
tc qdisc del dev $DEV root
tc qdisc del dev $DEV ingress
$DEV为 你的内外网卡
routeros
回复

使用道具 举报

发表于 2006-11-11 18:26:01 | 显示全部楼层
而且看你的QOS设置基本上是不符合QOS的原意,有什么作用,和不使用它有什么区别??
routeros
回复

使用道具 举报

 楼主| 发表于 2006-11-12 07:58:10 | 显示全部楼层
不是啊  我觉得没问题啊!   把所有上行都限制为10K  下行最高180k   因为不是每个人都下载的只有部分人下载 所以这个限制已经符合我的要求了!
routeros
回复

使用道具 举报

 楼主| 发表于 2006-11-12 08:37:50 | 显示全部楼层
网上找到说:创建一个tc脚本,编辑adsl-connect脚本加入对tc脚本的调用。   那 该如何操作呢!!  上面的DX能教一下我吗???
routeros
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|手机版|小黑屋|软路由 ( 渝ICP备15001194号-1|渝公网安备 50011602500124号 )

GMT+8, 2024-6-1 09:30 , Processed in 0.053172 second(s), 4 queries , Gzip On, Redis On.

Powered by Discuz! X3.5 Licensed

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表