注册 | 登录 忘记密码? 51cto首页 | 博客 | 论坛 | 招聘
热点文章 网工人才缺口大 传统网管..
 帮助

拥塞管理之---CBWFQ


2007-03-28 04:00:22
版权声明:原创作品,谢绝转载!否则将追究法律责任。
 
源为R1,目标为R3,在R2上定义CBWFQ使:
1,ping保证带宽为20K
2,telnet保证带宽为1M
 
基本配置
R1
conf t
int f 0/0
ip ad 10.1.1.1 255.255.255.0
no shut
router rip
ver 2
no au
net 10.0.0.0
end
 
R2
conf t
int f 0/0
ip ad 10.1.1.2 255.255.255.0
no shut
int s2/0
ip ad 10.1.2.2 255.255.255.0
encap f
no arp f
no frame inver
frame map ip 10.1.2.3 203 b
no shut
router rip
ver 2
no au
net 10.0.0.0
exit
access-list 100 permit icmp host 10.1.1.1 host 10.1.2.3
access-list 101 permit tcp host 10.1.1.1 host 10.1.2.3 eq telnet

class-map PING
match access-group 100

exit
class-map TELNET
match access-group 101

exit
policy-map CBWFQ
class PING
bandwidth 20

class TELNET
bandwidth 1000

exit
int s2/0
service-policy output CBWFQ                           /*CBWFQ只支持output方向策略
end
 
R3
conf t
int s2/0
ip ad 10.1.2.3 255.255.255.0
encap f
no arp f
no frame inver
frame map ip 10.1.2.2 302 b
no shut
router rip
ver 2
no au
net 10.0.0.0
line vty 0 4
password cisco
login
end

校验
R1#ping 10.1.2.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.2.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 12/52/88 ms
R1#telnet 10.1.2.3
Trying 10.1.2.3 ... Open

User Access Verification
Password:
R3>quit
[Connection to 10.1.2.3 closed by foreign host]
 

R2#sh ip access-list
Extended IP access list 100
    10 permit icmp host 10.1.1.1 host 10.1.2.3 (5 matches)
Extended IP access list 101
    10 permit tcp host 10.1.1.1 host 10.1.2.3 eq telnet (22 matches)

R2#sh policy-map int s2/0
 Serial2/0
  Service-policy output: CBWFQ
    Class-map: PING (match-all)
      10 packets, 1040 bytes
      5 minute offered rate 0 bps, drop rate 0 bps
      Match: access-group 100
      Queueing
        Output Queue: Conversation 265
        Bandwidth 20 (kbps) Max Threshold 64 (packets)
        (pkts matched/bytes matched) 0/0
        (depth/total drops/no-buffer drops) 0/0/0
    Class-map: TELNET (match-all)
      39 packets, 1844 bytes
      5 minute offered rate 0 bps, drop rate 0 bps
      Match: access-group 101
      Queueing
        Output Queue: Conversation 266
        Bandwidth 1000 (kbps) Max Threshold 64 (packets)
        (pkts matched/bytes matched) 2/100
        (depth/total drops/no-buffer drops) 0/0/0

R2#sh queue s2/0
  Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
  Queueing strategy: Class-based queueing
  Output queue: 0/1000/64/0 (size/max total/threshold/drops)
     Conversations  0/1/256 (active/max active/max total)
     Reserved Conversations 2/2 (allocated/max allocated)
     Available Bandwidth 138 kilobits/sec
 
当使用RTP和LLQ时
 
R2
class-map VOICE
match dscp ef
policy-map LLQ
class VOICE
priority 50                                                     /×限定dscp值为ef的流量为50K
int s2/0
ip rtp priority 20000 21000 100               /*限定UDP端口范围从20000到21000的流量带宽为100K
service-policy output LLQ
end

本文出自 “穿过地狱去看海” 博客,谢绝转载!





    文章评论
 <<   1   2   >>   页数 ( 1/2 )  
2007-03-28 16:40:02
不看不知道,一看吓一跳.

2007-03-29 19:43:46
兄弟技术是越来越好了

2007-03-29 22:49:08
想问一下,WFQ的配置不是应该有fair-queue的命令才生效吗?我是这样验证的,一个FTP流和TFTP流分别用下载速度证明效果

2007-03-29 23:38:46
WFQ在路由器的串口上是自动启用的,你可以用show int <id>命令来查看
R1#sh int f0/0
.........................
Queueing strategy: fifo
.....................................

R1#sh int s2/0
................................................
Queueing strategy: weighted fair

在路由器的以太网接口要启用fair-queue命令才可以


还有,这个是我在模拟器上做的实验,没有真机,我也没办法去验证

2007-03-29 23:45:56
呵呵,原来这样.我还在看你的实验,还有一个问题,我怎么找不到关于CBWFQ只能在出口方向限制说明的出处?

2007-03-30 01:45:31
这个文档上也没写清楚,不过文档上给出的配置命令没有input方向上的

2007-03-30 07:52:19
R1(config-if)#service-policy input cbwfq
CBWFQ : Can be enabled as an output feature only

 <<   1   2   >>   页数 ( 1/2 )  

发表评论

昵   称:
验证码:  点击图片可刷新验证码  博客过2级,无需填写验证码
内   容: