[BSCI]配置OSPF nssa区域

719180_1248362113VDqG
R1-R5预配置
R1(config)#int lo0
R1(config-if)#ip add 1.1.1.1 255.255.255.255
R1(config-if)#int s2/1
R1(config-if)#ip add 12.0.0.1 255.255.255.0
R1(config-if)#no sh R1(config-if)#int s2/2
R1(config-if)#ip add 15.0.0.1 255.255.255.0
R1(config-if)#no sh
R1(config-if)#end
R2(config)#int lo0
R2(config-if)#ip add 2.2.2.2 255.255.255.255
R2(config-if)#int s2/1
R2(config-if)#ip add 12.0.0.2 255.255.255.0
R2(config-if)#no sh
R2(config-if)#int s2/2
R2(config-if)#ip add 23.0.0.2 255.255.255.0
R2(config-if)#no sh
R2(config-if)#end
R3(config)#int lo0
R3(config-if)#ip add 3.3.3.3 255.255.255.255
R3(config-if)#int s2/1
R3(config-if)#ip add 23.0.0.3 255.255.255.0
R3(config-if)#no sh
R3(config-if)#exit
R4(config)#int lo0
R4(config-if)#ip add 4.4.4.4 255.255.255.0
R4(config-if)#int s2/2
R4(config-if)#ip add 45.0.0.4 255.255.255.0
R4(config-if)#no sh R4(config-if)#exit
R5(config)#int lo0
R5(config-if)#ip add 5.5.5.5 255.255.255.255
R5(config-if)#int s2/1
R5(config-if)#ip add 15.0.0.5 255.255.255.0
R5(config-if)#no sh
R5(config-if)#int s2/2
R5(config-if)#ip add 45.0.0.5 255.255.255.0
R5(config-if)#no sh
R5(config-if)#exit
 
配置R1~R5的OSPF协议
R1(config)#router ospf 64
R1(config-router)#router-id 1.1.1.1
R1(config-router)#net 1.1.1.1 0.0.0.0 area 0
R1(config-router)#net 12.0.0.1 0.0.0.0 area 0
R1(config-router)#net 15.0.0.1 0.0.0.0 area 0
R1(config-router)#exit R2(config)#router ospf 64
R2(config-router)#router-id 2.2.2.2
R2(config-router)#net 2.2.2.2 0.0.0.0 area 0
R2(config-router)#net 12.0.0.2 0.0.0.0 area 0
R2(config-router)#net 23.0.0.2 0.0.0.0 area 32
R2(config-router)#exit
R3(config)#router ospf 64
R3(config-router)#router-id 3.3.3.3
R3(config-router)#net 3.3.3.3 0.0.0.0 area 32
R3(config-router)#net 23.0.0.3 0.0.0.0 area 32
R3(config-router)#exit
R4(config)#router ospf 64
R4(config-router)#router-id 4.4.4.4
R4(config-router)#net 4.4.4.4 0.0.0.0 area 54
R4(config-router)#net 45.0.0.4 0.0.0.0 area 54
R4(config-router)#exit R5(config)#router ospf 64
R5(config-router)#router-id 5.5.5.5
R5(config-router)#net 5.5.5.5 0.0.0.0 area 0
R5(config-router)#net 15.0.0.5 0.0.0.0 area 0
R5(config-router)#net 45.0.0.5 0.0.0.0 area 54
R5(config-router)#exit
 
配置Area 32为NSSA区域 
R2(config)#router ospf 64
R2(config-router)#area 32 nssa
R3#conf t R3(config)#router ospf 64
R3(config-router)#area 32 nssa
 
在R3上配置重分布
R3(config)#int lo11
R3(config-if)#ip add 172.16.1.1 255.255.255.0
R3(config-if)#int lo12
R3(config-if)#ip add 172.16.2.2 255.255.255.0
R3(config-if)#int lo13
R3(config-if)#ip add 172.16.3.3 255.255.255.0
R3(config-if)#int lo14
R3(config-if)#ip add 172.16.4.4 255.255.255.0
R3(config-if)#exit
R3(config)#router ospf 64
R3(config-router)#redistribute connected subnet
R3(config-router)#end
 
查看R3的OSPF数据库
R3#show ip ospf database
OSPF Router with ID (3.3.3.3) (Process ID 64)
Router Link States (Area 32) Link ID ADV Router Age Seq# Checksum Link count 2.2.2.2 2.2.2.2 615 0x80000005 0x008BBF 2 3.3.3.3 3.3.3.3 59 0x80000006 0x006BBD 3 Summary Net Link States (Area 32) Link ID ADV Router Age Seq# Checksum 1.1.1.1 2.2.2.2 615 0x80000004 0x004B9B 2.2.2.2 2.2.2.2 615 0x80000004 0x009A88 4.4.4.4 2.2.2.2 615 0x80000004 0x00C594 5.5.5.5 2.2.2.2 615 0x80000004 0x001581 12.0.0.0 2.2.2.2 615 0x80000004 0x00D20D 15.0.0.0 2.2.2.2 615 0x80000004 0x002E6E 45.0.0.0 2.2.2.2 615 0x80000004 0x002915 Type-7 AS External Link States (Area 32) //
 
在R3上重发布的路由成为了LSA 7型 Link ID ADV Router Age Seq# Checksum Tag 172.16.1.0 3.3.3.3 58 0x80000001 0x00FEC1 0 172.16.2.0 3.3.3.3 59 0x80000001 0x00F3CB 0 172.16.3.0 3.3.3.3 59 0x80000001 0x00E8D5 0 172.16.4.0 3.3.3.3 59 0x80000001 0x00DDDF 0
 
查看R2的路由表
R2#show ip route
 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 o - ODR, P - periodic downloaded static route Gateway of last resort is not set
1.0.0.0/32 is subnetted, 1 subnets O 1.1.1.1 [110/65] via 12.0.0.1, 00:42:04, Serial2/1
2.0.0.0/24 is subnetted, 1 subnets C 2.2.2.0 is directly connected, Loopback0 3.0.0.0/32 is subnetted, 1 subnets O 3.3.3.3 [110/65] via 23.0.0.3, 00:41:38, Serial2/2 4.0.0.0/32 is subnetted, 1 subnets O IA 4.4.4.4 [110/193] via 12.0.0.1, 00:42:04, Serial2/1 5.0.0.0/32 is subnetted, 1 subnets O 5.5.5.5 [110/129] via 12.0.0.1, 00:42:04, Serial2/1 23.0.0.0/24 is subnetted, 1 subnets C 23.0.0.0 is directly connected, Serial2/2 172.16.0.0/24 is subnetted, 4 subnets O N2 172.16.4.0 [110/20] via 23.0.0.3, 00:01:17, Serial2/2 O N2 172.16.1.0 [110/20] via 23.0.0.3, 00:01:17, Serial2/2 O N2 172.16.2.0 [110/20] via 23.0.0.3, 00:01:17, Serial2/2 O N2 172.16.3.0 [110/20] via 23.0.0.3, 00:01:17, Serial2/2 12.0.0.0/24 is subnetted, 1 subnets C 12.0.0.0 is directly connected, Serial2/1 45.0.0.0/24 is subnetted, 1 subnets O IA 45.0.0.0 [110/192] via 12.0.0.1, 00:42:04, Serial2/1 15.0.0.0/24 is subnetted, 1 subnets O 15.0.0.0 [110/128] via 12.0.0.1, 00:42:04, Serial2/1
 
查看R1的路由表与数据库
R1#show ip ospf database
OSPF Router with ID (1.1.1.1) (Process ID 64) Router Link States (Area 0) Link ID ADV Router Age Seq# Checksum Link count 1.1.1.1 1.1.1.1 1349 0x80000007 0x005737 5 2.2.2.2 2.2.2.2 754 0x80000007 0x00153F 3 5.5.5.5 5.5.5.5 1341 0x80000005 0x0040E8 3 Summary Net Link States (Area 0)
Link ID ADV Router Age Seq# Checksum 3.3.3.3 2.2.2.2 754 0x80000002 0x004D99 4.4.4.4 5.5.5.5 1341 0x80000002 0x00C412
23.0.0.0 2.2.2.2 754 0x80000004 0x009D3D 45.0.0.0 5.5.5.5 1341 0x80000002 0x002892 Type-5 AS External Link States Link ID ADV Router Age Seq# Checksum Tag 172.16.1.0 2.2.2.2 193 0x80000001 0x00B11D 0 172.16.2.0 2.2.2.2 193 0x80000001 0x00A627 0 172.16.3.0 2.2.2.2 193 0x80000001 0x009B31 0 172.16.4.0 2.2.2.2 194 0x80000001 0x00903B 0 R1#
 
 R1#show ip route
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 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 2.0.0.0/32 is subnetted, 1 subnets O 2.2.2.2 [110/65] via 12.0.0.2, 00:46:48, Serial2/1 3.0.0.0/32 is subnetted, 1 subnets O IA 3.3.3.3 [110/129] via 12.0.0.2, 00:43:48, Serial2/1 4.0.0.0/32 is subnetted, 1 subnets O IA 4.4.4.4 [110/129] via 15.0.0.5, 00:55:13, Serial2/2 5.0.0.0/32 is subnetted, 1 subnets O 5.5.5.5 [110/65] via 15.0.0.5, 00:55:35, Serial2/2 23.0.0.0/24 is subnetted, 1 subnets O IA 23.0.0.0 [110/128] via 12.0.0.2, 00:46:48, Serial2/1 172.16.0.0/24 is subnetted, 4 subnets O E2 172.16.4.0 [110/20] via 12.0.0.2, 00:03:25, Serial2/1 O E2 172.16.1.0 [110/20] via 12.0.0.2, 00:03:25, Serial2/1 O E2 172.16.2.0 [110/20] via 12.0.0.2, 00:03:25, Serial2/1 O E2 172.16.3.0 [110/20] via 12.0.0.2, 00:03:25, Serial2/1
12.0.0.0/24 is subnetted, 1 subnets C 12.0.0.0 is directly connected, Serial2/1 45.0.0.0/24 is subnetted, 1 subnets O IA 45.0.0.0 [110/128] via 15.0.0.5, 00:55:24, Serial2/2 15.0.0.0/24 is subnetted, 1 subnets C 15.0.0.0 is directly connected, Serial2/2
 
总结:
1. 因为R3被连接到NSSA,所以它将自己回环口上的路由作为类型7的LSA重发布到Area 32中
2. 作为NSSA和Area 0之间的ABR,R2接收类型7的LSA
3. 在SPF计算完转发数据库后,R2将类型7的LSA转换成类型5的LSA,并将它们洪泛到整个Area 0 如果加上“no-summary”参数,将使NSSA成为完全末节。它可以阻止类型3和类型4的汇总路由洪泛扩散到NSSA区域中,并减少该区域内路由器的路由表

你可能感兴趣的:(休闲,区域,ospf,BSCI,NSSA)