VPS参考测评推荐
专注分享VPS主机优惠信息
衡天云优惠活动
华纳云最新优惠促销活动
jtti最新优惠促销活动

动态路由OSPF基础,区域划分,LSA类型,一分钟了解下

locvps
主机参考:VPS测评参考推荐/专注分享VPS服务器优惠信息!若您是商家可以在本站进行投稿,查看详情!此外我们还提供软文收录、PayPal代付、广告赞助等服务,查看详情!
我们发布的部分优惠活动文章可能存在时效性,购买时建议在本站搜索商家名称可查看相关文章充分了解该商家!若非中文页面可使用Edge浏览器同步翻译!PayPal代付/收录合作

一、OSPF报文

OSPF 协议报文直接封装为 IP 报文,协议号为 89。

OSPF 有五种类型的协议报文:

(1) Hello 报文:周期性发送,用来发现和维持 OSPF 邻居关系,以及进行 DR(DesignatedRouter,指定路由器)/BDR(Backup Designated Router,备份指定路由器)的选举。

(2) DD(Database Description,数据库描述)报文:描述了本地 LSDB(Link State DataBase,链路状态数据库)中每一条 LSA(Link State Advertisement,链路状态通告)的摘要信息,用于两台路由器进行数据库同步。

(3) LSR(Link State Request,链路状态请求)报文:向对方请求所需的 LSA。两台路由器互相交换 DD 报文之后,得知对端的路由器有哪些 LSA 是本地的 LSDB 所缺少的,这时需要发送LSR 报文向对方请求所需的 LSA。

(4) LSU(Link State Update,链路状态更新)报文:向对方发送其所需要的 LSA。

(5) LSAck(Link State Acknowledgment,链路状态确认)报文:用来对收到的 LSA 进行确认。

二、LSA类型

OSPF 中对链路状态信息的描述都是封装在 LSA 中发布出去,常用的 LSA 有以下几种类型:

(1) Router LSA(Type-1):由每个路由器产生,描述路由器的链路状态和开销,在其始发的区域内传播。

(2) Network LSA(Type-2):由 DR 产生,描述本网段所有路由器的链路状态,在其始发的区域内传播。

(3) Network Summary LSA(Type-3):由 ABR(Area Border Router,区域边界路由器)产生,描述区域内某个网段的路由,并通告给其他区域。

(4) ASBR Summary LSA(Type-4):由 ABR 产生,描述到 ASBR(Autonomous System Boundary Router,自治系统边界路由器)的路由,通告给相关区域。

(5) AS External LSA(Type-5):由 ASBR 产生,描述到 AS(Autonomous System,自治系统)外部的路由,通告到所有的区域(除了 Stub 区域和 NSSA 区域)。

(6) NSSA External LSA(Type-7):由 NSSA(Not-So-Stubby Area)区域内的 ASBR 产生,描述到 AS 外部的路由,仅在 NSSA 区域内传播。

(7) Opaque LSA:用于 OSPF 的扩展通用机制,目前有 Type-9、Type-10 和 Type-11 三种。其中,Type-9 LSA 仅在本地链路范围进行泛洪,用于支持 GR(Graceful Restart,平滑重启)的 Grace LSA 就是 Type-9 的一种类型;Type-10 LSA 仅在区域范围进行泛洪,用于支持MPLS TE 的 LSA 就是 Type-10 的一种类型;Type-11 LSA 可以在一个自治系统范围进行泛洪。

三、OSPF区域

1. 区域的边界是路由器,而不是链路。一个路由器可以属于不同的区域,但是一个网段(链路)只能属于一个区域,或者说每个运行 OSPF 的接口必须指明属于哪一个区域。划分区域后,可以在区域边界路由器上进行路由聚合,以减少通告到其他区域的 LSA 数量,还可以将网络拓扑变化带来的影响最小化。

2. 骨干区域与虚连接

(1) 骨干区域(Backbone Area)OSPF 划分区域之后,并非所有的区域都是平等的关系。其中有一个区域是与众不同的,它的区域号是 0,通常被称为骨干区域。骨干区域负责区域之间的路由,非骨干区域之间的路由信息必须通过骨干区域来转发。对此,OSPF 有两个规定:

所有非骨干区域必须与骨干区域保持连通; 骨干区域自身也必须保持连通。

在实际应用中,可能会因为各方面条件的限制,无法满足上面的要求。这时可以通过配置 OSPF 虚连接予以解决。

(2) 虚连接(Virtual Link)虚连接是指在两台 ABR 之间通过一个非骨干区域而建立的一条逻辑上的连接通道。它的两端必须是 ABR,而且必须在两端同时配置方可生效。为虚连接两端提供一条非骨干区域内部路由的区域称为传输区(Transit Area)。

3. Stub区域和Totally Stub区域Stub 区域是一些特定的区域,该区域的 ABR 会将区域间的路由信息传递到本区域,但不会引入自治系统外部路由,区域中路由器的路由表规模以及 LSA 数量都会大大减少。为保证到自治系统外的路由依旧可达,该区域的 ABR 将生成一条缺省路由 Type-3 LSA,发布给本区域中的其他非 ABR路由器。

为了进一步减少 Stub 区域中路由器的路由表规模以及 LSA 数量,可以将区域配置为 Totally Stub(完全 Stub)区域,该区域的 ABR 不会将区域间的路由信息和自治系统外部路由信息传递到本区域。为保证到本自治系统的其他区域和自治系统外的路由依旧可达,该区域的 ABR 将生成一条缺省路由 Type-3 LSA,发布给本区域中的其他非 ABR 路由器。

4. NSSA区域和Totally NSSA区域

NSSA(Not-So-Stubby Area)区域是 Stub 区域的变形,与 Stub 区域的区别在于 NSSA 区域允许引入自治系统外部路由,由 ASBR 发布 Type-7 LSA 通告给本区域。当 Type-7 LSA 到达 NSSA 的ABR 时,由 ABR 将 Type-7 LSA 转换成 Type-5 LSA,传播到其他区域。

可以将区域配置为 Totally NSSA(完全 NSSA)区域,该区域的 ABR 不会将区域间的路由信息传递到本区域。为保证到本自治系统的其他区域的路由依旧可达,该区域的 ABR 将生成一条缺省路由 Type-3 LSA,发布给本区域中的其他非 ABR 路由器。


1、 OSPF message

OSPF protocol message is directly encapsulated as IP message with protocol number of 89.

OSPF has five types of protocol messages:

(1) Hello message: sent periodically, used to discover and maintain OSPF neighbor relationship, as well as conduct DR (designated router) / BDR (backup designated router) election.

(2) DD (database description) message: describes the summary information of each LSA (link state advertisement) in the local LSDB (link state database), which is used for database synchronization between two routers.

(3) LSR (link state request) message: request the LSA required from the other party. After the two routers exchange DD messages with each other, they know which LSAS of the opposite router are missing from the local LSDB. At this time, they need to send LSR messages to request LSAS required by the other.

(4) LSU (link state update) message: send the required LSA to the other party.

(5) Lsack (link state acknowledgement) message: used to acknowledge the received LSA.

2、 LSA type

Link state information in OSPF is encapsulated and published in LSA. There are several types of LSA in common use:

(1) Router LSA (type-1): generated by each router, which describes the link state and cost of the router and propagates in the region it originates.

(2) Network LSA (type-2): generated by Dr, describes the link status of all routers in this network segment, and propagates in the region where they originate.

(3) Network Summary LSA (type-3): generated by ABR (area border router), which describes the route of a network segment in the area and informs other areas.

(4) ASBR summary LSA (type-4): generated by ABR, describes the route to ASBR (autonomous system boundary router), and notifies the relevant area.

(5) As external LSA (type-5): generated by ASBR, describes the route outside as (autonomous system), and notifies all areas (except stub area and NSSA area).

(6) NSSA external LSA (type-7): generated by ASBR in the NSSA (not so stubby area), describes the route to the outside of as, and propagates only in the NSSA area.

(7) Opaque LSA: a general extension mechanism for OSPF. Currently, there are three types: type-9, type-10 and type-11. Among them, the type-9 LSA only floods in the local link range, and the grace LSA used to support gr (graceful restart) is a type of type-9; the type-10 LSA only floods in the area range, and the LSA used to support MPLS TE is a type of type-10; the type-11 LSA can flood in an autonomous system range.

3、 OSPF area

1. The boundary of the area is router, not link. A router can belong to different areas, but a network segment (link) can only belong to one area, or each interface running OSPF must indicate which area it belongs to. After partition, route aggregation can be carried out on the area boundary router to reduce the number of LSAS advertised to other areas, and minimize the impact of network topology changes.

2. Backbone area and virtual connection

(1) After OSPF divides the backbone area, not all areas are equal. One of the areas is unique. Its area number is 0, which is usually called backbone area. Backbone regions are responsible for routing between regions, and routing information between non backbone regions must be forwarded through backbone regions. In this regard, OSPF has two provisions:

All non backbone regions must be connected with backbone regions, and backbone regions themselves must also be connected.

In practical application, the above requirements may not be met due to the limitations of various conditions. This can be solved by configuring OSPF virtual connection.

(2) Virtual link virtual connection refers to a logical connection channel established between two ABRs through a non backbone area. It must be ABR at both ends, and must be configured at both ends to take effect. The area that provides a non backbone internal route for both ends of the virtual connection is called the transfer area.

3. Stub area and total stub area are some specific areas. ABR of this area will transfer routing information between areas to this area, but it will not introduce external routing of autonomous system. The routing table size and LSA number of routers in this area will be greatly reduced. In order to ensure that the route outside the autonomous system is still reachable, ABR in this region will generate a default route type-3 LSA, which will be published to other non ABR routers in this region.

In order to further reduce the routing table size and LSA number of routers in the stub region, the region can be configured as a totally stub region, and the ABR of this region will not transfer the routing information between regions and the routing information outside the autonomous system to this region. To ensure that the routes to other regions of the autonomous system and outside the autonomous system are still reachable, ABR in this region will generate a default route type-3 LSA, which will be published to other non ABR routers in this region.

4. NSSA area and total NSSA area

NSSA (not so stubby area) area is a deformation of stubb area. The difference between NSSA area and stubb area is that it allows the introduction of external routes of autonomous system, and ASBR issues type-7 LSA to this area. When the type-7 LSA reaches the ABR of NSSA, the ABR converts the type-7 LSA to the type-5 LSA and propagates it to other areas.

The region can be configured as a total NSSA region, and the ABR of the region will not transfer routing information between regions to the region. To ensure that the route to other areas of the autonomous system is still reachable, ABR in this area will generate a default route type-3 LSA, which will be published to other non ABR routers in this area.

--------------------------------------------------------------
主机参考,收集国内外VPSVPS测评主机测评云服务器虚拟主机独立服务器,国内外服务器高性价比建站主机相关优惠信息@zhujicankao.com
详细介绍和测评国外VPS主机,云服务器,国外服务器,国外主机的相关优惠信息,商家背景,网络带宽等等,也是目前国内最好的主机云服务器VPS参考测评资讯优惠信息分享平台

这几篇文章你可能也喜欢:

本文由主机参考刊发,转载请注明:动态路由OSPF基础,区域划分,LSA类型,一分钟了解下 https://zhujicankao.com/12578.html

【腾讯云】领8888元采购礼包,抢爆款云服务器 每月 9元起,个人开发者加享折上折!
打赏
转载请注明原文链接:主机参考 » 动态路由OSPF基础,区域划分,LSA类型,一分钟了解下
主机参考仅做资料收集,不对商家任何信息及交易做信用担保,购买前请注意风险,有交易纠纷请自行解决!请查阅:特别声明

评论 抢沙发

评论前必须登录!