分类: 系统运维
2009-06-27 15:53:38
实验目的:
1、掌握类型1、2、3、4和5的LSA,及类型7的LSA在完全次末节区域的作用。
2、掌握次未节区域(NSSA)和完全次末节区域(NSSA Totally Stub Area)特点。
3、掌握两种区域配置方法。
4、注意:完全次末节区域(Totally NSSA)为CISCO私有的。
实验拓扑图:
实验步骤及要求:
1、配置各台路由器的IP地址,并且使用Ping命令确认各路由器的直连口的互通性。
2、配置OSPF与RIP的协议,并使用ping和show ip route命令进行确认协议正常工作。
3、为了完成实验需要在R2和R5上配置重发布,配置如下:
R2(config)#router ospf 1 R2(config-router)#redistribute rip metric 200 subnets R2(config-router)#exit R2(config)# R2(config)#router rip R2(config-router)#redistribute ospf 1 metric 10 R2(config-router)#exit R2(config)#exit |
R5(config)#router ospf 1 R5(config-router)#redistribute rip metric 200 subnets R5(config-router)#exit R5(config)# R5(config)#router rip R5(config-router)#redistribute ospf 1 metric 10 R5(config-router)#exit R5(config)#exit |
4、查看R3的路由表的路由表和链路状态数据库。
R3#show ip ospf database OSPF Router with ID (172.16.255.5) (Process ID 1) Router Link States (Area 1) Link ID ADV Router Age Seq# Checksum Link count 172.16.255.1 172.16.255.1 534 0x80000005 0x008564 2 172.16.255.5 172.16.255.5 679 0x80000004 0x007390 4 172.16.255.9 172.16.255.9 672 0x80000003 0x00A42F 2 Summary Net Link States (Area 1) Link ID ADV Router Age Seq# Checksum 172.16.255.8 172.16.255.9 662 0x80000001 0x005B1A Summary ASB Link States (Area 1) Link ID ADV Router Age Seq# Checksum 192.168.1.1 172.16.255.9 98 0x80000001 0x006E5C Type-5 AS External Link States Link ID ADV Router Age Seq# Checksum Tag 131.131.1.0 172.16.255.1 513 0x80000001 0x007BAA 0 131.131.2.0 172.16.255.1 513 0x80000001 0x0070B4 0 192.168.1.0 192.168.1.1 94 0x80000002 0x001FF5 0 192.168.2.0 192.168.1.1 94 0x80000002 0x0014FF 0 R3# |
R3#show ip route Gateway of last resort is not set 172.16.0.0/30 is subnetted, 3 subnets C 172.16.255.0 is directly connected, Serial1/0 C 172.16.255.4 is directly connected, Serial1/1 O IA 172.16.255.8 [110/128] via 172.16.255.6, 00:07:46, Serial1/1 131.131.0.0/24 is subnetted, 2 subnets O E2 131.131.1.0 [110/200] via 172.16.255.1, 00:00:30, Serial1/0 O E2 131.131.2.0 [110/200] via 172.16.255.1, 00:00:30, Serial1/0 O E2 192.168.1.0/24 [110/200] via 172.16.255.6, 00:00:30, Serial1/1 O E2 192.168.2.0/24 [110/200] via 172.16.255.6, 00:00:30, Serial1/1 R3# |
4、由于area 1路由违背了stub区域要求,即stub区域不能够有ASBR路由器的特性。因此本实验采用NSSA的配置方法来减少R3路由器的路由表大小。
5、在R4上将area 1区域配置成NSSA区域:
R4(config)#router ospf 1 R4(config-router)#area 1 nssa default-information-originate R4(config-router)#exit R4(config)# |
6、在R3上作如下配置。
R3(config)#router ospf 1 R3(config-router)#area 1 nssa R3(config-router)#exit R3(config)#exit R3# |
7、在R2上作如下配置。
R2(config)#router ospf 1 R2(config-router)#area 1 nssa R2(config-router)#exit R2(config)#exit R3# |
8、再次查看R3路由表和链路状态数据库。
R3#show ip route Gateway of last resort is 172.16.255.6 to network 0.0.0.0 172.16.0.0/30 is subnetted, 3 subnets C 172.16.255.0 is directly connected, Serial1/0 C 172.16.255.4 is directly connected, Serial1/1 O IA 172.16.255.8 [110/128] via 172.16.255.6, 00:01:10, Serial1/1 131.131.0.0/24 is subnetted, 2 subnets O N2 131.131.1.0 [110/200] via 172.16.255.1, 00:01:10, Serial1/0 O N2 131.131.2.0 [110/200] via 172.16.255.1, 00:01:10, Serial1/0 O*N2 0.0.0.0/0 [110/1] via 172.16.255.6, 00:01:10, Serial1/1 R3# |
下面显示的是R3的链路状态数据库。
R3#show ip ospf database OSPF Router with ID (172.16.255.5) (Process ID 1) Router Link States (Area 1) Link ID ADV Router Age Seq# Checksum Link count 172.16.255.1 172.16.255.1 314 0x80000007 0x0027BA 2 172.16.255.5 172.16.255.5 314 0x80000008 0x0011E8 4 172.16.255.9 172.16.255.9 450 0x80000005 0x004C7D 2 Summary Net Link States (Area 1) Link ID ADV Router Age Seq# Checksum 172.16.255.8 172.16.255.9 850 0x80000002 0x00FE6F Type-7 AS External Link States (Area 1) Link ID ADV Router Age Seq# Checksum Tag 0.0.0.0 172.16.255.9 850 0x80000001 0x00C464 0 131.131.1.0 172.16.255.1 318 0x80000001 0x00213D 0 131.131.2.0 172.16.255.1 318 0x80000001 0x001647 0 R3# |
9、查看R2或R3的路由表。
R2#show ip route Gateway of last resort is 172.16.255.2 to network 0.0.0.0 172.16.0.0/30 is subnetted, 3 subnets C 172.16.255.0 is directly connected, Serial1/1 O 172.16.255.4 [110/128] via 172.16.255.2, 00:07:26, Serial1/1 O IA 172.16.255.8 [110/192] via 172.16.255.2, 00:07:26, Serial1/1 131.131.0.0/24 is subnetted, 2 subnets R 131.131.1.0 [120/1] via 131.131.2.2, 00:00:06, Serial1/0 C 131.131.2.0 is directly connected, Serial1/0 O*N2 0.0.0.0/0 [110/1] via 172.16.255.2, 00:07:26, Serial1/1 R2# |
下面是R1路由器的路由表内容:
R1#show ip route Gateway of last resort is 131.131.2.1 to network 0.0.0.0 R 172.16.0.0/16 [120/10] via 131.131.2.1, 00:00:28, Serial1/1 131.131.0.0/24 is subnetted, 2 subnets C 131.131.1.0 is directly connected, Loopback0 C 131.131.2.0 is directly connected, Serial1/1 R* 0.0.0.0/0 [120/10] via 131.131.2.1, 00:00:28, Serial1/1 R1# |
10、在R1上使用ping命令测试默认路由有效性:
R1#ping 192.168.2.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.168.2.1, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 288/384/432 ms R1# |
11、为了进一步简化area 1区域的路由器的路由表,我们采用完全次末节区域(Totally NSSA)特性来配置area 1。
12、在NSSA的基础上配置Totally NSSA区域特性,只需要在R4的路由器上作如下配置:
R4(config)#router ospf 1 R4(config-router)#area 1 nssa no-summary R4(config-router)#exit |
13、再次查看R3的路由表和链路状态数据库:
R3#show ip route Gateway of last resort is 172.16.255.6 to network 0.0.0.0 172.16.0.0/30 is subnetted, 2 subnets C 172.16.255.0 is directly connected, Serial1/0 C 172.16.255.4 is directly connected, Serial1/1 131.131.0.0/24 is subnetted, 2 subnets O N2 131.131.1.0 [110/200] via 172.16.255.1, 00:20:24, Serial1/0 O N2 131.131.2.0 [110/200] via 172.16.255.1, 00:20:24, Serial1/0 O*IA 0.0.0.0/0 [110/65] via 172.16.255.6, 00:02:10, Serial1/1 R3# |
R3#show ip ospf database OSPF Router with ID (172.16.255.5) (Process ID 1) Router Link States (Area 1) Link ID ADV Router Age Seq# Checksum Link count 172.16.255.1 172.16.255.1 1504 0x80000007 0x0027BA 2 172.16.255.5 172.16.255.5 1504 0x80000008 0x0011E8 4 172.16.255.9 172.16.255.9 1640 0x80000005 0x004C7D 2 Summary Net Link States (Area 1) Link ID ADV Router Age Seq# Checksum 0.0.0.0 172.16.255.9 396 0x80000001 0x0070FF Type-7 AS External Link States (Area 1) Link ID ADV Router Age Seq# Checksum Tag 0.0.0.0 172.16.255.9 66 0x80000002 0x00C265 0 131.131.1.0 172.16.255.1 1508 0x80000001 0x00213D 0 131.131.2.0 172.16.255.1 1508 0x80000001 0x001647 0 R3# |
14、查看R1和R2路由表,并且使用ping命令确认路由。
R2#show ip route Gateway of last resort is 172.16.255.2 to network 0.0.0.0 172.16.0.0/30 is subnetted, 2 subnets C 172.16.255.0 is directly connected, Serial1/1 O 172.16.255.4 [110/128] via 172.16.255.2, 00:23:09, Serial1/1 131.131.0.0/24 is subnetted, 2 subnets R 131.131.1.0 [120/1] via 131.131.2.2, 00:00:17, Serial1/0 C 131.131.2.0 is directly connected, Serial1/0 O*IA 0.0.0.0/0 [110/129] via 172.16.255.2, 00:04:46, Serial1/1 R2# |
R1#show ip route Gateway of last resort is 131.131.2.1 to network 0.0.0.0 R 172.16.0.0/16 [120/10] via 131.131.2.1, 00:00:13, Serial1/1 131.131.0.0/24 is subnetted, 2 subnets C 131.131.1.0 is directly connected, Loopback0 C 131.131.2.0 is directly connected, Serial1/1 R* 0.0.0.0/0 [120/10] via 131.131.2.1, 00:00:13, Serial1/1 R1# |
R1#ping 192.168.2.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.168.2.1, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 336/454/528 ms R1# |
15、最后,到R5的路由器上查看在R3路由器上的类型7的LSA是否被转换为类型5的LSA:
R5#show ip ospf database OSPF Router with ID (192.168.1.1) (Process ID 1) Router Link States (Area 0) Link ID ADV Router Age Seq# Checksum Link count 172.16.255.9 172.16.255.9 338 0x80000004 0x005DC2 2 192.168.1.1 192.168.1.1 767 0x80000004 0x002753 2 Summary Net Link States (Area 0) Link ID ADV Router Age Seq# Checksum 172.16.255.0 172.16.255.9 81 0x80000002 0x002C10 172.16.255.4 172.16.255.9 1337 0x80000002 0x0081F6 Type-5 AS External Link States Link ID ADV Router Age Seq# Checksum Tag 131.131.1.0 172.16.255.9 1761 0x80000001 0x0085DA 0 131.131.2.0 172.16.255.9 1761 0x80000001 0x007AE4 0 192.168.1.0 192.168.1.1 767 0x80000003 0x001DF6 0 192.168.2.0 192.168.1.1 767 0x80000003 0x001201 0 R5# |
16、实验完成。