Configuring Routing Protocols to Restart Without Losing Adjacencies

Problem

You want to control when routers calculate new paths so that temporary routing-protocol failures don't cause unnecessary recalculations.

Solution

Enable graceful restart for all routing protocols on the router:

	[edit routing-options]
	aviva@RouterG# set graceful-restart

 

Discussion

From time to time, something happens to interrupt the operation of the routing protocols. The interruption might be a planned reinstallation of the routing software to fix a problem. The interruption might also be unplanned because a routing protocol stops running or a network link goes down but is something you might be able to respond to and repair quickly. When this happens, the routing protocols stop sending keepalive messages to their neighbors. After a short while (the actual time depends on the protocol and how it's configured), the neighbor will declare that the local router is down and, because the network topology has changed, will start calculating new paths to network destinations. This recalculation floods a lot of protocol traffic, which can disrupt the operation of the network. If you know that the downtime for the routing protocols will generally be brief, you really don't want the routing protocols to recalculate paths, only to recalculate them again once the routing protocols are back up.

Graceful restart is a way to hide the fact that a routing protocol has restarted and thus prevent path recalculations. With graceful restart, if the router or routing protocol has to restart, it informs its adjacent neighbors and requests a grace period from them. During this grace period, the neighbor acts as a helper, masking the fact that the local router is down. The restarting router continues to forward traffic during the restart period, and convergence in the network is not disrupted. The restart is not visible to the portion of the network that is not communicating directly with the local router. The neighboring routers are aware of the restart. Also, the restarting router is not removed from the network topology. Because the network's topology is "frozen" during the restart period, you should use graceful restart only when you know that your topology is stable.

You turn on graceful restart globally, as shown in this recipe. You generally leave graceful restart running all the time in case of an unplanned failure. The global configuration applies to all routing protocols, including BGP, IS-IS, OSPF, PIM SM, RIP, and RIPng, and to all MPLS-related protocols, including RSVP, LDP, CCC, and TCC.

Configuring graceful restart is just a request. The JUNOS software honors the request only when the network topology is stable and the neighboring routers cooperate.

Now you see that graceful restart settings are different for the different protocols. For BGP, use the show bgp neighbor command:

	aviva@RouterG> show bgp neighbor 10.0.0.2
	Peer: 10.0.0.2+2098 AS 64555 Local: 10.0.0.1+179 AS 64550
	 Type: External State: Established Flags: 
	 Last State: OpenConfirm Last Event: RecvKeepAlive
	 Last Error: None
	 Options: GracefulRestart PeerAS Refresh>
	 Holdtime: 90 Preference: 170
	 Number of flaps: 1
	 Error: 'Cease' Sent: 0 Recv: 1
	 Peer ID: 10.0.0.1 Local ID: 192.168.19.1 Active Holdtime: 90
	 Keepalive Interval: 30 Peer index: 0
	 Local Interface: fe-1/0/1.0
	 NLRI for restart configured on peer: inet-unicast
	 NLRI advertised by peer: inet-unicast
	 NLRI for this session: inet-unicast
	 Peer supports Refresh capability (2)
	 Restart time configured on the peer: 120
	 Stale routes from peer are kept for: 300
	 Restart time requested by this peer: 120
	 NLRI that peer supports restart for: inet-unicast
	 NLRI peer can save forwarding state: inet-unicast
	 NLRI that peer saved forwarding for: inet-unicast
	 NLRI that restart is negotiated for: inet-unicast
	 NLRI of received end-of-rib markers: inet-unicast
	 NLRI of all end-of-rib markers sent: inet-unicast
	 Table inet.0 Bit: 10000
	 RIB State: BGP restart is complete
	 Send state: in sync
	 Active prefixes: 0
	 Received prefixes: 0
	 Suppressed due to damping: 0
	 Advertised prefixes: 0
	 Last traffic (seconds): Received 19 Sent 19 Checked 19
	 Input messages: Total 3 Updates 1 Refreshes 0 Octets 97
	 Output messages: Total 3 Updates 0 Refreshes 0 Octets 116

The Options line shows that graceful restart is enabled. The two Restart time lines and the Stale routes line show the default graceful restart parameters. Here, the router allows a grace period of 120 seconds for a neighboring router to restart and requests a grace period of 120 seconds from its neighbors. The router will continue to advertise stale routes from the down neighbors for 300 seconds. The NLRI lines indicate which routing tables are involved in the graceful restart operation.

For IS-IS, you see the graceful restart settings in the show isis adjacency detail output:

	aviva@RouterF> show isis adjacency detail
	RouterF
	 Interface: fe-0/0/1.0, Level: 2, State: Up, Expires in 7 secs
	 Priority: 64, Up/Down transitions: 1, Last transition: 00:01:05 ago
	 Circuit type: 3, Speaks: IP, IPv6, MAC address: 0:5:85:c4:72:d1
	 Topologies: Unicast
	 Restart capable: Yes
	 LAN id: RouterF.02, IP addresses: 10.0.8.1

The Restart capable line indicates that graceful restart is configured.

For OSPF, there is no specific command to see that graceful restart is configured.

For all protocols, there are two commands that show that graceful restart is configured. The first is the show route command:

	aviva@RouterF> show route
	inet.0: 9 destinations, 9 routes (9 active, 0 holddown, 0 hidden)
	Restart Complete
	+ = Active Route, - = Last Active, * = Both

The Restart line at the top of the output shows that graceful restart is enabled.

The second command is show route instance detail:

	aviva@RouterF> show route instance detail
	master:
	 Router ID: 192.168.12.1
	 Type: forwarding State: Active
	 Restart State: Pending Path selection timeout: 300
	 Tables:
	 inet.0 : 8 routes (8 active, 0 holddown, 0 hidden)
	 Restart Complete
	 iso.0 : 1 routes (1 active, 0 holddown, 0 hidden)
	 Restart Complete

The Restart State: Pending entry tells you that graceful restart is enabled and that the router is ready to perform a graceful restart operation, if necessary. When the router is in the process of restarting, you can see the routing component that is restarting. For IS-IS, here is the restart operation in progress:

	aviva@RouterF> show route instance detail
	master:
	 Router ID: 10.0.0.1
	 Type: forwarding State: Active
	 Restart State: Pending Path selection timeout: 300
	 Tables:
	 inet.0 : 8 routes (8 active, 0 holddown, 0 hidden)
	 Restart Pending: IS-IS
	 iso.0 : 1 routes (1 active, 0 holddown, 0 hidden)
	 Restart Pending: IS-IS

For OSPF, the output is similar:

	aviva@RouterF> show route instance detail
	master:
	 Router ID: 10.0.0.1
	 Type: forwarding State: Active
	 Restart State: Pending Path selection timeout: 300
	 Tables:
	 inet.0 : 10 routes (9 active, 1 holddown, 0 hidden)
	 Restart Pending: OSPF(TED done)
	 iso.0 : 1 routes (1 active, 0 holddown, 0 hidden)
	 Restart Complete

When the restart operation completes, the output changes to Restart Complete:

	aviva@RouterF> show route instance detail
	master:
	 Router ID: 10.0.0.1
	 Type: forwarding State: Active
	 Restart State: Pending Path selection timeout: 300
	 Tables:
	 inet.0 : 8 routes (8 active, 0 holddown, 0 hidden)
	 Restart Complete
	 iso.0 : 1 routes (1 active, 0 holddown, 0 hidden)
	 Restart Complete

This recipe shows how to enable graceful restart for all routing protocols. If you do not want to use it on a particular protocol, disable it for that protocol. Here's how to disable it for IS-IS:

	[edit protocols isis]
	aviva@RouterF# set graceful-restart disable

 

See Also

RFC 3478, Graceful Restart Mechanism for LDP; RFC 3623, Graceful OSPF Restart; RFC 3847, Restart signaling for IS-IS; Internet draft draft-ietf-idr-restart-10.txt, Graceful Restart Mechanism for BGP (expires December 2004); Internet draft draft-ietf-mpls-bgp-mpls-restart-03.txt, Graceful Restart Mechanism for BGP with MPLS (expires August 2004) at http://www.ietf.org


Router Configuration and File Management

Basic Router Security and Access Control

IPSec

SNMP

Logging

NTP

Router Interfaces

IP Routing

Routing Policy and Firewall Filters

RIP

IS-IS

OSPF

BGP

MPLS

VPNs

IP Multicast



JUNOS Cookbook
Junos Cookbook (Cookbooks (OReilly))
ISBN: 0596100140
EAN: 2147483647
Year: 2007
Pages: 290
Authors: Aviva Garrett

Flylib.com © 2008-2020.
If you may any questions please contact us: flylib@qtcs.net