Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

header-navigation
keyboard_arrow_up
close
keyboard_arrow_left
list Table of Contents
file_download PDF
{ "lLangCode": "en", "lName": "English", "lCountryCode": "us", "transcode": "en_US" }
English
keyboard_arrow_right

Configuring Backup Selection Policy for the OSPF Protocol

date_range 24-Nov-23

Support for OSPF loop-free alternate (LFA) routes essentially adds IP fast-reroute capability for OSPF. Junos OS precomputes multiple loop-free backup routes for all OSPF routes. These backup routes are pre-installed in the Packet Forwarding Engine, which performs a local repair and implements the backup path when the link for a primary next hop for a particular route is no longer available. The selection of LFA is done randomly by selecting any matching LFA to progress to the given destination. This does not ensure best backup coverage available for the network. In order to choose the best LFA, Junos OS allows you to configure network-wide backup selection policies for each destination (IPv4 and IPv6) and a primary next-hop interface. These policies are evaluated based on admin-group, srlg, bandwidth, protection-type, metric, and node information.

Before you begin to configure the backup selection policy for the OSPF protocol:

  • Configure the router interfaces. See the Junos OS Network Management Administration Guide for Routing Devices.

  • Configure an interior gateway protocol or static routing. See the Junos OS Routing Protocols Library for Routing Devices.

To configure the backup selection policy for the OSPF protocol:

  1. Configure per-packet load balancing.
    content_copy zoom_out_map
    [edit policy-options]
     user@host# set policy-statement ecmp term 1 then load-balance per-packet
    
  2. Enable RSVP on all the interfaces.
    content_copy zoom_out_map
    [edit protocols]
    user@host# set rsvp interface all
    
  3. Configure administrative groups.
    content_copy zoom_out_map
    [edit protocols mpls]
    user@host# set admin-groups group-name
    
  4. Configure srlg values.
    content_copy zoom_out_map
    [edit routing-options]
    user@host# set srlg srlg-name srlg-value srlg-value
    
  5. Enable MPLS on all the interfaces.
    content_copy zoom_out_map
    [edit protocols mpls]
    user@host# set interface all
    
  6. Apply MPLS to an interface configured with an administrative group.
    content_copy zoom_out_map
    [edit protocols mpls]
    user@host# set interface interface-name admin-group group-name
    
  7. Configure the ID of the router.
    content_copy zoom_out_map
    [edit routing-options]
    user@host# set router-id router-id
    
  8. Apply the routing policy to all equal cost multipaths exported from the routing table to the forwarding table.
    content_copy zoom_out_map
    [edit routing-options]
    user@host# set forwarding-table export ecmp
    
  9. Enable link protection and configure metric values on all the interfaces for an area.
    content_copy zoom_out_map
    [edit protocols ospf]
    user@host# set area area-id interface interface-name link-protection
    user@host# set area area-id interface interface-name metric metric
    
  10. Configure the administrative group of the backup selection policy for an IP address.

    You can choose to exclude, include all, include any, or prefer the administrative groups from the backup path.

    content_copy zoom_out_map
    [edit routing-options]
    user@host# set backup-selection destination ip-address interface interface-name admin-group 
    

    • Specify the administrative group to be excluded.

      content_copy zoom_out_map
      [edit routing-options backup-selection destination ip-address interface interface-name admin-group]
      user@host# set exclude group-name
      

      The backup path is not selected as the loop-free alternate (LFA) or backup nexthop if any of the links in the path have any one of the listed administrative groups.

      For example, to exclude the group c1 from the administrative group:

      content_copy zoom_out_map
      [edit routing-options backup-selection destination 0.0.0.0/0 interface all admin-group]
      user@host# set exclude c1
      
    • Configure all the administrative groups if each link in the backup path requires all the listed administrative groups in order to accept the path.

      content_copy zoom_out_map
      [edit routing-options backup-selection destination ip-address interface interface-name admin-group]
      user@host# set include-all group-name
      

      For example, to set all the administrative groups if each link requires all the listed administrative groups in order to accept the path:

      content_copy zoom_out_map
      [edit routing-options backup-selection destination 0.0.0.0/0 interface all admin-group]
      user@host# set include-all c2
      
    • Configure any administrative group if each link in the backup path requires at least one of the listed administrative groups in order to select the path.

      content_copy zoom_out_map
      [edit routing-options backup-selection destination ip-address interface interface-name admin-group]
      user@host# set include-any group-name
      

      For example, to set any administrative group if each link in the backup path requires at least one of the listed administrative groups in order to select the path:

      content_copy zoom_out_map
      [edit routing-options backup-selection destination 0.0.0.0/0 interface all admin-group]
      user@host# set include-any c3
      
    • Define an ordered set of an administrative group that specifies the preference of the backup path.

      The leftmost element in the set is given the highest preference.

      content_copy zoom_out_map
      [edit routing-options backup-selection destination ip-address interface interface-name admin-group]
      user@host#  set preference group-name
      

      For example, to set an ordered set of an administrative group that specifies the preference of the backup path:

      content_copy zoom_out_map
      [edit routing-options backup-selection destination 0.0.0.0/0 interface all admin-group]
      user@host#  set preference c4
      
  11. Configure the backup path to allow the selection of the backup next hop only if the bandwidth is greater than or equal to the bandwidth of the primary next hop.
    content_copy zoom_out_map
    [edit routing-options]
    user@host# set backup-selection destination ip-address interface interface-name bandwidth-greater-equal-primary
    
  12. Configure the backup path to specify the metric from the one-hop neighbor or from the remote router such as an RSVP backup label-switched-path (LSP) tail-end router to the final destination.

    The destination metric can be either highest or lowest.

    • Configure the backup path that has the highest destination metric.

      content_copy zoom_out_map
      [edit routing-options]
      user@host# set backup-selection destination ip-address interface interface-name dest-metric highest
      
    • Configure the backup path that has the lowest destination metric.

      content_copy zoom_out_map
      [edit routing-options]
      user@host# set backup-selection destination ip-address interface interface-name dest-metric lowest
      
  13. Configure the backup path that is a downstream path to the destination.
    content_copy zoom_out_map
    [edit routing-options]
    user@host# set backup-selection destination ip-address interface interface-name downstream-paths-only
    
  14. Set the order of preference of the root and the destination metric during backup path selection.

    The preference order can be :

    • [root dest] — Backup path selection or preference is first based on the root-metric criteria. If the criteria of all the root-metric is the same, then the selection or preference is based on the dest-metric.

    • [dest root] — Backup path selection or preference is first based on the dest-metric criteria. If the criteria of all the dest-metric is the same, then the selection is based on the root-metric.

    content_copy zoom_out_map
    [edit routing-options]
    user@host# set backup-selection destination ip-address interface interface-name metric-order dest
    user@host# set backup-selection destination ip-address interface interface-name metric-order root
    
  15. Configure the backup path to define a list of loop-back IP addresses of the adjacent neighbors to either exclude or prefer in the backup path selection.

    The neighbor can be a local (adjacent router) neighbor, remote neighbor, or any other router in the backup path.

    content_copy zoom_out_map
    [edit routing-options]
    user@host# set backup-selection destination ip-address interface interface-name node 
    
    • Configure the list of neighbors to be excluded.

      content_copy zoom_out_map
      [edit routing-options backup-selection destination ip-address interface interface-name node]
      user@host# set exclude node-address
      

      The backup path that has a router from the list is not selected as the loop-free alternative or backup next hop.

    • Configure an ordered set of neighbors to be preferred.

      content_copy zoom_out_map
      [edit routing-options backup-selection destination ip-address interface interface-name node]
      user@host# set preference node-address
      

      The backup path having the leftmost neighbor is selected.

  16. Configure the backup path to specify the required protection type of the backup path to be link, node, or node-link.
    • Select the backup path that provides link protection.

      content_copy zoom_out_map
      [edit routing-options]
      user@host# set backup-selection destination ip-address interface interface-name protection-type link
      
    • Select the backup path that provides node protection.

      content_copy zoom_out_map
      [edit routing-options]
      user@host# set backup-selection destination ip-address interface interface-name protection-type node
      
    • Select the backup path that allows either node or link protection LFA where node-protection LFA is preferred over link-protection LFA.

      content_copy zoom_out_map
      [edit routing-options]
      user@host# set backup-selection destination ip-address interface interface-name protection-type node-link
      
  17. Specify the metric to the one-hop neighbor or to the remote router such as an RSVP backup label-switched-path (LSP) tail-end router.
    • Select the path with highest root metric.

      content_copy zoom_out_map
      [edit routing-options]
      user@host# set backup-selection destination ip-address interface all root-metric highest
      
    • Select the path with lowest root metric.

      content_copy zoom_out_map
      [edit routing-options]
      user@host# set backup-selection destination ip-address interface all root-metric lowest
      
  18. Configure the backup selection path to either allow or reject the common shared risk link groups (SRLGs) between the primary link and each link in the backup path.
    • Configure the backup path to allow common srlgs between the primary link and each link in the backup path.

      content_copy zoom_out_map
      [edit routing-options]
      user@host# set backup-selection destination ip-address interface all srlg loose
      

      A backup path with a fewer number of srlg collisions is preferred.

    • Configure the backup path to reject the backup path that has common srlgs between the primary next-hop link and each link in the backup path.

      content_copy zoom_out_map
      [edit routing-options]
      user@host# set backup-selection destination ip-address interface all srlg strict
      
  19. Configure the backup path to control the order and the criteria of evaluating the backup path based on the administrative group, srlg, bandwidth, protection type, node, and metric.

    The default order of evaluation is admin-group, srlg, bandwidth, protection-type, node, and metric.

    content_copy zoom_out_map
    [edit routing-options]
    user@host# set backup-selection destination ip-address interface all evaluation-order admin-group
    user@host# set backup-selection destination ip-address interface all evaluation-order srlg
    user@host# set backup-selection destination ip-address interface all evaluation-order bandwidth
    
footer-navigation