Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
ON THIS PAGE
 

Segment Routing

SUMMARY The Juniper Cloud-Native Router provides support for Segment Routing (SR-MPLS and SRv6). Read this topic to understand the supported features.

Segment routing (SR) is a modern variant of source routing that simplifies the network by removing network state information from intermediate routers and instead adds path state information into packet headers in the forwarding plane. When a packet arrives at an SR ingress node, the ingress node subjects the packet to policy. The policy associates the packet with an SR path to its destination. The SR path is an ordered list of segments that connects an SR ingress node to an SR egress node. This SR path can be engineered to satisfy any number of constraints for example, link bandwidth, minimum path latency and more.

Segment Routing can leverage either MPLS or IPv6 in the forwarding plane. When Segment Routing uses the MPLS forwarding plane, it is referred to as SR-MPLS. SR-MPLS supports both an IPv4 and IPv6 underlay. When Segment Routing leverages an IPv6 forwarding plane, it is called SRv6. Review the SR-MPLS Day One Book and SRv6 Day One Book for more details.

Segment Routing can be used as a transport tunneling technology for interconnecting data centers for the next-generation Network Function Virtualization (NFV) based telco cloud, 5G, cloud WAN and content distribution networks (CDNs). It can provide multiple benefits in the following use cases:

  • Traffic Engineering— Segment Routing provides efficient and dynamic steering of traffic based on networking conditions to enable load balancing, congestion avoidance and better utilization of bandwidth. This results in improved network performance and user experience.

  • Network Slicing— Segment Routing creates virtualized network slices by enabling different services or tenants to coexist on the same physical infrastructure. Each network slice can have its own forwarding policies and resources, providing enhanced isolation and flexibility for diverse applications.

  • Service Function Chaining— Segment Routing enables flexible and dynamic service function chaining, where packets traverse a sequence of network services such as firewalls, load-balancing and more. It simplifies service deployments and enables on-demand service chaining by defining specific paths for packet flow.

  • Mobile Networks— Segment Routing optimizes traffic routing and handover procedures for a mobile network by enabling efficient path selection and reduced latency.

SR-MPLS

JCNR supports SR-MPLS for both IPv4 and IPv6 underlay. The cloud-native router can participate as a sending, receiving or transit router in SR-MPLS networks. It supports SR-MPLS implementation with or without penultimate hop popping (PHP), with and without overlay ECMP, and Explicit/Implicit NULL. Segment Routing Flexible Algorithm (Flex-Algo) is supported from JCNR Release 24.1 onwards. Review Segment Routing (IS-IS) for more information.

Configuring SR-MPLS on JCNR

Consider the following topology:

We want to segment routing in this network. PE1 is an ingress JCNR node, P is a transit JCNR node while PE2 is an egress JCNR node. We will configure a common segment routing global block (SRGB) range for all nodes. All nodes are assigned a segment ID (node SID) for both IPv4 and IPv6.

Note:

Use the configlet resource to configure the cRPD pods.

JCNR Ingress (PE1) Configuration

Configure the JCNR Ingress (PE1) router with the following configuration:

  1. Configure the interfaces:

  2. Configure IS-IS:

  3. Configure routing options:

  4. Configure MPLS protocol on the interfaces:

  5. Configure BGP neighbors:

  6. Configure the start label and index range of SRGB:

  7. Configure the IPv4 and IPv6 node segment ID:

  8. Optionally, configure the explicit null label:

JCNR Transit (P) Configuration

Configure the JCNR Transit (P) router with the following configuration:

  1. Configure the interfaces:

  2. Configure IS-IS:

  3. Configure routing options:

  4. Configure MPLS protocol on the interfaces:

  5. Configure the start label and index range of SRGB:

  6. Configure the IPv4 and IPv6 node segment ID:

JCNR Egress (PE2) Configuration

Configure the JCNR Egress (PE2) router with the following configuration:

  1. Configure the interfaces:

  2. Configure IS-IS:

  3. Configure routing options:

  4. Configure MPLS protocol on the interfaces:

  5. Configure BGP neighbors:

  6. Configure the start label and index range of SRGB:

  7. Configure the IPv4 and IPv6 node segment ID:

  8. Optionally, configure the explicit null label:

Verify SR-MPLS Configuration on JCNR

The following commands can be used to verify the SRv6 configuration on cRPD:

Verify Configuration on JCNR Forwarding Plane

Verify the traffic flow via the vRouter on each PE node:

SRv6

SRv6 is a segment routing paradigm that is applied to an IPv6 underlay with a new IPv6 extension header called Segment Routing Header (SRH). SRv6 leverages existing IPv6 forwarding technology to encode network programming instructions, also known as Segment Identifiers (SIDs). In SRv6, the SIDs are represented as IPv6 addresses when compared with SR-MPLS where SIDs are encoded as SR-MPLS labels. An SRv6 SID is 128 bits and consists of the following components:

Table 1: SID Components

Component

Description

Locator

First part of an SID that identifies the address of an SRv6 node. It is a network address that provides route to its parent node and is installed in inet6.0 table by the IS-IS protocol. IS-IS routes the segment to its parent node, which performs a function that is defined in the second part of the SID. It is 64 bits in length.

Function

Second part of an SID that defines the function that a node (identified by the locator) performs, such as:

End: Endpoint function for SRv6 instantiation of a Prefix SID [RFC8402]

End.X: Endpoint with L3 cross-connect function for SRv6 instantiation of an Adjacent SID [RFC8402]

End.DT4: Endpoint with decapsulation and specific IPv4 table lookup function for SRv6 instantiation of Global or IPv4 L3VPN (transport IPv4 services over SRv6 underlay)

End.DT6: Endpoint with decapsulation and specific IPv6 table lookup function for SRv6 instantiation of Global or IPv6 L3VPN (Transport IPv6 services over SRv6 underlay)

End.DT46: Endpoint with decapsulation and specific IP table lookup function for SRv6 instantiation of Global, IPv4 or IPv6 L3VPN (Transport both IPv4 and IPv6 services over SRv6 underlay). It is shared across IPv4 and IPv6 prefixes.

The End SID behavior can be specified through flavors such as Penultimate Segment Pop (PSP), Ultimate Segment Pop (USP), and Ultimate Segment Decapsulation (USD).

The Function component is 16 bits in length.

Argument

A variable length field that provides additional information about the forwarding action. Can be maximum 48 bits in length.

The SRH carries the SIDs. As the packet travels through the network, each node examines the next SID in the SRH to determine the corresponding next-hop and forwards the packet until the packet reaches its destination. If a packet is required to be guided via multiple segments in the SRv6 path, the SRv6-SIDs need to be stacked up using the SRH, to a maximum of 6 typical SRv6-SIDs. This presents additional bandwidth and processing overhead. Thus, micro-SIDs (uSIDs) are envisaged where multiple SRV6-addresses are compressed into a single IPv6 address. The 16-byte uSID is encoded as a micro-program or a container instruction that is carried either in the packet destination address or in the SRH. It has a specific structure represented by the following format:

BBBB:BBBB:<uSID1>:<uSID2>:<uSID3>:<uSID4>:<uSID5>:<uSID6>

where BBBB:BBBB/32 represents the prefix or block assigned by an operator within an SR domain. Various prefix lengths are supported including /16, /32, /48, /64 blocks. A /32 block is most commonly used. The blocks can either be a Global Identifier Block (GIB) or a Local Identifier Block (LIB). The GIB represents a globally unique range of uSIDs allocated from a public or reserved address space specifically designated for SRv6 deployments. The LIB is assigned by a specific network node within the SR domain and applicable only within the node's local context. The uSIDx represents the individual 16-bit uSIDs that can either be from the GIB or LIB. The uSIDs implement the following functions:

  • uN: Micro-node-SID that maps to the ultimate destination (End).

  • uA: Micro-adjacency-SID that has adjacency specific behavior (End.X)

  • uDT: Micro-service-SID that is domain specific information (End.DT4, End.DT6, End.DT46)

JCNR supports the following SRv6 functionalities:

Table 2: SRv6 Supported Functionalities

Functionalities

Notes

SRv6 L3VPN with uSID

uSID Types: Global uSID, Local uSID

uSID encoding in Destination Address

Block and uSID sizes

Support for /16, /32, /48, /64 blocks

JCNR SRv6 Node Types and Micro-instructions

Ingress: SRv6 Encapsulation in Destination Address (SRH is not required)

Transit: IPv6 forwarding if Ingress node is JCNR; Shift and forward if Ingress node is non-JCNR

Egress: Decpasulate and execute the SID service function

SR Endpoints (Functions)

End, End.X, End.DT4, End.DT6, and End.DT46

uSID Behavior

uN, uDT

Failure Recovery

Control plane initiated failure recovery (alternative path as next hop)

JCNR supports the following SRv6 network programming features:
Table 3: SRv6 Supported Features

Feature

Description

SRv6 uSID underlay tunnels via IS-IS

IS-IS brings up Best Effort tunnel to advertised locators and programs them in inet6.3 table.

SRv6 uSID underlay tunnels via IS-IS with ECMP paths

IS-IS brings up Best Effort tunnel to advertised locators and programs them in inet6.3 table. The tunnels can have ECMP forwarding paths.

Routes for BGP internet prefixes advertised with uN SID

BGP internet prefixes advertised with uN SIDs will resolve over corresponding locators (SRv6 uSID underlay tunnels). The underlay routes can have a single gateway or ECMP.

Multipath routes for BGP internet prefixes advertised with uN SID

Multiple Provide Edge (PE) routers could originate the same internet prefix (multihoming) that can lead to BGP multipath at the ingress PE. Each multipath route resolves over underlay SRv6 tunnels that have either a single gateway or ECMP.

Routes for L3VPN prefixes advertised with uN SID

L3VPN prefixes advertised with uN SIDs will resolve over corresponding locators (SRV6 uSID underlay tunnels). These underlay routes can have a single gateway or have ECMP.

Multipath routes for L3VPN prefixes advertised with uN SID

Multiple PEs could originate the same L3VPN prefix (multihoming) and this can lead to BGP multipath at the ingress PE. Each multipath route resolves over the underlay SRv6 tunnels that have either a single gateway or ECMP.

BGP intent routes over flex-algorithm IS-IS tunnels

Flex algorithm uSIDs can be advertised via IS-IS with SRv6 underlay tunnels created. BGP internet prefixes and L3VPN prefixes with uSIDs can resolve over the underlay tunnels. These prefixes can be non-intent (without any color-community attached to them). The prefixes are resolved over SRV6 underlay tunnels installed in inet6.3 table.

BGP intent routes over flex-algorithm IS-IS tunnels with fallback mechanism

Flex algorithm uSIDs can be advertised via IS-IS with SRv6 underlay tunnels created. The BGP internet prefixes and L3VPN prefixes with uSIDs can resolve over the underlay tunnels. These prefixes can be intent (with a color-community attached to them). The prefixes are resolved over SRv6 underlay tunnels installed in junos-rti-tc-<color>.inet6.3 table, where color corresponds to the color in the color-community advertised with the prefix. If the prefix resolution does not happen over the junos-rti-tc-<color>.inet6.3 table, it can resolve over flex-algorithm underlay tunnel installed in inet6.3 table, thus providing a fallback mechanism.

Support for programming uN SID and forwarding packets based on the uN SID routes

We support programming uN SID routes in inet6.0 table. This facilitates forwarding of packets that have uN SIDs as a part of their destination address. Note that packets having Segment Routing Header (SRH) is not supported currently.

Supported SID Functionalities

uN SID shift and lookup (flavor type none)

uDT for IPv4

uDT for IPv6

uDT for IPv4 and IPv6

Locator summarization and leaking

Locator summarization and leaking is an advantage of SRv6 over SR-MPLS. An L1-L2 may summarize locators from other levels and leak them to another level. Locator leaking can happen even without summarization.

Configuring SRv6 in JCNR

Consider the following topology:

Figure 1: Topology Diagram Topology Diagram

We want to enable communication between hosts 10.1.1.1/32 and 10.2.2.2/32 via an SRv6 tunnel. PE1 is an ingress JCNR node, P is transit JCNR node while PE2 is an egress JCNR node. PE1, P, and PE2 advertise their uSIDs (shown in the figure) via IS-IS along with overlay prefixes via BGP to each other. CE1 initiates the packet flow to the ingress node (PE1). PE1 encapsulates the source packet with the SRv6 header while setting the destination address to the uSID of the egress node (PE2). Since JCNR is the ingress node in this topology, the transit node (P) simply forwards the IPv6 packet. The egress node (PE2) is configured with a micro-service-SID (uDT) to decapsulate the packet and lookup a specific IP table to route the packet to CE2.

The configuration of SRv6 in JCNR includes the micro-SID block configuration, micro-SID locator configuration, micro-node-SID (uN) configuration in IS-IS and micro-service-SID (uDT) configuration in BGP.

Configure the JCNR control plane for SRv6. For brevity, we will cover the configuration for the egress JCNR node (PE2) in this example. The configuration for other nodes is similar.

  1. Configure the micro-SID block and optionally the maximum number of local static SIDs (default value is 0, must be configured if using static uSIDs):

  2. Configure the micro-SID locator:

  3. Configure micro-node-SID (uN SID) in IS-IS to advertise locator TLV and micro-node-SID:

  4. There are two ways to configure micro-service-SIDs. The first is only BGP, which enables one set of dt4, dt6, and dt46 uSIDs to be configured per BGP instance. The uSID can either be static or dynamically allocated. The second way is to configure an export policy to specify the micro-service-SID used by a prefix or the locator to derive the micro-service-SID from. BGP is configured via the non-default keyword. An example for each method is provided below. You must use only one of them for a set of dt4, dt6, and dt46 uSIDs.

    1. Static default micro-service-SID for IPv4 services. Note that the static uSID must be in the maximum-static-sids range defined in Step 1:

    2. Set auto-allocated default micro-service-SID for IPv4 services:

    3. Set non-default micro-service-SID with BGP export policy:

  5. Configure BGP to advertise SRv6 service. An example for family inet is provided below:

Verify SRv6 Configuration on JCNR

The following commands can be used to verify the SRv6 configuration on cRPD:

Verify Packet Flow via JCNR Forwarding Plane

Verify the traffic flow via the vRouter on each PE node:

  1. Ingress SRv6 node (PE1)

    Note that the next hop for traffic to 10.2.2.2/32 is an SRv6 tunnel with Destination IP:2001:db8:4600:e001:: (The uSID of egress node)

  2. Transit SRv6 node (P)

    Note that P only forwards the IPv6 packet.

  3. Egress SRv6 node (PE2)

    Note that the Egress PE looks up for the uSID IPv6 address in the default table. The exact match next-hop is configured to Vrf_Translate. It looks up 10.2.2.2/32 destination IP address in the specified VRF and routes the packet to CE2.