Networking · Topic 8 of 8
High Availability: NSF, NSR, BFD and Link Aggregation
Build a resilient provider network with NSF and graceful restart, NSR, BFD fast failure detection and LACP link aggregation, with IOS XR examples.
- 5 min
- Includes a diagram
- NSF keeps forwarding during a restart, and neighbours must support graceful restart.
- NSR keeps the protocol state on the standby, so no neighbour support is needed.
- NSR uses more resources than NSF.
What it is
High availability features keep traffic flowing when a link, a line card or a route processor fails.
Some features hide a processor failure from the rest of the network. Others detect a failed link in milliseconds, or combine several links so that one failure costs only part of the capacity.
How it works
Each feature protects a different kind of failure, so they are often used together.
NSF and graceful restart
Nonstop forwarding (NSF) lets a router keep forwarding packets while its control plane restarts or switches to a standby route processor. The forwarding tables stay in place on the line cards.
The router tells its neighbours that it is restarting, and they keep its routes during a grace period. This is called graceful restart.
It needs neighbours that support it, called helpers. The standby takes over with stateful switchover (SSO), and the routing protocol then rebuilds its state.
There are two styles of NSF in OSPF and IS-IS: a Cisco style and an IETF style. IETF is the standard one that works with other vendors. BGP has its own graceful restart capability, negotiated in the OPEN message.
RP/0/RP0/CPU0:R1(config)# router ospf 1
RP/0/RP0/CPU0:R1(config-ospf)# nsf ietf
RP/0/RP0/CPU0:R1(config-ospf)# exit
RP/0/RP0/CPU0:R1(config)# router bgp 65000
RP/0/RP0/CPU0:R1(config-bgp)# bgp graceful-restart
NSR
Nonstop routing (NSR) keeps the protocol state on the standby processor, including the session and adjacency state. After a switchover the neighbours see nothing change.
NSR does not need helpers, so it works with any neighbour. It uses more memory and processing, because the state is mirrored. It is available for OSPF, IS-IS, BGP and LDP on IOS XR.
RP/0/RP0/CPU0:R1(config-ospf)# nsr
RP/0/RP0/CPU0:R1(config-bgp)# nsr
| Feature | Neighbour support needed | How it hides a failure |
|---|---|---|
| NSF with graceful restart | Yes, helpers | Neighbours keep routes while the router restarts |
| NSR | No | The standby already holds the protocol state |
BFD
Bidirectional forwarding detection (BFD) is a light hello protocol that detects a failed path in milliseconds. Routing protocol hellos are much slower.
Two routers send BFD packets to each other at an agreed interval. If a number of packets is missed, the session goes down.
The detection time is the interval times the multiplier. Single hop BFD uses UDP port 3784, and multihop uses 4784.
A routing protocol registers with BFD as a client. When BFD reports a failure, the protocol drops the neighbour at once.
RP/0/RP0/CPU0:R1(config)# router ospf 1
RP/0/RP0/CPU0:R1(config-ospf)# area 0
RP/0/RP0/CPU0:R1(config-ospf-ar)# interface GigabitEthernet0/0/0/0
RP/0/RP0/CPU0:R1(config-ospf-ar-if)# bfd fast-detect
RP/0/RP0/CPU0:R1(config-ospf-ar-if)# bfd minimum-interval 50
RP/0/RP0/CPU0:R1(config-ospf-ar-if)# bfd multiplier 3
RP/0/RP0/CPU0:R1# show bfd session
On IOS XE, the timers are set on the interface with bfd interval 50 min_rx 50 multiplier 3, and each protocol is told to use it, for example neighbor 192.0.2.2 fall-over bfd for BGP.
Link aggregation
Link aggregation bundles several physical links into one logical link, using LACP (IEEE 802.3ad, now 802.1AX). Traffic is shared across the members, and the bundle survives the loss of one member.
On IOS XR the logical interface is a Bundle Ethernet, and members join with bundle id.
RP/0/RP0/CPU0:R1(config)# interface Bundle-Ether1
RP/0/RP0/CPU0:R1(config-if)# ipv4 address 10.0.0.1 255.255.255.252
RP/0/RP0/CPU0:R1(config-if)# exit
RP/0/RP0/CPU0:R1(config)# interface GigabitEthernet0/0/0/0
RP/0/RP0/CPU0:R1(config-if)# bundle id 1 mode active
RP/0/RP0/CPU0:R1# show bundle
The equivalent on IOS XE is channel-group 1 mode active, which creates a Port-channel interface. LACP modes are active and passive, and at least one end must be active. A bundle can set a minimum number of active links, below which it is taken down, so traffic moves to a better path.
What to remember for the exam
Seven facts cover most questions on this topic.
- NSF keeps forwarding during a restart, and neighbours must support graceful restart.
- NSR keeps the protocol state on the standby, so no neighbour support is needed.
- NSR uses more resources than NSF.
- BFD detection time is the interval multiplied by the multiplier.
- BFD single hop uses UDP port 3784, and multihop uses UDP port 4784.
- Routing protocols register as BFD clients and drop the neighbour when BFD fails.
- LACP needs at least one end active, and IOS XR members join a bundle with
bundle id.
If the question says the neighbour is not changed or does not need to help, the answer is NSR. If it mentions a grace period, the answer is NSF.
Common mistakes
These four mistakes appear often.
Expecting graceful restart to work with a neighbour that does not support it. There is no helper, so the neighbour drops the routes.
Setting BFD timers too aggressively. A busy processor can miss packets, and the session flaps.
Configuring BFD on one side only. Both ends must run the session.
Setting LACP passive on both ends. Neither side starts negotiation, so the bundle does not form.
Very short BFD timers on many sessions can load the CPU. Test the timers on the real platform.
Check yourself
Work through these three questions.
What is the main difference between NSF and NSR?
NSF needs neighbours to help during a grace period, while NSR keeps the protocol state on the standby so no help is needed.
How is BFD detection time worked out?
It is the interval multiplied by the multiplier.
Which LACP mode pairs fail to form a bundle?
Passive with passive, because neither side starts the negotiation.
Topic 8 of 8 in Networking
Test yourself on Networking
The full Cisco CCNP 350-501 SPCOR question bank has 738 questions, with timed practice exams and an explanation for every answer.
This study guide is independent and is not affiliated with, endorsed by, or sponsored by Cisco. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.