11-Segment Routing Command Reference

HomeSupportReference GuidesCommand ReferencesH3C MSR1000[2600][3600] Routers Command Reference(V9)-R9119-6W10011-Segment Routing Command Reference
06-SRv6 service chain commands
Title Size Download
06-SRv6 service chain commands 132.96 KB

SRv6 service chain commands

backup-opcode

Use backup-opcode to specify a backup End.AS SID opcode for SRv6 service chain dualhoming protection in static proxy mode.

Use undo backup-opcode to restore the default.

Syntax

backup-opcode func-opcode

undo backup-opcode

Default

No backup End.AS SID opcode is configured for SRv6 service chain dualhoming protection in static proxy mode.

Views

SRv6 service chain static proxy view

Predefined user roles

network-admin

Parameters

func-opcode: Specifies a backup End.AS SID opcode for SRv6 service chain dualhoming protection in static proxy mode. The value range for the opcode is 1 to 2static-length-1. The static-length argument is configured by using the locator command.

Usage guidelines

This command is applicable to an SRv6 service chain in static proxy mode.

Use this command on an SFF to specify a backup End.AS SID in a dualhoming protection scenario. The primary and backup End.AS SIDs must belong to the same locator. To distinguish the primary and backup End.AS SIDs, specify different opcodes in the locator on the SFFs. When the primary SFF cannot reach the SF, it removes the outer IPv6 header and SRH to decapsulate packets. Then, the primary SFF reencapsulates a new outer IPv6 header and SRH to the packets. The SRH contains the backup End.AS SID configured by using this command and the End SID of the backup SFF specified by using the proxy peer-sid command. In the outer IPv6 header, the destination address is the End SID of the backup SFF.

Before using the backup-opcode command, use the proxy peer-sid command to specify the End SID of the backup SFF.

Static SIDs on the redundant SFFs cannot conflict with each other. The SFFs must be configured with the same locator and the same backup SID opcode.

Examples

# Set the backup End.AS SID opcode to 12 for SRv6 service chain dualhoming protection in static proxy mode.

<Sysname> system-view

[Sysname] segment-routing ipv6

[Sysname-segment-routing-ipv6] proxy peer-sid 1:2:3::3:4

[Sysname-segment-routing-ipv6] locator test ipv6-prefix 100:: 64 static 32

[Sysname-segment-routing-ipv6-locator-test] opcode 32 end-as

[Sysname-segment-routing-ipv6-locator-test-endas-32] backup-opcode 12

Related commands

proxy peer-sid

bypass

Use bypass to enable bypass and specify a bypass End.AS SID for an SRv6 service chain in static proxy mode.

Use undo bypass to disable bypass and cancel the bypass End.AS SID configuration for an SRv6 service chain in static proxy mode.

Syntax

bypass [ sid ipv6-address ]

undo bypass [ sid ipv6-address ]

Default

Bypass is disabled.

Views

SRv6 service chain static proxy view

Predefined user roles

network-admin

Parameters

sid ipv6-address: Specifies a bypass End.AS SID. The ipv6-address argument represents the End.AS SID. If you do not specify a bypass End.AS SID, this command only enables bypass and the system does not forward packets to a bypass SF.

Usage guidelines

This command is applicable to an SRv6 service chain in static proxy mode.

If you do not use this command on an SFF, the SFF discards packets destined for its associated SF when the SF fails or the SFF cannot reach the SF.

If you use this command on an SFF, the SFF forwards packets as follows when the SF fails or the SFF cannot reach its associated SF:

·     If you do not specify the sid ipv6-address option, the SFF decapsulates the packets and reencapsulates a new SRH and outer IPv6 header to the packets. The SRH contains the SID list specified by using the cache list command. The reencapsulated packets will skip the SF and be forwarded as in a standard SRv6 packet forwarding process.

·     If you specify the sid ipv6-address option, the SFF decapsulates the packets and reencapsulates a new SRH and outer IPv6 header to the packets. The SID list in the SRH contains only the bypass End.AS SID specified by using the bypass command. The destination address of the reencapsulated packets is the bypass End.AS SID. The packets are forwarded to the backup SFF from the local SFF.

Dualhoming protection takes precedence over bypass protection. If dualhoming protection is not available or fails, bypass protection applies.

Examples

# Enable bypass and specify bypass End.AS SID 7::8 for an SRv6 service chain in static proxy mode.

<Sysname> system-view

[Sysname] segment-routing ipv6

[Sysname-segment-routing-ipv6] locator test ipv6-prefix 100:: 64 static 32

[Sysname-segment-routing-ipv6-locator-test] opcode 32 end-as

[Sysname-segment-routing-ipv6-locator-test-endas-32] bypass sid 7::8

cache list

Use cache list to specify the SID list that will be added to the packets forwarded back to an SFF from the SF associated with that SFF.

Use undo cache list to delete the SID list or specific SIDs that will be added to the packets forwarded back to an SFF from the SF associated with that SFF.

Syntax

cache list sid-list

undo cache list [ sid-list ]

Default

No SID list is specified for an SFF to encapsulate the packets forwarded back from its associated SF.

Views

SRv6 service chain static proxy view

Predefined user roles

network-admin

Parameters

sid-list: Specifies a list of space-separated SIDs. The SID list can contain up to 10 SIDs.

Usage guidelines

This command is applicable to an SRv6 service chain in static proxy mode.

The packets forwarded back to an SFF from its associated SF do not have an outer IPv6 header or SRH. The SFF searches for a matching service chain for the packets according to the packet input interface or the packet input interface and inbound VLANs. Then, the SFF adds an SRH and outer IPv6 header to the packets. The SRH contains the SID list configured by using this command for the matching service chain. In the outer IPv6 header, the destination IPv6 address is the SID next to the local End.AS SID in the SID list.

When you configure the SID list, follow these restrictions and guidelines:

·     Specify the SID value of each node in the forwarding path according to the number of hops to the source node. The fewer the hops to the source node, the more front the SID position in the SID list.

·     To avoid loops, each SID in the SID list must be unique.

·     The SID list must have a minimum of two SIDs and the last SID must be an End.DT4 SID. In addition, the SID list must include the local End.AS SID.

·     The explicit path of the SID list must be consistent with the end-to-end path in the SRv6 TE policy on the SC.

If you do not specify an SID for the undo cache list command, the command deletes all SIDs from the SID list.

Examples

# Configure the SFF to encapsulate SID list 1::1, 2::2, 3::3, 4::4, 100::12, 6::6, 7::7, 8::8, and 9::9 to the packets forwarded back to the SFF from its associated SF.

<Sysname> system-view

[Sysname] segment-routing ipv6

[Sysname-segment-routing-ipv6] locator test ipv6-prefix 100:: 64 static 32

[Sysname-segment-routing-ipv6-locator-test] opcode 32 end-as

[Sysname-segment-routing-ipv6-locator-test-endas-32] cache list 1::1 2::2 3::3 4::4 100::12 6::6 7::7 8::8 9::9

cache source-address

Use cache source-address to specify the source IPv6 address that will be added to the packets forwarded back to an SFF from the SF associated with that SFF.

Use undo cache source-address to restore the default.

Syntax

cache source-address ipv6-address

undo cache source-address

Default

No source IPv6 address is specified for an SFF to encapsulate the packets forwarded back from its associated SF.

Views

SRv6 service chain static proxy view

Predefined user roles

network-admin

Parameters

ipv6-address: Specifies an IPv6 address.

Usage guidelines

This command is applicable to an SRv6 service chain in static proxy mode.

To ensure correct packet encapsulation and forwarding, execute this command to specify a source IPv6 address for an SFF to encapsulate the packets forwarded back from its associated SF. If you do not execute this command, the SFF will discard the packets forwarded back from its associated SF.

One SFF can associate only with one SF. If you execute this command multiple times, the most recent configuration takes effect.

Examples

# Specify IPv6 address 1:2::3:4 as the source IPv6 address that will be added to the packets forwarded back to the SFF from its associated SF.

<Sysname> system-view

[Sysname] segment-routing ipv6

[Sysname-segment-routing-ipv6] locator test ipv6-prefix 100:: 64 static 32

[Sysname-segment-routing-ipv6-locator-test] opcode 32 end-as

[Sysname-segment-routing-ipv6-locator-test-endas-32] cache source-address 1:2::3:4

display segment-routing ipv6 sfc forwarding

Use display segment-routing ipv6 sfc forwarding to display forwarding entry information about SRv6 service chains in static proxy mode.

Syntax

display segment-routing ipv6 sfc forwarding [ locator locator-name [ opcode operation-code ] ] [ nid-value ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

locator locator-name: Specifies an SRv6 locator by its name, a case-sensitive string of 1 to 31 characters. If you do not specify an SRv6 locator, this command displays SRv6 service chain forwarding entry information for all SRv6 locators.

opcode operation-code: Specifies an opcode. The operation-code argument represents the opcode of an SRv6 End.AS SID in the specified SRv6 locator. If you do not specify an opcode, this command displays SRv6 service chain forwarding entry information for all opcodes in the specified SRv6 locator.

nid-value: Specifies a forwarding entry by its ID. If you do not specify a forwarding entry, this command displays information for all SRv6 service chain forwarding entries.

Usage guidelines

This command is applicable to an SRv6 service chain in static proxy mode.

Examples

# Display forwarding entry information about SRv6 service chains in static proxy mode.

<Sysname> display segment-routing ipv6 sfc forwarding

Total forwarding entries: 1

 

NID                 : 2153775106

 Locator name/Opcode : aaa/1

 Type                : Cache list

 Path Count          : 2

  Interface          : GE0/0/1

  Next hop           : FE80::6CCE:CBFF:FE91:206

  Interface          : GE0/0/1.1

  Next hop           : FE80::6CCE:CBFF:FE91:207

Table 1 Command output

Field

Description

Total forwarding entries

Total number of SRv6 service chain forwarding entries.

NID

SRv6 service chain forwarding entry ID.

Locator name/Opcode

End.AS SID locator name and opcode.

Type

Forwarding entry generation method:

·     Cache list—Forwarding entry generated based on the cache list configuration.

·     Bypass—Forwarding entry generated based on the bypass protection configuration.

·     Backup opcode—Forwarding entry generated based on the backup End.AS SID opcode configuration for dualhoming protection.

Path Count

Number of output paths.

Interface

Output interface abbreviation.

Next hop

Next hop address.

 

encapsulation eth out-interface

Use encapsulation eth out-interface to configure Layer 2 encapsulation for packets forwarded between a pair of SFF and SF.

Use undo encapsulation eth out-interface to remove Layer 2 encapsulation configuration for packets forwarded between a pair of SFF and SF.

Syntax

In SRv6 service chain static proxy view:

encapsulation eth out-interface out-interface-type out-interface-number [ out-s-vlan out-svid [ out-c-vlan out-cvid ] ] in-interface in-interface-type in-interface-number [ in-s-vlan in-svid [ in-c-vlan in-cvid ] ] [ dest-mac dest-mac ]

undo encapsulation eth out-interface out-interface-type out-interface-number [ out-s-vlan out-svid [ out-c-vlan out-cvid ] ] in-interface in-interface-type in-interface-number [ in-s-vlan in-svid [ in-c-vlan in-cvid ] ]

In SRv6 service chain masquerading view:

encapsulation eth out-interface out-interface-type out-interface-number [ out-s-vlan out-svid [ out-c-vlan out-cvid ] ] in-interface in-interface-type in-interface-number [ in-s-vlan in-svid [ in-c-vlan in-cvid ] ]

undo encapsulation eth out-interface out-interface-type out-interface-number [ out-s-vlan out-svid [ out-c-vlan out-cvid ] ] in-interface in-interface-type in-interface-number [ in-s-vlan in-svid [ in-c-vlan in-cvid ] ]

Default

Layer 2 encapsulation is not configured for an SFF to encapsulate the packets forwarded back from the SF associated with that SFF.

Views

SRv6 service chain static proxy view

SRv6 service chain masquerading view

Predefined user roles

network-admin

Parameters

out-interface-type out-interface-number: Specifies an output interface by its type and number.

out-s-vlan out-svid: Specifies an outer VLAN ID for outgoing packets from the SFF to the SF. The out-svid argument represents the outer VLAN ID, in the range of 1 to 4094. If you do not specify an outer VLAN ID, the outer VLAN ID is the PVID of the output interface.

out-c-vlan out-cvid: Specifies an inner VLAN ID for outgoing packets from the SFF to the SF. The out-cvid argument represents the inner VLAN ID, in the range of 1 to 4094. If you do not specify an inner VLAN ID, the outgoing packets do not have an inner VLAN ID. Only the outer VLAN ID is encapsulated into the outgoing packets.

in-interface in-interface-type in-interface-number: Specifies an input interface by its type and number.

in-s-vlan in-svid: Specifies an outer VLAN ID for incoming packets from the SF to the SFF. The in-svid argument represents the outer VLAN ID, in the range of 1 to 4094. If you do not specify an outer VLAN ID, the outer VLAN ID is the PVID of the input interface.

in-c-vlan in-cvid: Specifies an inner VLAN ID for incoming packets from the SF to the SFF. The in-cvid argument represents the inner VLAN ID, in the range of 1 to 4094. If you do not specify an inner VLAN ID, the incoming packets do not have an inner VLAN ID. Only the outer VLAN ID is encapsulated into the incoming packets.

dest-mac dest-mac: Specifies the destination MAC address that will be encapsulated to the packets sent from the SF to the remote redundant SFF in a dualhoming protection scenario. The dest-mac argument represents the destination MAC address, in the format of H-H-H. The MAC address cannot be the all-F or all-zero MAC address or a multicast MAC address. If you do not specify a destination MAC address, the destination MAC address for the packets forwarded from the SF is the MAC address of the input interface on the local SFF. This option is available only in SRv6 service chain static proxy view.

Usage guidelines

IMPORTANT

IMPORTANT:

If an interface has been specified as an input or output interface of an SRv6 service chain, do not configure other services on that interface. Any violation might cause forwarding issues.

 

Use this command if the SFF is connected to the SF through a Layer 3 Ethernet interface, Layer 2 Ethernet interface, or Layer 3 Ethernet subinterface. The out-interface out-interface-type out-interface-number and in-interface in-interface-type in-interface-number options specify output and input interfaces, respectively, on the SFF. The output interface is the interface through which packets are forwarded from the SFF to the SF. The input interface is the interface through which the SFF receives packets from the SF. The output and input interfaces can be the same interface or different interfaces.

When you use this command, follow these restrictions and guidelines:

·     If the output and input interfaces are Layer 3 Ethernet subinterfaces, follow these restrictions and guidelines to ensure correct packet forwarding:

¡     If this command only specifies the outer VLAN IDs, the inbound and outbound outer VLAN IDs must be the same as the termination VLAN IDs specified by using the vlan-type dot1q vid command on each Layer 3 Ethernet subinterface.

¡     If this command specifies both the inner and outer VLAN IDs, the inner and outer VLAN IDs specified for each subinterface must be the same as the termination inner and outer VLAN IDs specified by using the vlan-type dot1q vid second-dot1q command on these subinterfaces.

·     If the output and input interfaces are Layer 3 Ethernet interfaces, do not specify the out-s-vlan out-svid, in-s-vlan in-svid, out-c-vlan out-cvid, or in-c-vlan in-cvid option.

Each SRv6 service chain in static proxy mode must have unique input interfaces, inbound inner VLAN IDs, and inbound outer VLAN IDs. The same input interface cannot be shared by an SRv6 service chain in static proxy mode and an SRv6 service chain in masquerading mode.

In an SRv6 service chain, the same output interface and outbound inner and outer VLAN IDs can be associated with only one input interface. If you associate different input interfaces with the same output interface and outbound inner and outer VLAN IDs for the SRv6 service chain, the most recent configuration takes effect.

In a dualhoming protection scenario for an SRv6 service chain in static proxy mode, the local SFF and its associated SF do not know the MAC address of the remote redundant SFF. For the SF to forward traffic back to the remote redundant SFF instead of the local SFF, use the dest-mac dest-mac option on the local SFF. Make sure the destination MAC address specified by using this option is the MAC address of the input interface on the remote redundant SFF. The outgoing traffic is forwarded from the local SFF to the SF and the incoming traffic is forwarded from the SF to the remote redundant SFF. As a result, outgoing traffic and incoming traffic are distributed to different SFFs for load sharing. The dest-mac dest-mac option is not available for an SRv6 service chain in masquerading mode.

If the SF has multiple VMs to process service chain traffic, execute this command multiple times for the same SRv6 service chain to specify multiple output interfaces or outbound VLANs. This operation distributes the traffic of an application service to multiple VMs for load sharing.

For an SRv6 service chain in static proxy mode, the encapsulation eth out-interface command is mutually exclusive with the encapsulation ipv4 nexthop command. An SRv6 service chain in static proxy mode supports only one packet encapsulation method.

For an SRv6 service chain in masquerading mode, the encapsulation eth out-interface command is mutually exclusive with the encapsulation ipv6 nexthop command. An SRv6 service chain in masquerading mode supports only one packet encapsulation method.

Examples

# For an SRv6 service chain in static proxy mode, configure Layer 2 encapsulation for packets forwarded between the SFF and its associated SF. The output interface is GigabitEthernet 0/0/1 and the input interface is GigabitEthernet 0/0/1. The outbound outer VLAN ID is 2, the inbound outer VLAN ID is 4, the outbound inner VLAN ID is 3, and the inbound inner VLAN ID is 5.

<Sysname> system-view

[Sysname] segment-routing ipv6

[Sysname-segment-routing-ipv6] locator test ipv6-prefix 100:: 64 static 32

[Sysname-segment-routing-ipv6-locator-test] opcode 32 end-as

[Sysname-segment-routing-ipv6-locator-test-endas-32] encapsulation eth out-interface gigabitethernet 0/0/1 out-s-vlan 2 out-c-vlan 3 in-interface gigabitethernet 0/0/1 in-s-vlan 4 in-c-vlan 5

# For an SRv6 service chain in static proxy mode, configure Layer 2 encapsulation for packets forwarded between the SFF and its associated SF. The output interface is GigabitEthernet 0/0/1 and the input interface is GigabitEthernet 0/0/1. The outbound outer VLAN ID is 2, the inbound outer VLAN ID is 4, the outbound inner VLAN ID is 3, and the inbound inner VLAN ID is 5. The destination MAC address is abc-de-89.

<Sysname> system-view

[Sysname] segment-routing ipv6

[Sysname-segment-routing-ipv6] locator test ipv6-prefix 100:: 64 static 32

[Sysname-segment-routing-ipv6-locator-test] opcode 32 end-as

[Sysname-segment-routing-ipv6-locator-test-endas-32] encapsulation eth out-interface gigabitethernet 0/0/1 in-s-vlan 2 out-c-vlan 3 in-interface gigabitethernet 0/0/1 in-s-vlan 4 in-c-vlan 5 dest-mac abc-de-89

# For an SRv6 service chain in masquerading mode, configure Layer 2 encapsulation for packets forwarded between the SFF and its associated SF. The output interface is GigabitEthernet 0/0/1 and the input interface is GigabitEthernet 0/0/1. The outbound outer VLAN ID is 2, the inbound outer VLAN ID is 4, the outbound inner VLAN ID is 3, and the inbound inner VLAN ID is 5.

<Sysname> system-view

[Sysname] segment-routing ipv6

[Sysname-segment-routing-ipv6] locator test ipv6-prefix 100:: 64 static 32

[Sysname-segment-routing-ipv6-locator-test] opcode 32 end-am

[Sysname-segment-routing-ipv6-locator-test-endam-32] encapsulation eth out-interface gigabitethernet 0/0/1 out-s-vlan 2 out-c-vlan 4 in-interface gigabitethernet 0/0/1 in-s-vlan 4 in-c-vlan 5

Related commands

encapsulation ipv4 nexthop

encapsulation ipv6 nexthop

encapsulation ipv4 nexthop

Use encapsulation ipv4 nexthop to configure Layer 3 encapsulation for inner IPv4 packets forwarded between a pair of SFF and SF.

Use undo encapsulation ipv4 nexthop to remove Layer 3 encapsulation configuration for inner IPv4 packets forwarded between a pair of SFF and SF.

Syntax

encapsulation ipv4 nexthop nexthop-addr out-interface out-interface-type out-interface-number in-interface in-interface-type in-interface-number [ symmetric-index index-value ]

undo encapsulation ipv4 nexthop nexthop-addr out-interface out-interface-type out-interface-number in-interface in-interface-type in-interface-number

Default

Layer 3 encapsulation is not configured for an SFF to encapsulate the inner IPv4 packets forwarded back from the SF associated with that SFF.

Views

SRv6 service chain static proxy view

Predefined user roles

network-admin

Parameters

nexthop-addr: Specifies a next hop IPv4 address in dotted decimal notation.

out-interface out-interface-type out-interface-number: Specifies an output interface by its type and number. You can specify a VLAN interface, Layer 3 Ethernet interface, or Layer 3 Ethernet subinterface.

in-interface in-interface-type in-interface-number: Specifies an input interface by its type and number.

symmetric-index index-value: Specifies a VM by its index. To ensure that the forward traffic and backward traffic between two nodes pass through the same path, specify the same VM for the SRv6 service chains that process the traffic. The index-value argument represents the VM index, in the range of 1 to 4294967295. If you do not specify a VM index, the SRv6 service chain selects a VM to process forward or backward traffic according to the VM configuration order.

Usage guidelines

IMPORTANT

IMPORTANT:

If an interface has been specified as an input or output interface of an SRv6 service chain, do not configure other services on that interface. Any violation might cause forwarding issues.

 

This command is applicable to an SRv6 service chain in static proxy mode.

Use this command if the SFF is connected to the SF through a Layer 3 interface. The out-interface out-interface-type out-interface-number and in-interface in-interface-type in-interface-number options specify output and input interfaces, respectively, on the SFF. The output interface is the interface through which inner IPv4 packets are forwarded from the SFF to the SF. The input interface is the interface through which the SFF receives inner IPv4 packets from the SF. The output and input interfaces can be the same interface or different interfaces. One SRv6 service chain in static proxy mode must have unique input interfaces among all SRv6 service chains. In the same SRv6 service chain in static proxy mode, the same output interface and next hop address can be associated only with one input interface.

If you specify the same output interface and next hop address to associate with different input interfaces in an SRv6 service chain in static proxy mode, the most recent configuration takes effect.

Typically, traffic in a service chain network is bidirectional. Forward traffic is the traffic from the SC to the tail node. Backward traffic is the traffic from the tail node to the SC. An SFF has two SRv6 service chains in static proxy mode in opposite directions for traffic between the SC and tail node. To ensure that the forward traffic and backward traffic are processed by the same VM when the SF has multiple VMs, specify the same VM index for the two SRv6 service chains in static proxy mode.

To specify the VM index, use this command with the symmetric-index index-value option. If you do not specify a VM index, the system automatically assigns the index of 0. In this case, an SRv6 service chain in static proxy mode selects a VM to process forward or backward traffic according to the VM configuration order. If you execute this command multiple times to specify the same VM index for the same SRv6 service chain in static proxy mode, the most recent configuration takes effect.

If multiple VMs exist on the SF, you can specify multiple input and output interfaces to distribute the traffic of an SRv6 service chain in static proxy mode among the VMs for load sharing.

The encapsulation ipv4 nexthop command is mutually exclusive with the encapsulation eth out-interface command. An SRv6 service chain in static proxy mode supports only one packet encapsulation method.

Examples

# Configure Layer 3 encapsulation for inner IPv4 packets forwarded between the SFF and its associated SF. The next hop address is 10.2.3.4, the output interface is GigabitEthernet0/0/1, the input interface is GigabitEthernet0/0/1, and the VM index is 10.

<Sysname> system-view

[Sysname] segment-routing ipv6

[Sysname-segment-routing-ipv6] locator test ipv6-prefix 100:: 64 static 32

[Sysname-segment-routing-ipv6-locator-test] opcode 32 end-as

[Sysname-segment-routing-ipv6-locator-test-endas-32] encapsulation ipv4 nexthop 10.2.3.4 out-interface gigabitethernet 0/0/1 in-interface gigabitethernet 0/0/1 symmetric-index 10

# Configure Layer 3 encapsulation for inner IPv4 packets forwarded between the SFF and its associated SF. The next hop address is 10.2.3.4, the output interface is VLAN-interface 10, the input interface is VLAN-interface 10, and the VM index is 10.

<Sysname> system-view

[Sysname] segment-routing ipv6

[Sysname-segment-routing-ipv6] locator test ipv6-prefix 100:: 64 static 32

[Sysname-segment-routing-ipv6-locator-test] opcode 32 end-as

[Sysname-segment-routing-ipv6-locator-test-endas-32] encapsulation ipv4 nexthop 10.2.3.4 out-interface vlan-interface 10 in-interface vlan-interface 10 symmetric-index 10

Related commands

encapsulation eth out-interface

encapsulation ipv6 nexthop

Use encapsulation ipv6 nexthop to configure Layer 3 encapsulation for IPv6 packets forwarded between a pair of SFF and SF.

Use undo encapsulation ipv6 nexthop to remove Layer 3 encapsulation configuration for IPv6 packets forwarded between a pair of SFF and SF.

Syntax

encapsulation ipv6 nexthop nexthop-ipv6-addr out-interface out-interface-type out-interface-number in-interface in-interface-type in-interface-number

undo encapsulation ipv6 nexthop nexthop-ipv6-addr out-interface out-interface-type out-interface-number in-interface in-interface-type in-interface-number

Default

Layer 3 encapsulation is not configured for an SFF to encapsulate the IPv6 packets forwarded back from the SF associated with that SFF.

Views

SRv6 service chain masquerading view

Predefined user roles

network-admin

Parameters

nexthop-ipv6-addr: Specifies a next hop IPv6 address.

out-interface out-interface-type out-interface-number: Specifies an output interface by its type and number. You can specify a VLAN interface, Layer 3 Ethernet interface, or Layer 3 Ethernet subinterface.

in-interface in-interface-type in-interface-number: Specifies an input interface by its type and number.

Usage guidelines

IMPORTANT

IMPORTANT:

If an interface has been specified as an input or output interface of an SRv6 service chain, do not configure other services on that interface. Any violation might cause forwarding issues.

 

This command is applicable to an SRv6 service chain in masquerading mode.

Use this command if the SFF is connected to the SF through a Layer 3 interface. The out-interface out-interface-type out-interface-number and in-interface in-interface-type in-interface-number options specify output and input interfaces, respectively, on the SFF. The output interface is the interface through which IPv6 packets are forwarded from the SFF to the SF. The input interface is the interface through which the SFF receives IPv6 packets from the SF. The output and input interfaces can be the same interface or different interfaces. One SRv6 service chain in masquerading mode must have unique input interfaces among all SRv6 service chains. In the same SRv6 service chain in masquerading mode, the same output interface and next hop address can be associated with only one input interface.

If you specify the same output interface and next hop address to associate with different input interfaces for an SRv6 service chain in masquerading mode, the most recent configuration takes effect.

If multiple VMs exist on the SF, you can specify multiple input and output interfaces to distribute the traffic of an SRv6 service chain in masquerading mode among the VMs for load sharing.

The encapsulation ipv6 nexthop command is mutually exclusive with the encapsulation eth out-interface command. An SRv6 service chain in masquerading mode supports only one packet encapsulation method.

Examples

# Configure Layer 3 encapsulation for IPv6 packets forwarded between the SFF and its associated SF. The next hop address is 1::1, the output interface is GigabitEthernet 0/0/1, and the input interface is GigabitEthernet 0/0/1.

<Sysname> system-view

[Sysname] segment-routing ipv6

[Sysname-segment-routing-ipv6] locator test ipv6-prefix 100:: 64 static 32

[Sysname-segment-routing-ipv6-locator-test] opcode 32 end-am

[Sysname-segment-routing-ipv6-locator-test-endam-32] encapsulation ipv6 nexthop 1::1 out-interface gigabitethernet 0/0/1 in-interface gigabitethernet 0/0/1

# Configure Layer 3 encapsulation for IPv6 packets forwarded between the SFF and its associated SF. The next hop address is 1::1, the output interface is VLAN-interface 10, and the input interface is VLAN-interface 10.

<Sysname> system-view

[Sysname] segment-routing ipv6

[Sysname-segment-routing-ipv6] locator test ipv6-prefix 100:: 64 static 32

[Sysname-segment-routing-ipv6-locator-test] opcode 32 end-am

[Sysname-segment-routing-ipv6-locator-test-endam-32] encapsulation ipv6 nexthop 1::1 out-interface vlan-interface 10 in-interface vlan-interface 10

Related commands

encapsulation eth out-interface

inner-type ipv4

Use inner-type ipv4 to configure an SFF to send original packets of the IPv4 protocol type to the SF associated with that SFF.

Use undo inner-type ipv4 to restore the default.

Syntax

inner-type ipv4

undo inner-type ipv4

Default

An SFF cannot send original packets of any protocol type to an SF.

Views

SRv6 service chain static proxy view

Predefined user roles

network-admin

Usage guidelines

Use this command on an SFF to ensure that the SFF can forward traffic to its associated SF. This command is required for an SRv6 service chain in static proxy mode.

An SFF can forward only original packets of the IPv4 protocol type to the SF associated with that SFF.

Examples

# Configure an SFF to send original packets of the IPv4 protocol type to the SF associated with that SFF.

<Sysname> system-view

[Sysname] segment-routing ipv6

[Sysname-segment-routing-ipv6] locator test ipv6-prefix 100:: 64 static 32

[Sysname-segment-routing-ipv6-locator-test] opcode 32 end-as

[Sysname-segment-routing-ipv6-locator-test-endas-32] inner-type ipv4

opcode end-am

Use opcode end-am to configure an End.AM SID opcode in an SRv6 locator and enter SRv6 service chain masquerading view, or directly enter SRv6 service chain masquerading view if the view already exists.

Use undo opcode to delete an End.AM SID opcode from an SRv6 locator and delete all settings in SRv6 service chain masquerading view.

Syntax

opcode opcode end-am

undo opcode opcode

Default

No End.AM SID opcode exists in an SRv6 locator.

Views

SRv6 locator view

Predefined user roles

network-admin

Parameters

opcode: Specifies an End.AM SID opcode in the range of 1 to 2static-length-1. The static-length argument is specified by using the locator command.

Usage guidelines

This command is applicable to an SRv6 service chain in masquerading mode.

To modify the End.AM SID opcode in an SRv6 locator, you must first use the undo opcode command to delete the original opcode.

Examples

# Set the End.AM SID opcode to 32 for locator test and enter SRv6 service chain masquerading view.

<Sysname> system-view

[Sysname] segment-routing ipv6

[Sysname-segment-routing-ipv6] locator test ipv6-prefix 100:: 64 static 32

[Sysname-segment-routing-ipv6-locator-test] opcode 32 end-am

[Sysname-segment-routing-ipv6-locator-test-endam-32]

Related commands

locator

segment-routing ipv6

opcode end-as

Use opcode end-as to configure an End.AS SID opcode in an SRv6 locator and enter SRv6 service chain static proxy view or enter SRv6 service chain static proxy view if the view already exists.

Use undo opcode to delete an End.AS SID opcode from an SRv6 locator and delete all settings in SRv6 service chain static proxy view.

Syntax

opcode opcode end-as

undo opcode opcode

Default

No End.AS SID opcode exists in an SRv6 locator.

Views

SRv6 locator view

Predefined user roles

network-admin

Parameters

opcode: Specifies an End.AS SID opcode in the range of 1 to 2static-length-1. The static-length argument is specified by using the locator command.

Usage guidelines

This command is applicable to an SRv6 service chain in static proxy mode.

To modify the static End.AS SID opcode in an SRv6 locator, you must first use the undo opcode end-as command to delete the original opcode.

Examples

# Set the End.AS SID opcode to 32 for locator test and enter SRv6 service chain static proxy view.

<Sysname> system-view

[Sysname] segment-routing ipv6

[Sysname-segment-routing-ipv6] locator test ipv6-prefix 100:: 64 static 32

[Sysname-segment-routing-ipv6-locator-test] opcode 32 end-as

[Sysname-segment-routing-ipv6-locator-test-endas-32]

Related commands

locator

segment-routing ipv6

proxy peer-sid

Use proxy peer-sid to specify the End SID of one SFF as the backup peer SID of the other SFF in a dualhoming protection scenario for an SRv6 service chain in static proxy mode.

Use undo proxy peer-sid to restore the default.

Syntax

proxy peer-sid peer-sid

undo proxy peer-sid

Default

No backup peer SID is specified for dualhoming protection for an SRv6 service chain in static proxy mode.

Views

SRv6 view

Predefined user roles

network-admin

Parameters

peer-sid: Specifies the End SID of the remote redundant SFF.

Usage guidelines

This command is applicable to an SRv6 service chain in static proxy mode.

In a dualhoming protection scenario, use this command on the redundant SFFs to specify the End SID of one SFF as the backup peer SID of the other SFF. If you execute this command multiple times for an SFF, the most recent configuration takes effect.

In a dualhoming protection scenario, the End SID cannot belong to the same locator as the End.AS SID on each SFF.

Examples

# In a dualhoming protection scenario for an SRv6 service chain in static proxy mode, specify the End SID (1:2:3::3:4) of the other SFF as the backup peer SID of the local SFF.

<Sysname> system-view

[Sysname] segment-routing ipv6

[Sysname-segment-routing-ipv6] proxy peer-sid 1:2:3::3:4

sfc diffserv-mode

Use sfc diffserv-mode to configure the DiffServ mode for an SRv6 service chain in static proxy mode.

Use undo sfc diffserv-mode to restore the default.

Syntax

sfc diffserv-mode pipe service-class color

undo sfc diffserv-mode

Default

The DiffServ mode is uniform for an SRv6 service chain in static proxy mode.

Views

SRv6 service chain static proxy view

Predefined user roles

network-admin

Parameters

pipe: Specifies the pipe mode.

service-class: Specifies a service class. The following shows the supported service classes in ascending order of priority:

·     be.

·     af1.

·     af2.

·     af3.

·     af4.

·     ef.

·     cs6.

·     cs7.

color: Specifies a color for packets. The following shows the supported colors in ascending order of packet drop probability:

·     green: Specifies the green color. The packet drop priority is 0.

·     yellow: Specifies the yellow color. The packet drop priority is 1.

·     red: Specifies the red color. The packet drop priority is 2.

Usage guidelines

This command is applicable to an SRv6 service chain in static proxy mode.

Use this command on an SFF to configure the DiffServ mode for packets forwarded between the SFF and its associated SF.

·     Pipe mode—In this mode, packets are processed as follows:

¡     In the inbound direction (from SF to SFF), the SFF ignores the IP precedence or DSCP value in the incoming packets. Instead, the SFF uses the specified service class as the priority and uses the specified color as the color flag when it reencapsulates the packets as SRv6 packets. In the SRv6 network, devices perform QoS scheduling for the packets based on the specified service class and color.

¡     In the outbound direction (from SFF to SF), the SFF removes the outer IPv6 header and SRH without modifying the IP precedence, DSCP, or color in the original packets.

·     Uniform mode—In this mode, packets are processed as follows:

¡     In the inbound direction (from SF to SFF), the SFF maps the IP precedence or DSCP value in the original packets to the outer IPv6 header when it reencapsulates the packets. The color of the original packets is not mapped to the outer IPv6 header.

¡     In the outbound direction (from SFF to SF), the SFF removes the outer IPv6 header and SRH from outgoing packets. Then, the SFF maps the priority value in the outer IPv6 header to the IP precedence or DSCP of the original packets. The color of the outer IPv6 header is not mapped to the original packets.

Examples

# Set the DiffServ mode to pipe for an SRv6 service chain in static proxy mode, set the service class to af1, and set the color to red.

<Sysname> system-view

[Sysname] segment-routing ipv6

[Sysname-segment-routing-ipv6] locator test ipv6-prefix 100:: 64 static 32

[Sysname-segment-routing-ipv6-locator-test] opcode 32 end-as

[Sysname-segment-routing-ipv6-locator-test-endas-32] sfc diffserv-mode pipe af1 red

sfc ttl-mode

Use sfc ttl-mode to configure the TTL mode for SRv6 service chain packets forwarded back to an SFF from its associated SF.

Use undo sfc ttl-mode to restore the default.

Syntax

sfc ttl-mode pipe ttl-value

undo sfc ttl-mode

Default

The TTL mode is uniform.

Views

SRv6 service chain static proxy view

Predefined user roles

network-admin

Parameters

pipe: Specifies the pipe mode.

ttl-value: Sets the TTL value, in the range of 1 to 255.

Usage guidelines

This command is applicable to an SRv6 service chain in static proxy mode.

Use this command on an SFF to configure the TTL mode for packets forwarded back to the SFF from its associated SF.

·     Uniform mode—When packets are forwarded back to the SFF, the SFF decreases the TTL value in the original packets by 1 and encapsulates the TTL to the reencapsulated outer IPv6 header.

·     Pipe mode—When packets are forwarded back to the SFF, the SFF decreases the specified TTL value by 1 and encapsulates the TTL to the reencapsulated outer IPv6 header.

Examples

# Set the TTL mode to pipe and set the TTL value to 255.

<Sysname> system-view

[Sysname] segment-routing ipv6

[Sysname-segment-routing-ipv6] locator test ipv6-prefix 100:: 64 static 32

[Sysname-segment-routing-ipv6-locator-test] opcode 32 end-as

[Sysname-segment-routing-ipv6-locator-test-endas-32] sfc ttl-mode pipe 255

 

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