RFC 10041 lets OSPF routers mark a link as unreachable

In short

0xffff metric that now means "unreachable" (once all routers agree); 0xfffe new "last resort" maximum for links still in use; 4 earlier RFCs updated; 1 new capability bit, "Unreachable Link"

The problem: a link that is there but should not be used

OSPF is a routing protocol that routers inside one organisation's network use to learn the map of the network. Each router announces its links, with a cost (the metric) on each. Every router then runs a shortest-path calculation (called SPF) over that map to decide where to send each packet. This is our plain-English summary of the standard idea.

The RFC, written by authors at China Mobile, New H3C Technologies, Arrcus and ZTE, starts from a limitation: OSPF's router advertisements use fixed formats that "always include advertised links in the default Shortest Path First (SPF) computation". A link announced at all is available for ordinary routing.

Sometimes an operator does not want that. The RFC gives two cases:

Why a partial rollout is risky

The RFC's answer is to use the metric LSLinkInfinity (0xffff) to say "unreachable". But under the base OSPF specification (RFC 2328), the RFC notes, links with that metric were treated as reachable. So the new meaning only works consistently where every router reads it the new way.

That is dangerous. The RFC gives a worked example (its Figure 5): link D-F carries 65535. Router B treats it as unreachable and sends traffic for F the long way round, B to A to C to E to F. Router A does not, and sends it to B, which sends it straight back. The result is a routing loop, with packets bouncing between two routers.

How do OSPF routers agree to mark links unreachable?

RFC 10041 makes a link advertised with 0xffff unreachable, but only under a condition.

The unreachable rule applies to the router-LSA in OSPFv2 and OSPFv3, and to the Router-Link TLV of the OSPFv3 E-Router-LSA. Once it applies, the link is out of both the base calculation and any Flex-Algorithm calculation that uses the OSPF metric. In the RFC's Flex-Algorithm example the two "Red" links vanish from the default map but stay in the Flex-Algorithm 128 map, which is what the operator wanted.

The safeguard has a gap. If a router without support joins an area that was fully upgraded, the RFC says the news spreads gradually and "transient routing loops" can occur until every router has noticed it.

What happens to the old uses of 0xffff

Several older standards already used 0xffff (called MaxLinkMetric) to mean "use this link only as a last resort", not "never use it". If 0xffff now meant "unreachable", those would break. So the RFC introduces MaxReachableLinkMetric, 0xfffe, and updates the following to use it once a router supports the new capability:

The RFC says it is "important to keep the link in the topology" in the last two cases, so traffic can still use it as a last resort.

Automatic costing needs care too. If a router sets link costs from bandwidth, a mix of slow and fast links can produce the maximum value by accident. The RFC requires implementations that support it to cap automatically computed costs at 0xfffe.

Operations and security

Support must be configurable, and "the default MUST be to not advertise the capability", so nothing changes until an operator turns it on. The RFC also defines YANG data models for configuring it.

On security, it warns that a compromised router could toggle its capability repeatedly and force other routers to recalculate over and over. It recommends the SPF back-off delay algorithm from RFC 8405 as a defence.

Terms in plain English

Where things stand

RFC 10041 is a Standards Track document, which the RFC calls the consensus of the IETF community, approved by the IESG. Nothing in the text says which vendors have implemented it, so we do not know how widely it is deployed. We read the RFC only.

Sources

Sources

Related stories

More from Wi-Fi Wizards

All stories from Wi-Fi Wizards