优先级队列
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
优先级队列(PQ )
【实验名称】
优先级队列(PQ )
【实验目的】
掌握优先级队列(PQ )的原理及配置。
【背景描述】
假设校园网通过一台路由器连接到校园外的另一台路由器上,现要在路由器上做适当配置,实现校园网内部主机与校园网外部主机的相互通信。
该网络存在的问题是:当校园网内部主机与校园网外部主机的相互通信时,内部主机访问外部网络的WWW 服务时,网络响应速度很慢。本实验以2台R2624路由器为例,路由器分别为Router1和Router2,路由器之间通过串口采用V35 DCE/DTE 电缆连接 。PC1的IP 地址和缺省网关分别为172.16.1.11和172.16.1.1,PC2的IP 地址和缺省网关分别为172.16.3.22和172.16.3.2 ,网络掩码都是255.255.255.0 。
【实现功能】
实现网络的互连互通,从而实现信息的共享和传递,并且使内部主机对外部网络WWW 服务的访问得到应有的服务质量。
【实验拓扑】
【实验设备】
R2624(2台)、V35 DTE 线缆(1根)、V35 DCE 线缆(1根)
【实验步骤】
第一步:在路由器Router1上配置接口的IP 地址和串口上的时钟频率
Router1(config)# interface fastethernet 0 !进入接口F0的配置模式
Router1(config-if)# ip address 172.16.1.1 255.255.255.0 !配置路由器接口F0的IP 地址 Router1(config)# no shutdown !开启路由器fastethernet0接口
!
Router1(config)# interface serial 0 !进入接口S0配置模式
Router1(config-if)# ip address 172.16.2.1 255.255.255.0 !配置路由器接口S0的IP 地址 Router1(config-if)#clock rate 64000 !配置Router1的时钟频率(DCE )
172.16.1.0/24
PC1 PC2
172.16.2.0/24 172.16.3.0/24 .1 .11
.1 .2 .2 .22 Router1 Router2
Router1(config)# no shutdown !开启路由器fastethernet0接口
验证测试:验证路由器接口的配置
Router1#show ip interface brief
Interface IP-Address OK? Method Status Protocol FastEthernet0 172.16.1.1 YES manual up up Serial0 172.16.2.1 YES manual down down Serial1 unassigned YES unset administratively down down
Router1#show interface serial 0
Serial0 is down, line protocol is down
Hardware is HDLC4530A
Internet address is 172.16.2.1/24
MTU 1500 bytes, BW 2048 Kbit, DL Y 20000 usec, rely 255/255, load 1/255 Encapsulation HDLC, loopback not set, keepalive set (10 sec)
Last input never, output never, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0 (size/max/drops); Total output drops: 0
Queueing strategy: weighted fair
Output queue: 0/64/0 (size/threshold/drops)
Conversations 0/0 (active/max active)
Reserved Conversations 0/0 (allocated/max allocated)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
0 packets input, 0 bytes, 0 no buffer
Received 0 broadcasts
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
0 packets output, 0 bytes, 0 underruns
0 output errors, 0 collisions, 8 interface resets
0 output buffer failures, 0 output buffers swapped out
0 carrier transitions
DCD=down DSR=down DTR=down RTS=down CTS=down
第二步:在路由器Router1上配置静态路由
Router1(config)#ip route 172.16.3.0 255.255.255.0 172.16.2.2
或
Router1(config)#ip route 172.16.3.0 255.255.255.0 serial 0
验证测试:验证Router1上的静态路由配置
Router1#show ip route
Codes: C - connected, S - static, R - RIP