11-Segment Routing Configuration Guide

HomeSupportSwitchesS6550X-HI SeriesConfigure & DeployConfiguration GuidesH3C S6550X-HI Configuration Guides-R1330Pxx-6W10011-Segment Routing Configuration Guide
01-SRv6 configuration
Title Size Download
01-SRv6 configuration 161.28 KB

Configuring SRv6

About SRv6

Segment Routing (SR) is a source routing technology. The source node selects a path for packet forwarding, and then encodes the path in the packet header as an ordered list of segments. Each segment is identified by the Segment Identifier (SID). The SR nodes along the path forward the packets based on the SIDs in the packets. Only the source node needs to maintain the path status.

IPv6 Segment Routing (SRv6) uses IPv6 addresses as SIDs to forward packets.

Basic concepts

SR node

An SR node is a node that supports the SRv6 feature. The following SR nodes are available:

·     Source node—Responsible for inserting an SRH into the IPv6 header of IPv6 packets, or encapsulating an outer IPv6 header into IPv6 packets and inserting an SRH into the outer IPv6 header. A source node steers traffic to the SRv6 path defined in the Segment List of SRH.

¡     If the Segment List contains only one SID and the SRH is not required to include information or TLV, the source node only sets the SID as the destination address in the IPv6 header. No SRH is inserted.

¡     If the Segment List contains multiple SIDs, the source node must insert an SRH to the packets.

A source node can be the originator of SRv6 packets or the edge device of an SRv6 domain.

·     Transit node—Forwards IPv6 packets along the SRv6 path. A transit node does not participate in SRv6 processing. It can be an SRv6-aware or SRv6-unaware node.

·     Endpoint node—Performs an SRv6 function for received SRv6 packets. The IPv6 destination address of the received SRv6 packets must be an SRv6 SID configured on the endpoint node. The endpoint node processes the packets based on the SRv6 SID and updates the SRH.

A node can act as multiple roles. For example, a node can be the source node in one SRv6 path and a transit node or endpoint node in another SRv6 path.

SID portions

SRv6 supports SRv6 SIDs that have specific functions.

An SRv6 SID is in the format of IPv6 address, but the IPv6 address does not belong to any interface on any device.

As shown in Figure 1, an SRv6 SID contains the Locator, Function, Arguments, and Must be zero (MBZ) portions.

·     Locator—Identifies the network segment of the SID. The locator of an SRv6 SID must be unique in the SR domain.

·     Function—Contains an opcode that identifies the network function of an SID. An SR node will execute the function in the SRv6 SID Function field of an SRv6 packet after it receives that SRv6 packet.

·     Arguments—Defines flow and service parameters for SRv6 packets.

·     MBZ—When the total number of bits in the Locator, Function, and Arguments portions is less than 128 bits, the remaining bits are padded with 0s.

Figure 1 SRv6 SID

According to whether SRv6 SIDs are compressible, SRv6 SIDs are divided into the following categories for a locator:

·     Common SRv6 SIDs—Include static and dynamic SRv6 SIDs. The formats are as follows:

¡     A static SRv6 SID is generated based on the following formula: static SRv6 SID = ipv6-prefix + 0 + opcode + 0.

-     The ipv6-prefix portion represents the IPv6 prefix specified by using the ipv6-address and prefix-length arguments in the locator command. The number of bits occupied by the IPv6 prefix is configured by using the prefix-length argument.

-     The number of bits occupied by 0s (following the ipv6-prefix portion) is 128 - prefix-length - static-length - args-length.

-     opcode represents the static portion in the Function field. The number of bits occupied by the opcode is the value of the static-length argument. The number of bits occupied by 0s (following the opcode portion) is the value of the args-length argument.

¡     A dynamic SRv6 SID is generated based on the following formula: dynamic SRv6 SID = ipv6-prefix + dynamic + static + 0.

-     The ipv6-prefix portion represents the IPv6 prefix specified by using the ipv6-address and prefix-length arguments in the locator command. The number of bits occupied by the IPv6 prefix is configured by using the prefix-length argument.

-     dynamic represents the dynamic portion in the Function field. The value for this portion cannot be all zeros. The number of bits occupied by this portion is 128 - prefix-length - static-length - args-length.

-     static represents the static portion in the Function field. The number of bits occupied by this portion is static-length. This portion can use any value. The number of bits occupied by 0s is the value of the args-length argument.

For example, use the locator test1 ipv6-prefix 100:200:DB8:ABCD:: 64 static 24 args 32 command.

¡     The locator is 100:200:DB8:ABCD::. The prefix length is 64 bits.

¡     The static portion length is 24 bits.

¡     The Args portion length is 32 bits.

¡     The dynamic portion length is 8 bits.

In this example, the following non-compressible static SRv6 SID range and dynamic SRv6 SID range are obtained on the locator:

¡     The start value for static SRv6 SIDs is 100:200:DB8:ABCD:0:1::.

¡     The end value for static SRv6 SIDs is 100:200:DB8:ABCD:FF:FFFF::.

¡     The start value for dynamic SRv6 SIDs is 100:200:DB8:ABCD:100::.

¡     The end value for dynamic SRv6 SIDs is 100:200:DB8:ABCD:FFFF:FFFF::.

Figure 2 Common SRv6 SID

 

According to the functions of SRv6 SIDs, SRv6 SIDs are divided into the following categories:

·     End.DT4 SID—Identifies an IPv4 VPN in the network. The function of an End.DT4 SID is decapsulating packets and searching the routing table of the corresponding IPv4 VPN instance to forward the packets. End.DT4 SIDs are applicable to IP L3VPN and EVPN L3VPN scenarios.

·     End.DT6 SID—Identifies an IPv6 VPN in the network. The function of an End.DT6 SID is decapsulating packets and searching the routing table of the corresponding IPv6 VPN instance to forward the packets. End.DT6 SIDs are applicable to IPv6 L3VPN and IPv6 EVPN L3VPN scenarios.

·     End.DT2M SID—Identifies one end of a Layer 2 cross-connect and floods traffic. The function of an End.DT2M SID is removing the outer IPv6 header and SRH of packets and flooding the decapsulated packets in the VSI. End.DT2M SIDs are applicable to EVPN VPLS BUM traffic.

·     End.DT2U SID—Identifies one end of a Layer 2 cross-connect and performs unicast forwarding. The function of an End.DT2U SID is removing the outer IPv6 header and SRH of packets, looking up the MAC address table for the destination MAC address, and forwarding the packets to the output interface based on the MAC address entry. End.DT2U SIDs are applicable to EVPN VPLS unicast traffic.

Use IGP to advertise SRv6 SIDs for an SR node. The other SR nodes will generate route entries of that SR node based on the advertised information.

Local SID forwarding table

An SRv6-enabled node maintains a local SID forwarding table that records the SRv6 SIDs generated on the local node. The local SID forwarding table has the following functions:

·     Stores local generated SRv6 SID forwarding information.

·     Stores SRv6 SID operation types.

Segment List

A Segment List is an ordered list of SIDs, which is also referred to as a Segment Identifier (SID) list in this document. The SR nodes forward packets based on the SIDs in the order that they are arranged in the SID list.

SRv6 tunnel

An SRv6 tunnel is a virtual point-to-point connection established between the SRv6 ingress node and egress node. IPv6 packets are encapsulated at the ingress node and de-encapsulated at the egress node.

SRv6 packet format

An outer IPv6 header and a Segment Routing Header (SRH) are added to the original Layer 3 data packet to form an SRv6 packet.

As shown in Figure 3, the value for the Next Header field is 43 in the outer IPv6 header, which indicates that the header next to the IPv6 header is a routing extension header. The value for the Routing Type field in the routing extension header is 4, which indicates that the routing extension header is an SRH. The SRH header contains the following fields:

·     8-bit Next Header—Identifies the type of the header next to the SRH.

·     8-bit Hdr Ext Len—Length of the SRH header in 8-octet units, not including the first 8 octets.

·     8-bit Routing Type—The value for this field is 4, which represents SRH.

·     8-bit Segments Left—Contains the index of the next segment to inspect in the Segment List. The Segments Left field is set to n-1 where n is the number of segments in the Segment List. Segments Left is decremented at each segment.

·     8-bit Last Entry—Contains the index of the first SID in the path used to forward the packet.

·     8-bit Flags—Contains flags.

·     16-bit Tag—Tags a packet as part of a class or group of packets, for example, packets sharing the same set of properties.

·     Segment List—Contains 128-bit IPv6 addresses representing the ordered segments. The Segment List is encoded starting from the last segment of the path. The first element of the segment list (Segment List [0]) contains the last segment of the path, the second element (Segment List [1]) contains the penultimate segment of the path and so on. The number enclosed in a pair of brackets is the index of a segment.

Figure 3 SRv6 packet format

SRv6 packet forwarding

As shown in Figure 3, an IPv6 packet is forwarded through an SRv6 tunnel as follows:

1.     Upon receiving an IPv6 packet, Device A finds in the routing table that the outgoing interface is an SRv6 tunnel interface. The packet is delivered to the tunnel interface.

2.     The SRv6 tunnel interface encapsulates the IPv6 packet as follows:

¡     Adds an SRH header. The Segments Left (SL) value is the number of segments minus one. The path from ingress to egress has three segments, so the SL value is set to 2. The encapsulated SID list is Segment List [0]=D, Segment List [1]=C, Segment List [2]=B. The Segment List is encoded starting from the last segment of the path to the first segment of the path.

¡     Adds an outer IPv6 header. The source address is the tunnel source, and the destination address is determined by the SL value. On Device A, the SL value is 2, which points to the IPv6 address of Device B, so the destination address is the IPv6 address of Device B.

3.     Device A searches the routing table for the destination address in the newly encapsulated IPv6 header, and forwards the packet to Device B.

4.     Device B first checks the destination address and SID type in the outer IPv6 header. Then, the device checks the SL value in the SRH header and decreases the value by one. Then, the device searches for the IPv6 address pointed by Segment List [1] and uses the IPv6 address of Device C to replace the destination address of the outer IPv6 header.

5.     Device B searches the routing table for the destination address in the outer IPv6 header and forwards the packet to Device C.

6.     Device C performs the same operations as what Device B has done in steps Table 1Figure 11 and Table 1Figure 11, and then forwards the packet to Device D.

7.     Device D checks the SL value in the SRH header and finds that the value has decreased to 0. The device performs the following operations:

a.     De-encapsulates the packet by removing the outer IPv6 header and the SRH header.

b.     Forwards the original IP data packet to the destination based on the destination address.

Figure 4 SRv6 tunnel packet forwarding

Protocols and standards

·     draft-previdi-6man-segment-routing-header

·     draft-ietf-6man-segment-routing-header

·     draft-filsfils-spring-segment-routing

·     draft-filsfils-spring-srv6-network-programming

SRv6 configuration tasks at a glance

To configure SRv6, perform the following tasks:

1.     Configuring non-compressible SRv6 SIDs

2.     Specifying a source address for the outer IPv6 header of SRv6-encapsulated packets

3.     Using IGP to advertise SRv6 SIDs

Prerequisites for SRv6

Before you configure an SRv6 tunnel, perform the following tasks:

·     Determine the ingress node, transit nodes, and egress node of the SRv6 tunnel.

·     Plan the IPv6 address of each SR node.

Configuring non-compressible SRv6 SIDs

Restrictions and guidelines

The IPv6 address for a locator must be the main IPv6 address for an interface.

Each locator must have a unique name.

Do not configure the same IPv6 address prefix and prefix length for different locators. In addition, the IPv6 address prefixes of different locators cannot overlap.

You cannot disable SRv6 or delete a locator in SRv6 view if the locator has dynamic SRv6 SIDs that are being used.

Configuring the local locator and opcode

1.     Enter system view.

system-view

2.     Enable SRv6 and enter SRv6 view.

segment-routing ipv6

3.     Configure a locator and enter SRv6 locator view.

locator locator-name [ ipv6-prefix ipv6-address prefix-length [ args args-length | static static-length ] * ]

4.     Configure an opcode. Perform one of the following tasks:

¡     Configure an opcode for End.DT4 SIDs.

opcode opcode end-dt4 [ vpn-instance vpn-instance-name [ evpn | l3vpn-evpn ] ]

The specified VPN instance must exist. The same End.DT4 SIDs cannot be configured in different VPN instances.

¡     Configure an opcode for End.DT6 SIDs.

opcode opcode end-dt6 [ vpn-instance vpn-instance-name [ evpn | l3vpn-evpn ] ]

The specified VPN instance must exist. The same End.DT6 SIDs cannot be configured in different VPN instances.

¡     Configure an opcode for End.DT2M SIDs.

opcode opcode end-dt2m vsi vsi-name

The specified VSI must exist. The same End.DT2M SIDs cannot be configured in different VSIs.

¡     Configure an opcode for End.DT2U SIDs.

opcode opcode end-dt2u vsi vsi-name

The specified VSI must exist. The same End.DT2U SIDs cannot be configured in different VSIs.

 

Specifying a source address for the outer IPv6 header of SRv6-encapsulated packets

Restrictions and guidelines

As a best practice to ensure correct traffic forwarding in an SRv6 network, specify a source address for the outer IPv6 header of SRv6-encapsulated packets.

You cannot specify a loopback address, link-local address, multicast address, or unspecified address as the source IPv6 address. You must specify an IPv6 address of the local device as the source IPv6 address, and make sure the IPv6 address has been advertised by a routing protocol. As a best practice, specify a loopback interface address of the local device as the source IPv6 address.

Procedure

1.     Enter system view.

system-view

2.     Enter SRv6 view.

segment-routing ipv6

3.     Specify a source address for the outer IPv6 header of SRv6-encapsulated packets.

encapsulation source-address ipv6-address [ ip-ttl ttl-value ]

By default, no source address is specified for the outer IPv6 header of SRv6-encapsulated packets.

 

 

Using IGP to advertise SRv6 SIDs

About this task

Use an IGP protocol to advertise the SRv6 SIDs of a locator by applying the locator to the IGP protocol.

Prerequisites

If IS-IS is used to advertise SRv6 SIDs, make sure the cost style of IS-IS is wide, compatible, or wide-compatible. For more information about the cost styles of IS-IS, see Layer 3—IP Routing Configuration Guide.

Using IS-IS to advertise SRv6 SIDs

1.     Enter system view.

system-view

2.     Enter IS-IS process view.

isis [ process-id ] [ vpn-instance vpn-instance-name ]

3.     Enter IS-IS IPv6 address family view.

address-family ipv6 [ unicast ]

4.     Apply a locator to IS-IS IPv6 address family.

segment-routing ipv6 locator locator-name [ level-1 | level-2 ] [ auto-sid-coc32 [ additive ] | auto-sid-coc-both { all | coc32 | coc32-all | coc32-none } | auto-sid-disable ]

By default, no locators are applied to IS-IS IPv6 address family.

Repeat this command to apply multiple locators to IS-IS IPv6 address family for the family to advertise multiple SRv6 SIDs.

Verifying and maintaining SRv6

Displaying basic SRv6 configuration information

Perform display tasks in any view.

·     Display brief SRv6 information.

display segment-routing ipv6 brief

·     Display SRv6 forwarding entries.

display segment-routing ipv6 forwarding [ entry-id [ relation ] | forwarding-type { srv6be | srv6sids } ] [ slot slot-number ]

·     Display information about the SRv6 local SID forwarding table.

display segment-routing ipv6 local-sid [ locator locator-name ] [ end-dt2m | end-dt2u ] [ owner owner ] [ sid ]

display segment-routing ipv6 local-sid [ locator locator-name ] [ end-dt4 | end-dt6 ] [ owner owner ] [ sid | vpn-instance vpn-instance-name ]

·     Display statistics about SRv6 SIDs allocated for each protocol.

display segment-routing ipv6 local-sid statistics [ locator [ locator-name ] ]

·     Display SRv6 locator information.

display segment-routing ipv6 locator [ locator-name ]

·     Display available static SRv6 SIDs in a locator.

display segment-routing ipv6 available-static-sid locator locator-name [ from begin-value ]

·     Display SRv6 locator configuration and statistics about allocated SRv6 SIDs in locators.

display segment-routing ipv6 locator-statistics [ locator-name ]

Displaying IS-IS SRv6 information

Perform display tasks in any view.

·     Display IS-IS SRv6 capability information.

display isis segment-routing ipv6 capability [ level-1 | level-2 ] [ process-id ]

·     Display IS-IS SRv6 locator routing information.

display isis segment-routing ipv6 locator [ ipv6-address prefix-length ] [ [ level-1 | level-2 ] | verbose ] * [ process-id ]

·     Display information about SRv6 SIDs advertised by IS-IS.

display isis segment-routing ipv6 sid-info sid [ sid-value | [ end-dt4 | end-dt6 ] ] [ level-1 | level-2 ] [ process-id ]

·     Display information about SRv6 SIDs advertised by IS-IS in a locator or all locators.

display isis segment-routing ipv6 sid-info locator [ ipv6-prefix prefix-length ] [ end-dt4 | end-dt6 ] [ level-1 | level-2 ] [ process-id ]

·     Display information about SRv6 SIDs advertised from a system or all systems.

display isis segment-routing ipv6 sid-info system-id [ system-id ] [ end-dt4 | end-dt6 ] [ level-1 | level-2 ] [ process-id ] [ is-name isname ]

·     Display information about conflicting SRv6 SIDs.

display isis segment-routing ipv6 sid-info conflict [ sid-value ] [ level-1 | level-2 ] [ process-id ]

·     Display SRv6 SID statistics.

display isis segment-routing ipv6 sid-info statistics [ system-id system-id ] [ level-1 | level-2 ] [ process-id ]

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Intelligent Storage
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
  • Technical Blogs
All Support
  • Become A Partner
  • Partner Policy & Program
  • Global Learning
  • Partner Sales Resources
  • Partner Business Management
  • Service Business
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网