资源描述:
《实验 ospf协议的配置》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库。
1、实验一OSPF协议的配置一、实验目的通过本实验,可掌握一下技能:Ø会在路由器上启动OSPF协议Ø能声明相应网络进入OSPF路由进程Ø查看OSPF路由信息Ø查看OSPF协议配置信息Ø查看OSPF邻居路由信息二、实验拓扑图及接口IP地址接口IP地址如表所示:路由器接口地址掩码R0F0/0192.168.10.1255.255.255.0R0S0/0192.168.20.1255.255.255.0R1S0/0192.168.20.2255.255.255.0R1S0/1192.168.30.1255.255.255.0R2F0/01
2、92.168.40.1255.255.255.0R2S0/0192.168.30.2255.255.255.0三、实验配置步骤首先对各路由器的相关接口进行配置,然后再进行以下配置步骤一:先分别为路由器添加环回接口(这样有利于选举DR)Router0(config)#interfaceloopback0Router0(config-if)#ipaddress1.1.1.1255.255.255.0Router0(config-if)#noshutdownRouter0(config-if)#Router1(config)#inte
3、rfaceloopback0Router1(config-if)#ipaddress2.2.2.2255.255.255.0Router1(config-if)#noshutdownRouter1(config-if)#Router2(config)#interfaceloopback0Router2(config-if)#ipaddress3.3.3.3255.255.255.0Router2(config-if)#noshutdownRouter2(config-if)#步骤二:分别去除EIGRP然后配置OSPFRouter
4、0(config)#norouteeig100Router0(config)#routerospf100Router0(config-router)#network192.168.0.00.0.255.255area0Router0(config-router)#Router1(config)#noroutereig100Router1(config)#routerospf100Router1(config-router)#network192.168.0.00.0.255.255area0Router1(config-rout
5、er)#Router2(config)#noroutereig100Router2(config)#routerospf100Router2(config-router)#network192.168.0.00.0.255.255area0Router2(config-router)#注意:先配置R0和R2,再配置R1步骤三:分别查看R0、R1和R2的路由表Router0#showiprouteCodes:C-connected,S-static,I-IGRP,R-RIP,M-mobile,B-BGPD-EIGRP,EX-EIG
6、RPexternal,O-OSPF,IA-OSPFinterareaN1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2E1-OSPFexternaltype1,E2-OSPFexternaltype2,E-EGPi-IS-IS,L1-IS-ISlevel-1,L2-IS-ISlevel-2,ia-IS-ISinterarea*-candidatedefault,U-per-userstaticroute,o-ODRP-periodicdownloadedstaticrouteGat
7、ewayoflastresortisnotset1.0.0.0/24issubnetted,1subnetsC1.1.1.0isdirectlyconnected,Loopback0C192.168.10.0/24isdirectlyconnected,FastEthernet0/0C192.168.20.0/24isdirectlyconnected,Serial0/0O192.168.30.0/24[110/128]via192.168.20.2,00:00:31,Serial0/0O192.168.40.0/24[110/
8、129]via192.168.20.2,00:00:31,Serial0/0Router1#showiprouteCodes:C-connected,S-static,I-IGRP,R-RIP,M-mobile,B-BGPD-EIGRP,EX-EIGRPexte