1.配置管制:(超过额定带宽,处理方式丢包)
R2:
//抓取地址,调用ACL,配置Police-map
access-list 101 permit ip 10.1.1.0 0.0.0.255 any
class-map match-all 101
match access-group 101
policy-map 101
class 10
police cir 8000 bc 2000
//接口调用police-map
interface Ethernet0/0
ip address 12.1.1.2 255.255.255.0
service-policy output 101
效果:
R1#ping 10.1.1.1 size 2000 repeat 1000
Type escape sequence to abort.
Sending 1000, 2000-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:
!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.
!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.
Success rate is 50 percent (70/140), round-trip min/avg/max = 1/4/92 ms
R1#ping 20.1.1.1 size 2000 repeat 1000
Type escape sequence to abort.
Sending 1000, 2000-byte ICMP Echos to 20.1.1.1, timeout is 2 seconds:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Success rate is 100 percent (873/873), round-trip min/avg/max = 1/3/12 ms
2.配置整形(超过额定带宽,将流量缓存到内存中,等待传输。不丢包)
R2:
access-list 102 permit ip 10.1.1.0 0.0.0.255 any
class-map match-all shape102
match access-group 102
policy-map shape102
class shape102
shape average 8000 2000
interface Ethernet0/0
ip address 12.1.1.2 255.255.255.0
service-policy output shape102
效果 :
R1#ping 10.1.1.1 size 2000 repeat 100
Type escape sequence to abort.
Sending 100, 2000-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!.
Success rate is 98 percent (84/85), round-trip min/avg/max = 24/1496/1552 ms
R1#ping 20.1.1.1 size 2000 repeat 100
Type escape sequence to abort.
Sending 100, 2000-byte ICMP Echos to 20.1.1.1, timeout is 2 seconds:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Success rate is 100 percent (100/100), round-trip min/avg/max = 1/3/16 ms
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/20928363/viewspace-716810/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/20928363/viewspace-716810/