vMX
Highlighted
vMX

Secondary LSP standby LSP is using the same path as Primary why?

[ Edited ]
‎06-22-2020 01:28 PM

Hi everybody,

Please consider the following example:

ADAPTIVE-1.PNG

Above:

1) We have MX2-MX5 LSP ( primary) and MX2-MX5 Secondary standby LSP.

2) Juniper's implementation will try to avoid all the paths traversed by Primary LSP,  for Standby LSP.

In order to test this out as proof of concept, I implemented a simple lab as shown above.

I observed eventhough enough BW is avaialble on Alternate path ( MX2-MX3-MX5), Standby LSP ( MX2-MX5) is using the same paths traversed by primary LSP:

 

MX2> show mpls lsp extensive
Ingress LSP: 1 sessions

5.5.5.5
From: 2.2.2.2, State: Up, ActiveRoute: 0, LSPname: MX2-MX5
ActivePath: PRI (primary)
LSPtype: Static Configured, Penultimate hop popping
LoadBalance: Random
Encoding type: Packet, Switching type: Packet, GPID: IPv4
*Primary PRI State: Up
Priorities: 7 0
Bandwidth: 2Mbps
SmartOptimizeTimer: 180
Computed ERO (S [L] denotes strict [loose] hops): (CSPF metric: 2)
24.24.24.4 S 45.45.45.5 S

Standby SEC State: Up
Priorities: 7 0
Bandwidth: 2Mbps

SmartOptimizeTimer: 180
Computed ERO (S [L] denotes strict [loose] hops): (CSPF metric: 2)
24.24.24.4 S 45.45.45.5 S

What am I missing ?

All the configs and RSVP reservations shown below

Thanks and have a good day!!

 

 

 

##RSVP RESERVATION##

MX2> show rsvp interface
RSVP interface: 5 active
Active Subscr- Static Available Reserved Highwater
Interface State resv iption BW BW BW mark
ge-0/0/0.192Up 0 100% 1000Mbps 1000Mbps 0bps 0bps
ge-0/0/1.12 Up 0 1% 1000Mbps 10Mbps 0bps 0bps
ge-0/0/2.23 Up 0 1% 1000Mbps 10Mbps 0bps 0bps
ge-0/0/3.24 Up 1 1% 1000Mbps 8Mbps 2Mbps 2Mbps
ge-0/0/4.25 Down 0 1% 1000Mbps 10Mbps 0bps 0bps

MX3> show rsvp interface
RSVP interface: 3 active
Active Subscr- Static Available Reserved Highwater
Interface State resv iption BW BW BW mark
ge-0/0/0.192Up 0 100% 1000Mbps 1000Mbps 0bps 0bps
ge-0/0/2.23 Up 0 1% 1000Mbps 10Mbps 0bps 0bps
ge-0/0/3.35 Up 0 100% 1000Mbps 1000Mbps 0bps 0bps

 

MX4> show rsvp interface
RSVP interface: 3 active
Active Subscr- Static Available Reserved Highwater
Interface State resv iption BW BW BW mark
ge-0/0/0.192Up 0 100% 1000Mbps 1000Mbps 0bps 0bps
ge-0/0/1.45 Up 1 1% 1000Mbps 8Mbps 2Mbps 2Mbps
ge-0/0/3.24 Up 0 1% 1000Mbps 10Mbps 0bps 0bps

##CONFIGS##

##MX2##
set version 14.1R1.10
set interfaces ge-0/0/0 vlan-tagging
set interfaces ge-0/0/0 unit 192 vlan-id 192
set interfaces ge-0/0/0 unit 192 family inet address 192.168.1.2/24
set interfaces ge-0/0/1 vlan-tagging
set interfaces ge-0/0/1 unit 12 vlan-id 12
set interfaces ge-0/0/1 unit 12 family inet address 12.12.12.2/24
set interfaces ge-0/0/1 unit 12 family mpls
set interfaces ge-0/0/2 vlan-tagging
set interfaces ge-0/0/2 unit 23 vlan-id 23
set interfaces ge-0/0/2 unit 23 family inet address 23.23.23.2/24
set interfaces ge-0/0/2 unit 23 family mpls
set interfaces ge-0/0/3 vlan-tagging
set interfaces ge-0/0/3 unit 24 vlan-id 24
set interfaces ge-0/0/3 unit 24 family inet address 24.24.24.2/24
set interfaces ge-0/0/3 unit 24 family mpls
set interfaces ge-0/0/4 vlan-tagging
set interfaces ge-0/0/4 unit 25 disable
set interfaces ge-0/0/4 unit 25 vlan-id 25
set interfaces ge-0/0/4 unit 25 family inet address 25.25.25.2/24
set interfaces ge-0/0/4 unit 25 family mpls
set interfaces lo0 unit 0 family inet address 2.2.2.2/32
set forwarding-options enhanced-hash-key family inet incoming-interface-index
set forwarding-options enhanced-hash-key family inet type-of-service
set routing-options static route 7.7.7.7/32 lsp-next-hop MX2-MX5
set routing-options static route 7.7.7.7/32 lsp-next-hop MX2-MX5-BACKUP
set routing-options forwarding-table export ECMP
set protocols rsvp interface all
set protocols rsvp interface ge-0/0/1.12 subscription 1
set protocols rsvp interface ge-0/0/2.23 subscription 1
set protocols rsvp interface ge-0/0/4.25 subscription 1
set protocols rsvp interface ge-0/0/3.24 subscription 1
set protocols mpls traffic-engineering mpls-forwarding
set protocols mpls admin-groups AG0 0
set protocols mpls admin-groups AG1 1
set protocols mpls admin-groups AG3 3
set protocols mpls admin-groups AG4 4
set protocols mpls admin-groups AG5 5
set protocols mpls admin-groups AG6 6
set protocols mpls admin-groups AG7 7
set protocols mpls admin-groups AG2 2
set protocols mpls label-switched-path MX2-MX5 to 5.5.5.5
set protocols mpls label-switched-path MX2-MX5 bandwidth 2m
set protocols mpls label-switched-path MX2-MX5 adaptive
set protocols mpls label-switched-path MX2-MX5 primary PRI
set protocols mpls label-switched-path MX2-MX5 secondary SEC standby
set protocols mpls path PRI
set protocols mpls path SEC
set protocols mpls interface all
set protocols mpls interface ge-0/0/3.24 admin-group AG1
set protocols mpls interface ge-0/0/4.25 admin-group AG2
set protocols mpls interface ge-0/0/2.23 admin-group AG3
set protocols ospf traffic-engineering
set protocols ospf area 0.0.0.0 interface all interface-type p2p
set protocols ospf area 0.0.0.0 interface ge-0/0/0.192 passive
set policy-options policy-statement ECMP then load-balance per-packet

##MX3##
set version 14.1R1.10
set interfaces ge-0/0/0 vlan-tagging
set interfaces ge-0/0/0 unit 192 vlan-id 192
set interfaces ge-0/0/0 unit 192 family inet address 192.168.1.3/24
set interfaces ge-0/0/2 vlan-tagging
set interfaces ge-0/0/2 unit 23 vlan-id 23
set interfaces ge-0/0/2 unit 23 family inet address 23.23.23.3/24
set interfaces ge-0/0/2 unit 23 family mpls
set interfaces ge-0/0/3 vlan-tagging
set interfaces ge-0/0/3 unit 35 vlan-id 35
set interfaces ge-0/0/3 unit 35 family inet address 35.35.35.3/24
set interfaces ge-0/0/3 unit 35 family mpls
set interfaces lo0 unit 0 family inet address 3.3.3.3/32
set protocols rsvp interface all
set protocols rsvp interface ge-0/0/2.23 subscription 1
set protocols rsvp interface ge-0/0/3.35
set protocols mpls traffic-engineering mpls-forwarding
set protocols mpls admin-groups AG0 0
set protocols mpls admin-groups AG1 1
set protocols mpls admin-groups AG3 3
set protocols mpls admin-groups AG4 4
set protocols mpls admin-groups AG5 5
set protocols mpls admin-groups AG6 6
set protocols mpls admin-groups AG7 7
set protocols mpls admin-groups AG2 2
set protocols mpls interface all
set protocols mpls interface ge-0/0/2.23 admin-group AG3
set protocols mpls interface ge-0/0/3.35 admin-group AG3
set protocols ospf traffic-engineering
set protocols ospf area 0.0.0.0 interface all interface-type p2p
set protocols ospf area 0.0.0.0 interface ge-0/0/0.192 passive


##MX4##

set version 14.1R1.10
set system root-authentication encrypted-password "$1$YtmaHJ7R$upaVLs0stgmbsVtyRFbFW."
set system services ssh root-login allow
set interfaces ge-0/0/0 vlan-tagging
set interfaces ge-0/0/0 unit 192 vlan-id 192
set interfaces ge-0/0/0 unit 192 family inet address 192.168.1.4/24
set interfaces ge-0/0/1 vlan-tagging
set interfaces ge-0/0/1 unit 45 vlan-id 45
set interfaces ge-0/0/1 unit 45 family inet address 45.45.45.4/24
set interfaces ge-0/0/1 unit 45 family mpls
set interfaces ge-0/0/3 vlan-tagging
set interfaces ge-0/0/3 unit 24 vlan-id 24
set interfaces ge-0/0/3 unit 24 family inet address 24.24.24.4/24
set interfaces ge-0/0/3 unit 24 family mpls
set interfaces lo0 unit 4 family inet address 4.4.4.4/32
set protocols rsvp interface all
set protocols rsvp interface ge-0/0/3.24 subscription 1
set protocols rsvp interface ge-0/0/1.45 subscription 1
set protocols mpls traffic-engineering mpls-forwarding
set protocols mpls admin-groups AG0 0
set protocols mpls admin-groups AG1 1
set protocols mpls admin-groups AG3 3
set protocols mpls admin-groups AG4 4
set protocols mpls admin-groups AG5 5
set protocols mpls admin-groups AG6 6
set protocols mpls admin-groups AG7 7
set protocols mpls admin-groups AG2 2
set protocols mpls interface all
set protocols mpls interface ge-0/0/3.24 admin-group AG1
set protocols mpls interface ge-0/0/1.45 admin-group AG1
set protocols ospf traffic-engineering
set protocols ospf area 0.0.0.0 interface all interface-type p2p
set protocols ospf area 0.0.0.0 interface ge-0/0/0.192 passive


##MX5##
set version 14.1R1.10
set interfaces ge-0/0/0 vlan-tagging
set interfaces ge-0/0/0 unit 192 vlan-id 192
set interfaces ge-0/0/0 unit 192 family inet address 192.168.1.5/24
set interfaces ge-0/0/1 vlan-tagging
set interfaces ge-0/0/1 unit 45 vlan-id 45
set interfaces ge-0/0/1 unit 45 family inet address 45.45.45.5/24
set interfaces ge-0/0/1 unit 45 family mpls
set interfaces ge-0/0/2 vlan-tagging
set interfaces ge-0/0/2 unit 57 vlan-id 57
set interfaces ge-0/0/2 unit 57 family inet address 57.57.57.5/24
set interfaces ge-0/0/2 unit 57 family mpls
set interfaces ge-0/0/3 vlan-tagging
set interfaces ge-0/0/3 unit 35 vlan-id 35
set interfaces ge-0/0/3 unit 35 family inet address 35.35.35.5/24
set interfaces ge-0/0/3 unit 35 family mpls
set interfaces ge-0/0/4 vlan-tagging
set interfaces ge-0/0/4 unit 25 vlan-id 25
set interfaces ge-0/0/4 unit 25 family inet address 25.25.25.5/24
set interfaces ge-0/0/4 unit 25 family mpls
set interfaces lo0 unit 0 family inet address 5.5.5.5/32
set routing-options static route 7.7.7.7/32 next-hop 57.57.57.7
set protocols rsvp interface all
set protocols rsvp interface ge-0/0/3.35 subscription 1
set protocols rsvp interface ge-0/0/4.25 subscription 1
set protocols rsvp interface ge-0/0/1.45 subscription 1
set protocols rsvp interface ge-0/0/2.57 subscription 1
set protocols mpls traffic-engineering mpls-forwarding
set protocols mpls admin-groups AG0 0
set protocols mpls admin-groups AG1 1
set protocols mpls admin-groups AG3 3
set protocols mpls admin-groups AG4 4
set protocols mpls admin-groups AG5 5
set protocols mpls admin-groups AG6 6
set protocols mpls admin-groups AG7 7
set protocols mpls admin-groups AG2 2
set protocols mpls interface all
set protocols mpls interface ge-0/0/4.25 admin-group AG2
set protocols mpls interface ge-0/0/1.45 admin-group AG1
set protocols mpls interface ge-0/0/3.35 admin-group AG3
set protocols ospf traffic-engineering
set protocols ospf area 0.0.0.0 interface all interface-type p2p
set protocols ospf area 0.0.0.0 interface ge-0/0/0.192 passive

 

 

3 REPLIES 3
Highlighted
vMX
Solution
Accepted by topic author sarahr202
‎06-23-2020 02:18 PM

Re: Secondary LSP standby LSP is using the same path as Primary why?

‎06-22-2020 02:36 PM

@sarahr202 wrote:

2) Juniper's implementation will try to avoid all the paths traversed by Primary LSP,  for Standby LSP.

In order to test this out as proof of concept, I implemented a simple lab as shown above.

 

 


Hello,

 

Using secondary path without any constraints will not force the router to avoid the primary path, this is normal behavior. You have to configure enough constraints otherwise the router will simply attempt to signal the best path to the egress node through the network.

By default LSPs are configured with Random load balance rule - meaning that if multiple equal cost paths exists the CSPF algorithm will select the best path randomly regardless of the available bandwidth as described here: https://www.juniper.net/documentation/en_US/junos/topics/topic-map/lsp-computation.html

Highlighted
vMX

Re: Secondary LSP standby LSP is using the same path as Primary why?

‎06-24-2020 06:26 PM

Thanks for your response.

Using secondary path without any constraints will not force the router to avoid the primary path, this is normal behavior. You have to configure enough constraints otherwise the router will simply attempt to signal the best path to the egress node through the network.

 

Stanby LSP is contrained to use 2M as shown in my output.

Standby SEC State: Up
Priorities: 7 0
Bandwidth: 2Mbps

 

The issue:

MX2 could not establish RSVP session with MX3, ( something hung, there was no arp either on MX2 for MX3 and vice versa, once I rebooted  vMX3, vMX2, RSVP establishes and standby LSP  is placed over MX2-MX3-MX5 path.

 

 

Highlighted
vMX

Re: Secondary LSP standby LSP is using the same path as Primary why?

‎06-25-2020 10:55 AM

Hi,

 

I should correct my previous statement, you are indeed correct. If an LSP has a primary path and secondary in standby then the secondary should not be signaled to use the same hops as the primary path as the router actually sets a constraint "avoid primary path".

Only in case a LSP doesn't have a primary but just secondary paths in standby then it may happen that they take the same path i.e. 

 

label-switched-path P1-P2 {
    to 198.51.100.2;
    bandwidth 2m;
    adaptive;
    secondary path1 {
        standby;
    }
    secondary path2 {
        standby;
    }
}


Jun 25 17:23:44.798497 CSPF adding path P1-P2(secondary path1) to CSPF queue 0
Jun 25 17:23:44.798600 bandwidth: CT0=2Mbps ; setup priority: 7; random
Jun 25 17:23:44.798643 constraint bandwidth: CT0=2Mbps
Jun 25 17:23:44.798666 CSPF ERO for P1-P2(secondary path1) (2 hops)
Jun 25 17:23:44.798671 node 203.133.13.3/32
Jun 25 17:23:44.798674 node 203.133.23.2/32


Jun 25 17:24:14.778507 CSPF adding path P1-P2(secondary path2) to CSPF queue 0
Jun 25 17:24:14.778565 bandwidth: CT0=2Mbps ; setup priority: 7; random
Jun 25 17:24:14.778608 constraint bandwidth: CT0=2Mbps
Jun 25 17:24:14.778632 CSPF ERO for P1-P2(secondary path2) (2 hops)
Jun 25 17:24:14.778637 node 203.133.13.3/32
Jun 25 17:24:14.778641 node 203.133.23.2/32

 

 

It is quite interesting that your secondary actually established over the same path as when I simulated similar scenario (with no other path available as was your case due to issue between MX2 and MX3) the secondary wouldn't establish due to the constraint to avoid the primary path and the router would keep attempting to signal the secondary over different path.

 

Jun 25 17:44:24.729852 CSPF adding path P1-P2(primary path1) to CSPF queue 0
Jun 25 17:44:24.730106  bandwidth: CT0=2Mbps ; setup priority: 7; random
Jun 25 17:44:24.730164  constraint bandwidth: CT0=2Mbps
Jun 25 17:44:24.730192 CSPF ERO for P1-P2(primary path1) (2 hops)
Jun 25 17:44:24.730196  node 203.133.13.3/32
Jun 25 17:44:24.730200  node 203.133.23.2/32

Jun 25 17:44:53.909661 CSPF adding path P1-P2(secondary path2) to CSPF queue 0
Jun 25 17:44:53.909724  bandwidth: CT0=2Mbps ; setup priority: 7; random
Jun 25 17:44:53.909753  constraint bandwidth: CT0=2Mbps
Jun 25 17:44:53.909757  constraint avoid primary path
Jun 25 17:44:53.909766  Link overlap with primary path, adding cost 8000000
Jun 25 17:44:53.909772  Link overlap with primary path, adding cost 8000000
Jun 25 17:44:53.909788 CSPF Reached target
Jun 25 17:44:53.909796 CSPF completed in 0.000040s
Jun 25 17:44:53.909803 CSPF ERO for P1-P2(secondary path2) (2 hops)
Jun 25 17:44:53.909807  node 203.133.13.3/32
Jun 25 17:44:53.909811  node 203.133.23.2/32
Jun 25 17:44:53.909813 CSPF Overlap between primary and secondary
Jun 25 17:44:53.909819 CSPF credibility 1
Jun 25 17:44:53.909822 CSPF final destination 198.51.100.2
Jun 25 17:44:53.909828 CSPF starting from P1.00 (198.51.100.1) to 198.51.100.2, hoplimit 254
Jun 25 17:44:53.909833  constraint bandwidth: CT0=2Mbps
Jun 25 17:44:53.909836  constraint avoid primary path
Jun 25 17:44:53.909842 CSPF completed in 0.000012s
Jun 25 17:44:53.909845 CSPF couldn't find a route to 198.51.100.2

 

However it seems that under certain circumstances it's possible the primary and secondary path will traverse the same hops - I could simulate it when changing the LSP config where the secondary was already established and the primary resignaled to the same path. It wasn't untill the next reoptimization round for the secondary to go down or resignal to different path - 

 

root@P1# set label-switched-path P1-P2 primary path1
root@P1# delete label-switched-path P1-P2 secondary path1

root@P1# run show mpls lsp name P1-P2 extensive 
  ActivePath: path1 (primary)
 *Primary   path1            State: Up
 203.133.13.3 S 203.133.23.2 S
    5 Jun 25 17:33:01.732 Selected as active path: due to 'primary'
  Standby   path2            State: Up
 203.133.13.3 S 203.133.23.2 S
    6 Jun 25 17:33:01.731 Deselected as active: due to 'primary'

 

Cheers,

Radek

 

Feedback