07-Segment Routing Command Reference

HomeSupportSwitchesS12500X-AF SeriesReference GuidesCommand ReferencesH3C S12500X-AF Switch Series Command References(R3606)-6W10007-Segment Routing Command Reference
02-SR-TE policy commands
Title Size Download
02-SR-TE policy commands 154.88 KB

SR-TE policy commands

address-family ipv4 sr-policy

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

Use undo address-family ipv4 sr-policy to delete the BGP IPv4 SR-TE policy address family and all the configuration in the BGP IPv4 SR-TE policy address family.

Syntax

address-family ipv4 sr-policy

undo address-family ipv4 sr-policy

Default

The BGP IPv4 SR-TE policy address family does not exist.

Views

BGP instance view

Predefined user roles

network-admin

Usage guidelines

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

Examples

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

<Sysname> system-view

[Sysname] bgp 100

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

[Sysname-bgp-default-srpolicy-ipv4]

binding-sid

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

Use undo binding-sid to delete the BSID.

Syntax

binding-sid mpls mpls-label

undo binding-sid

Default

No BSID is configured for an SR-TE policy.

Views

SR-TE policy view

Predefined user roles

network-admin

Parameters

mpls mpls-label: Specifies the BSID value, which is an MPLS label value in the range of 16 to 1048575.

Usage guidelines

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

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

If you configure an MPLS label as the BSID but the label is not in the range of the SRGB or SRLB or is already used by a protocol, the configuration does not take effect. For more information about SRGB or SRLB, see MPLS SR configuration in Segment Routing Configuration Guide.

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

The candidate paths of the same SR-TE policy have the same BSID.

Examples

# Set the BSID of SR-TE policy srpolicy to 20.

<Sysname> system-view

[Sysname] segment-routing

[Sysname-segment-routing] traffic-engineering

[Sysname-sr-te] policy srpolicy

[Sysname-sr-te-policy-srpolicy] binding-sid mpls 20

Related commands

color end-point

candidate-paths

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

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

Syntax

candidate-paths

undo candidate-paths

Default

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

Views

SR-TE policy view

Predefined user roles

network-admin

Examples

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

<Sysname> system-view

[Sysname] segment-routing

[Sysname-segment-routing] traffic-engineering

[Sysname-sr-te] policy srpolicy

[Sysname-sr-te-policy-srpolicy] candidate-paths

[Sysname-sr-te-policy-srpolicy-path]

color end-point

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

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

Syntax

color color-value end-point ipv4 ipv4-address

undo color

Default

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

Views

SR-TE policy view

Predefined user roles

network-admin

Parameters

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

ipv4-address: Specifies the endpoint IP address.

Usage guidelines

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

Different SR-TE policies cannot have the same color and they can have the same endpoint IP address.

Examples

# Configure the color as 20 and endpoint IP address as 10.0.0.1 for SR-TE policy srpolicy.

<Sysname> system-view

[Sysname] segment-routing

[Sysname-segment-routing] traffic-engineering

[Sysname-sr-te] policy srpolicy

[Sysname-sr-te-policy-srpolicy] color 20 end-point ipv4 10.0.0.1

Related commands

binding-sid

display bgp routing-table ipv4 sr-policy

Use display bgp routing-table ipv4 sr-policy to display route information of an BGP IPv4 SR-TE policy.

Syntax

display bgp [ instance instance-name ] routing-table ipv4 sr-policy [ sr-policy-prefix [ advertise-info ] | peer ipv4-address { advertised-routes | received-routes } [ statistics ] | statistics ]

Views

Any view

Predefined user roles

network-admin

network-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 SR-TE policy route prefix, which is a case-insensitive string of 1 to 512 characters in the format of SR-TE policy route/mask length.

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

peer ipv4-address: Specifies a peer by its IP address.

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

received-routes: Displays detailed information about the BGP IPv4 SR-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 IPv4 SR-TE policy routes.

Examples

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

<Sysname> display bgp routing-table ipv4 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 : [10][1][9.9.9.9]/96

     NextHop : 2.1.1.2                                  LocPrf    : 100

     PrefVal : 0                                        OutLabel  : NULL

     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 IPv4 SR-TE policy route, comprised of the following elements:

·     SR-TE policy candidate path preference.

·     SR-TE policy color attribute value.

·     Endpoint IP address.

NextHop

Next hop IP address.

LocPrf

Local preference value.

PrefVal

Preferred value of the route.

OutLabel

Outgoing label 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 IPv4 SR-TE policy route [102][2][5.6.7.8]/96.

<Sysname> display bgp routing-table ipv4 sr-policy [102][2][5.6.7.8]/96

 

 BGP local router ID: 2.2.2.2

 Local AS number: 1

 

 Paths:   1 available, 1 best

 

 BGP routing table information of [102][2][5.6.7.8]:

 From            : 3.1.1.2 (10.11.113.29)

 Rely nexthop    : 0.0.0.0

 Original nexthop: 3.1.1.2

 Route age       : 00h33m33s

 OutLabel        : NULL

 RxPathID        : 0x0

 TxPathID        : 0x0

 AS-path         : 2

 Origin          : igp

 Attribute value : MED 0, pref-val 0

 State           : valid, external, best

 IP precedence   : N/A

 QoS local ID    : N/A

 Traffic index   : N/A

 Tunnel Encaps   : Type 15 (SR Policy)

                     Preference 20, BSID 150000,

                     Path 1, weight 1

                      SID lists: {1000} {2000} {3000}

Table 2 Command output

Field

Description

Paths

Route information:

·     available—Number of valid routes.

·     best—Number of optimal routes.

BGP routing table information of [102][2][5.6.7.8]

Information of the BGP IPv4 SR-TE policy route [102][2][5.6.7.8], where:

·     [102] is the SR-TE policy candidate path preference

·     [2] is the SR-TE policy color attribute value.

·     [5.6.7.8] is the endpoint IP 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.

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-TE 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 IPv4 SR-TE policy route [102][2][5.6.7.8]/96.

<Sysname> display bgp routing-table ipv4 sr-policy [102][2][5.6.7.8]/96 advertise-info

 

 

 BGP local router ID: 2.2.2.2

 Local AS number: 1

 

 Paths:   1 best

 

 BGP routing table information of [102][2][5.6.7.8]/96(TxPathID:0):

 Advertised to peers (2 in total):

    2.1.1.2

    3.3.3.3

Table 4 Command output

Field

Description

Paths

Number of optimal paths to reach the destination network.

BGP routing table information of [102][2][5.6.7.8]/96(TxPathID:0)

Advertisement information about the BGP IPv4 SR-TE policy route [102][2][5.6.7.8]/96. 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 IPv4 SR-TE policy routes advertised to peer 2.1.1.2.

<Sysname> display bgp routing-table ipv4 sr-policy peer 10.2.1.2 advertised-routes statistics

 

 Advertised routes total: 2

# Display statistics about the BGP IPv4 SR-TE policy routes received from peer 2.1.1.2.

<Sysname> display bgp routing-table ipv4 sr-policy peer 2.1.1.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 IPv4 SR-TE policy routes.

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

 

 Total number of routes: 3

display segment-routing te forwarding

Use display segment-routing te forwarding to display SR TE forwarding information.

Syntax

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

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

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

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

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

end-point ipv4 ip-address: Specifies the endpoint IPv4 address of an SR-TE policy.

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

Usage guidelines

To use this command to display SR TE traffic forwarding statistics, make sure SR TE traffic forwarding statistics is enabled.

Examples

# Display brief forwarding information of all SR-TE policies.

<Sysname> display segment-routing te forwarding

Total forwarding entries: 1

 

SR TE policy ID/name: 1/p3

  BSID: 2169

  SegList ID/name: 1/sl1

  NID: 0x01400003

  Outlabel: 3

  Interface: HGE1/0/1

  Nexthop: 1.1.2.2

 

  SegList ID/name: 2/sl2

  NID: 0x01400004

  Outlabel: 3

  Interface: HGE1/0/2

  Nexthop: 1.1.3.3

# Display detailed forwarding information of all SR-TE policies.

<Sysname> display segment-routing te forwarding verbose

Total forwarding entries: 1

 

SR TE policy ID/name: 1/p3

  BSID: 2169

  Inbound statistics:

   Octets: 525

   Packets: 1

   Erroneous packets: 0

   Dropped packets: 0

  SegList ID/name: 1/sl1

  NID: 0x01400003

  Outlabel: 3

  Interface: HGE1/0/1

  Nexthop: 1.1.2.2

  Path ID: 1

  Weight: 1

  Label stack: {16200, 16300, 16400, 16500}

  Outbound statistics:

   Octets: 750

   Packets: 1

   Erroneous packets: 0

   Dropped packets: 0

Table 6 Command output

Field

Description

BSID

Label value of the ingress node.

Inbound statistics

Inbound traffic statistics, that is, the traffic statistics about the BSID.

Octets

Number of forwarded bytes.

Packets

Number of forwarded packets.

Erroneous packets

Number of erroneous packets.

Dropped packets

Number of dropped packets.

SegList ID/name

SID list ID/name.

NID

NHLFE entry index

OutLabel

Outgoing label value.

Interface

Brief name of the outgoing interface.

Nexthop

Nexthop IP address.

Path ID

ID of the SR-TE policy candidate path

Weight

Weight of the path.

Label stack

Stack of labels from top to bottom.

Outbound statistics

Outbound traffic statistics, that is, the traffic statistics about the NID.

 

display segment-routing te policy

Use display segment-routing te policy to display SR-TE policy information.

Syntax

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

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

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

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

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

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

end-point ipv4 ip-address: Specifies the endpoint IPv4 address of an SR-TE policy.

Usage guidelines

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

Examples

# Display information about all SR-TE policies.

<Sysname> display segment-routing te policy

Name/ID: abc/0

 Color: 10

 Endpoint: 4.4.4.4

 BSID:

  Mode: EXPLICIT           Type: TYPE_1              Request state: SUCCESS

  Current BSID: 15000      Explicit BSID: 15000      Dynamic BSID: -

 Reference counts: 3

 Flags: A/BS

 Status: Up

 Up/Down date: 2019-08-19 14:17:36

 Candidate paths state: Configured

 Candidate paths:

  Preference : 10

   Instance ID: 0          ASN: 0          Node address: 0.0.0.0

   Peer address: 0.0.0.0

   Optimal: Y              Flags: V/A

   Explict SID list:

    ID: 1          Name: abc

    Weight: 1

Table 7 Command output

Field

Description

Name/ID

SR-TE policy name/ID.

Color

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

Endpoint

Endpoint IP address of the SR-TE policy. If the endpoint is not configured, this field displays 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_1—MPLS label.

Request state

BSID request state:

·     Failed.

·     Succeeded.

Explicit BSID

Manually configured BSID.

Dynamic BSID

Dynamically requested BSID. If the BSID is not dynamically requested, this field displays a hyphen (-).

Reference counts

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

Flags

SR-TE policy flags:

·     A—Active SR-TE policy.

·     C—Optimal SR-TE policy.

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

·     BA—Requesting BSID.

·     BS—Optimal BSID.

·     D—Deleted SR-TE policy.

·     CF—Conflicted with an existing BSID.

Status

SR-TE policy status:

·     Up—Active state.

·     Down—Inactive state.

Up/Down date

Date and time when the SR-TE policy became up or down.

Candidate paths status

Whether candidate paths are configured:

·     Configured.

·     Not configured.

Candidate paths

SR-TE policy candidate path information.

Preference

SR-TE policy candidate path preference.

Instance ID

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

ASN

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

Node address

BGP node address.

For a manually configured SR-TE policy, the node address is 0.0.0.0. For an SR-TE policy obtained from a BGP peer, the node address is the Router ID of the BGP peer.

Peer address

BGP peer address.

For a manually configured SR-TE policy, the peer address is 0.0.0.0. For an SR-TE policy obtained from a BGP peer, the peer  address is the address of the BGP peer.

Optimal

Whether the path is the optimal path:

·     Y—Yes.

·     N—No.

Flags

Flags of the SR-TE policy candidate path:

·     V—Valid candidate path.

·     A—Active candidate path.

·     None—No candidate path.

Explict SID list

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

ID

SID list index

Name

SID list name

Weight

Weight of the SID list in the candidate path.

 

display segment-routing te policy statistics

Use display segment-routing te policy statistics to display SR-TE policy statistics.

Syntax

display segment-routing te policy statistics

Views

Any view

Predefined user roles

network-admin

network-operator

Examples

# Display SR-TE policy statistics.

<Sysname> display segment-routing te policy statistics

Total policies: 4 (2 up 2 down)

    Configured: 2

    From BGP: 2 (Added 2, deleted 0)

Total candidate paths: 6

    Configured: 3

    From BGP: 3 (Added 3, delete 0)

Total SID lists: 6

    Configured: 3

    From BGP: 3

Table 8 Command output

Field

Description

Total policies

Total number of SR-TE policies:

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

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

Configured

Number of manually configured SR-TE policies.

From BGP

Number of SR-TE policies learned through BGP.

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

·     deleted—Number of BGP-deleted SR policies.

Total candidate paths

Total number of SR-TE policy candidate paths.

Total SID lists

Total number of SID lists.

display segment-routing te segment-list

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

Syntax

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

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

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

id id-value: Specifies an SR-TE SID list by its ID in the range of 1 to 4294967295.

Usage guidelines

If you do not specify the name segment-list-name or id id-value option, the command displays information about all SR-TE SID lists.

To view the IDs of SR-TE SID lists, execute the display segment-routing te policy command.

Examples

# Display information about all SR-TE SID lists.

<Sysname> display segment-routing te segment-list

 

Total SID lists: 1

 

Name/ID: s1/1

 Origin         : CLI

 Status         : Up

 Nodes          : 2

  Index: 10         Label: 17401

  Type : TYPE_1     Flags: -

 

  Index: 20         Label: 18101

  Type : TYPE_1     Flags: -

Table 9 Command output

Field

Description

Total SID lists

Total number of SID lists.

Name/ID

SID list name and ID.

Origin

Source of the SID list:

·     CLI—The SID list was configured at the CLI.

·     BGP—The SID list was from BGP configuration deployment.

·     PCE—The SID list was from PCE configuration deployment. This value is not supported in the current software version.

If there is no valid source, this field displays a hyphen (-).

Status

Status of the SID list, Down or Up.

Nodes

Number of nodes in the SID list.

Index

Index of the node.

Label

Label of the node.

Type

Type of the label. If the label is an MPLS label, this field displays TYPE_1. If the node does not have a label, this field displays None.

Flags

Flags of the node. This field always displays a hyphen (-) in the current software version.

Related commands

display segment-routing te policy

explicit segment-list

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

Use undo explicit segment-list to delete an SID list of a candidate path.

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 SR-TE policy candidate path.

Views

Candidate path preference view

Predefined user roles

network-admin

Parameters

segment-list-name: Specifies an SID list name, a 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 SR-TE policy uses the SID list specified for the highest-preference candidate path as a traffic forwarding subpath.

An SR-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 SR-TE policy candidate path with preference 20, and the set the SID list weight to 20.

<Sysname> system-view

[Sysname] segment-routing

[Sysname-segment-routing] traffic-engineering

[Sysname-sr-te] policy a1

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

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

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

Related commands

segment-list

forwarding statistics enable

Use forwarding statistics enable to enable SR TE forwarding statistics.

Use undo forwarding statistics enable to disable SR TE forwarding statistics.

Syntax

forwarding statistics enable

undo forwarding statistics enable

Default

SR TE forwarding statistics is disabled.

Views

SR TE view

Predefined user roles

network-admin

Examples

# Enable SR TE forwarding statistics.

<Sysname> system-view

[Sysname] segment-routing

[Sysname-segment-routing] traffic-engineering

[Sysname-sr-te] forwarding statistics enable

Related commands

display segment-routing te forwarding verbose

forwarding statistics interval

reset segment-routing te forwarding statistics

forwarding statistics interval

Use forwarding statistics interval to set the SR TE forwarding statistics interval.

Use undo forwarding statistics interval to restore the default.

Syntax

forwarding statistics interval interval

undo forwarding statistics interval

Default

The SR TE forwarding statistics interval is 30 seconds.

Views

SR TE view

Predefined user roles

network-admin

Parameters

Interval: Sets the SR TE forwarding statistics interval, in the range of 5 to 65535 seconds.

Examples

# Set the SR TE forwarding statistics interval to 90 seconds.

<Sysname> system-view

[Sysname] segment-routing

[Sysname-segment-routing] traffic-engineering

[Sysname-sr-te] forwarding statistics interval 90

Related commands

display segment-routing te forwarding verbose

forwarding statistics enable

reset segment-routing te forwarding statistics

import-route

Use import-route sr-policy to enable BGP to redistribute routes from the SR-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 SR-TE policy routes.

Views

BGP IPv4 SR-TE policy address family view

Predefined user roles

network-admin

Usage guidelines

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

Examples

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

<Sysname> system-view

[Sysname] bgp 100

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

[Sysname-bgp-default-srpolicy-ipv4] 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 mpls label label-value

undo index index-number

Default

No nodes exist in a SID list.

Views

SID list view

Predefined user roles

network-admin

Parameters

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

mpls label label-value: Specifies the MPLS label value of the node, in the range of 0, 3, and 16 to 1048575.

Examples

# Add a node to SID list abc, and set the node index to 1 and MPLS label to 1000.

<Sysname> system-view

[Sysname] segment-routing

[Sysname-segment-routing] traffic-engineering

[Sysname-sr-te] segment-list abc

[Sysname-sr-te-sl-abc] index 1 mpls label 1000

policy

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

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

Syntax

policy policy-name

undo policy policy-name

Default

No SR-TE policies exist.

Views

SR TE view

Predefined user roles

network-admin

Parameters

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

Examples

# Create an SR-TE policy named srpolicy and enter its view.

<Sysname> system-view

[Sysname] segment-routing

[Sysname-segment-routing] traffic-engineering

[Sysname-sr-te] policy srpolicy

[Sysname-sr-te-policy-srpolicy]

preference

Use preference to set the preference for a candidate path and enter candidate path preference view, or enter an existing candidate path preference view.

Use undo preference to delete a candidate path preference and all the configuration in the candidate path preference view.

Syntax

preference preferenc-value

undo preference preferenc-value

Default

No candidate path preferences are set.

Views

Candidate path view

Predefined user roles

network-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 SR-TE policy.

Examples

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

<Sysname> system-view

[Sysname] segment-routing

[Sysname-segment-routing] traffic-engineering

[Sysname-sr-te] policy a1

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

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

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

reset segment-routing te forwarding statistics

Use reset segment-routing te forwarding statistics to clear SR TE forwarding statistics.

Syntax

reset segment-routing te forwarding statistics

Views

User view

Predefined user roles

network-admin

Examples

# Clear SR TE forwarding statistics.

<Sysname> reset segment-routing te forwarding statistics

Related commands

display segment-routing te forwarding verbose

forwarding statistics enable

forwarding statistics interval

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

SR TE view

Predefined user roles

network-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

[Sysname-segment-routing] traffic-engineering

[Sysname-sr-te] segment-list abc

[Sysname-sr-te-sl-abc]

traffic-engineering

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

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

Syntax

traffic-engineering

undo traffic-engineering

Default

The SR TE view does not exist.

Views

Segment routing view

Predefined user roles

network-admin

Examples

# Create and enter the SR TE view.

<Sysname> system-view

[Sysname] segment-routing

[Sysname-segment-routing] traffic-engineering

[Sysname-sr-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
新华三官网