6. Area 数据结构
-
Area 数据结构
area 数据结构包含运行基本 OSPF 路由算法所用的全部信息. 每个 area 维护自己的 link-state database. 一个网络属于单个 area, 一个路由器 接口连接到单个 area. 每个路由器 adjacency 也属于单个 area.
OSPF backbone 是一个特殊 OSPF area, 负责传播 inter-area routing information.
area link-state database 由该 area 中路由器产生的 router-LSAs, network-LSAs 和 summary-LSAs 集合组成. 这些信息只在单个 area 内 flooding. AS-external-LSAs 列表 (见第 5 节) 也被视为每个 area 的 link-state database 的一部分.
Area ID 标识 area 的 32 位数字. Area ID 0.0.0.0 保留用于 backbone.
List of area address ranges 为了在 area 边界聚合路由信息, 可以使用 area address ranges. 每个 address range 由 [address,mask] 对以及 Advertise 或 DoNotAdvertise 状态指示指定 (见第 12.4.3 节).
+----+
|RT10|------+
+----+ \+-------------+
/ \ |Routing Table|
/ \ +-------------+
/ \
+------+ / \ +--------+
|Area 2|---+ +---|Backbone|
+------+***********+ +--------+
/ \ * / \
/ \ * / \+---------+ +---------+ +------------+ +------------+ |Interface| |Interface| |Virtual Link| |Interface Ib| | to N6 | | to N8 | | to RT11 | +------------+ +---------+ +---------+ +------------+ | / \ | | | / \ | | | +--------+ +--------+ | +-------------+ +------------+ |Neighbor| |Neighbor| | |Neighbor RT11| |Neighbor RT6| | RT8 | | RT7 | | +-------------+ +------------+ +--------+ +--------+ | | +-------------+ |Neighbor RT11| +-------------+
Figure 9: Router RT10's Data structuresAssociated router interfaces 连接到该 area 的本路由器接口. 路由器接口属于且只属于一个 area (或 backbone). 对于 backbone area, 该列表包括所有 virtual links. virtual link 由其另一端点的 Router ID 标识; 其 cost 是两个路由器 之间通过 Transit area 存在的最短 intra-area path 的 cost.
List of router-LSAs area 中每台路由器都会生成一个 router-LSA. 它描述该路由器连接到 该 area 的接口状态.
List of network-LSAs area 中每个 transit broadcast 和 NBMA network 都生成一个 network-LSA. network-LSA 描述当前连接到该网络的路由器集合.
List of summary-LSAs Summary-LSAs 来自该 area 的 area border routers. 它们描述到 Autonomous System 内部但 area 外部目的地的路由 (即 inter-area destinations).
Shortest-path tree 该 area 的 shortest-path tree, 以本路由器自身为 root. 它通过 Dijkstra algorithm 从收集到的 router-LSAs 和 network-LSAs 派生 (见第 16.1 节).
TransitCapability 该参数指示 area 是否能够承载既不源自也不终止于该 area 自身的数据 流量. 该参数在构建 area 的 shortest-path tree 时计算 (见第 16.1 节, 其中当且仅当存在一个或多个 fully adjacent virtual links 使用 该 area 作为 Transit area 时, TransitCapability 设为 TRUE), 并 作为 routing table 构建过程后续步骤的输入 (见第 16.3 节). 当某个 area 的 TransitCapability 设为 TRUE 时, 该 area 称为 "transit area".
ExternalRoutingCapability 指示 AS-external-LSAs 是否会被 flooded 进入/遍布该 area. 这是可 配置参数. 如果 AS-external-LSAs 被排除在 area 外, 该 area 称为 "stub". 在 stub areas 内, 到 AS 外部目的地的路由将仅基于默认 summary route. backbone 不能配置为 stub area. 此外, virtual links 不能配置为穿过 stub areas. 更多信息见第 3.6 节.
StubDefaultCost 如果该 area 已配置为 stub area, 且路由器自身是 area border router, 则 StubDefaultCost 指示该路由器应通告到该 area 中的默认 summary- LSA 的 cost. 更多信息见第 12.4.3 节.
除非另有规定, 本文档其余章节均指 OSPF 协议在单个 area 内的操作.