三个存根的故事...
使用 Cisco 设备时,OSPF 将一些东西称为“存根”……这有点令人困惑……
每个术语的含义都非常不同;更令人困惑的是,您可能会将多个存根术语应用于单个 OSPF 接口。我将在下面详细说明。
背景
让我们澄清一些术语......问题开始于询问思科所谓的“存根主机”...... OSPF 自动将环回接口分配给这个类别......
CORE01.PUB.DAL02#sh ip ospf interface lo0
Loopback0 is up, line protocol is up
Internet Address 128.66.62.5/32, Area 0.0.0.0
Process ID 100, Router ID 128.66.62.5, Network Type LOOPBACK, Cost: 1
Loopback interface is treated as a stub Host
^^^^^^^^^
CORE01.PUB.DAL02#
所有这些都不要与 OSPF 所指的“存根网络”相混淆……这仅意味着没有 OSPF 邻居的网络
CORE01.PUB.DAL02#sh ip ospf data router internal
...
Link connected to: a Transit Network <------- Broadcast Intf w/ Neighbor
(Link ID) Designated Router address: 128.66.62.75 <-------
(Link Data) Router Interface address: 128.66.62.75
Number of TOS metrics: 0
TOS 0 Metrics: 10
...
Link connected to: a Stub Network <------ Broadcast Intf w/o Neighbor
(Link ID) Network/subnet number: 128.66.62.32 <------
(Link Data) Network Mask: 255.255.255.248
Number of TOS metrics: 0
TOS 0 Metrics: 1
Link connected to: a Stub Network <------ Loopback interface
(Link ID) Network/subnet number: 128.66.62.5
(Link Data) Network Mask: 255.255.255.255
Number of TOS metrics: 0
TOS 0 Metrics: 1
然后,当然,我们有一个OSPF Stub Area。让我们想想这一切从何而来……
OSPF 存根网络与 OSPF 传输网络
Transit 和 Stub 网络在RFC 2328: OSPFv2 - Section 2.1中讨论:
2. The Link-state Database: organization and calculations
The following subsections describe the organization of OSPF's link-
state database, and the routing calculations that are performed on
the database in order to produce a router's routing table.
2.1. Representation of routers and networks
... Networks can be either transit or
stub networks. Transit networks are those capable of carrying
data traffic that is neither locally originated nor locally
destined. A transit network is represented by a graph vertex
having both incoming and outgoing edges. A stub network's vertex
has only incoming edges.
Transit Network和Stub Network之间的这种区别的全部意义在于节省路由器中的资源。
- 传输网络必须为邻居信息保留额外的内存
- 存根网络节省了路由器上的内存,因为不需要分配邻居
当我们开始扩展到潜在的数千个 LSA 时,即使是很小的内存节省也很重要。请注意,OSPF hello 仍然在存根网络上发送,并且它们能够形成邻居/转换到传输网络,除非该接口已在管理上标记为被动接口。
OSPF 主机路由 - Cisco 的“存根主机”
所以现在我们仍然有关于Stub Host的原始讨论,它也恰好是一个 OSPF Stub Network。这个概念来自RFC 2328: OSPFv2 - Section 9.1,它讨论了各种接口状态......
9.1. Interface states
The various states that router interfaces may attain is
documented in this section.
Down
...
Loopback
... For this reason, IP packets may
still be addressed to an interface in Loopback state. To
facilitate this, such interfaces are advertised in router-
LSAs as single host routes, whose destination is the IP
interface address.[4]
...
Waiting
...
Point-to-point
...
RFC 要求将环回网络类型作为 /32 主机路由进行通告。Cisco在输出中所说的Stub Hostshow ip ospf interface实际上只是 Loopback 接口类型,OSPF 将其自动分配为OSPF 内的/32 主机路由。
OSPF 末节区域
存根区域包含在RFC 2328: OSPFv2 - Section 3.6 中。OSPF 存根区域有几类...
- Stub Area:该区域内不允许有Type-5 External LSA,即该区域内没有路由重分配。类型 3 网络 LSA 起源于 ABR,因此不会丢失来自被存根功能阻塞的类型 5 LSA 的连接。OSPF 在Hello 报文中有一个E-bit 字段(E-bit =
ExternalRoutingCapability),当一个区域被配置为Stub Area 时会被清除
- Totally Stubby Area : 没有 Type-5 外部 LSA,只允许 Type-3 Network LSA 默认路由。这是特定于供应商的功能,未包含在 RFC 2328 中。
- Not So Stubby 区域:不允许 Type-5 外部 LSA,但允许通过特殊的 Type-7 LSA 重新分配。
概括
总而言之,我们谈到了...
- Stub Host:一种环回网络类型,它总是作为 /32 主机路由进行通告;Cisco 将其称为存根主机。
- 存根网络:一个 OSPF 网络,它没有连接到它的邻居
- Stub 区域:OSPF 区域,不允许 Type-5 外部 LSA。
如果您真的想解决所有这些问题,请考虑使用具有环回接口的 OSPF 路由器;该路由器完全包含在单个 OSPF 存根区域中。从技术上讲,您可以将所有三个 OSPF“存根”术语应用于此环回(存根主机、存根网络、存根区域)。