OSPF协议实验

2018-01-01  本文已影响0人  七分仙气

安徽工业经济职业技术学院-31715-17#418


一·实验目的

通过本实验,可掌握一下技能:

*会在路由器上启动ospf协议

*能让相应网络进入OSPF进程

*查看OSPF路由信息

*查看OSPF协议信息 

二·实验拓扑图及接口IP地址

三、实验配置步骤

Router0(config)#interface loopback 0

 Router0(config-if)#ip address 1.1.1.1 255.255.255.0 

Router0(config-if)#no shutdown 

Router0(config-if)# Router1(config)#interface loopback 0

 Router1(config-if)#ip address 2.2.2.2 255.255.255.0 

Router1(config-if)#no shutdown

Router2(config)#interface loopback 0 

 Router2(config-if)#ip address 3.3.3.3 255.255.255.0

 Router2(config-if)#no shutdown

分别去除EIGRP然后配置OSPF

Router0(config)#no route eig 100 

Router0(config)#router ospf 100 

 Router0(config-router)#network 192.168.0.0 0.0.255.255 area 0

 Router0(config-router)# Router1(config)#no router eig 100 

Router1(config)#router ospf 100

 Router1(config-router)#network 192.168.0.0 0.0.255.255 area 0

 Router1(config-router)# Router2(config)#no router eig 100

 Router2(config)#router ospf 100

 Router2(config-router)#network 192.168.0.0 0.0.255.255 area 0

 Router2(config-router)#         #注意:先配置R0 和R2,再配置R1

分别查看R0、R1和R2的路由表

Router0#show ip route

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

 D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

 N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

 E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP

 i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area * 

- candidate default, U - per-user static route, o - ODR

 P - periodic downloaded static route 

Gateway of last resort is not set 

 1.0.0.0/24 is subnetted, 1 subnets

 C 1.1.1.0 is directly connected, Loopback0

 C 192.168.10.0/24 is directly connected, FastEthernet0/0 

C 192.168.20.0/24 is directly connected, Serial0/0 

 O 192.168.30.0/24 [110/128] via 192.168.20.2, 00:00:31, Serial0/0

 O 192.168.40.0/24 [110/129] via 192.168.20.2, 00:00:31, Serial0/0 

 Router1#show ip route Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP

 D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

 N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2    

    E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP   

     i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area    

    * - candidate default, U - per-user static route, o - ODR  

      P - periodic downloaded static route Gateway of last resort is not set   

   2.0.0.0/24 is subnetted, 1 subnets 

C       2.2.2.0 is directly connected, Loopback0 

O    192.168.10.0/24 [110/65] via 192.168.20.1, 00:01:35, Serial0/0

 C    192.168.20.0/24 is directly connected, Serial0/0

 C    192.168.30.0/24 is directly connected, Serial0/1 

O    192.168.40.0/24 [110/65] via 192.168.30.2, 00:01:35, Serial0/1

Router#show ip route 

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

 D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 

 N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

 E1 - OSPF external type 1, E2 - OSPF external type 2

, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area * 

- candidate default, U - per-user static route, 

o - ODR P - periodic downloaded static route Gateway of last resort is not set 3.0.0.0/24 is subnetted, 1 subnets

 C 3.3.3.0 is directly connected, Loopback0 

 O 192.168.10.0/24 [110/129] via 192.168.30.1, 00:02:14, Serial0/0 

O 192.168.20.0/24 [110/128] via 192.168.30.1, 00:02:24, Serial0/0

 C 192.168.30.0/24 is directly connected, Serial0/0 

C 192.168.40.0/24 is directly connected, FastEthernet0/0

上一篇下一篇

猜你喜欢

热点阅读