您好,欢迎来到爱go旅游网。
搜索
您的当前位置:首页11实验 OSPF协议的STUB配置

11实验 OSPF协议的STUB配置

来源:爱go旅游网
实验 OSPF协议的STUB配置

课程名称: 实验名称: 实验目的: 通过此实验掌握OSPF协议,及其STUB配置。 计算机网络工程 OSPF协议的STUB配置 预备知识: 在OSPF里,STUB 区域是一些特定的区域,STUB 区域的ABR 不传播它们接收到的自治系统外部路由,在这些区域中路由器的路由表规模以及路由信息传递的数量都会大大减少。 STUB 区域是一种可选的配置属性,但并不是每个区域都符合配置的条件。通常来说,STUB 区域位于自治系统的边界,是那些只有一个ABR 的非骨干区域。 为保证到自治系统外的路由依旧可达,该区域的ABR 将生成一条缺省路由,并发布给STUB 区域中的其他非ABR 路由器。 配置STUB 区域时需要注意下列几点: 骨干区域不能配置成STUB 区域。 如果要将一个区域配置成STUB 区域,则该区域中的所有路由器必须都要配置STUB命令。 STUB 区域内不能存在ASBR,即自治系统外部的路由不能在本区域内传播。 虚连接不能穿过STUB 区域。 实验时间: 1.5小时 实验环境: 3台Cisco 7200路由器 两台PC机 实验任务: 任务一:OSPF协议的STUB配置 实验步骤: 任务一: OSPF协议的STUB配置 拓扑图如下。 1、进入路由器,更改第一台路由器名称。 Router>enable //进入特权模式 Router#configure terminal //进入全局模式 Enter configuration commands, one per line. End with CNTL/Z. Router(config)#hostname R1 //更改路由器名称 2、在R1配置serial 1/0端口的IP地址。 R1(config)#interface serial 1/0 //进入serial 1/0端口 R1(config-if)#ip address 192.168.1.1 255.255.255.0 //配置R1上serial 1/0端口的IP地址 R1(config-if)#no shutdown //激活serial 1/0端口 R1(config-if)#exit //退出serial 1/0端口模式 3、在R1配置快速以太网口的IP地址。 R1(config)#interface fastEthernet 0/0 //进入 fastEthernet 0/0端口 R1(config-if)#ip address 192.168.5.1 255.255.255.0 //配置R1上 fastEthernet 0/0端口上的IP地址 R1(config-if)#no shutdown //激活快速以太网口 4、进入路由器,更改第二台路由器名称。 Router>enable //进入特权模式 Router#configure terminal //进入全局模式 Enter configuration commands, one per line. End with CNTL/Z. Router(config)#hostname R2 //更改路由器名称 5、在R2配置serial 1/0端口的IP地址。 R2(config)#interface serial 1/0 //进入serial 1/0端口 R2(config-if)#ip address 192.168.1.2 255.255.255.0 //配置R2上serial 1/0端口的IP地址 R2(config-if)#no shutdown //激活serial 1/0端口 R2(config-if)#exit //退出serial 1/0端口模式 6、在R2配置serial 1/1 端口的IP地址。 R2(config)#interface serial 1/1 //进入serial 1/1端口 R2(config-if)#ip address 192.168.2.1 255.255.255.0 //配置R2上serial 1/1端口的IP地址 R2(config-if)#no shutdown //激活serial 1/1端口 7、进入路由器,配置第三台路由器名称。 Router>enable //进入特权模式 Router#configure terminal //进入全局模式 Enter configuration commands, one per line. End with CNTL/Z. Router(config)#hostname R3 //更改路由器名称 8、在R3配置serial 1/1端口的IP地址。 R3(config)#interface serial 1/1 //进入serial 1/1端口 R3(config-if)#ip address 192.168.2.2 255.255.255.0 //配置R3上serial1/1端口上的IP地址 R3(config-if)#no shutdown //激活serial 1/1端口 9、在R3配置快速以太网口的IP地址。 R3(config)#interface fastEthernet 0/0 //进入快速以太网0/0口 R3(config-if)#ip address 192.168.6.1 255.255.255.0 //配置R3上快速以太网口的IP地址 R3(config-if)#no shutdown //激活快速以太网口 10、显示各个路由器接口信息。 R1#show ip interface brief //显示R1路由器接口详细信息 Interface IP-Address OK? Method Status Protocol FastEthernet0/0 192.168.5.1 YES manual up up Serial1/0 192.168.1.1 YES manual up up Serial1/1 unassigned YES unset administratively down down R2#show ip interface brief //显示R2路由器接口详细信息 Interface IP-Address OK? Method Status Protocol FastEthernet0/0 unassigned YES unset administratively down down Serial1/0 192.168.1.2 YES manual up up Serial1/1 192.168.2.1 YES manual up up R3#show ip interface brief //显示R3路由器接口详细信息 Interface IP-Address OK? Method Status Protocol FastEthernet0/0 192.168.6.1 YES manual up up Serial1/0 unassigned YES unset administratively down down Serial1/1 192.168.2.2 YES manual up up 11、第一台PC机IP地址 第二台PC机IP地址 12、显示各个路由器路由表信息。 R1#show ip route //显示R1路由表信息 Codes: C - connected, S - static, 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 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route - ODR, P - periodic downloaded static route Gateway of last resort is not set C 192.168.1.0/24 is directly connected, Serial1/0 C 192.168.2.0/24 is directly connected, Serial1/1 R3#show ip route //显示R3路由表信息 Codes: C - connected, S - static, 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 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route - ODR, P - periodic downloaded static route Gateway of last resort is not set C 192.168.5.0/24 is directly connected, FastEthernet0/0 C 192.168.1.0/24 is directly connected, Serial1/0 R2#show ip route //显示R2路由表信息 Codes: C - connected, S - static, 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 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route - ODR, P - periodic downloaded static route Gateway of last resort is not set C 192.168.6.0/24 is directly connected, FastEthernet0/0 C 192.168.2.0/24 is directly connected, Serial1/1 13、进入R2,发布网段。 R2(config)#router ospf 100 //进入R2,发布192.168.1.0网段和192.168.2.0网段。100为进程号,可以随意设置。 R2(config-router)#network 192.168.1.0 0.0.0.255 area 0 // Area表示区域,这个网段属于哪个区域。0.0.0.255是反向掩码是发布OSPF必须用到的。 R2(config-router)#network 192.168.2.0 0.0.0.255 area 1 14、进入R1,发布网段。 R1(config)#router ospf 100 //进入R1,发布192.168.1.0网段和192.168.5.0网段。100为进程号,可以随意设置。 R1(config-router)#network 192.168.1.0 0.0.0.255 area 0 // Area同样表示区域。 R1(config-router)#network 192.168.5.0 0.0.0.255 area 0 15、进入R3,发布网段。 R3(config)#router ospf 100 //进入R3,发布192.168.2.0网段和192.168.6.0网段。100为进程号,可以随意设置。 R3(config-router)#network 192.168.2.0 0.0.0.255 area 1 R3(config-router)#network 192.168.6.0 0.0.0.255 area 1 16、显示各个路由器路由表信息。 R1#show ip route //显示R1路由表信息 Codes: C - connected, S - static, 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 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route - ODR, P - periodic downloaded static route Gateway of last resort is not set 192.168.5.0/24 [110/65] via 192.168.1.1, 00:16:55, Serial1/0 192.168.6.0/24 [110/65] via 192.168.2.2, 00:16:45, Serial1/1 //红色标记出来的部分表示是通过OSPF协议路由器学会的路由信息。 C 192.168.1.0/24 is directly connected, Serial1/0 C 192.168.2.0/24 is directly connected, Serial1/1 R3#show ip route //显示R3路由表信息 Codes: C - connected, S - static, 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 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route - ODR, P - periodic downloaded static route Gateway of last resort is not set C 192.168.5.0/24 is directly connected, FastEthernet0/0 IA 192.168.6.0/24 [110/129] via 192.168.1.2, 00:16:22, Serial1/0 C 192.168.1.0/24 is directly connected, Serial1/0 IA 192.168.2.0/24 [110/128] via 192.168.1.2, 00:16:30, Serial1/0 R2#show ip route //显示R2路由表信息 Codes: C - connected, S - static, 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 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route - ODR, P - periodic downloaded static route Gateway of last resort is not set IA 192.168.5.0/24 [110/129] via 192.168.2.1, 00:21:02, Serial1/1 C 192.168.6.0/24 is directly connected, FastEthernet0/0 IA 192.168.1.0/24 [110/128] via 192.168.2.1, 00:21:02, Serial1/1 C 192.168.2.0/24 is directly connected, Serial1/1 17、进行测试,OSPF基本配置成功。 R1#ping 192.168.6.1 //使用ping命令来测试连通性。 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.168.6.1, timeout is 2 seconds: !!!!! //!表明已经ping通 Success rate is 100 percent (5/5), round-trip min/avg/max = 60/77/92 ms R3#ping 192.168.5.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.168.5.1, timeout is 2 seconds: !!!!! //!表明已经ping通 Success rate is 100 percent (5/5), round-trip min/avg/max = 64/77/108 ms 18、配置末梢区域。 R2(config)#router ospf 100 //进入R2,配置末梢区域。 R2(config-router)#area 1 stub //进入R2,配置area 1 为末梢区域。 R3(config)#router ospf 100 //进入R3,配置末梢区域。 R3(config-router)#area 1 stub //进入R3,配置area 1 为末梢区域。 19、显示R3和R2路由器路由表信息,进行对比。 R3#show ip route //显示R3路由表信息。发现多了一条缺省路由。而这条缺省路由信息别的路由是学不到的。 Codes: C - connected, S - static, 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 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route - ODR, P - periodic downloaded static route Gateway of last resort is 192.168.2.1 to network 0.0.0.0 IA 192.168.5.0/24 [110/129] via 192.168.2.1, 00:01:44, Serial1/1 C 192.168.6.0/24 is directly connected, FastEthernet0/0 IA 192.168.1.0/24 [110/128] via 192.168.2.1, 00:01:44, Serial1/1 C 192.168.2.0/24 is directly connected, Serial1/1 O*IA 0.0.0.0/0 [110/65] via 192.168.2.1, 00:01:44, Serial1/1 //缺省路由 R2#show ip route //进入R2,显示路由表信息。发现没有缺省路由信息。 Codes: C - connected, S - static, 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 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route - ODR, P - periodic downloaded static route Gateway of last resort is not set 192.168.5.0/24 [110/65] via 192.168.1.1, 00:07:22, Serial1/0 192.168.6.0/24 [110/65] via 192.168.2.2, 00:06:48, Serial1/1 C 192.168.1.0/24 is directly connected, Serial1/0 C 192.168.2.0/24 is directly connected, Serial1/1 20、查看R1和R3的LSA类型。 R1#show ip ospf //查看ospf总信息,并查看LSA类型。 Routing Process \"ospf 100\" with ID 192.168.5.1 //路由进程“路由100 ”的编号192.168.5.1 Supports only single TOS(TOS0) routes Supports opaque LSA //支持不透明的LSA Supports Link-local Signaling (LLS) //支持链路本地信令 Initial SPF schedule delay 5000 msecs Minimum hold time between two consecutive SPFs 10000 msecs Maximum wait time between two consecutive SPFs 10000 msecs Minimum LSA interval 5 secs. Minimum LSA arrival 1 secs //最小的LSA间隔5秒。最小的LSA 1秒到来 LSA group pacing timer 240 secs //起搏的LSA 240秒计时器 Interface flood pacing timer 33 msecs //接口防洪泛起搏计时器33 秒 Retransmission pacing timer 66 msecs //重传计时器66 秒 Number of external LSA 0. Checksum Sum 0x000000 Number of opaque AS LSA 0. Checksum Sum 0x000000 Number of DCbitless external and opaque AS LSA 0 Number of DoNotAge external and opaque AS LSA 0 Number of areas in this router is 1. 1 normal 0 STUB 0 nssa External flood list length 0 Area BACKBONE(0) Number of interfaces in this area is 2 Area has no authentication SPF algorithm last executed 02:16:34.056 ago SPF algorithm executed 5 times //SPF级算法执行的5倍 Area ranges are Number of LSA 4.(由ABR生成,通告给ASBR) Checksum Sum 0x030FAC Number of opaque link LSA 0. Checksum Sum 0x000000 Number of DCbitless LSA 0 Number of indication LSA 0 Number of DoNotAge LSA 0 Flood list length 0 R3#show ip ospf //查看ospf总信息,并查看LSA类型。 Routing Process \"ospf 100\" with ID 192.168.6.1 Supports only single TOS(TOS0) routes Supports opaque LSA Supports Link-local Signaling (LLS) Initial SPF schedule delay 5000 msecs Minimum hold time between two consecutive SPFs 10000 msecs Maximum wait time between two consecutive SPFs 10000 msecs Minimum LSA interval 5 secs. Minimum LSA arrival 1 secs LSA group pacing timer 240 secs Interface flood pacing timer 33 msecs Retransmission pacing timer 66 msecs Number of external LSA 0. Checksum Sum 0x000000 Number of opaque AS LSA 0. Checksum Sum 0x000000 Number of DCbitless external and opaque AS LSA 0 Number of DoNotAge external and opaque AS LSA 0 Number of areas in this router is 1. 0 normal 1 STUB 0 nssa External flood list length 0 Area 1 Number of interfaces in this area is 2 It is a stub area Area has no authentication SPF algorithm last executed 00:41:33.680 ago SPF algorithm executed 8 times Area ranges are Number of LSA 5.(由ASBR通告给内部) Checksum Sum 0x018401 Number of opaque link LSA 0. Checksum Sum 0x000000 Number of DCbitless LSA 0 Number of indication LSA 0 Number of DoNotAge LSA 0 Flood list length 0 实验总结: 通过本实验我们学会了OSPF STUB协议的概念,还学会了OSPF协议的STUB配置,使我们再一次更深入的了解了路由协议。

因篇幅问题不能全部显示,请点此查看更多更全内容

Copyright © 2019- igat.cn 版权所有

违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务