18 mins read

SR-MPLS –  Static non-colored LSP 

1. Intro

The segment routing architecture enables the ingress devices in a core network to steer traffic through explicit paths. You can configure these paths using segment lists to define the paths that the incoming traffic should take.

SR is a control-plane architecture that enables an ingress devices in a core network to steer traffic through a specific set of nodes and links in the network without relying on the intermediate nodes in the network to determine the actual path it should take. You can configure these paths using segment lists to define the paths that the incoming traffic should take.

Segment routing LSPs can either be dynamic or static in nature.

  • Dynamic SR LSPs – When a segment routing LSP is created either by an external controller and downloaded to an ingress device through Path Computation Element Protocol (PCEP) extensions, or through BGP segment routing extensions. (not covered by this post), or using Distributed CSPF (D-CSPF).
  • Static SR LSPs – When a segment routing LSP is created on the ingress device through local configuration, the LSP is statically provisioned. Can be further classified as:
    • colored (will be covered in a different post)
    • non-colored LSPs 

The static non-colored segment routing LSP has a unique name and a destination IP address. An ingress route to the destination is installed in the inet.3 routing table with a default preference of 8 and a metric of 1. 

You can configure segment routing tunnel by configuring the source-routing-path statement. The SR tunnel has a destination address and one or more primary paths and optionally secondary paths that refer to the segment list.

The segment list is a set of explicit SR paths are configured on the ingress router by configuring the segment-list statement. Each segment list consists of a sequence of hops.

For non-colored static segment routing tunnel, the first hop of the segment list specifies an immediate next hop IP address and the second to Nth hop specifies the segment identifies (SID) labels corresponding to the link or node which the path traverses.

2. Configuration

Because we are continuing the previous post by configuring a static non-colored LSP, we are using the same topology:

A quick refresh, the SR-MPLS config was already applied on all routers:

To create our 1st static non-colored LSP, the destination will be router R8:

Now, we can do multiple checks to verify the status of the newly created LSP:

3. auto-translate

We will use interface IPs for this 1st example:

### Reconfigure the segment list so that it contains only IP Lookups: 

set protocols source-packet-routing segment-list R1-TO-R8-primary HOP-1-R3 ip-address 17.1.3.3
set protocols source-packet-routing segment-list R1-TO-R8-primary HOP-2-R6 ip-address 17.3.6.6
set protocols source-packet-routing segment-list R1-TO-R8-primary HOP-3-R7 ip-address 17.6.7.7
set protocols source-packet-routing segment-list R1-TO-R8-primary HOP-4-R8 ip-address 17.7.8.8

### JunOS will not even let you commit: 

root@R1# commit 
[edit protocols source-packet-routing]
  'segment-list R1-TO-R8-primary'
    segment-list R1-TO-R8-primary has an invalid unknown type in the 2nd hop
error: configuration check-out failed

### We need to add the auto-translate option: 

set protocols source-packet-routing segment-list R1-TO-R8-primary auto-translate
set protocols source-packet-routing segment-list R1-TO-R8-primary HOP-1-R3 ip-address 17.1.3.3
set protocols source-packet-routing segment-list R1-TO-R8-primary HOP-2-R6 ip-address 17.3.6.6
set protocols source-packet-routing segment-list R1-TO-R8-primary HOP-3-R7 ip-address 17.6.7.7
set protocols source-packet-routing segment-list R1-TO-R8-primary HOP-4-R8 ip-address 17.7.8.8

### Still not working, we need to activate the TED: 

root@R1# run show spring-traffic-engineering lsp detail 
Name: R1-TO-R8
  Tunnel-source: Static configuration
  Tunnel Forward Type: SRMPLS
  To: 17.0.0.8
  Te-group-id: 0
  State: Down
    Path: R1-TO-R8-primary
    Path Status: NA
    Outgoing interface: NA
    Auto-translate status: Enabled Auto-translate result: TED is empty
    Compute Status:Disabled , Compute Result:N/A , Compute-Profile Name:N/A
    BFD status: N/A BFD name: N/A
    BFD remote-discriminator: N/A
    Segment ID : 128 
    ERO Valid: true
      SR-ERO hop count: 4
        Hop 1 (Strict): 
          NAI: IPv4 Adjacency ID, 0.0.0.0 -> 17.1.3.3
          SID type: None
        Hop 2 (Strict): 
          NAI: IPv4 Adjacency ID, 0.0.0.0 -> 17.3.6.6
          SID type: None
        Hop 3 (Strict): 
          NAI: IPv4 Adjacency ID, 0.0.0.0 -> 17.6.7.7
          SID type: None
        Hop 4 (Strict): 
          NAI: IPv4 Adjacency ID, 0.0.0.0 -> 17.7.8.8
          SID type: None

### To activate the TED database: 

set protocols isis traffic-engineering l3-unicast-topology

### Now the LSP is UP and we can see how the IPs were translated to Adjacency SIDs:

root@R1# run show spring-traffic-engineering lsp detail 
Name: R1-TO-R8
  Tunnel-source: Static configuration
  Tunnel Forward Type: SRMPLS
  To: 17.0.0.8
  Te-group-id: 0
  State: Up
    Path: R1-TO-R8-primary
    Path Status: NA
    Outgoing interface: ge-0/0/2.0
    Auto-translate status: Enabled Auto-translate result: Success
    Compute Status:Disabled , Compute Result:N/A , Compute-Profile Name:N/A
    BFD status: N/A BFD name: N/A
    BFD remote-discriminator: N/A
    Segment ID : 128 
    ERO Valid: true
      SR-ERO hop count: 4
        Hop 1 (Strict): 
          NAI: IPv4 Adjacency ID, 0.0.0.0 -> 17.1.3.3
          SID type: 20-bit label, Value: 23
        Hop 2 (Strict): 
          NAI: IPv4 Adjacency ID, 0.0.0.0 -> 17.3.6.6
          SID type: 20-bit label, Value: 18
        Hop 3 (Strict): 
          NAI: IPv4 Adjacency ID, 0.0.0.0 -> 17.6.7.7
          SID type: 20-bit label, Value: 20
        Hop 4 (Strict): 
          NAI: IPv4 Adjacency ID, 0.0.0.0 -> 17.7.8.8
          SID type: 20-bit label, Value: 19

### We can see what labels are pushed to the wire: 

root@R1# run show route table inet.3 17.0.0.8/32 

inet.3: 7 destinations, 8 routes (7 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

17.0.0.8/32        *[SPRING-TE/8] 00:03:03, metric 1, metric2 30
                    >  to 17.1.3.3 via ge-0/0/2.0, Push 19, Push 20, Push 18(top)

### With tcmpdump we can see the same labels on the wire: 

15:58:36.512441 MPLS (label 18, exp 0, ttl 64) (label 20, exp 0, ttl 64) (label 19, exp 0, ttl 64) (label 16, exp 0, [S], ttl 64) IP 192.168.1.1 > 192.168.8.1: ICMP echo request, id 59696, seq 4859, length 64

Let’s use the Loopbacks IP in our 2nd example:

### Reconfigure the LSP so that the Loopbacks are used instead: 

set protocols source-packet-routing segment-list R1-TO-R8-primary auto-translate
set protocols source-packet-routing segment-list R1-TO-R8-primary HOP-1-R3 ip-address 17.0.0.3
set protocols source-packet-routing segment-list R1-TO-R8-primary HOP-2-R6 ip-address 17.0.0.6
set protocols source-packet-routing segment-list R1-TO-R8-primary HOP-3-R7 ip-address 17.0.0.7
set protocols source-packet-routing segment-list R1-TO-R8-primary HOP-4-R8 ip-address 17.0.0.8

### But the system still thinks the IPs are interface IP. 

root@R1# run show spring-traffic-engineering lsp detail 
Name: R1-TO-R8
  Tunnel-source: Static configuration
  Tunnel Forward Type: SRMPLS
  To: 17.0.0.8
  Te-group-id: 0
  State: Down
    Path: R1-TO-R8-primary
    Path Status: NA
    Outgoing interface: NA
    Auto-translate status: Enabled Auto-translate result: Link not found
    Compute Status:Disabled , Compute Result:N/A , Compute-Profile Name:N/A
    BFD status: N/A BFD name: N/A
    BFD remote-discriminator: N/A
    Segment ID : 128 
    ERO Valid: true
      SR-ERO hop count: 4
        Hop 1 (Strict): 
          NAI: IPv4 Adjacency ID, 0.0.0.0 -> 17.0.0.3
          SID type: None
        Hop 2 (Strict): 
          NAI: IPv4 Adjacency ID, 0.0.0.0 -> 17.0.0.6
          SID type: None
        Hop 3 (Strict): 
          NAI: IPv4 Adjacency ID, 0.0.0.0 -> 17.0.0.7
          SID type: None
        Hop 4 (Strict): 
          NAI: IPv4 Adjacency ID, 0.0.0.0 -> 17.0.0.8
          SID type: None

### Let's tell JunOS these are node IPs or loopbacks: 

set protocols source-packet-routing segment-list R1-TO-R8-primary auto-translate
set protocols source-packet-routing segment-list R1-TO-R8-primary HOP-1-R3 ip-address 17.0.0.3
set protocols source-packet-routing segment-list R1-TO-R8-primary HOP-1-R3 label-type node
set protocols source-packet-routing segment-list R1-TO-R8-primary HOP-2-R6 ip-address 17.0.0.6
set protocols source-packet-routing segment-list R1-TO-R8-primary HOP-2-R6 label-type node
set protocols source-packet-routing segment-list R1-TO-R8-primary HOP-3-R7 ip-address 17.0.0.7
set protocols source-packet-routing segment-list R1-TO-R8-primary HOP-3-R7 label-type node
set protocols source-packet-routing segment-list R1-TO-R8-primary HOP-4-R8 ip-address 17.0.0.8
set protocols source-packet-routing segment-list R1-TO-R8-primary HOP-4-R8 label-type node

[edit]
root@R1# commit 
[edit protocols source-packet-routing]
  'segment-list R1-TO-R8-primary'
    Under segment-list R1-TO-R8-primary, label-type node for 1st hop is supported only with inherit-label-nexthops enabled
error: configuration check-out failed

### Ok, Adding inherit-label-nexthops:

set protocols source-packet-routing segment-list R1-TO-R8-primary inherit-label-nexthops
set protocols source-packet-routing segment-list R1-TO-R8-primary auto-translate
set protocols source-packet-routing segment-list R1-TO-R8-primary HOP-1-R3 ip-address 17.0.0.3
set protocols source-packet-routing segment-list R1-TO-R8-primary HOP-1-R3 label-type node
set protocols source-packet-routing segment-list R1-TO-R8-primary HOP-2-R6 ip-address 17.0.0.6
set protocols source-packet-routing segment-list R1-TO-R8-primary HOP-2-R6 label-type node
set protocols source-packet-routing segment-list R1-TO-R8-primary HOP-3-R7 ip-address 17.0.0.7
set protocols source-packet-routing segment-list R1-TO-R8-primary HOP-3-R7 label-type node
set protocols source-packet-routing segment-list R1-TO-R8-primary HOP-4-R8 ip-address 17.0.0.8
set protocols source-packet-routing segment-list R1-TO-R8-primary HOP-4-R8 label-type node

### Now it is working: 

root@R1# run show spring-traffic-engineering lsp detail 
Name: R1-TO-R8
  Tunnel-source: Static configuration
  Tunnel Forward Type: SRMPLS
  To: 17.0.0.8
  Te-group-id: 0
  State: Up
    Path: R1-TO-R8-primary
    Path Status: NA
    Outgoing interface: NA
    Auto-translate status: Enabled Auto-translate result: Success
    Compute Status:Disabled , Compute Result:N/A , Compute-Profile Name:N/A
    BFD status: N/A BFD name: N/A
    BFD remote-discriminator: N/A
    Segment ID : 128 
    ERO Valid: true
      SR-ERO hop count: 4
        Hop 1 (Loose): 
          NAI: IPv4 Node ID, Node address: 17.0.0.3
          SID type: 20-bit label, Value: 801003
        Hop 2 (Loose): 
          NAI: IPv4 Node ID, Node address: 17.0.0.6
          SID type: 20-bit label, Value: 801006
        Hop 3 (Loose): 
          NAI: IPv4 Node ID, Node address: 17.0.0.7
          SID type: 20-bit label, Value: 801007
        Hop 4 (Loose): 
          NAI: IPv4 Node ID, Node address: 17.0.0.8
          SID type: 20-bit label, Value: 801008


### We can see what labels are pushed to the wire: 

root@R1# run show route table inet.3 17.0.0.8/32 

inet.3: 7 destinations, 8 routes (7 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

17.0.0.8/32        *[SPRING-TE/8] 00:00:35, metric 1, metric2 30
                    >  to 17.1.3.3 via ge-0/0/2.0, Push 801008, Push 801007, Push 801006(top)

### With tcmpdump we can see the same labels on the wire: 

16:11:13.674433 MPLS (label 801006, exp 0, ttl 64) (label 801007, exp 0, ttl 64) (label 801008, exp 0, ttl 64) (label 16, exp 0, [S], ttl 64) IP 192.168.1.1 > 192.168.8.1: ICMP echo request, id 59696, seq 5612, length 64

Or we can use a combination:

### Alternatively we can remove inherit-label-nexthops and use an interface IP for hop 1 and 3:

root@R1# show | compare 
[edit protocols source-packet-routing segment-list R1-TO-R8-primary]
-    inherit-label-nexthops;
[edit protocols source-packet-routing segment-list R1-TO-R8-primary HOP-1-R3]
-     ip-address 17.0.0.3;
+     ip-address 17.1.3.3;
-     label-type {
-         node;
-     }
[edit protocols source-packet-routing segment-list R1-TO-R8-primary HOP-3-R7]
-     ip-address 17.0.0.7;
+     ip-address 17.6.7.7;
-     label-type {
-         node;
-     }

### So the config looks like this: 

set protocols source-packet-routing segment-list R1-TO-R8-primary auto-translate
set protocols source-packet-routing segment-list R1-TO-R8-primary HOP-1-R3 ip-address 17.1.3.3
set protocols source-packet-routing segment-list R1-TO-R8-primary HOP-2-R6 ip-address 17.0.0.6
set protocols source-packet-routing segment-list R1-TO-R8-primary HOP-2-R6 label-type node
set protocols source-packet-routing segment-list R1-TO-R8-primary HOP-3-R7 ip-address 17.6.7.7
set protocols source-packet-routing segment-list R1-TO-R8-primary HOP-4-R8 ip-address 17.0.0.8
set protocols source-packet-routing segment-list R1-TO-R8-primary HOP-4-R8 label-type node

### The LSP is UP:

root@R1# run show spring-traffic-engineering lsp detail 
Name: R1-TO-R8
  Tunnel-source: Static configuration
  Tunnel Forward Type: SRMPLS
  To: 17.0.0.8
  Te-group-id: 0
  State: Up
    Path: R1-TO-R8-primary
    Path Status: NA
    Outgoing interface: ge-0/0/2.0
    Auto-translate status: Enabled Auto-translate result: Success
    Compute Status:Disabled , Compute Result:N/A , Compute-Profile Name:N/A
    BFD status: N/A BFD name: N/A
    BFD remote-discriminator: N/A
    Segment ID : 128 
    ERO Valid: true
      SR-ERO hop count: 4
        Hop 1 (Strict): 
          NAI: IPv4 Adjacency ID, 0.0.0.0 -> 17.1.3.3
          SID type: 20-bit label, Value: 23
        Hop 2 (Loose): 
          NAI: IPv4 Node ID, Node address: 17.0.0.6
          SID type: 20-bit label, Value: 801006
        Hop 3 (Strict): 
          NAI: IPv4 Adjacency ID, 0.0.0.0 -> 17.6.7.7
          SID type: 20-bit label, Value: 20
        Hop 4 (Loose): 
          NAI: IPv4 Node ID, Node address: 17.0.0.8
          SID type: 20-bit label, Value: 801008

### The labels pushed to the wire: 

root@R1# run show route table inet.3 17.0.0.8/32 

inet.3: 7 destinations, 8 routes (7 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

17.0.0.8/32        *[SPRING-TE/8] 00:02:10, metric 1, metric2 30
                    >  to 17.1.3.3 via ge-0/0/2.0, Push 801008, Push 20, Push 801006(top)

### And the same labels as seen with the tcpdump: 

16:22:35.989263 MPLS (label 801006, exp 0, ttl 64) (label 20, exp 0, ttl 64) (label 801008, exp 0, ttl 64) (label 16, exp 0, [S], ttl 64) IP 192.168.1.1 > 192.168.8.1: ICMP echo request, id 59696, seq 6290, length 64

External Resources: