实验5动态路由协议详情RIP与OSPF地配置.docx

上传人:b****2 文档编号:23238320 上传时间:2023-05-15 格式:DOCX 页数:25 大小:90.21KB
下载 相关 举报
实验5动态路由协议详情RIP与OSPF地配置.docx_第1页
第1页 / 共25页
实验5动态路由协议详情RIP与OSPF地配置.docx_第2页
第2页 / 共25页
实验5动态路由协议详情RIP与OSPF地配置.docx_第3页
第3页 / 共25页
实验5动态路由协议详情RIP与OSPF地配置.docx_第4页
第4页 / 共25页
实验5动态路由协议详情RIP与OSPF地配置.docx_第5页
第5页 / 共25页
点击查看更多>>
下载资源
资源描述

实验5动态路由协议详情RIP与OSPF地配置.docx

《实验5动态路由协议详情RIP与OSPF地配置.docx》由会员分享,可在线阅读,更多相关《实验5动态路由协议详情RIP与OSPF地配置.docx(25页珍藏版)》请在冰豆网上搜索。

实验5动态路由协议详情RIP与OSPF地配置.docx

实验5动态路由协议详情RIP与OSPF地配置

实验5动态路由协议RIP与OSPF的配置

实验学时:

2

一、实验目的

1、熟悉CISCOIOS和CLI命令模式的使用;

2、了解和掌握路由器基本配置命令的使用;

3、掌握动态路由协议的配置;

4、掌握VLAN中路由器的设置;

3.掌握RIP与OSPF路由协议及其配置。

二、实验设备与环境

Windows2000Server/AdvanceServer主机局域网、CISCOCatalyst2950交换机和2600系列路由器,CiscoPacketTracer7.0软件。

三、预备知识

3.1动态路由配置

两个重要的命令用于配置动态路由:

router和network。

Router命令启动一个路由选择进程,格式:

router(config)#routerprotocol[keywork],network命令是每个IP路由选择进程所需要的。

router(config-router)#networknetwork-number

参数如下表:

Protocol

RIP,IGRP,OSPF和EIGRP

Network

例如一个自主系统,使用如IGRP这样的协议。

Network命令是每个IP路由选择过程所必须的配置命令,以检查路由更新时哪个接口参与接收和发送

Network-number

具体说明一个直连网络

3.2RIP协议配置

RIP的关键特点如下:

·它是一个距离矢量路由选择协议;

·选用跳计数作为路由选择的度量标准;

·跳计数允许的最大值是15;

缺省情况下,路由选择的更新数据每30秒种广播一次。

第一版本不支持子网划分,如使用子网划分应使用第二版本(命令:

version2)。

routerrip命令选择RIP作为路由协议:

Router(config)#routerrip

network命令指定基于NIC网络号码,选择直连的网络:

Router(config-router)#networknetwork-number

路由选择进程将接口与适合的地址相关联,并且开始在规定的网络上处理数据包。

RIP配置实例:

·routerrip:

选择RIP作为路由选择协议;

·network1.0.0.0:

指定一个直接相连的网络;

·network2.0.0.0:

指定一个直接相连的网络;

3.3OSPF协议配置

OSPF作为一种链路状态路由协议,除了路由器的数目外,还通过路程段之间的连接速率和负载平衡等多项参数计算出到达目标节点的度量值,并选择度量值最低的作为发送数据包的最佳途径。

OSPF是层次化的路由选择协议,用于大型网络的互连,可以将网络划分多个区域,每个区域为一个段,区域0(area0)是OSPF网络中必须具有的主干区域,其他所有区域要求通过区域0互连到一起。

(1)OSPF路由进程ID的范围在1-65535之间,而且只有本地含义,不同路由器的路由进程ID可以不同。

如果要想启动OSPF路由进程,至少确保有一个接口是up的。

同一台路由器上可以启动多个OSPF进程,但会消耗更多的CPU和内存等资源。

(2)区域ID是0-4294967295的数,也可以是IP地址的格式A.B.C.D。

当网络区域为0或0.0.0.0时称为主干区域。

(3)RouterID选择遵循如下顺序:

 1)最优先的是在OSPF进程中使用“router-id”指定了RID;

 2)如果没有在OSPF进程中指定RID,则选择IP地址最大的环回接口的IP地址为RID;

 3)如果没有环回接口,则选择活动的IP地址最大的物理接口的IP地址为RID。

  ①如果使用“secondary”配置IP地址时,该地址不起作用,即不参与RID竞选;

  ②使用“router-id”后,应使用命令“clearipospfprocess”重置ospf进程,新配置的RID才能生效;

  ③2、3步只有在下次重启路由器时才会生效,即后来加入大的IP地址也不能选举为RID直到路由器重启。

(4)RouterID重新选举规则:

 1>使用“router-id”和“clearipospfprocess”命令;

 2>重启路由器(不一定)。

四、实验内容

4.1课内实验任务

1、路由器的RIP协议配置

(1)实验准备工作

运用CiscoPacketTracer软件设计如下网络拓扑图。

不同型号的交换机配置命令不同,这里选择2600系列路由器的2621型号,交换机选择2900系列。

IP地址、掩码和连接路由器的端口号如图所示。

将网络拓扑图保存,并在CiscoPacketTracer模拟器中打开该图(参考实验4的方法)。

 

 

(2)实验过程

1)采用配置PC1和PC2的IP地址和子网掩码。

2)连接到路由器Router3,配置路由器的RIP,命令如下:

Router>enable

Router#confterminal

Router(config)#hostnameR3

R3(config)#interfaceFastEthernet0/0

R3(config-if)#ipaddress11.0.0.1255.255.255.0

R3(config-if)#noshutdown

R3(config-if)#interfaceFastEthernet0/1

R3(config-if)#ipaddress12.0.0.1255.255.255.0

R3(config-if)#noshutdown

R3(config-if)#interfaceserial0

R3(config-if)#ipaddress10.0.0.1255.255.255.0

R3(config-if)#bandwidth128//设置链路带宽为128kbit/s

R3(config-if)#clockrate64000//设置DCE设备的时钟速率

R3(config-if)#noshutdown

R3(config-if)#exit

-------------设置路由器R3的RIP--------------------------------------

R3(config)#routerrip//设置RIP

R3(config-router)#network10.0.0.0//设置接口S0连接的网络地址

R3(config-router)#network11.0.0.0//设置接口E0连接的网络地址

R3(config-router)#network12.0.0.0//设置接口E1连接的网络地址

R3(config-router)#end

4)按照步骤(3)分别完成对路由器R1、R2、R4的接口配置。

5)按照步骤(3)分别完成对路由器R1、R2、R4的RIP配置。

R1(config)#routerrip//设置路由器R1的RIP

R1(config-router)#network11.0.0.0

R1(config-router)#end

------------设置路由器R2的RIP---------------------------------------

R2(config)#routerrip//设置路由器R2的RIP

R2(config-router)#network12.0.0.0

R2(config-router)#end

------------设置路由器R4的RIP---------------------------------------

R4(config)#routerrip//设置路由器R4的RIP

R4(config-router)#network10.0.0.0

R4(config-router)#network192.168.1.0

R4(config-router)#end

6)连接到路由器R1中,通过命令“showiproute”显示R1的动态路由表,观察路由表项,当目标网络是192.168.1.0/24时,需要多少跳数(hops)?

通过命令“showipprotocols”查看每台路由器的协议。

需要2跳

Router#showiproute

Codes:

C-connected,S-static,I-IGRP,R-RIP,M-mobile,B-BGP

D-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinterarea

N1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2

E1-OSPFexternaltype1,E2-OSPFexternaltype2,E-EGP

i-IS-IS,L1-IS-ISlevel-1,L2-IS-ISlevel-2,ia-IS-ISinterarea

*-candidatedefault,U-per-userstaticroute,o-ODR

P-periodicdownloadedstaticroute

Gatewayoflastresortisnotset

R10.0.0.0/8[120/1]via11.0.0.1,00:

00:

21,FastEthernet0/0

11.0.0.0/24issubnetted,1subnets

C11.0.0.0isdirectlyconnected,FastEthernet0/0

R12.0.0.0/8[120/1]via11.0.0.1,00:

00:

21,FastEthernet0/0

R192.168.1.0/24[120/2]via11.0.0.1,00:

00:

21,FastEthernet0/0

R1协议:

Router#showipprotocols

RoutingProtocolis"rip"

Sendingupdatesevery30seconds,nextduein17seconds

Invalidafter180seconds,holddown180,flushedafter240

Outgoingupdatefilterlistforallinterfacesisnotset

Incomingupdatefilterlistforallinterfacesisnotset

Redistributing:

rip

Defaultversioncontrol:

sendversion1,receiveanyversion

InterfaceSendRecvTriggeredRIPKey-chain

FastEthernet0/0121

Automaticnetworksummarizationisineffect

Maximumpath:

4

RoutingforNetworks:

11.0.0.0

PassiveInterface(s):

RoutingInformationSources:

GatewayDistanceLastUpdate

11.0.0.112000:

00:

18

Distance:

(defaultis120)

R2协议:

Router#showipprotocols

RoutingProtocolis"rip"

Sendingupdatesevery30seconds,nextduein0seconds

Invalidafter180seconds,holddown180,flushedafter240

Outgoingupdatefilterlistforallinterfacesisnotset

Incomingupdatefilterlistforallinterfacesisnotset

Redistributing:

rip

Defaultversioncontrol:

sendversion1,receiveanyversion

InterfaceSendRecvTriggeredRIPKey-chain

FastEthernet0/0121

Automaticnetworksummarizationisineffect

Maximumpath:

4

RoutingforNetworks:

12.0.0.0

PassiveInterface(s):

RoutingInformationSources:

GatewayDistanceLastUpdate

12.0.0.112000:

00:

22

Distance:

(defaultis120)

R3协议:

R3#showipprotocols

RoutingProtocolis"rip"

Sendingupdatesevery30seconds,nextduein2seconds

Invalidafter180seconds,holddown180,flushedafter240

Outgoingupdatefilterlistforallinterfacesisnotset

Incomingupdatefilterlistforallinterfacesisnotset

Redistributing:

rip

Defaultversioncontrol:

sendversion1,receiveanyversion

InterfaceSendRecvTriggeredRIPKey-chain

Serial0/0121

FastEthernet0/0121

FastEthernet0/1121

Automaticnetworksummarizationisineffect

Maximumpath:

4

RoutingforNetworks:

10.0.0.0

11.0.0.0

12.0.0.0

PassiveInterface(s):

RoutingInformationSources:

GatewayDistanceLastUpdate

10.0.0.212000:

00:

08

Distance:

(defaultis120)

R4协议:

Router#showipprotocols

RoutingProtocolis"rip"

Sendingupdatesevery30seconds,nextduein10seconds

Invalidafter180seconds,holddown180,flushedafter240

Outgoingupdatefilterlistforallinterfacesisnotset

Incomingupdatefilterlistforallinterfacesisnotset

Redistributing:

rip

Defaultversioncontrol:

sendversion1,receiveanyversion

InterfaceSendRecvTriggeredRIPKey-chain

Serial0/0121

FastEthernet0/0121

Automaticnetworksummarizationisineffect

Maximumpath:

4

RoutingforNetworks:

10.0.0.0

192.168.1.0

PassiveInterface(s):

RoutingInformationSources:

GatewayDistanceLastUpdate

10.0.0.112000:

00:

03

Distance:

(defaultis120)

Router#

7)连接到R2、R3和R4,通过“showiproute”和“showipprotocols”命令查看每台路由器的路由表和协议。

R2路由表:

Router#showiproute

Codes:

C-connected,S-static,I-IGRP,R-RIP,M-mobile,B-BGP

D-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinterarea

N1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2

E1-OSPFexternaltype1,E2-OSPFexternaltype2,E-EGP

i-IS-IS,L1-IS-ISlevel-1,L2-IS-ISlevel-2,ia-IS-ISinterarea

*-candidatedefault,U-per-userstaticroute,o-ODR

P-periodicdownloadedstaticroute

Gatewayoflastresortisnotset

R10.0.0.0/8[120/1]via12.0.0.1,00:

00:

04,FastEthernet0/0

R11.0.0.0/8[120/1]via12.0.0.1,00:

00:

04,FastEthernet0/0

12.0.0.0/24issubnetted,1subnets

C12.0.0.0isdirectlyconnected,FastEthernet0/0

R192.168.1.0/24[120/2]via12.0.0.1,00:

00:

04,FastEthernet0/0

R2协议:

Router#showipprotocols

RoutingProtocolis"rip"

Sendingupdatesevery30seconds,nextduein0seconds

Invalidafter180seconds,holddown180,flushedafter240

Outgoingupdatefilterlistforallinterfacesisnotset

Incomingupdatefilterlistforallinterfacesisnotset

Redistributing:

rip

Defaultversioncontrol:

sendversion1,receiveanyversion

InterfaceSendRecvTriggeredRIPKey-chain

FastEthernet0/0121

Automaticnetworksummarizationisineffect

Maximumpath:

4

RoutingforNetworks:

12.0.0.0

PassiveInterface(s):

RoutingInformationSources:

GatewayDistanceLastUpdate

12.0.0.112000:

00:

22

Distance:

(defaultis120)

R3路由表:

R3#showiproute

Codes:

C-connected,S-static,I-IGRP,R-RIP,M-mobile,B-BGP

D-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinterarea

N1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2

E1-OSPFexternaltype1,E2-OSPFexternaltype2,E-EGP

i-IS-IS,L1-IS-ISlevel-1,L2-IS-ISlevel-2,ia-IS-ISinterarea

*-candidatedefault,U-per-userstaticroute,o-ODR

P-periodicdownloadedstaticroute

Gatewayoflastresortisnotset

10.0.0.0/24issubnetted,1subnets

C10.0.0.0isdirectlyconnected,Serial0/0

11.0.0.0/24issubnetted,1subnets

C11.0.0.0isdirectlyconnected,FastEthernet0/0

12.0.0.0/24issubnetted,1subnets

C12.0.0.0isdirectlyconnected,FastEthernet0/1

R192.168.1.0/24[120/1]via10.0.0.2,00:

00:

19,Serial0/0

R3协议:

R3#showipprotocols

RoutingProtocolis"rip"

Sendingupdatesevery30seconds,nextduein2seconds

Invalidafter180seconds,holddown180,flushedafter240

Outgoingupdatefilterlistforallinterfacesisnotset

Incomingupdatefilterlistforallinterfacesisnotset

Redistributing:

rip

Defaultversioncontrol:

sendversion1,receiveanyversion

InterfaceSendRecvTriggeredRIPKey-chain

Serial0/0121

FastEthernet0/0121

FastEthernet0/1121

Automaticnet

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 小学教育 > 语文

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1