分类: 系统运维
2009-06-27 15:52:39
实验目的:
1、掌握类型1、2、3、4和5的LSA的作用。
2、掌握OSPF完全末节(Totally Stub)区域特点。
3、掌握OSPF Totally Stub区域配置方法。
4、掌握OSPF Stub区域配置要求: Stub区域没有ASBR,它至少拥有一个ABR。
5、注意:完全末节区域(NSSA)为CISCO私有的。
实验拓扑图:
实验步骤及要求:
1、配置各台路由器的IP地址,并且使用Ping命令确认各路由器的直连口的互通性。
2、配置OSPF与RIP的协议,并使用ping和show ip route命令进行确认协议正常工作。
3、为了完成实验需要在R3上配置重发布,配置如下:
R3(config)#router ospf 1 R3(config-router)#redistribute rip subnets metric 200 R3(config-router)#exit R3(config)# R3(config)#router rip R3(config-router)#redistribute ospf 1 metric 10 R3(config-router)#exit R3(config)#exit |
4、首先将area 1配置成ospf stub area区域。
5、查看R1路由器的路由表和数据链路状态数据库。
R1#show ip ospf database OSPF Router with ID (172.16.1.1) (Process ID 1) Router Link States (Area 1) Link ID ADV Router Age Seq# Checksum Link count 172.16.1.1 172.16.1.1 155 0x80000005 0x0055C7 3 172.16.255.5 172.16.255.5 155 0x80000005 0x004F97 2 Summary Net Link States (Area 1) Link ID ADV Router Age Seq# Checksum 0.0.0.0 172.16.255.5 168 0x80000001 0x00017B 172.16.2.0 172.16.255.5 168 0x80000002 0x0068D3 172.16.255.4 172.16.255.5 168 0x80000002 0x00B7C6 172.16.255.8 172.16.255.5 168 0x80000002 0x001228 R1# R1#show ip route Gateway of last resort is 172.16.255.2 to network 0.0.0.0 172.16.0.0/16 is variably subnetted, 5 subnets, 2 masks C 172.16.255.0/30 is directly connected, Serial1/1 O IA 172.16.255.4/30 [110/128] via 172.16.255.2, 00:04:19, Serial1/1 O IA 172.16.255.8/30 [110/192] via 172.16.255.2, 00:04:19, Serial1/1 C 172.16.1.0/24 is directly connected, Loopback0 O IA 172.16.2.0/24 [110/193] via 172.16.255.2, 00:04:19, Serial1/1 O*IA 0.0.0.0/0 [110/65] via 172.16.255.2, 00:04:19, Serial1/1 R1# |
6、通过stub的区域特性配置,已经可以有效的减少路由表的大小。但是此时R1的路由表并不是最精简的。可以使用totally stub区域特性来进一步的减少路由表尺寸。配置如下:
R2(config)#router ospf 1 R2(config-router)#area 1 stub no-summary R2(config-router)#exit R2(config)#exit R2# |
R1(config)#router ospf 1 R1(config-router)#area 1 stub R1(config-router)#exit R1(config)#exit R1# |
7、再次查看R1的路由表。
R1#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, 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 o - ODR, P - periodic downloaded static route Gateway of last resort is 172.16.255.2 to network 0.0.0.0 172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks C 172.16.255.0/30 is directly connected, Serial1/1 C 172.16.1.0/24 is directly connected, Loopback0 O*IA 0.0.0.0/0 [110/65] via 172.16.255.2, 00:34:32, Serial1/1 R1# |
8、查看R1的链路状态数据库。现在R1的链路状态数据库,仅有类型1和经过汇总的类型3的LSA。而其它的OSPF区域LSA被禁止了。
R1#show ip ospf database OSPF Router with ID (172.16.1.1) (Process ID 1) Router Link States (Area 1) Link ID ADV Router Age Seq# Checksum Link count 172.16.1.1 172.16.1.1 387 0x80000006 0x0053C8 3 172.16.255.5 172.16.255.5 412 0x80000006 0x004D98 2 Summary Net Link States (Area 1) Link ID ADV Router Age Seq# Checksum 0.0.0.0 172.16.255.5 295 0x80000003 0x00FC7D R1# |
9、使用ping命令确认路由。
R1#ping 10.1.1.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds: .!!!! Success rate is 80 percent (4/5), round-trip min/avg/max = 216/570/1488 ms R1# |
10、本次实验的关键是:完全末节区域(Totally Stub Area)拒绝了类型3、类型4和类型5的LSA。而对于其它区域的非OSPF自治系统的网络使用默认路由替代。
11、实验完成。