Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation

Example: Configuring SRLG

This example shows how to configure Shared Risk Link Groups (SRLGs) on a device.

Requirements

This example uses the following hardware and software components:

  • Seven routers that can be a combination of M Series, MX Series, or T Series routers
  • Junos OS Release 11.4 or later running on all the devices

Overview

Junos OS Release 11.4 and later support SRLG configuration in an IGP (OSPFv2 and IS-IS) domain. In this example, you configure SRLG and associate it with the MPLS interface on a device.

The device uses the SRLG cost parameter for the Constrained Shortest Path First (CSPF) algorithm and tries to keep the links used for the primary and secondary paths mutually exclusive by avoiding links that share any SRLG with the primary path.

To configure the SRLG, you first define the SRLG parameters at the [edit routing-options srlg srlg-name] hierarchy level and then associate the SRLG with an MPLS interface at the [edit mpls interface interface-name] hierarchy level.

The srlg srlg-name statement has the following options:

  • srlg-cost—Include a cost for the SRLG ranging from 1 through 65535. The cost of the SRLG determines the level of impact this SRLG has on the CSPF algorithm for path computations. The higher the cost, the less likely it is for a secondary path to share the same SRLG as the primary path. By default, the srlg-cost is 1.
  • srlg-value—Include a group ID for the SRLG ranging from 1 through 4294967295.

In this example, PE1 is the ingress router and PE2 is the egress router. P1, P2, and P3, P4, and P5 are transit routers. OSPF is configured on all the routers as the interior gateway protocol (IGP). SRLG is configured on all seven routers. The primary path includes SRLG srlg-a. For the standby secondary path, the link P2>PE2 belongs to SRLG srlg-a. The effective link metric, with the added srlg-cost of 10, becomes 11. Therefore, the computed secondary path is PE1>P3>P4>P5>PE2 with a CSPF link metric of 4.

Configuration

CLI Quick Configuration

To quickly configure this section of the example, copy the following commands, paste them into a text file, remove any line breaks, change any details necessary to match your network configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy level.

Router PE1

set interfaces ge-0/0/1 unit 0 family inet address 192.168.12.1/24set interfaces ge-0/0/1 unit 0 family mplsset interfaces ge-0/0/2 unit 0 family inet address 192.168.13.1/24set interfaces ge-0/0/2 unit 0 family mplsset interfaces ge-0/0/3 unit 0 family inet address 192.168.14.1/24set interfaces ge-0/0/3 unit 0 family mplsset interfaces lo0 unit 0 family inet address 10.255.0.1/32set routing-options srlg srlg-a srlg-value 101set routing-options srlg srlg-a srlg-cost 10set protocols rsvp interface ge-0/0/1.0set protocols rsvp interface ge-0/0/2.0set protocols rsvp interface ge-0/0/3.0set protocols mpls optimize-timer 120set protocols mpls label-switched-path pe1-pe2 to 10.255.0.7set protocols mpls label-switched-path pe1-pe2 primary via-p1set protocols mpls label-switched-path pe1-pe2 secondary path2 standbyset protocols mpls path via-p1 10.255.0.2 strictset protocols mpls path path2set protocols mpls interface ge-0/0/1.0set protocols mpls interface ge-0/0/2.0set protocols mpls interface ge-0/0/3.0set protocols ospf traffic-engineeringset protocols ospf area 0.0.0.0 interface ge-0/0/1.0set protocols ospf area 0.0.0.0 interface ge-0/0/2.0set protocols ospf area 0.0.0.0 interface ge-0/0/3.0set protocols ospf area 0.0.0.0 interface lo0.0

Router P1

set interfaces ge-0/0/1 unit 0 family inet address 192.168.12.2/24set interfaces ge-0/0/1 unit 0 family mplsset interfaces ge-0/0/2 unit 0 family inet address 192.168.27.2/24set interfaces ge-0/0/2 unit 0 family mplsset interfaces lo0 unit 0 family inet address 10.255.0.2/32set routing-options srlg srlg-a srlg-value 101set routing-options srlg srlg-a srlg-cost 10set protocols rsvp interface ge-0/0/1.0set protocols rsvp interface ge-0/0/2.0set protocols mpls interface ge-0/0/1.0set protocols mpls interface ge-0/0/2.0 srlg srlg-aset protocols ospf traffic-engineeringset protocols ospf area 0.0.0.0 interface ge-0/0/1.0set protocols ospf area 0.0.0.0 interface ge-0/0/2.0set protocols ospf area 0.0.0.0 interface lo0.0

Router P2

set interfaces ge-0/0/1 unit 0 family inet address 192.168.13.3/24set interfaces ge-0/0/1 unit 0 family mplsset interfaces ge-0/0/2 unit 0 family inet address 192.168.37.3/24set interfaces ge-0/0/2 unit 0 family mplsset interfaces lo0 unit 0 family inet address 10.255.0.3/32set routing-options srlg srlg-a srlg-value 101set routing-options srlg srlg-a srlg-cost 10set protocols rsvp interface ge-0/0/1.0set protocols rsvp interface ge-0/0/2.0set protocols mpls interface ge-0/0/1.0set protocols mpls interface ge-0/0/2.0 srlg srlg-aset protocols ospf traffic-engineeringset protocols ospf area 0.0.0.0 interface ge-0/0/1.0set protocols ospf area 0.0.0.0 interface ge-0/0/2.0set protocols ospf area 0.0.0.0 interface lo0.0

Router P3

set interfaces ge-0/0/1 unit 0 family inet address 192.168.14.4/24set interfaces ge-0/0/1 unit 0 family mplsset interfaces ge-0/0/2 unit 0 family inet address 192.168.45.4/24set interfaces ge-0/0/2 unit 0 family mplsset interfaces lo0 unit 0 family inet address 10.255.0.4/32set routing-options srlg srlg-a srlg-value 101set routing-options srlg srlg-a srlg-cost 10set protocols rsvp interface ge-0/0/1.0set protocols rsvp interface ge-0/0/2.0set protocols mpls interface ge-0/0/1.0set protocols mpls interface ge-0/0/2.0set protocols ospf traffic-engineeringset protocols ospf area 0.0.0.0 interface ge-0/0/1.0set protocols ospf area 0.0.0.0 interface ge-0/0/2.0set protocols ospf area 0.0.0.0 interface lo0.0

Router P4

set interfaces ge-0/0/1 unit 0 family inet address 192.168.45.5/24set interfaces ge-0/0/1 unit 0 family mplsset interfaces ge-0/0/2 unit 0 family inet address 192.168.56.5/24set interfaces ge-0/0/2 unit 0 family mplsset interfaces lo0 unit 0 family inet address 10.255.0.5/32set routing-options srlg srlg-a srlg-value 101set routing-options srlg srlg-a srlg-cost 10set protocols rsvp interface ge-0/0/1.0set protocols rsvp interface ge-0/0/2.0set protocols mpls interface ge-0/0/1.0set protocols mpls interface ge-0/0/2.0set protocols ospf traffic-engineeringset protocols ospf area 0.0.0.0 interface ge-0/0/1.0set protocols ospf area 0.0.0.0 interface ge-0/0/2.0set protocols ospf area 0.0.0.0 interface lo0.0

Router P5

set interfaces ge-0/0/1 unit 0 family inet address 192.168.56.6/24set interfaces ge-0/0/1 unit 0 family mplsset interfaces ge-0/0/2 unit 0 family inet address 192.168.67.6/24set interfaces ge-0/0/2 unit 0 family mplsset interfaces lo0 unit 0 family inet address 10.255.0.6/32set routing-options srlg srlg-a srlg-value 101set routing-options srlg srlg-a srlg-cost 10set protocols rsvp interface ge-0/0/1.0set protocols rsvp interface ge-0/0/2.0set protocols mpls interface ge-0/0/1.0set protocols mpls interface ge-0/0/2.0set protocols ospf traffic-engineeringset protocols ospf area 0.0.0.0 interface ge-0/0/1.0set protocols ospf area 0.0.0.0 interface ge-0/0/2.0set protocols ospf area 0.0.0.0 interface lo0.0

Router PE2

set interfaces ge-0/0/1 unit 0 family inet address 192.168.27.7/24set interfaces ge-0/0/1 unit 0 family mplsset interfaces ge-0/0/2 unit 0 family inet address 192.168.37.7/24set interfaces ge-0/0/2 unit 0 family mplsset interfaces ge-0/0/3 unit 0 family inet address 192.168.67.7/24set interfaces ge-0/0/3 unit 0 family mplsset interfaces lo0 unit 0 family inet address 10.255.0.7/32set routing-options srlg srlg-a srlg-value 101set routing-options srlg srlg-a srlg-cost 10set protocols rsvp interface ge-0/0/1.0set protocols rsvp interface ge-0/0/2.0set protocols rsvp interface ge-0/0/3.0set protocols mpls interface ge-0/0/1.0set protocols mpls interface ge-0/0/2.0set protocols mpls interface ge-0/0/3.0set protocols ospf traffic-engineeringset protocols ospf area 0.0.0.0 interface ge-0/0/1.0set protocols ospf area 0.0.0.0 interface ge-0/0/2.0set protocols ospf area 0.0.0.0 interface ge-0/0/3.0set protocols ospf area 0.0.0.0 interface lo0.0

Step-by-Step Procedure

The following example requires you to navigate various levels in the configuration hierarchy. For information about navigating the CLI, see the CLI User Guide.

To configure the ingress router PE1:

  1. Configure the device interfaces.
    [edit interfaces]user@PE1# set ge-0/0/1 unit 0 family inet address 192.168.12.1/24user@PE1# set ge-0/0/1 unit 0 family mplsuser@PE1# set ge-0/0/2 unit 0 family inet address 192.168.13.1/24user@PE1# set ge-0/0/2 unit 0 family mplsuser@PE1# set ge-0/0/3 unit 0 family inet address 192.168.14.1/24user@PE1# set ge-0/0/3 unit 0 family mplsuser@PE1# set lo0 unit 0 family inet address 10.255.0.1/32
  2. Configure OSPF on the interfaces.
    [edit protocols ospf]user@PE1# set traffic-engineeringuser@PE1# set area 0.0.0.0 interface ge-0/0/1.0user@PE1# set area 0.0.0.0 interface ge-0/0/2.0user@PE1# set area 0.0.0.0 interface ge-0/0/3.0user@PE1# set area 0.0.0.0 interface lo0.0
  3. Configure the SRLG definitions.
    [edit routing-options]user@PE1# set routing-options srlg srlg-a srlg-value 101user@PE1# set routing-options srlg srlg-a srlg-cost 10
  4. Configure MPLS and the LSPs.
    [edit protocols mpls]user@PE1# set interface ge-0/0/1.0user@PE1# set interface ge-0/0/2.0user@PE1# set interface ge-0/0/3.0user@PE1# set optimize-timer 120user@PE1# set label-switched-path pe1-pe2 to 10.255.0.7user@PE1# set label-switched-path pe1-pe2 primary via-p1user@PE1# set label-switched-path pe1-pe2 secondary path2 standbyuser@PE1# set path via-p1 10.255.0.2 strictuser@PE1# set path path2
  5. Enable RSVP on the interfaces.
    [edit protocols rsvp]user@PE1# set interface ge-0/0/1.0user@PE1# set interface ge-0/0/2.0user@PE1# set interface ge-0/0/3.0

Results

From configuration mode, confirm your configuration by entering the show interfaces, show protocols ospf, show routing-options, show protocols mpls, and show protocols rsvp commands. If the output does not display the intended configuration, repeat the instructions in this example to correct the configuration.

user@PE1# show interfaces
interfaces {ge-0/0/1 {unit 0 {family inet {address 192.168.12.1/24;}family mpls;}}ge-0/0/2 {unit 0 {family inet {address 192.168.13.1/24;}family mpls;}}ge-0/0/3 {unit 0 {family inet {address 192.168.14.1/24;}family mpls;}}lo0 {unit 0 {family inet {address 10.255.0.1/32;}}}}
user@PE1# show protocols ospftraffic-engineering;
area 0.0.0.0 {interface ge-0/0/1.0;;interface ge-0/0/2.0;interface ge-0/0/3.0;interface lo0.0;}
user@PE1# show protocols mplsoptimize-timer 120;
label-switched-path pe1-pe2 {to 10.255.0.7;primary via-p1;secondary path2 {standby;}}
path via-p1 {10.255.0.2 strict;}
path path2;interface ge-0/0/1.0;interface ge-0/0/2.0;interface ge-0/0/3.0;
user@PE1# show protocols rsvpinterface ge-0/0/1.0;interface ge-0/0/2.0;interface ge-0/0/3.0;
user@PE1# show routing-options
routing-options {srlg {srlg-a {srlg-value 101;srlg-cost 10;}}}

If you are done configuring the device, enter commit from configuration mode.

Note: Repeat this procedure for every Juniper Networks router in the IGP domain, after modifying the appropriate interface names, addresses, and any other parameters for each router.

Verification

Confirm that the configuration is working properly.

Verifying SRLG Definitions

Purpose

Verify SRLG-to-value mappings and SRLG cost.

Action

user@PE1> show mpls srlg
SRLG             Value      Cost
srlg-a             101        10

Verify TE-Link SRLG

Purpose

Verify the traffic engineering link SRLG association.

Action

user@PE1> show ted link detail
...
10.255.0.2->192.168.27.7-1, Local: 192.168.27.2, Remote: 0.0.0.0
  Local interface index: 0, Remote interface index: 0
  LocalPath: 1, Metric: 1, StaticBW: 1000Mbps, AvailBW: 1000Mbps
      Color: 0 <none>
  SRLGs: srlg-a
  localBW [0] 0bps  [1] 0bps  [2] 0bps  [3] 0bps
  localBW [4] 0bps  [5] 0bps  [6] 0bps  [7] 0bps

...
10.255.0.3->192.168.37.7-1, Local: 192.168.37.3, Remote: 0.0.0.0
  Local interface index: 0, Remote interface index: 0
  LocalPath: 0, Metric: 1, StaticBW: 1000Mbps, AvailBW: 1000Mbps
      Color: 0 <none>
  SRLGs: srlg-a
  localBW [0] 0bps  [1] 0bps  [2] 0bps  [3] 0bps
  localBW [4] 0bps  [5] 0bps  [6] 0bps  [7] 0bps

...

Meaning

Links P1-PE2 and P2-PE2 are associated with SRLG srlg-a.

Verify Standby Secondary Path

Purpose

Check the SRLG link cost and its impact on the CSPF computation of the standby secondary path link.

Action

user@PE1> show mpls lsp ingress extensive
Ingress LSP: 1 sessions

10.255.0.7
  From: 10.255.0.1, State: Up, ActiveRoute: 0, LSPname: pe1-pe2
  ActivePath: via-p1 (primary)
  LSPtype: Static Configured
  LoadBalance: Random
  Encoding type: Packet, Switching type: Packet, GPID: IPv4
 *Primary   via-p1           State: Up
    Priorities: 7 0
    OptimizeTimer: 120
    SmartOptimizeTimer: 180
    SRLG: srlg-a
    Reoptimization in 110 second(s).
    Computed ERO (S [L] denotes strict [loose] hops): (CSPF metric: 2)
 192.168.12.2 S 192.168.27.7 S
    Received RRO (ProtectionFlag 1=Available 2=InUse 4=B/W 8=Node 10=SoftPreempt 20=Node-ID):
          192.168.12.2 192.168.27.7
    7 Oct 13 15:17:11.310 CSPF: computation result ignored, new path no benefit
    6 Oct 13 15:15:14.959 Selected as active path
    5 Oct 13 15:15:14.958 Record Route:  192.168.12.2 192.168.27.7
    4 Oct 13 15:15:14.954 Up
    3 Oct 13 15:15:14.793 Originate Call
    2 Oct 13 15:15:14.793 CSPF: computation result accepted  192.168.12.2 192.168.27.7
    1 Oct 13 15:14:46.214 CSPF failed: no route toward 10.255.0.2
  Standby   path2            State: Up
    Priorities: 7 0
    OptimizeTimer: 120
    SmartOptimizeTimer: 180
    Reoptimization in 115 second(s).
    Computed ERO (S [L] denotes strict [loose] hops): (CSPF metric: 4)
 192.168.14.4 S 192.168.45.5 S 192.168.56.6 S 192.168.67.7 S
    Received RRO (ProtectionFlag 1=Available 2=InUse 4=B/W 8=Node 10=SoftPreempt 20=Node-ID):
          192.168.14.4 192.168.45.5 192.168.56.6 192.168.67.7
   10 Oct 13 15:17:11.929 Record Route:  192.168.14.4 192.168.45.5 192.168.56.6 192.168.67.7
    9 Oct 13 15:17:11.929 Up
    8 Oct 13 15:17:11.729 Originate Call
    7 Oct 13 15:17:11.729 Clear Call
    6 Oct 13 15:17:11.729 CSPF: computation result accepted  192.168.14.4 192.168.45.5 192.168.56.6 192.168.67.7
    5 Oct 13 15:17:11.729 CSPF: Reroute due to re-optimization
    4 Oct 13 15:15:14.984 Record Route:  192.168.13.3 192.168.37.7
    3 Oct 13 15:15:14.984 Up
    2 Oct 13 15:15:14.830 Originate Call
    1 Oct 13 15:15:14.830 CSPF: computation result accepted  192.168.13.3 192.168.37.7
  Created: Thu Oct 13 15:13:46 2011
Total 1 displayed, Up 1, Down 0

Meaning

Check the standby secondary path. The effective link cost for P2>PE2 is 11 (with the added srlg-cost of 10). CSPF computes the secondary path as PE1>P3>P4>P5>PE2 with a CSPF link metric of 4.

Published: 2013-05-27