encapsulation source-address

Function

The encapsulation source-address command configures a source address for SRv6 encapsulation.

The undo encapsulation source-address command deletes the source address configured for SRv6 encapsulation.

By default, no source address is configured for SRv6 encapsulation.

Format

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

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

Parameters

Parameter Description Value
ipv6-address

Specifies an IPv6 address.

The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.

ip-ttl ttl-value

Specifies a TTL in IPv6 packets.

If the ttl-mode command is not run or the ttl-mode pipe is run in the VPN instance view, the TTL carried in the IPv6 header is the same as ip-ttl ttl-value.

The value is an integer ranging from 1 to 255. The default value is 255.

Views

Segment routing IPv6 view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
segr write

Usage Guidelines

Usage Scenario

IPv6 encapsulation is performed during SRv6 data forwarding. The source and destination addresses need to be encapsulated in the IPv6 header. This command is used to configure the source address to be encapsulated.

In unicast forwarding scenarios, SRv6 selects source addresses in the following sequence:

  1. encapsulation source-address
  2. Default address ::

    In ping and tracert scenarios, SRv6 selects source addresses in the following sequence:
  • In a scenario where a public network route recurses to an SRv6 TE Policy:
  1. encapsulation source-address
  2. IPv6 router ID configured using the te ipv6-router-id command
  3. Minimum interface address configured on the device
  • In a scenario where a VPN route recurses to an SRv6 TE Policy:
  1. encapsulation source-address
  2. IPv6 router ID configured using the te ipv6-router-id command
  3. Default address ::

Example

# Configure a source address for SRv6 encapsulation.
<HUAWEI> system-view
[~HUAWEI] segment-routing ipv6
[*HUAWEI-segment-routing-ipv6] encapsulation source-address 2001:db8:66::66 ip-ttl 200
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >