10-Segment Routing Command Reference

HomeSupportResource CenterRoutersCR19000 Core SeriesCR19000 Core SeriesTechnical DocumentsReference GuidesCommand ReferencesH3C CR19000 Core Router Series Command References-E3521-5W10010-Segment Routing Command Reference
05-SRv6-TE policy commands
Title Size Download
05-SRv6-TE policy commands 185.44 KB

SRv6-TE policy commands

address-family ipv6 sr-policy

Use address-family ipv6 sr-policy to create the BGP IPv6 SR policy address family and enter its view, or enter the view of the existing BGP IPv6 SR policy address family.

Use undo address-family ipv6 sr-policy to delete the BGP IPv6 SR policy address family and all the configuration in the BGP IPv6 SR policy address family.

Syntax

address-family ipv6 sr-policy

undo address-family ipv6 sr-policy

Default

The BGP IPv6 SR policy address family does not exist.

Views

BGP instance view

Predefined user roles

network-admin

mdc-admin

Usage guidelines

The configuration in BGP IPv6 SR policy address family view applies only to routes and peers in the BGP IPv6 SR policy address family.

Examples

# In BGP instance view, create the BGP IPv6 SR policy address family and enter its view.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp-default] address-family ipv6 sr-policy

[Sysname-bgp-default-srpolicy-ipv6]

advertise ebgp enable

Use advertise ebgp enable to enable advertising SRv6-TE policy routes to EBGP peers.

Use undo advertise ebgp enable to restore the default.

Syntax

advertise ebgp enable

undo advertise ebgp enable

Default

SRv6-TE policy routes are not advertised to EBGP peers.

Views

BGP IPv6 SR policy address family

Predefined user roles

network-admin

mdc-admin

Usage guidelines

By default, SRv6-TE policy routes are advertised among IBGP peers. To advertise SRv6-TE policy routes to EBGP peers, you must execute this command to enable the advertisement capability.

Examples

# Enable advertising SRv6-TE policy routes to EBGP peers.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp-default] address ipv6 sr-policy

[Sysname-bgp-default-srpolicy-ipv6] advertise ebgp enable

binding-sid

Use binding-sid to configure a BSID for an SRv6-TE policy.

Use undo binding-sid to delete the BSID.

Syntax

binding-sid ipv6 ipv6-address

undo binding-sid

Default

No BSID is configured for an SRv6-TE policy.

Views

SRv6-TE policy view

Predefined user roles

network-admin

mdc-admin

Parameters

ipv6 ipv6-address: Specifies the BSID value, which is an IPv6 address.

Usage guidelines

You can use this command to manually configure a BSID for an SRv6-TE policy or leave the SRv6-TE policy to obtain a BSID automatically. If an SRv6-TE policy has only color and endpoint configuration, the SRv6-TE policy will automatically request a BSID.

The manually configured BSID has a higher priority over the automatically obtained BSID.

The BSID configured by this command must be on the locator specified for SRv6-TE policies in SRv6 TE view. Otherwise, the SRv6-TE policy cannot forward packets.

If you execute this command multiple times, the most recent configuration takes effect.

Examples

# Set the BSID of SRv6-TE policy srv6policy to 1000::1.

<Sysname> system-view

[Sysname] segment-routing ipv6

[Sysname-segment-routing-ipv6] traffic-engineering

[Sysname-srv6-te] policy srv6policy

[Sysname-srv6-te-policy-srv6policy] binding-sid ipv6 1000::1

candidate-paths

Use candidate-paths to create and enter the candidate path view for an SRv6-TE policy, or enter the existing SRv6-TE policy candidate path view.

Use undo candidate-paths to delete the SRv6-TE policy candidate path view and all the configurations in the view.

Syntax

candidate-paths

undo candidate-paths

Default

The candidate path view for an SRv6-TE policy does not exist.

Views

SRv6-TE policy view

Predefined user roles

network-admin

mdc-admin

Examples

# Create the SRv6-TE policy candidate paths instance and enter its view.

<Sysname> system-view

[Sysname] segment-routing ipv6

[Sysname-segment-routing-ipv6] traffic-engineering

[Sysname-srv6-te] policy srv6policy

[Sysname-srv6-te-policy-srv6policy] candidate-paths

[Sysname-srv6-te-policy-srv6policy-path]

color end-point

Use color end-point to configure the color and endpoint attributes of an SRv6-TE policy.

Use undo color to delete the color and endpoint settings of an SRv6-TE policy.

Syntax

color color-value end-point ipv6 ipv6-address

undo color

Default

The color and endpoint attributes of an SRv6-TE policy are not configured.

Views

SRv6-TE policy view

Predefined user roles

network-admin

mdc-admin

Parameters

color-value: Specifies the color attribute value, in the range of 1 to 4294967295.

Ipv6-address: Specifies the endpoint IPv6 address.

Usage guidelines

If you execute this command multiple times, the most recent configuration takes effect.

Different SRv6-TE policies cannot have the same color or endpoint IP address.

Examples

# Configure the color as 20 and endpoint IPv6 address as 1000::1 for SRv6-TE policy srv6policy.

<Sysname> system-view

[Sysname] segment-routing ipv6

[Sysname-segment-routing-ipv6] traffic-engineering

[Sysname-srv6-te] policy srv6policy

[Sysname-srv6-te-policy-srv6policy] color 20 end-point ipv6 1000::1

display bgp routing-table ipv6 sr-policy

Use display bgp routing-table ipv6 sr-policy to display route information of a BGP SRv6-TE policy.

Syntax

display bgp [ instance instance-name ] routing-table ipv6 sr-policy [ sr-policy-prefix [ advertise-info ] | [ color color-value ] [ end-point ipv6 ipv6-address ] | peer ipv6-address { advertised-routes | received-routes } [ statistics ] [ color color-value ] [ end-point ipv6 ipv6-address ] | statistics [ color color-value ] [ end-point ipv6 ipv6-address ] ]

Views

Any view

Predefined user roles

network-admin

network-operator

mdc-admin

mdc-operator

Parameters

instance instance-name: Specifies a BGP instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify a BGP instance, this command displays information about the default instance.

sr-policy-prefix: Specifies a BGP SRv6-TE policy route prefix, which is a case-insensitive string of 1 to 512 characters in the format of SRv6-TE policy route/prefix length.

color color-value: Specifies the color attribute value of a BGP SRv6-TE policy, in the range of 1 to 4294967295.

end-point ipv6 ipv6-address: Specifies the endpoint IPv6 address of a BGP SRv6-TE policy.

advertise-info: Displays advertisement information about BGP SRv6-TE policy routes.

peer ipv6-address: Specifies a peer by its IPv6 address.

advertised-routes: Displays detailed information about the BGP SRv6-TE policy routes advertised to the specified peer.

received-routes: Displays detailed information about the BGP SRv6-TE policy routes received from the specified peer.

statistics: Displays route statistics.

Usage guidelines

If you do not specify any parameters, this command displays brief information about all BGP SRv6-TE policy routes.

Examples

# Display brief information about all BGP SRv6-TE policy routes.

<Sysname> display bgp routing-table ipv6 sr-policy

 

 Total number of routes: 1

 

 BGP local router ID is 2.2.2.2

 Status codes: * - valid, > - best, d - dampened, h - history

               s - suppressed, S - stale, i - internal, e - external

               a – additional-path

       Origin: i - IGP, e - EGP, ? - incomplete

 

>i Network : [46][46][8::8]/192

   NextHop : 1::2                                  LocPrf    : 100

   PrefVal : 0                                     MED       : 0

   Path/Ogn: i

Table 1 Command output

Field

Description

Status codes

Status codes of the route.

Origin

Origin of the route:

·     i – IGP—Originated in the AS.

·     e – EGP—Learned through an EGP.

·     ? – incomplete—Unknown origin.

Network

BGP SRv6-TE policy route, comprised of the following elements:

·     SRv6-TE policy candidate path preference.

·     SRv6-TE policy color attribute value.

·     Endpoint IPv6 address.

NextHop

Next hop IP address.

LocPrf

Local preference value.

PrefVal

Preferred value of the route.

MED

Multi-Exit Discriminator attribute value.

Path/Ogn

AS_PATH and ORIGIN attributes of the route:

·     AS_PATH—Records the ASs the route has passed.

·     ORIGIN—Identifies the origin of the route.

# Display detailed information about BGP SRv6-TE policy route [46][46][8::8]/192.

<Sysname> display bgp routing-table ipv6 sr-policy [46][46][8::8]/192

 

BGP local router ID: 5.5.5.1

Local AS number: 100

 

Paths: 1 available, 1 best

 

 BGP routing table information of [46][46][8::8]/192

 Imported route.

 Original nexthop: ::

 Output interface: NULL0 

 Route age       : 19h45m02s

 OutLabel        : NULL

 RxPathID        : 0x0

 TxPathID        : 0x0

 Org-validation  : Valid

 AS-path         : (null)

 Origin          : igp

 Attribute value : MED 0, localpref 100, pref-val 32768

 State           : valid, local, best

 IP precedence   : N/A

 QoS local ID    : N/A

 Traffic index   : N/A

 Tunnel encapsulation info:

    Type: 15 (SR policy)

     Policy name: p1

     Binding SID: 2::6

     Preference: 100

     Path: 1

      Weight: 1

      SIDs: {2::2}

Table 2 Command output

Field

Description

Paths

Route information:

·     available—Number of valid routes.

·     best—Number of optimal routes.

BGP routing table information of [46][46][8::8]/192

Information of the BGP SRv6-TE policy route [46][46][8::8]/192, where:

·     [46] is the SRv6-TE policy candidate path preference

·     [46] is the SRv6-TE policy color attribute value.

·     [8::8] is the endpoint IPv6 address.

From

IP address of the BGP peer that advertised the route.

Rely Nexthop

Recursive nexthop IP address. If no next hop is found by route recursion, this field displays not resolved.

Original nexthop

Original nexthop IP address. If the route was obtained from a BGP update message, the original next hop is the nexthop IP address in the message.

Route age

Time elapsed since the last update for the route.

OutLabel

Outgoing label of the route.

RxPathID

Received Add-Path ID of the route.

TxPathID

Advertised Add-Path ID of the route.

Org-validation

BGP RPKI validation state:

·     Valid.

·     Not found.

·     Invalid.

AS-path

AS_PATH attribute of the route.

Origin

Origin of the route:

·     igp—Originated in the AS.

·     egp—Learned through an EGP.

·     incomplete—Unknown origin.

Attribute value

BGP path attributes:

·     MED—MED value.

·     localprefLocal preference value.

·     pref-val—Preferred value.

·     pre—Protocol preference.

State

Current state of the route. Options include:

·     valid—Valid route.

·     internal—Internal route.

·     external—External route.

·     local—Locally generated route.

·     synchronize—Synchronized route.

·     best—Optimal route.

·     delay—Delayed route. The route will be delayed for optimal route selection. This value is available only in detailed information of the route.

·     not preferred for reason—Reason why the route is not selected as the optimal route. For more information, see Table 3.

IP precedence

IP precedence of the route, in the range of 0 to 7. N/A indicates that the route does not support this field.

QoS local ID

QoS local ID of the route, in the range of 1 to 4095. N/A indicates that the route does not support this field.

Traffic index

Traffic index in the range of 1 to 64. N/A indicates that the route does not support this field.

Type: 15 (SR Policy)

The tunnel encryption type is 15, which represents SR policy.

Preference

Candidate path preference.

Binding SID

BSID value

Path

Candidate path.

Weight

Weight of the SID list.

SIDs

List of SIDs.

Table 3 Reason why the route is not selected as the optimal route

Reason

Description

preferred-value

Routes with larger preferred values exist.

local-preference

Routes with larger local preference values exist.

as-path

Routes with smaller AS_PATH attribute values exist.

origin

There are routes whose origin has a higher priority. The route origins are IGP, EGP, and INCOMPLETE in descending order of priority.

med

Routes with smaller MED values exist.

remote-route

There are routes whose remote-route attribute has a higher priority.

BGP selects the optimal route from remote routes in this order:

·     Route learned from an EBGP peer.

·     Route learned from a confederation EBGP peer.

·     Route learned from a confederation IBGP peer.

·     Route learned from an IBGP peer.

igp-cost

Routes with smaller IGP metrics exist.

relydepth

Routes with smaller recursion depth values exist.

rfc5004

A route received from an EBGP peer is the current optimal route. BGP does not change the optimal route when it receives routes from other EBGP peers.

router-id

Routes with smaller router IDs exist.

If one of the routes is advertised by a route reflector, BGP compares the ORIGINATOR_ID of the route with the router IDs of other routes. Then, BGP selects the route with the smallest ID as the optimal route.

cluster-list

Routes with smaller CLUSTER_LIST attribute values exist.

peer-address

Routes advertised by peers with lower IP addresses exist.

received

Earlier learned routes exist.

# Displays advertisement information about the BGP SRv6-TE policy route [46][46][8::8]/192.

<Sysname> display bgp routing-table ipv6 sr-policy [46][46][8::8]/192 advertise-info

 

 

 BGP local router ID: 2.2.2.2

 Local AS number: 1

 

 Paths:   1 best

 

 BGP routing table information of [46][46][8::8]/192(TxPathID:0):

 Advertised to peers (2 in total):

    1::1

    3::3

Table 4 Command output

Field

Description

Paths

Number of optimal paths to reach the destination network.

BGP routing table information of [46][46][8::8]/192(TxPathID:0)

Advertisement information about the BGP SRv6-TE policy route [46][46][8::8]/192. TxPathID represents the advertised Add-Path ID of the route.

Advertised to peers (2 in total)

Indicates the peers to which the route has been advertised. The number in the parentheses indicates the total number of the peers.

# Display statistics about the BGP SRv6-TE policy routes advertised to peer 2::2.

<Sysname> display bgp routing-table ipv6 sr-policy peer 2::2 advertised-routes statistics

 

 Advertised routes total: 2

# Display statistics about the BGP SRv6-TE policy routes received from peer 2::2.

<Sysname> display bgp routing-table ipv6 sr-policy peer 2::2 received-routes statistics

 

 Received routes total: 1

Table 5 Command output

Field

Description

Advertised routes total

Total number of routes advertised to the specified peer.

Received routes total

Total number of routes received from the specified peer.

# Display statistics about BGP SRv6-TE policy routes.

<Sysname> display bgp routing-table ipv6 sr-policy statistics

 

 Total number of routes: 3

display segment-routing ipv6 te forwarding

Use display segment-routing ipv6 te forwarding to display SRv6 TE forwarding information.

Syntax

display segment-routing ipv6 te forwarding [ policy { name policy-name | { color color-value | end-point ipv6 ipv6-address } * } ] [ verbose ]

Views

Any view

Predefined user roles

network-admin

network-operator

mdc-admin

mdc-operator

Parameters

policy: Displays forwarding information of the specified SRv6-TE policy. If you do not specify an SRv6-TE policy, this command displays forwarding information of all SRv6-TE policies.

name policy-name: Specifies the name of an SRv6-TE policy, a case-sensitive string of 1 to 59 characters.

color color-value: Specifies the color of an SRv6-TE policy, in the range of 0 to 4294967295.

end-point ipv6 ip-address: Specifies the endpoint IPv6 address of an SRv6-TE policy.

verbose: Displays detailed SRv6 TE forwarding information. If you do not specify this keyword, the command displays brief SRv6 TE forwarding information.

Examples

# Display brief information about all SRv6-TE policies.

<Sysname> display segment-routing ipv6 te forwarding

 

Total forwarding entries: 1

 

Policy name/ID: p1/0

 Binding SID: 8000::1

 Forwarding index: 0x80300001

 Main path:

   Seglist ID: 1

     Seglist forwarding index: 0x80200001

     Weight: 1

     Outgoing forwarding index: 0x80100001

       Interface: GE1/2/0/1

       Nexthop: FE80::6CCE:CBFF:FE91:206

# Display detailed information about all SRv6-TE policies.

<Sysname> display segment-routing ipv6 te forwarding verbose

 

Total forwarding entries: 1

 

Policy name/ID: p1/0

 Binding SID: 8000::1

 Forwarding index: 0x80300001

 Inbound statistics:

   Total octets: 525

   Total packets: 1

   Erroneous packets: 0

   Dropped packets: 0

 Outbound statistics:

   Total octets: 750

   Total packets: 1

   Erroneous packets: 0

   Dropped packets: 0

 Main path:

   Seglist ID: 1

     Seglist forwarding index: 0x80200001

     Weight: 1

     Outbound statistics:

       Total octets: 750

       Total packets: 1

       Erroneous packets: 0

       Dropped packets: 0

     Outgoing forwarding index: 0x80100001

       Interface: GE1/2/0/1

       Nexthop: FE80::6CCE:CBFF:FE91:206

         Path ID: 1

         SID list: {44::44, 45::45}

       Outbound statistics:

         Total octets: 750

         Total packets: 1

         Erroneous packets: 0

         Dropped packets: 0

Table 6 Command output

Field

Description

Total forwarding entries

Total number of SRv6 TE forwarding entries.

Policy name/ID

Name/ID of an SRv6-TE policy.

Binding SID

SID value of the ingress node.

Forwarding index

Index of the SRv6-TE policy forwarding entry.

Inbound statistics

Statistics on inbound traffic (the traffic received by the BSID).

Total octets

Total number of octets forwarded.

Total packets

Total number of packets forwarded.

Erroneous packets

Number of erroneous packets.

Dropped packets

Number of dropped packets.

Outbound statistics

Statistics on outbound traffic.

Main path

Main path for traffic forwarding.

Seglist ID

ID of the SID list.

Seglist forwarding index

Forwarding entry index of the SID list.

Weight

Weight of the SID list.

Outgoing forwarding index

The nexthop forwarding entry index of the first address in the SID list.

Interface

Brief name of the outgoing interface.

Nexthop

Next hop IPv6 address.

Path ID

ID of the SRv6-TE policy candidate path.

SID list

List of SIDs.

display segment-routing ipv6 te policy

Use display segment-routing ipv6 te policy to display SRv6-TE policy information.

Syntax

display segment-routing ipv6 te policy [ name policy-name | down | up | { color color-value | end-point ipv6 ipv6-address } * ]

Views

Any view

Predefined user roles

network-admin

network-operator

mdc-admin

mdc-operator

Parameters

name policy-name: Specifies an SRv6-TE policy by its name, a case-sensitive string of 1 to 59 characters.

down: Specifies the SRv6-TE policies in down state.

up: Specifies the SRv6-TE policies in up state.

color color-value: Specifies the color of an SRv6-TE policy, in the range of 1 to 4294967295.

end-point ipv6 ipv6-address: Specifies the endpoint IPv6 address of an SRv6-TE policy.

Usage guidelines

If you do not specify any parameters, this command displays information about all SRv6-TE policies.

Examples

# Display information about all SRv6-TE policies.

<Sysname> display segment-routing ipv6 te policy

Name/ID: p1/0

 Color: 10

 Endpoint: 1000::1

 Name from BGP: <none>

 BSID:

  Mode: Dynamic              Type: Type_2              Request state: Succeeded

  Current BSID: 5000::2      Explicit BSID: -          Dynamic BSID: 5000::2

 Reference counts: 3

 Flags: A/BS/NC

 Status: Up

 Up time: 2020-03-09 16:09:40

 Down time: 2020-03-09 16:09:13

 Statistics: Enabled

 Forwarding index: 2150629377

 Candidate paths state: Configured

 Candidate paths statistics:

  CLI paths: 1       BGP paths: 0     PCEP paths: 0

 Candidate paths:

  Preference : 20

   CpathName: <none>

   Instance ID: 0               ASN: 0              Node address: 0.0.0.0

   Peer address: 0.0.0.0

   Optimal: Y                   Flags: V/A

   Explicit SID list:

    ID: 1                      Name: Sl1

    Weight: 1                  Forwarding index: 2149580801

    State: Up

Table 7 Command output

Field

Description

Name/ID

SRv6-TE policy name/ID.

Color

Color attribute of the SRv6-TE policy. A value of 0 means that the color attribute is not configured.

Endpoint

Endpoint IPv6 address of the SRv6-TE policy. If the endpoint is not configured, this field displays None.

Name from BGP

Name of the SRv6-TE policy obtained from BGP. If no SRv6-TE policy was obtained from BGP, this field display <none>.

BSID

SID value of the ingress node.

Mode

BSID configuration mode:

·     Explicit—Manually configured.

·     Dynamic—Dynamically requested.

·     None—Not configured.

Type

BSID type:

·     None—Not configured.

·     Type_2—IPv6 address.

Request state

BSID request state:

·     Failed.

·     Succeeded.

·     Conflicted.

Explicit BSID

Manually configured BSID.

Dynamic BSID

Dynamically requested BSID.

Reference counts

Number of times that the SRv6-TE policy has been referenced.

Flags

SRv6-TE policy flags:

·     A—Active SRv6-TE policy.

·     C—Optimal SRv6-TE policy.

·     N—In optimal SRv6-TE policy selection progress.

·     BA—Requesting BSID.

·     BS—Optimal BSID.

·     D—Deleted SRv6-TE policy.

·     CF—Conflicted with an existing BSID.

·     NC—Manually configured SRv6-TE policy.

·     NB—SRv6-TE policy obtained from a BGP route.

·     W—The number of SRv6-TE policies has exceeded the maximum capacity.

Up time

Date and time when the SRv6-TE policy became up.

Down time

Date and time when the SRv6-TE policy became down.

Statistics

Traffic statistics status for the SRv6-TE policy:

·     Disabled.

·     Enabled.

·     Not configured.

Forwading index

Forwarding entry index of the SRv6-TE policy.

Candidate paths state

Whether candidate paths are configured:

·     Configured.

·     Not configured.

Candidate paths statistics

Candidate paths statistics by path origin.

CLI paths

Number of manually configured candidate paths.

BGP paths

Number of candidate paths obtained from BGP SRv6 Policy routes.

PCEP paths

This field is not supported in the current software version.

Number of candidate paths obtained from PCEP.

Candidate paths

SRv6-TE policy candidate path information.

Preference

SRv6-TE policy candidate path preference.

CPathName

Name of the candidate path obtained from a BGP route. If no path name was obtained, this field displays N/A.

Instance ID

BGP instance ID. A value of 0 indicates that the device does not obtain SRv6-TE policy information from BGP peers.

ASN

AS number. A value of 0 indicates that the device does not obtain SRv6-TE policy information from BGP peers.

Node address

BGP node address.

For an SRv6-TE policy obtained from a BGP peer, the node address is the Router ID of the BGP peer.

For an SRv6-TE policy obtained in other methods, the node address is 0.0.0.0.

Peer address

BGP peer address.

For an SRv6-TE policy obtained from a BGP peer, the peer address is the address of the BGP peer.

For an SRv6-TE policy obtained in other methods, the peer address is 0.0.0.0.

Optimal

Whether the path is the optimal path:

·     Y—Yes.

·     N—No.

Flags

Flags of the SRv6-TE policy candidate path:

·     V—Valid candidate path.

·     A—Active candidate path.

·     None—No candidate path.

Explicit SID list

Explicit SID list in the candidate path of the SRv6-TE policy.

ID

SID list ID.

Name

SID list name.

Weight

Weight of the SID list in the candidate path.

Forwarding index

Forwarding entry index of the SID list.

State

SID list state:

·     UP.

·     DOWN.

display segment-routing ipv6 te policy statistics

Use display segment-routing ipv6 te policy statistics to display SRv6-TE policy statistics.

Syntax

display segment-routing ipv6 te policy statistics

Views

Any view

Predefined user roles

network-admin

network-operator

mdc-admin

mdc-operator

Examples

# Display SRv6-TE policy statistics.

<Sysname> display segment-routing ipv6 te policy statistics

Total policies: 0 (0 up 0 down)

    Configured: 0

    From BGP: 0 (Added 0, deleted 0)

Total candidate paths: 0

    Configured: 0

    From BGP: 0 (Added 0, deleted 0)

Total SID lists: 0

    Configured: 0

    From BGP: 0

Table 8 Command output

Field

Description

Total policies

Total number of SRv6-TE policies:

·     up—Number of SRv6-TE policies in up state.

·     down—Number of SRv6-TE policies in down state.

Configured

Number of manually configured SR policies.

From BGP

Number of SR policies learned through BGP.

·     Added—Number of BGP-added SRv6-TE policies.

·     deleted—Number of BGP-deleted SRv6-TE policies.

Total candidate paths

Total number of SRv6-TE policy candidate paths.

Total SID lists

Total number of SID lists.

display segment-routing ipv6 te segment-list

Use display segment-routing ipv6 te segment-list to display SRv6-TE SID list information.

Syntax

display segment-routing ipv6 te segment-list [ name seglist-name | id id-value ]

Views

Any view

Predefined user roles

network-admin

network-operator

mdc-admin

mdc-operator

Parameters

name segment-list-name: Specifies a SID list by its name, a case-sensitive string of 1 to 128 characters.

id id-value: Specifies a SID list by its ID. The value range for the SID list ID is 1 to 4294967295.

Usage guidelines

If you do not specify a SID list name or ID, this command displays information about all SRv6-TE SID lists.

To view SID list ID information, execute the display segment-routing ipv6 te policy command.

Examples

# Display information about all SRv6-TE SID lists.

<Sysname> display segment-routing ipv6 te segment-list

 

Total Segment lists: 1

 

Name/ID: A/1

 Origin: CLI

 Status: Up

 Nodes: 1

 

  Index: 1             SID: 1::2

  Type : Type_2      Flags: None

Table 9 Command output

Field

Description

Total Segment lists

Number of SID lists.

Name/ID

SID list name/ID.

Origin

Origin of the SID list. Options include:

·     CLI—Locally configured in the CLI.

·     BGP—Issued by BGP.

·     PCE—Issued by a PCE. (This option is not supported in the current software version.)

If the SID list does not have a valid origin, this field displays a hyphen (-).

Status

SID list status, Down or Up.

Nodes

Number of nodes in the SID list.

Index

Node index.

SID

SID value (IPv6 address) of the node.

Type

SID type of the node:

·     None—Not configured.

·     Type_2—IPv6 address.

Flags

Node flags, which are not defined and displayed as None.

explicit segment-list

Use explicit segment-list to specify a SID list for a candidate path.

Use undo explicit segment-list to delete a SID list of a candidate path or restore the default weight of a SID list.

Syntax

explicit segment-list segment-list-name [ weight weight-value ]

undo explicit segment-list segment-list-name [ weight ]

Default

No SID lists are specified for an SRv6-TE policy candidate path.

Views

SRv6-TE policy path preference view

Predefined user roles

network-admin

mdc-admin

Parameters

segment-list-name: Specifies an SID list name, a case-sensitive string of 1 to 128 characters.

weight weight-value: Specifies a weight for the SID list, in the range of 1 to 4294967295. The default weight is 1.

Usage guidelines

An SRv6-TE policy uses the SID list specified for the highest-preference candidate path as a traffic forwarding subpath.

An SRv6-TE policy candidate path can have multiple SID lists. All the SID lists can be used to forward traffic for load sharing based on their weights. Assume SID lists a, b, and c are assigned weights x, y, z, respectively. The load of SID list a is x/(x+y+z) of the total traffic.

If you assign weight values for the same SID list multiple times, the most recent configuration takes effect.

Examples

# Configure SID list abc for the SRv6-TE policy candidate path with preference 20, and the set the SID list weight to 20.

<Sysname> system-view

[Sysname] segment-routing ipv6

[Sysname-segment-routing-ipv6] traffic-engineering

[Sysname-srv6-te] policy a1

[Sysname-srv6-te-policy-a1] candidate-paths

[Sysname-srv6-te-policy-a1-path] preference 20

[Sysname-srv6-te-policy-a1-path-pref20] explicit segment-list abc weight 20

Related commands

segment-list

forwarding statistics

Use forwarding statistics to configure traffic forwarding statistics for an SRv6-TE policy.

Use undo forwarding statistics to restore the default.

Syntax

forwarding statistics { disable | enable }

undo forwarding statistics

Default

An SRv6-TE policy uses the traffic forwarding statistics configuration in SRv6 TE view.

Views

SRv6-TE policy view

Predefined user roles

network-admin

mdc-admin

Parameters

disable: Disables the SRv6-TE policy forwarding statistics.

enable: Enables the SRv6-TE policy forwarding statistics.

Usage guidelines

You can configure traffic forwarding statistics for all SRv6-TE policies globally in SRv6 TE view or for a specific SRv6-TE policy in SRv6-TE policy view. The policy-specific configuration takes precedence over the global configuration. An SRv6-TE policy uses the global configuration only when it has no policy-specific configuration.

Examples

# Enable traffic forwarding statistics for SRv6-TE policy 1.

<Sysname> system-view

[Sysname] segment-routing ipv6

[Sysname-segment-routing-ipv6] traffic-engineering

[Sysname-srv6-te] policy 1

[Sysname-srv6-te-policy-1] forwarding statistics enable

Related commands

display segment-routing ipv6 te forwarding

reset segment-routing ipv6 te forwarding statistics

srv6-policy forwarding statistic enable

srv6-policy forwarding statistic interval

import-route sr-policy

Use import-route sr-policy to enable BGP to redistribute routes from the SRv6-TE policy.

Use undo import-route sr-policy to restore the default.

Syntax

import-route sr-policy

undo import-route sr-policy

Default

BGP does not redistribute SRv6-TE policy routes.

Views

BGP IPv6 SR policy address family

Predefined user roles

network-admin

mdc-admin

Usage guidelines

After you execute this command, the system will redistribute the local SRv6-TE policy routes to the BGP routing table and advertise the routes to IBGP peers. Then, the peers can forward traffic based on the SRv6-TE policy.

Examples

# In BGP IPv6 SR policy address family view, enable BGP to redistribute routes from the SRv6-TE policy.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp-default] address-family ipv6 sr-policy

[Sysname-bgp-default-srpolicy-ipv6] import-route sr-policy

index

Use index to add a node to a SID list.

Use undo index to delete a node from a SID list.

Syntax

index index-number ipv6 ipv6-address

undo index index-number

Default

No nodes exist in a SID list.

Views

SID list view

Predefined user roles

network-admin

mdc-admin

Parameters

index-number: Specifies the node index, in the range of 1 to 65535.

ipv6-address: Specifies the IPv6 address of the node.

Examples

# Add a node to SID list abc, and set the node index to 1 and IPv6 address to 1000::1.

<Sysname> system-view

[Sysname] segment-routing ipv6

[Sysname-segment-routing-ipv6] traffic-engineering

[Sysname-srv6-te] segment-list abc

[Sysname-srv6-te-sl-abc] index 1 ipv6 1000::1

srv6-policy locator

Use srv6-policy locator to specify a locator for SRv6 TE.

Use undo srv6-policy locator to cancel the locator configuration.

Syntax

srv6-policy locator locator-name

undo srv6-policy locator

Default

No locator is specified for SRv6 TE.

Views

SRv6 TE view

Predefined user roles

network-admin

mdc-admin

Parameters

locator-name: Specifies a locator by its name, a case-sensitive string of 1 to 31 characters.

Usage guidelines

The locator specified in SRv6 TE view restricts the BSID range. Only BSIDs within the range of the locator can take effect.

You cannot change the locator for SRv6 TE by repeatedly executing this command. To change the locator, first execute the undo srv6-policy locator command to remove the specified locator and then execute the srv6-policy locator command to specify a new locator.

Examples

# Specify locator test1 in SRv6 TE view.

<Sysname> system-view

[Sysname] segment-routing ipv6

[Sysname-segment-routing-ipv6] traffic-engineering

[Sysname-srv6-te] srv6-policy locator test1

policy

Use policy to create an SRv6-TE policy and enter its view, or enter the view of an existing SRv6-TE policy.

Use undo policy to delete an SRv6-TE policy and all the configuration in the SRv6-TE policy.

Syntax

policy policy-name

undo policy policy-name

Default

No SRv6-TE policies exist.

Views

SRv6 TE view

Predefined user roles

network-admin

mdc-admin

Parameters

policy-name: Specifies an SRv6-TE policy name, a case-sensitive string of 1 to 59 characters.

Examples

# Create an SRv6-TE policy named srv6policy and enter its view.

<Sysname> system-view

[Sysname] segment-routing ipv6

[Sysname-segment-routing-ipv6] traffic-engineering

[Sysname-srv6-te] policy p1

[Sysname-srv6-te-policy-p1]

preference

Use preference to set the preference for an SRv6-TE policy candidate path and enter SRv6-TE policy path preference view, or enter an existing SRv6-TE policy path preference view.

Use undo preference to delete an SRv6-TE policy candidate path preference and all the configuration in the SRv6-TE policy path preference view.

Syntax

preference preferenc-value

undo preference preferenc-value

Views

SRv6-TE policy candidate path view

Predefined user roles

network-admin

mdc-admin

Parameters

preferenc-value: Specifies a candidate path preference in the range of 1 to 65535. A bigger value represents a higher preference.

Usage guidelines

A preference represents a candidate path of an SRv6-TE policy.

Examples

# Set the preference of an SRv6-TE policy candidate path to 20, and enter SRv6-TE policy path preference view.

<Sysname> system-view

[Sysname] segment-routing ipv6

[Sysname-segment-routing-ipv6] traffic-engineering

[Sysname-srv6-te] policy a1

[Sysname-srv6-te-policy-a1] candidate-paths

[Sysname-srv6-te-policy-a1-path] preference 20

[Sysname-srv6-te-policy-a1-path-pref20]

reset segment-routing ipv6 te forwarding statistics

Use reset segment-routing ipv6 te forwarding statistics to clear forwarding statistics for all SRv6-TE policies.

Syntax

reset segment-routing ipv6 te forwarding statistics

Views

User view

Predefined user roles

network-admin

mdc-admin

Examples

# Clear SRv6-TE policy forwarding statistics.

<Sysname> reset segment-routing ipv6 te forwarding statistics

Related commands

display segment-routing ipv6 te forwarding

forwarding statistics

srv6-policy forwarding statistics enable

srv6-policy forwarding statistics interval

router-id filter

Use router-id filter to enable Router ID filtering.

Use undo router-id filter to disable Router ID filtering.

Syntax

router-id filter

undo router-id filter

Default

Router ID filtering is disabled.

Views

BGP IPv6 SR policy address family.

Predefined user roles

network-admin

mdc-admin

Usage guidelines

For the device to process only part of the received SRv6-TE policy routes, you can execute this command to enable filtering the routes by Router ID.

This command enables the device to check the Route Target attribute of a received SRv6-TE policy route. The device accepts the route only if the Route Target attribute contains the Router ID of the local device.

To use Router ID filtering, make sure you add Route Target attributes to SRv6-TE policy routes properly by using routing policy or other methods. Otherwise, Router ID filtering might learn or drop SRv6-TE policy routes incorrectly.

Examples

# Enable Router ID filtering.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp-default] address ipv6 sr-policy

[Sysname-bgp-default-srpolicy-ipv6] router-id filter

segment-list

Use segment-list to create a SID list and enter its view, or enter the view of an existing SID list.

Use undo segment-list to delete a SID list and all the configuration in the SID list.

Syntax

segment-list segment-list-name

undo segment-list segment-list-name

Default

No SID lists exist.

Views

SRv6 TE view

Predefined user roles

network-admin

mdc-admin

Parameters

segment-list-name: Specifies the SID list name, a case-sensitive string of 1 to 128 characters.

Examples

# Create a SID list named abc and enter its view.

<Sysname> system-view

[Sysname] segment-routing ipv6

[Sysname-segment-routing-ipv6] traffic-engineering

[Sysname-srv6-te] segment-list abc

[Sysname-srv6-te-sl-abc]

segment-routing ipv6 traffic-engineering

Use segment-routing ipv6 traffic-engineering to enable L3VPN recursion to SRv6-TE policy tunnels.

Use undo segment-routing ipv6 traffic-engineering to restore the default.

Syntax

segment-routing ipv6 traffic-engineering [ best-effort ] [ evpn ]

undo segment-routing ipv6 traffic-engineering [ best-effort ] [ evpn ]

Default

L3VPN cannot recurse to SRv6-TE policy tunnels.

Views

BGP-VPN IPv4 unicast address family

BGP-VPN IPv6 unicast address family

Predefined user roles

network-admin

mdc-admin

Parameters

best-effort: Enables the best-effort SRv6 forwarding mode. In this mode, L3VPN packets are forwarded by looking up the routing table according to the End.DT4 SID, End.DT6 SID, or End.DT46 SID of the packets in case of SRv6-TE policy failure. If you do not specify this keyword, L3VPN packets will be forwarded by looking up the routing table according to the destination IP address of the packets in case of SRv6-TE policy failure.

evpn: Enables EVPN L3VPN recursion to SRv6-TE policy tunnels. If you do not specify this keyword, the command enables MPLS L3VPN recursion to SRv6-TE policy tunnels.

Usage guidelines

This command applies to MPLS L3VPN and EVPN L3VPN networks where you want to use an SRv6-TE policy tunnel as the public tunnel to transfer the VPN traffic.

You can specify the best-effort keyword to improve packet forwarding reliability. In the SRv6 best effort mode, the device forwards L3VPN packets as follows:

1.     Forwards L3VPN packets by using an SRv6-TE policy tunnel.

2.     When the SRv6-TE policy tunnel fails, the device forwards L3VPN packets by looking up the routing table according to the End.DT4 SID, End.DT6 SID, or End.DT46 SID of the packets.

3.     If SID-based forwarding fails, the device forwards L3VPN packets by looking up the routing table according to the destination IP address of the packets.

4.     If the destination IP-based forwarding fails, the device drops the packets.

This command is mutually exclusive with the segment-routing ipv6 best-effort command.

Examples

# In BGP-VPN IPv4 unicast family view, enable L3VPN recursion to SRv6-TE policy tunnels.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp-default] ip vpn-instance vpn1

[Sysname-bgp-default-vpn1] address-family ipv4

[Sysname-bgp-default-ipv4-vpn1] segment-routing ipv6 traffic-engineering

Related commands

segment-routing ipv6 best-effort

sr-policy steering

Use sr-policy steering to configure the traffic steering mode for SRv6-TE policies.

Use undo sr-policy steering to restore the default.

Syntax

sr-policy steering [ disable | policy-based ]

undo sr-policy steering

Default

The device steering data packets to SRv6-TE policies based on colors of the packets.

Views

BGP instance view

Predefined user roles

network-admin

mdc-admin

Parameters

disable: Does not forward traffic by using SRv6-TE policies.

policy-based: Steers traffic to an SRv6-TE policy based on the tunnel policy.

Usage guidelines

The following traffic steering modes are available for SRv6-TE policies:

·     Based on color—The device searches for an SRv6-TE policy whose color and endpoint address match the color and nexthop address of a BGP route. If a matching SRv6-TE policy exists, the device recurse the BGP route to that SRv6-TE policy. Then, when the device receives packets that match the BGP route, it forwards the packets through the SRv6-TE policy.

·     Based on tunnel policy—-On the ingress PE of an MPLS L3VPN or EVPN L3VPN network, create an SRv6-TE policy with endpoint address as an End.DT4 SID, End.DT6 SID, or End.DT46 SID. Configure a preferred tunnel or load sharing tunnel policy that uses the SRv6-TE policy. In this way, the SRv6-TE policy will be used as the public tunnel to carry the packets of a VPN instance. For more information about the tunnel policy configuration, see MPLS Configuration Guide.

Examples

# Configure the SRv6-TE traffic steering mode as tunnel policy.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp-default] sr-policy steering policy-based

srv6-policy forwarding statistics enable

Use srv6-policy forwarding statistics enable to enable traffic forwarding statistics for all SRv6-TE policies.

Use undo srv6-policy forwarding statistics enable to disable traffic forwarding statistics for all SRv6-TE policies.

Syntax

srv6-policy forwarding statistics enable

undo srv6-policy forwarding statistics enable

Default

Traffic forwarding statistics is disabled for all SRv6-TE policies.

Views

SRv6 TE view

Predefined user roles

network-admin

mdc-admin

Predefined user roles

You can configure traffic forwarding statistics for all SRv6-TE policies globally in SRv6 TE view or for a specific SRv6-TE policy in SRv6-TE policy view. The policy-specific configuration takes precedence over the global configuration. An SRv6-TE policy uses the global configuration only when it has no policy-specific configuration.

Examples

# Enable traffic forwarding statistics for all SRv6-TE policies.

<Sysname> system-view

[Sysname] segment-routing ipv6

[Sysname-segment-routing-ipv6] traffic-engineering

[Sysname-srv6-te] srv6-policy forwarding statistics enable

Related commands

display segment-routing ipv6 te forwarding

forwarding statistic

reset segment-routing ipv6 te forwarding statistics

srv6-policy forwarding statistics interval

srv6-policy forwarding statistics interval

Use srv6-policy forwarding statistics interval to configure the traffic forwarding statistics interval for all SRv6-TE policies.

Use undo srv6-policy forwarding statistics interval to restore the default.

Syntax

srv6-policy forwarding statistics interval interval

undo srv6-policy forwarding statistics interval

Default

The SRv6-TE policies forwarding statistics interval is 30 seconds.

Views

SRv6 TE view

Predefined user roles

network-admin

mdc-admin

Parameters

interval: Specifies the SRv6-TE policy traffic forwarding statistics interval in the range of 5 to 65535, in seconds.

Predefined user roles

This command takes effect only all SRv6-TE policies.

Examples

# Set the SRv6-TE policy traffic forwarding statistics interval to 90 seconds.

<Sysname> system-view

[Sysname] segment-routing ipv6

[Sysname-segment-routing-ipv6] traffic-engineering

[Sysname-srv6-te] srv6-policy forwarding statistics interval 90

Related commands

display segment-routing ipv6 te forwarding

forwarding statistic

reset segment-routing ipv6 te forwarding statistics

srv6-policy forwarding statistics enable

traffic-engineering

Use traffic-engineering to create and enter the SRv6 TE view, or enter the existing SR TE view.

Use undo traffic-engineering to delete the SRv6 TE view and all the configuration in the view.

Syntax

traffic-engineering

undo traffic-engineering

Default

The SRv6 TE view does not exist.

Views

SRv6 view

Predefined user roles

network-admin

mdc-admin

Examples

# Create and enter the SRv6 TE view.

<Sysname> system-view

[Sysname] segment-routing ipv6

[Sysname-segment-routing-ipv6] traffic-engineering

[Sysname-srv6-te]

 

  • 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
新华三官网