OSPF(Open Shortest Path First)开放式最短路径优先协议04
OSPF特殊区域:在ospf多域环境下lsa5是在AS系统内泛洪扩散的,我们知道到lsa5是ASBR路由始发的用来通告区域内部网络到外部,可有些时候这些lsa是多余的,如图所示在区域1中我们只需要lsa3就行了或者说我们通过一条缺省路由用来通告区域1,这些lsa通告有时回占用总个区域lsa的50%以上,这时候我们就可以把区域1配置为末梢区域,由于末梢区域的特性是阻止外部区域在本区域内部传播扩散的,这样我就可以减小区域1内的内存和cpu的使用量以及减少我们在排错的麻烦
末梢区域满足的条件
1.区域不能作为虚链路的穿越区域
2.Stub区域里无自治系统边界路由器ASBR
3.不是骨干区域Area 0
http://blog.运维网.com/attachment/201110/154331618.jpg
R2,R3各有一个环回口通告进area0,所有的外部路由全部重分布进OSPF进程。在R1上应该能看到4条E2路由,2条IA路由。
看下R1上EIGRP进来的两条路由的下一跳。
2.0.0.0/32 is subnetted, 1 subnets
O E2 2.2.2.2 via 12.0.0.2, 00:02:56, Serial1/0
22.0.0.0/32 is subnetted, 1 subnets
O E2 22.22.22.22 via 12.0.0.2, 00:02:51, Serial1/0
看下这两条路由的forward metric
R1(config-router)#do show ip ro 2.2.2.2
Routing entry for 2.2.2.2/32
Known via "ospf 1", distance 110, metric 20, type extern 2, forward metric 64 因为没有FA,将包发到始发的ASBR上。forward metric就是去往ASBR的metric,如果有forward address就是到达forward address的metric。
Last update from 12.0.0.2 on Serial1/0, 00:01:47 ago
Routing Descriptor Blocks:
* 12.0.0.2, from 2.2.2.2, 00:01:47 ago, via Serial1/0
Route metric is 20, traffic share count is 1
将area 1设为stub区域,再看下路由
R1,R2,R4
area 1 stub
再看下R1的路由表:
2.0.0.0/32 is subnetted, 1 subnets
O E2 2.2.2.2 via 13.0.0.3, 00:00:05, Serial1/1
22.0.0.0/32 is subnetted, 1 subnets
O E2 22.22.22.22 via 13.0.0.3, 00:00:08, Serial1/1
100.0.0.0/32 is subnetted, 1 subnets
O IA 100.0.0.1 via 12.0.0.2, 00:00:05, Serial1/0
看下同一条路由的forward metric
R1(config-router)#do show ip ro 2.2.2.2
Routing entry for 2.2.2.2/32
Known via "ospf 1", distance 110, metric 20, type extern 2, forward metric 65经由R3到达R2的路由。 收到E2路由,
Last update from 13.0.0.3 on Serial1/1, 00:01:27 ago
Routing Descriptor Blocks:
* 13.0.0.3, from 2.2.2.2, 00:01:27 ago, via Serial1/1
Route metric is 20, traffic share count is 1
从多个方向收到一条E2路由的时候,AD相同的情况下,先比较 metric然后再比较forward metric(其中有FA的影响)。选路不做重点讨论,在下节课会着重去讲。
看下R4的路由表:
O*IA 0.0.0.0/0 via 14.0.0.1, 00:03:22, Serial1/2
LSDB:
OSPF Router with ID (4.4.4.4) (Process ID 1)
Router Link States (Area 1)
Link ID ADV Router Age Seq# Checksum Link count
1.1.1.1 1.1.1.1 248 0x80000012 0x001E82 4
2.2.2.2 2.2.2.2 254 0x8000000C 0x00600C 2
4.4.4.4 4.4.4.4 247 0x80000004 0x002D32 2
Summary Net Link States (Area 1)
Link ID ADV Router Age Seq# Checksum
0.0.0.0 2.2.2.2 259 0x80000001 0x0075C0
13.0.0.0 2.2.2.2 259 0x80000006 0x00449F
100.0.0.1 2.2.2.2 259 0x80000006 0x004883
123.0.0.0 2.2.2.2 259 0x80000006 0x00268F
200.0.0.1 2.2.2.2 259 0x80000006 0x00392D
结论:STUB区域隔离4类LSA和5类LSA。会由ABR强制(任何两个非骨干区域,都不能直接通信,必须要经过骨干区域)
totally stub:
由于3类LSA,和默认都是ABR下放的,totally只需要在ABR上做即可
R2(config-router)#area 1 stub no-summary
R4上路由表:
12.0.0.0/24 is subnetted, 1 subnets
O 12.0.0.0 via 14.0.0.1, 00:13:40, Serial1/2
14.0.0.0/24 is subnetted, 1 subnets
C 14.0.0.0 is directly connected, Serial1/2
O*IA 0.0.0.0/0 via 14.0.0.1, 00:01:50, Serial1/2
R4上LSDB:
OSPF Router with ID (4.4.4.4) (Process ID 1)
Router Link States (Area 1)
Link ID ADV Router Age Seq# Checksum Link count
1.1.1.1 1.1.1.1 159 0x80000013 0x001C83 4
2.2.2.2 2.2.2.2 100 0x8000000D 0x005E0D 2
4.4.4.4 4.4.4.4 821 0x80000006 0x002934 2
Summary Net Link States (Area 1)
Link ID ADV Router Age Seq# Checksum
0.0.0.0 2.2.2.2 100 0x80000003 0x0071C2
可以看出,totally stub 是隔离3,4,5类LSA,并且下放一条3类的默认路由。
NSSA:
R1,R2,R4:
area 1 nssa
看R4的路由表:
1.0.0.0/32 is subnetted, 1 subnets
O N2 1.1.1.1 via 14.0.0.1, 00:05:06, Serial1/2
2.0.0.0/32 is subnetted, 1 subnets
O N2 2.2.2.2 via 14.0.0.1, 00:05:06, Serial1/2
100.0.0.0/32 is subnetted, 1 subnets
O IA 100.0.0.1 via 14.0.0.1, 00:05:06, Serial1/2
200.0.0.0/32 is subnetted, 1 subnets
O IA 200.0.0.1 via 14.0.0.1, 00:05:06, Serial1/2
22.0.0.0/32 is subnetted, 1 subnets
O N2 22.22.22.22 via 14.0.0.1, 00:05:06, Serial1/2
11.0.0.0/32 is subnetted, 1 subnets
O N2 11.11.11.11 via 14.0.0.1, 00:05:06, Serial1/2
123.0.0.0/24 is subnetted, 1 subnets
O IA 123.0.0.0 via 14.0.0.1, 00:05:07, Serial1/2
12.0.0.0/24 is subnetted, 1 subnets
O 12.0.0.0 via 14.0.0.1, 00:05:07, Serial1/2
13.0.0.0/24 is subnetted, 1 subnets
O IA 13.0.0.0 via 14.0.0.1, 00:05:07, Serial1/2
14.0.0.0/24 is subnetted, 1 subnets
C 14.0.0.0 is directly connected, Serial1/2
NSSA区域会将外部路由引入,用7类LSA代替5类LSA在本NSSA区域泛洪。NSSA不会下放默认路由,在R2上下放默认路由。
R2(config-router)#area 1 nssa default-information-originate
R4上看到一条N2的路由:
O*N2 0.0.0.0/0 via 14.0.0.1, 00:00:05, Serial1/2
对于R4来说,R1是ASBR,R2是ASBR的同时也是ABR,但是R2下放了一条默认路由,访问这个区域以外的路由,除了R1进来的路由,其他的都可以通过默认路由走。R2进来的7类LSA,完全没有必要。
在R2上:
R2(config-router)#area 1 nssa no-redistribution
在R4上看,没有了R2原来的两条7类路由。
由此得出结论,NSSA区域可以隔离4,5类LSA,不会下放默认路由。
totally NSSA(CISCO私有)
R2上:
R2(config-router)#area 1 nssa no-summary
看下R4的路由表
1.0.0.0/32 is subnetted, 1 subnets
O N2 1.1.1.1 via 14.0.0.1, 00:01:30, Serial1/2
11.0.0.0/32 is subnetted, 1 subnets
O N2 11.11.11.11 via 14.0.0.1, 00:01:30, Serial1/2
12.0.0.0/24 is subnetted, 1 subnets
O 12.0.0.0 via 14.0.0.1, 00:01:30, Serial1/2
14.0.0.0/24 is subnetted, 1 subnets
C 14.0.0.0 is directly connected, Serial1/2
O*IA 0.0.0.0/0 via 14.0.0.1, 00:00:04, Serial1/2
totally NSSA会干掉3,4,5类LSA,并且会下放一条3类的默认路由。
注:area 1 nssa no-redistribution default-information-originate no-summary3条命令可以连用,后两条多此一举,3类默认路由会优于7类的默认路由。虽然LSDB里面7类还有。
页:
[1]