Segment Routing Commands

This chapter describes the commands used to configure and use Segment Routing.

egress-engineering

To configure segment routing egress peer engineering (EPE) on the egress node, use the egress-engineering command.

egress-engineering

Syntax Description

This command has no keywords or arguments.

Command Default

No default behavior or values

Command Modes

Neighbor configuration

Command History

Release Modification

Release 6.1.2

This command was introduced.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

Task ID

Task ID

Operations

mpls-te

read, write

Examples

This example shows how to configure segment routing EPE on the egress node:


RP/0/RSP0/CPU0:router # configure
RP/0/RSP0/CPU0:router(config)# router bgp 1
RP/0/RSP0/CPU0:router(config-bgp)# neighbor 192.168.1.3
RP/0/RSP0/CPU0:router(config-bgp-nbr)# remote-as 3
RP/0/RSP0/CPU0:router(config-bgp-nbr)# egress-engineering

ping mpls nil-fec labels

To check network connectivity and identify LSP breakages, use the ping mpls nil-fec labels command.

ping mpls nil-fec labels { label[ ,label...] } [ output { interface tx-interface} [ nexthop next-hop-ip-address]]

Syntax Description

labels label,label...

Specifies the label stack. Use commas to separate the each label.

ouput interface tx-interface

Specifies the output interface.

nexthop next-hop-ip-address

(Optional) Causes packets to go through the specified next-hop address.

Command Default

None

Command Modes

EXEC

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

Task ID

Task ID Operation

mpls-te

read, write

Examples

This example shows how to check connectivity for a known label stack using a specific output interface and next-hop address:


RP/0/RSP0/CPU0:router# ping mpls nil-fec labels 16005,16007 output interface GigabitEthernet 0/2/0/1 nexthop 10.1.1.4 repeat 1
Sending 1, 72-byte MPLS Echos with Nil FEC labels 16005,16007,
     timeout is 2 seconds, send interval is 0 msec:

Codes: '!' - success, 'Q' - request not sent, '.' - timeout,
  'L' - labeled output interface, 'B' - unlabeled output interface,
  'D' - DS Map mismatch, 'F' - no FEC mapping, 'f' - FEC mismatch,
  'M' - malformed request, 'm' - unsupported tlvs, 'N' - no label entry,
  'P' - no rx intf label prot, 'p' - premature termination of LSP,
  'R' - transit router, 'I' - unknown upstream index,
  'd' - see DDMAP for return code,
  'X' - unknown return code, 'x' - return code 0

Type escape sequence to abort.
!
Success rate is 100 percent (1/1), round-trip min/avg/max = 1/1/1 ms
 Total Time Elapsed 0 ms
 

prefix-sid

To specify or advertise prefix (node) segment ID (SID) on all routers, use the prefix-sid command in IS-IS interface address family or OSPF interface configuration mode. To stop advertising prefix SID, use the no form of this command.

prefix-sid [ strict-spf ] { index sid-index | absolute sid-value } [ n-flag-clear ] [ explicit-null ]

no prefix-sid [ strict-spf ] { index sid-index | absolute sid-value } [ n-flag-clear ] [ explicit-null ]

Syntax Description

strict-spf

Specifies that the prefix-SID should use the SPF path instead of the SR-TE policy.

index sid-index

Specifies the prefix SID based on the lower boundary of the SRGB + the index.

absolute sid-value

Specifies the specific prefix SID value within the SRGB.

n-flag-clear

Specifies that the prefix-SID is not a node-SID by setting the N flag in the prefix-SID sub Type Length Value (TLV) to 0.

explicit-null

Adds an explicit-Null label by setting the E flag in the prefix-SID sub TLV to 1. Automatically disables penultimate-hop-popping (PHP) by setting the P flag (IS-IS) or NP flag (OSPF) to 1.

Command Default

Prefix SID is a node SID (N-flag is set to 1).

Explicit-Null label is not set (E-flag is set to 0).

Command Modes

IS-IS interface address-family configuration

OSPF interface configuration

Usage Guidelines

Segment routing must be configured on the ISIS instance or on the OSPF process, area, or interface before configuring prefix SID value.

Strict-SPF SIDs are used to forward traffic strictly along the SPF path. Strict-SPF SIDs are not forwarded to SR-TE policies. IS-IS advertises the SR Algorithm sub Type Length Value (TLV) (in the SR Router Capability SubTLV) to include both algorithm 0 (SPF) and algorithm 1 (Strict-SPF). When the IS-IS area or level is Strict-SPF TE-capable, Strict-SPF SIDs are used to build the SR-TE Strict-SPF policies. Strict-SPF SIDs are also used to program the backup paths for prefixes, node SIDs, and adjacency SIDs.


Note

The same SRGB is used for both regular SIDs and strict-SPF SIDs.

Task ID

Task ID

Operations

isis

ospf

read, write

Examples

This example shows how to configure a prefix SID.


RP/0/RSP0/CPU0:router # configure
RP/0/RSP0/CPU0:router(config)# router isis 100
RP/0/RSP0/CPU0:router(config-isis)# interface loopback0
RP/0/RSP0/CPU0:router(config-isis-if)# address-family ipv4 unicast
RP/0/RSP0/CPU0:router(config-isis-if-af)# prefix-sid index 1001

This example shows how to configure an absolute prefix SID on an OSPF interface.


RP/0/RSP0/CPU0:router # configure
RP/0/RSP0/CPU0:router(config)# router ospf 1
RP/0/RSP0/CPU0:router(config-ospf)# router area 0
RP/0/RSP0/CPU0:router(config-ospf-ar)# interface loopback0
RP/0/RSP0/CPU0:router(config-ospf-ar-if)# prefix-sid absolute 16041

segment-routing global-block

To configure the segment routing global block (SRGB), use the segment-routing global-block command.

segment-routing global-block starting_value ending_value

Syntax Description

starting_value ending_value

Specifies the block of segment routing IDs that are allocated for the routers in the network. Ranges from 16000 to 1048574.

Command Default

Default SRGB range is 16000 to 23999.

Command Modes

Global Configuration mode

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

To keep the segment routing configuration simple and to make it easier to troubleshoot segment routing issues, we recommend that you use the default SRGB range on each node in the domain. However, there are instances when you might need to define a different range:

  • The nodes of another vendor support a label range that is different from the default SRGB, and you want to use the same SRGB on all nodes.

  • The default range is too small.

  • To specify separate SRGBs for IS-IS and OSPF protocols, as long as the ranges do not overlap.

Because the values assigned from the range have domain-wide significance, we recommend that all routers within the domain be configured with the same range of values.

Task ID

Task ID Operation

mpls-te

read, write

Examples

This example shows how to configure the SRGB range:


RP/0/RSP0/CPU0:router(config)# segment-routing global-block 17000 20000

segment-routing mapping-server

To configure the segment routing mapping server (SRMS), use the segment-routing mapping-server command.

segment-routing mapping-server prefix-sid-map address-family{ ipv4 | ipv6} ip_address/ subnet_mask SID_start_value range range

Syntax Description

address-family{ ipv4 | ipv6}

Configures the address family for IS-IS.

ip_address/ subnet_mask

Specifies the prefix and mask.

SID_start_value

Specifies the first prefix SID in the range.

range range

Specifies the size of the range.

Command Default

None

Command Modes

Global Configuration mode

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

The position of the mapping server in the network is not important. However, since the mapping advertisements are distributed in IGP using the regular IGP advertisement mechanism, the mapping server needs an IGP adjacency to the network.

The role of the mapping server is crucial. For redundancy purposes, you should configure multiple mapping servers in the networks.

Task ID

Task ID Operation

mpls-te

read, write

Examples

This example shows how to configure the mapping server and add prefix-SID mapping entries in the active local mapping policy:


RP/0/RSP0/CPU0:router(config)# segment-routing mapping-server prefix-sid-map address-family ipv4 10.1.1.1/32 17000 range 100

segment-routing mpls

To enable segment routing for IPv4 addresses with MPLS data plane, use the segment-routing mpls command in IPv4 address family configuration mode. To disable segment routing, use the no form of this command.

segment-routing mpls

Syntax Description

mpls

Enables segment routing for IPv4 addresses with MPLS data plane.

Command Default

No default behavior or values.

Command Modes

IPv4 address family configuration

Router configuration

Area configuration

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

Task ID

Task ID Operation

mpls-te

read, write

Examples

This example shows how to enable segment routing with MPLS data plane.


RP/0/RSP0/CPU0:router# configure
RP/0/RSP0/CPU0:router(config)# router isis 100
RP/0/RSP0/CPU0:router(config-isis)# address-family ipv4 unicast
RP/0/RSP0/CPU0:router(config-isis-af)# segment-routing mpls

segment-routing prefix-sid-map advertise-local

To enable the router to advertise the segment routing mapping server (SRMS) entries that are locally configured, use the segment-routing prefix-sid-map advertise-local command. In addition to advertising these local SRMS entries, these mapping entries are also used to calculate segment ID (SID).

segment-routing prefix-sid-map advertise-local

Syntax Description

advertise-local

Advertises the SRMS mapping entries that are locally configured.

Command Default

Disabled.

Command Modes

IPv4 address family configuration

Router configuration

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

Task ID

Task ID Operation

ospf

isis

read, write

Examples

This example shows how to enable the router to advertise the locally configured SRMS entries:


RP/0/RSP0/CPU0:router# configure
RP/0/RSP0/CPU0:router(config)# router ospf 1
RP/0/RSP0/CPU0:router(config-ospf)# segment-routing prefix-sid-map advertise-local

segment-routing prefix-sid-map receive disable

To disable mapping client functionality, use the segment-routing prefix-sid-map receive disable command. To reenable client functionality, use the segment-routing prefix-sid-map receive command.

segment-routing prefix-sid-map receive [ disable]

Syntax Description

receive

Only remote SRMS mapping entries are used for SID calculation.

disable

Disable remote SRMS mapping entries received by flooding.

Command Default

Enabled.

Command Modes

IPv4 address family configuration

Router configuration

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

The mapping client functionality is enabled by default. When you disable client functionality, the SRMS active policy is calculated without remote SRMS entries.

You can use this command with the segment-routing prefix-sid-map advertise-local command simultaneously.

Task ID

Task ID Operation

ospf

isis

read, write

Examples

This example shows how to disable the mapping server client functionality:


RP/0/RSP0/CPU0:router(config)# router isis 1
RP/0/RSP0/CPU0:router(config-isis)# address-family ipv4 unicast
RP/0/RSP0/CPU0:router(config-isis-af)# segment-routing prefix-sid-map receive disable

show bgp egress-engineering

To display BGP egress peer engineering (EPE) information, use the show bgp egress-engineering command.

show bgp egress-engineering

Syntax Description

This command has no keywords or arguments.

Command Default

None

Command Modes

EXEC

Command History

Release Modification

Release 6.1.2

This command was introduced.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

Task ID

Task ID Operation

bgp

read

Examples

This example shows how to display BGP egress peer engineering (EPE) information:


RP/0/RSP0/CPU0:router2# show bgp egress-engineering

Egress Engineering Peer Set: 1.1.1.5/32 (10b48fec)
     Nexthop: 1.1.1.5
     Version: 2, rn_version: 2
       Flags: 0x00000006
   Local ASN: 1
  Remote ASN: 5
   Local RID: 1.1.1.2
  Remote RID: 1.1.1.5
   First Hop: 10.1.1.9
        NHID: 0, 0
       Label: 30025, Refcount: 3
     rpc_set: 10c34c24
. . .

show isis segment-routing prefix-sid-map

To verify the active and backup prefix-to-SID mappings for IS-IS, use the show isis segment-routing prefix-sid-map command.

show isis segment-routing prefix-sid-map [ active-policy | backup-policy]

Syntax Description

active-policy

(Optional) Specifies the active mapping policy.

backup-policy

(Optional) Specifies the backup mapping policy.

Command Default

None

Command Modes

EXEC

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

Task ID

Task ID Operation

isis

read

Examples

The example shows how to verify the active mapping policy on IS-IS:


RP/0/0/CPU0:router# show isis segment-routing prefix-sid-map active-policy

IS-IS 1 active policy
Prefix               SID Index    Range        Flags
1.1.1.100/32         100          20          
1.1.1.150/32         150          10          

Number of mapping entries: 2

The example shows how to verify the backup mapping policy on IS-IS:


RP/0/0/CPU0:router# show isis segment-routing prefix-sid-map backup-policy

IS-IS 1 backup policy
Prefix               SID Index    Range        Flags
1.1.1.100/32         100          20          
1.1.1.150/32         150          10          

Number of mapping entries: 2

show ospf segment-routing prefix-sid-map

To verify the active and backup prefix-to-SID mappings for OSPF, use the show ospf segment-routing prefix-sid-map command.

show ospf segment-routing prefix-sid-map [ active-policy | backup-policy]

Syntax Description

active-policy

(Optional) Specifies the active mapping policy.

backup-policy

(Optional) Specifies the backup mapping policy.

Command Default

None

Command Modes

EXEC

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

Task ID

Task ID Operation

ospf

read

Examples

The example shows how to verify the active mapping policy on OSPF:


RP/0/0/CPU0:router# show ospf segment-routing prefix-sid-map active-policy

        SRMS active policy for Process ID 1

Prefix               SID Index    Range        Flags
1.1.1.100/32         100          20          
1.1.1.150/32         150          10           

Number of mapping entries: 2

The example shows how to verify the backup mapping policy on OSPF:


RP/0/0/CPU0:router# show ospf segment-routing prefix-sid-map backup-policy

        SRMS backup policy for Process ID 1

Prefix               SID Index    Range        Flags
1.1.1.100/32         100          20          
1.1.1.150/32         150          10          

Number of mapping entries: 2

show segment-routing mapping-server prefix-sid-map

To verify the locally configured prefix-to-SID mappings, use the show segment-routing mapping-server prefix-sid-map command.

show segment-routing mapping-server prefix-sid-map [ ipv4 | ipv6] [ prefix] [ detail]

Syntax Description

ipv4

(Optional) Specifies an IPv4 address family.

ipv6

(Optional) Specifies an IPv6 address family.

prefix

(Optional) Specifies a prefix.

detail

(Optional) Displays detailed information on the prefix-to-SID mappings.

Command Default

None

Command Modes

EXEC

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

Task ID

Task ID Operation

read

Examples

The example shows how to verify the IPv4 prefix-to-SID mappings:


RP/0/0/CPU0:router# show segment-routing mapping-server prefix-sid-map ipv4
Prefix               SID Index    Range        Flags
20.1.1.0/24          400          300          
10.1.1.1/32          10           200          
Number of mapping entries: 2

The example shows how to display detailed information on the IPv4 prefix-to-SID mappings:


RP/0/0/CPU0:router# show segment-routing mapping-server prefix-sid-map ipv4 detail
Prefix
20.1.1.0/24
    SID Index:      400
    Range:          300
    Last Prefix:    20.2.44.0/24
    Last SID Index: 699
    Flags:          
10.1.1.1/32
    SID Index:      10
    Range:          200
    Last Prefix:    10.1.1.200/32
    Last SID Index: 209
    Flags:          
Number of mapping entries: 2

traceroute mpls nil-fec labels

To check network connectivity and identify LSP breakages, use the traceroute mpls nil-fec labels command.

traceroute mpls nil-fec labels { label[ ,label...] } [ output { interface tx-interface} [ nexthop next-hop-ip-address]]

Syntax Description

labels label,label...

Specifies the label stack. Use commas to separate the each label.

ouput interface tx-interface

Specifies the output interface.

nexthop next-hop-ip-address

(Optional) Causes packets to go through the specified next-hop address.

Command Default

None

Command Modes

EXEC

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

Task ID

Task ID Operation

mpls-te

read, write

Examples

This example shows how to check connectivity for a known label stack using a specific output interface and next-hop address:


RP/0/RSP0/CPU0:router# traceroute mpls nil-fec labels 16005,16007 output interface GigabitEthernet 0/2/0/1 nexthop 10.1.1.4
Tracing MPLS Label Switched Path with Nil FEC labels 16005,16007, timeout is 2 seconds

Codes: '!' - success, 'Q' - request not sent, '.' - timeout,
  'L' - labeled output interface, 'B' - unlabeled output interface,
  'D' - DS Map mismatch, 'F' - no FEC mapping, 'f' - FEC mismatch,
  'M' - malformed request, 'm' - unsupported tlvs, 'N' - no label entry,
  'P' - no rx intf label prot, 'p' - premature termination of LSP,
  'R' - transit router, 'I' - unknown upstream index,
  'd' - see DDMAP for return code,
  'X' - unknown return code, 'x' - return code 0

Type escape sequence to abort.
  0 10.1.1.3 MRU 1500 [Labels: 16005/16007/explicit-null Exp: 0/0/0]
L 1 10.1.1.4 MRU 1500 [Labels: implicit-null/16007/explicit-null Exp: 0/0/0] 1 ms
L 2 10.1.1.5 MRU 1500 [Labels: implicit-null/explicit-null Exp: 0/0] 1 ms
! 3 10.1.1.7 1 ms