QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1307|回复: 2

下面的tc命令都是什么意思啊~~ 急 多谢帮忙啊~~~

[复制链接]
发表于 2005-6-1 23:38:54 | 显示全部楼层 |阅读模式
# Creating  hash tables for classification of the packets to testbed11
tc filter add dev eth0 parent 2:0 prio 3 handle 1: u32 divisor 256
tc filter add dev eth0 parent 2:0 prio 3 handle 2: u32 divisor 256

# Configuring the 6th slot of the hash table 1 to select packets with
# destination set to testbed11 and the port set to 6010 (0x177a) and direct
# these to class 2:2 (which was just set up).
tc filter add dev eth0 parent 2:0 prio 3 u32 ht 1:6: match ip dst
129.237.125.146 match tcp dst 0x177a 0xffff flowid 2:2

# Configuring the 6th slot of the hash table 2 to select packets with
# destination set to testbed11 and the port set to 6011 (0x177b) and direct
# these to class 2:3 (which was just set up).
tc filter add dev eth0 parent 2:0 prio 3 u32 ht 2:6: match ip dst
129.237.125.146 match tcp dst 0x177b  0xffff flowid 2:3

# Lookup hash table and it it is not fragmented, use the protocol as the hash
# key.
tc filter add dev eth0 parent 2:0 prio 3 handle ::1 u32 ht 800:: match ip
nofrag offset mask 0x0F00 shift 6 hashkey mask 0x00ff0000 at 8 link 1:
tc filter add dev eth0 parent 2:0 prio 3 handle ::1 u32 ht 800:: match ip
nofrag offset mask 0x0F00 shift 6 hashkey mask 0x00ff0000 at 8 link 2:

# Installing a u32 classfier for the traffic to testbed13
tc filter add dev eth0 parent 3:0 prio 7 protocol ip u32

# Creating  hash tables for classification of the packets to testbed13
tc filter add dev eth0 parent 3:0 prio 7 handle 3: u32 divisor 256
tc filter add dev eth0 parent 3:0 prio 7 handle 4: u32 divisor 256

# Configuring the 6th slot of the hash table 3 to select packets with
# destination set to testbed13 and the port set to 6021 (0x1785) and direct
# these to class 3:2 (which was just set up).
tc filter add dev eth0 parent 3:0 prio 7 u32 ht 3:6: match ip dst
129.237.125.148 match tcp dst 0x1785 0xffff flowid 3:2

# Configuring the 6th slot of the hash table 4 to select packets with
# destination set to testbed13 and the port set to 6031 (0x178f) and direct
# these to class 3:3 (which was just set up).
tc filter add dev eth0 parent 3:0 prio 7 u32 ht 4:6: match ip dst
129.237.125.148 match tcp dst 0x178f 0xffff flowid 3:3


# Lookup hash table and it it is not fragmented, use the protocol as the hash
# key.
tc filter add dev eth0 parent 3:0 prio 7 handle ::1 u32 ht 800:: match ip
nofrag offset mask 0x0F00 shift 6 hashkey mask 0x00ff0000 at 8 link 3:
tc filter add dev eth0 parent 3:0 prio 7 handle ::1 u32 ht 800:: match ip
nofrag offset mask 0x0F00 shift 6 hashkey mask 0x00ff0000 at 8 link 4:
发表于 2005-6-2 13:24:05 | 显示全部楼层
这是在什么状态下出现的?
回复

使用道具 举报

 楼主| 发表于 2005-6-2 21:29:31 | 显示全部楼层
这就是一个tc--流量控制控制吧 是一个cbq的队列 类 过滤器什么的
想请问下这都是什么意思啊?
还有如果 我是要在linux下实现流量控制 应该怎么办? 是象上面这样的tc命令吗?
回复

使用道具 举报

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

本版积分规则

GMT+8, 2024-11-2 22:37 , Processed in 0.036282 second(s), 16 queries .

© 2021 Powered by Discuz! X3.5.

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