ospf特殊区域,默认路由,汇总

ospf 特殊区域 , 默认路由 , 汇总 , 认证
 
一: OSPF 特殊区域:
 
LSA types allowed per area type.
                      
 
 
 
 
 
 
Area Type
1&2
3
4
5
7
Backbone (area 0)
Yes
Yes
Yes
Yes
No
Non-backbone, non-stub
Yes
Yes
Yes
Yes
No
Stub
Yes
Yes
No
No
No
Totally stubby
Yes
No[*]
No
No
No
Not-so-stubby
Yes
Yes
NO
No
Yes
Total NSSA
Yes
No
No
No
Yes
 
 
[*] Except for a single type 3 LSA per ABR, advertising the default route.
 
 
Stub 区域特点如下:
 
1.As in any area, all routers in a stub area must have identical link-state databases. To ensure this condition, all stub routers will
set a flag (the E-bit) in their Hello packets to zero (表示不接受 4 5 LSA ; they will not accept any Hello from a router in which the E-bit is set to one. As
a result, adjacencies will not be established with any router that is not configured as a stub router.
2. Virtual links cannot be configured within, nor transit, a stub area.
3.No router within a stub area can be an ASBR. This restriction is intuitively understandable because ASBRs produce type 5
LSAs, and type 5 LSAs cannot exist within a stub area.
4.A stub area might have more than one ABR, but because of the default route, the internal routers cannot determine which router
is the optimal gateway to the ASBR.
 
根据特性一可以看出, stub 区域需要在区域内的所有路由器上进行配置,配置命令如下:
Area 1 stub
Stub 区域的 ABR 会产生一条三类的默认路由在区域内泛洪
 
 
 
Total stub 区域特点: :
除具备 stub 区域的所有特点外,还具备有阻止 3 LSA 的特性, Total stub 区域需要在 stub 区域的基础上,在 ABR 上配置如下命令:
Area 1 stub no-summary
 
NSSA 区域的特点:
 
The NSSA External LSA has a flag in its header known as the P-bit. The NSSA ASBR has the option of setting or clearing the P-bit. If the
NSSA's ABR receives a type 7 LSA with the P-bit set to one, it will translate the type 7 LSA into a type 5 LSA and flood it throughout the
other areas. If the P-bit is set to zero, no translation will take place and the destination in the type 7 LSA will not be
advertised outside of the NSSA. This option allows you to design an NSSA in which the external destinations learned in that area are
known only in that area.
 
NSSA 区域也需要在区域内所有路由器上进行配置,命令如下:
Area 1 nssa
 
注意: NSSA 区域的 ABR 不会自动产生一条 3 类的默认路由,需要管理员在 ABR 上进行手工配置,命令如下:
Area 1 nssa default-information-originate
 
Total NSSA 区域的特点:
 
NSSA 区域的基础上,阻止了 3 LSA ,并且能够自动产生一条 3 类的在区域内泛洪
 
提出疑问:为什么 NSSA 区域不能自动产生 3 类的默认路由,而
Stub total stub total nssa 却可以?
 
解决疑问:要知道, NSSA 区域能够通过 7 LSA 引入外部路由,并且 NSSA ABR 并不阻止 3 LSA 的进入,因此, NSSA 区域内部的路由器,可以在不需要默认路由的情况下实现域间通信和与外部通信,而其他三种特殊区域在没有默认路由的情况下,显然无法实现域间通信和与外部通信,故需要自动产生 3 类的默认路由加以弥补
 
 
 
 
 
 
二:默认路由:
 
OSPF 有两种方式产生默认路由:
1   通过命令 default-information originate
若想此命令生效,在路由器的路由表中必须要有一条默认路由,可通过静态路由写入一条静态路由,而后,路由器将产生一条 5 类的静态路由在整个 OSPF 域内进行泛洪
 
注意:若路由器处于特殊区域内,则将无法配置此命令!(若是特殊区域的 ABR ,且其至少连接了一个常规区域,则可配置此命令)
 
2   通过命令 default-information originate always
配置了此命令后,则不管路由器上是否有默认路由,路由器都会产生一条 5 类的静态路由在整个 OSPF 域内进行泛洪
 
注意:若路由器处于特殊区域内,则将无法配置此命令!(若是特殊区域的 ABR ,且其至少连接了一个常规区域,则可配置此命令)
 
三: OSPF 地址汇总:
汇总有两种命令
1 Area 1 range 172.168.0.0 255.255.252.0
此命令的意思是,将 area 1 中的 172.168.0.0 汇总成掩码长度为 18 的地址,并向除 area 1 以外的区域以三类 LSA 的形式泛洪,由此可以推断出,此命令一般用于 ABR 上。
注意: ABR 上配置了该命令后, ABR 路由器会首先检查路由表,只有当汇总的主网段在路由表中出现,并且该路由条目是由 LSA 1 计算的来的(即通过 network 引入), ABR 路由器才会产生一条 3 类的汇总 LSA ,向其他区域泛洪
2 Summary-address 172.168.0.0 255.255.252.0
此命令的意思是,将该汇总信息向其所连的所有区域以 5 LSA 的形式泛洪(一般用于 ASBR 上)
注意: ASBR 上配置了该命令后, ASBR 路由器会首先检查路由表,只有当汇总的主网段在路由表中出现,并且该路由条目是由他自己通过重分布引入, ASBR 路由器才会产生一条 5 类的汇总 LSA ,在整个区域内泛洪
 
四: OSPF 认证
1 .两个 OSPF 路由器之间的认证:
遵循以下步骤:
一:配置密钥(在接口模式中配置)
Ip ospf authentication-key cisco (明文认证)
 
Ip ospf message-digest-key 1 md5 cisco MD5 密文认证)
 
 
 
二:启用认证(在接口模式中配置)
Ip ospf authentication (明文认证)
 
Ip ospf authentication message-digest MD5 密文认证)
 
2 .区域认证:
遵循以下步骤:
一:区域内部启用认证( OSPF 进程模式下配置),配置此命令的路由器将会要求与该区域内的所有邻居进行认证
 
Area 0 authentication (明文认证)
 
Area 0 authentication message-digest MD5 密文认证)
 
二:配置密钥(接口模式下配置)
Ip ospf authentication-key cisco (明文认证)
 
Ip ospf message-digest-key 1 md5 cisco MD5 密文认证)
 

你可能感兴趣的:(职场,休闲,ospf)