跳到主要内容

4.5. Flooding 泛洪

大多数 flooding 算法与 [OSPFV2] 第 13 节中描述的 IPv4 flooding 机制相比保持不变. 不过, flooding scope 和未知 LSA 类型处理的引入, 使 OSPF flooding 算法发生了一些变化.

由于 flooding scope 编码在 LS type 中, 并且需要处理未知 LS types, 对接收到的 Link State Update packets 的处理需要修改. 对于 IPv6, Steps 2 和 3 修改如下:

(2) 检查 LSA 的 LS type. 如果接口所属区域已配置为 stub 或 NSSA area, 且 LS type 指示 "AS flooding scope", 则丢弃该 LSA, 并从 Link State Update packet 中取出下一个 LSA.

(3) 否则, 如果 LSA 的 LS type 中的 flooding scope 被设置为 "reserved", 则丢弃该 LSA, 并从 Link State Update packet 中取出下一个 LSA.

对于 IPv6, eligible interfaces 基于以下因素选择:

  • LSA 的 flooding scope
  • 对于具有 area 或 link-local flooding scope 的 LSAs, LSA 所关联的特定 area 或 interface
  • LSA 是否具有可识别的 LS type
  • LS type 中 U-bit 的设置

选择 eligible interfaces 集合可分为三种情况:

Case 1: LSA 的 LS type 可识别. 根据 LS type 中编码的 flooding scope 设置 eligible interfaces.

Case 2: LS type 不可识别, 且 U-bit 设置为 0. 只有一个 eligible interface, 即接收到该 LSA 的接口.

Case 3: LS type 不可识别, 且 U-bit 设置为 1. 与 Case 1 一样, 根据编码的 flooding scope 选择 eligible interfaces.

4.5.3. 在数据库中安装 LSAs

根据 LSAs 的 flooding scope, 有三个不同的位置用于存储它们:

  • 具有 AS flooding scope 的 LSAs 存储在 global OSPF data structure 中
  • 具有 area flooding scope 的 LSAs 存储在适当的 area data structure 中
  • 具有 link-local flooding scope 的 LSAs 存储在适当的 interface data structure 中

将 LSA 存入 Link State Database 时, 必须检查 LSA 的内容是否已发生变化. 当 LSA 内容发生变化时, 必须根据 LSA 的 LS type 重新计算 routing table 的部分内容.