2007年10月11日 星期四

[轉載]Cisco 設備的流量控制

Cisco 設備的流量控制分:GTS、CAR、Service Policy(Policy map)
GTS(Generic Traffic Shaping) for ACL

Step 1 Router(config)# access-list
Step 2 Router(config-if)# interface
Step 3 Router(config-if)# traffic-shape group bit-rate [ burst-size [ excess-burst-size]]
GTS
Router(config-if)# traffic-shape rate bit-rate [ burst-size[ excess-burst-size]]
檢查
Router# show traffic-shape [ interface-name]
Router# show traffic-shape statistics [ interface-name]
設定範例
access-list 101 permit udp any any
interface Ethernet0
traffic-shape group 101 1000000 125000 125000
!
interface Ethernet1
traffic-shape rate 5000000 625000 625000
CAR
Router(config-if)# rate-limit {input | output} [access-group ] bps [ burst-normal [ burst-max]] conform-action exceed-action
設定範例
interface Ethernet0
rate-limit input access-group 102 10000000 24000 32000 conform-action transmit exceed-action drop
access-list 102 permit tcp any any eq ftp
interface Ethernet1
rate-limit input 8000000 16000 24000 conform-action transmit xceed-action drop
Service Policy
Router(config)# policy-map
Router(config-if)# service-policy {input | output}
設定範例
Defining Traffic Classess
Router(config)# class-map class_1
Router(config-cmap)# match access-group 101
Router(config-cmap)# exit
Router(config)# class-map class_2
Router(config-cmap)# match access-group 102
Router(config-cmap)# exit
Creating a Traffic Policy
Router(config)# policy-map policy_1
Router(config-pmap)# class class_1
Router(config-pmap-c)# bandwidth 3000
Router(config-pmap-c)# queue-limit 30
Router(config-pmap-c)# exit
Router(config-pmap)# class class_2
Router(config-pmap-c)# bandwidth 2000
Router(config-pmap-c)# exit
Attaching a Traffic Policy to an Interface
Router(config)# interface f0/1
Router(config-if)# service-policy output policy_1
Router(config-if)# exit
檢查
Router# show policy-map
Router# show policy-map interface
< 以上文章內容摘錄自 Cisco IOS Quality of Service Solutions Configuration Guide >

沒有留言: