三、第一章:基本QOS实验
1.1、使用优先级排队实现QOS
实验图如下
R1配置
|
R2配置
|
host Host_1
no ip domain-lookup
line con 0
logging sy
exec-time 0 0
int f0/0
duplex full
ip add 192.168.1.2 255.255.255.0
no sh
exit
ip route 0.0.0.0 0.0.0.0 192.168.1.1
|
host Host_2
no ip domain-lookup
line con 0
logging sy
exec-time 0 0
int f0/0
duplex full
ip add 192.168.1.3 255.255.255.0
no sh
exit
ip route 0.0.0.0 0.0.0.0 192.168.1.1
|
R3配置
|
R7配置
|
host Singapore
no ip domain-lookup
line con 0
logging sy
exec-time 0 0
int f0/0
duplex full
ip add 192.168.1.1 255.255.255.0
exit
int s1/2
ip add 200.200.100.1 255.255.255.0
cl ra 56000
no sh
ip route 0.0.0.0 0.0.0.0 200.200.100.2
|
host ISP
no ip domain-lookup
line con 0
logging sy
exec-time 0 0
int s1/2
ip add 200.200.100.2 255.255.255.0
no sh
int s1/3
ip add 200.200.50.1 255.255.255.0
cl ra 56000
no sh
ip route 0.0.0.0 0.0.0.0 200.200.50.2
|
R4配置
|
|
host WebServer
no ip domain-lookup
line con 0
logging sy
exec-time 0 0
int s1/2
ip add 200.200.50.2 255.255.255.0
no sh
ip route 0.0.0.0 0.0.0.0 200.200.50.1
|
|
配制完以上后,我们就可以在R3和R7的s1/2端口上的队列机制是什么
用show int s1/2显示如下
Singapore#show int s1/2
Serial1/2 is up, line protocol is up
Hardware is M4T
Internet address is 200.200.100.1/24
MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation HDLC, crc 16, loopback not set
Keepalive set (10 sec)
Restart-Delay is 0 secs
Last input 00:00:08, output 00:00:05, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: weighted fair
Output queue: 0/1000/64/0 (size/max total/threshold/drops)
Conversations 0/0/256 (active/max active/max total)
Reserved Conversations 0/0 (allocated/max allocated)
Available Bandwidth 1536 kilobits/sec
正如上面所示,如果未加任何策略,在带宽低于2.048M(E1)速率的时缺省的队列模式为WFQ。如果在高于E1速率时缺省的队列模式为FIFO。
下面我们开始配制策略
R3:
Singapore(config)#access-list 101 permit tcp any any eq 80
Singapore(config)#access-list 102 permit ip any any
Singapore(config)#priority-list 1 protocol ip high list 101
Singapore(config)#priority-list 1 protocol ip medium list 102
Singapore(config)#int s1/2
Singapore(config-if)#priority-group 1
R7:
ISP(config)#access-list 101 permit tcp any any eq 80
ISP(config)#access-list 102 permit ip any any
ISP(config)#priority-list 1 protocol ip high list 101
ISP(config)#priority-list 1 protocol ip medium list 102
ISP(config)#int s1/2
ISP(config-if)#priority-group 1
验证
R3:
Singapore#show queueing priority
Current DLCI priority queue configuration:
Current priority queue configuration:
List Queue Args
1 high protocol ip list 101
1 medium protocol ip list 102
Singapore#show queueing interface s1/2
Interface Serial1/2 queueing strategy: priority
Output queue utilization (queue/count)
high/213 medium/0 normal/40 low/0
Singapore#show int s1/2
Serial1/2 is up, line protocol is up
Hardware is M4T
Internet address is 200.200.100.1/24
MTU 1500 bytes, BW 2048 Kbit, DLY 20000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation HDLC, crc 16, loopback not set
Keepalive set (10 sec)
Restart-Delay is 0 secs
Last input 00:00:02, output 00:00:00, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: priority-list 1
Output queue (queue priority: size/max/drops):
high: 0/20/0, medium: 0/40/0, normal: 0/60/0, low: 0/80/0
本文转自zcm8483 51CTO博客,原文链接:http://blog.51cto.com/haolun/993008