08-Segment Routing Command Reference

HomeSupportSwitchesS12500R SeriesReference GuidesCommand ReferencesH3C S12500R Switch Router Series Command References(R51xx)-6W10108-Segment Routing Command Reference
02-SR-MPLS TE policy commands
Title Size Download
02-SR-MPLS TE policy commands 242.47 KB

SR-MPLS TE policy commands

address-family ipv4 sr-policy

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

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

Syntax

address-family ipv4 sr-policy

undo address-family ipv4 sr-policy

Default

The BGP IPv4 SR policy address family does not exist.

Views

BGP instance view

Predefined user roles

network-admin

Usage guidelines

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

Examples

# In BGP instance view, create the BGP IPv4 SR 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]

backup hot-standby

Use backup hot-standby to configure hot standby for an SR-MPLS TE policy.

Use undo backup hot-standby to restore the default.

Syntax

backup hot-standby { disable | enable }

undo backup hot-standby

Default

Hot standby is not configured for an SR-MPLS TE policy.

Views

SR-MPLS TE policy view

Predefined user roles

network-admin

Parameters

disable: Disables hot standby for the SR-MPLS TE policy.

enable: Enables hot standby for the SR-MPLS TE policy.

Usage guidelines

The hot standby feature takes the candidate path with the greatest preference value in the SR-MPLS TE policy as the primary path and that with the second greatest preference value as the standby path. When the forwarding paths corresponding to all SID lists of the primary path fails, the standby path immediately takes over to minimize service interruption.

You can enable hot standby for all SR-MPLS TE policies globally in SR TE view or for a specific SR-MPLS TE policy in SR-MPLS TE policy view. The policy-specific configuration takes precedence over the global configuration. An SR-MPLS TE policy uses the global configuration only when it has no policy-specific configuration.

Examples

# Enable hot standby for SR-MPLS TE policy 1.

<Sysname> system-view

[Sysname] segment-routing

[Sysname-segment-routing] traffic-engineering

[Sysname-sr-te] policy 1

[Sysname-sr-te-policy-1] backup hot-standby enable

Related commands

sr-policy backup hot-standby enable

best-effort default

Use best-effort default to enable SR-BE forwarding for packets that do not match a color-to-DSCP mapping.

Use undo best-effort default to restore the default.

Syntax

best-effort { ipv4 | ipv6 } default

undo best-effort { ipv4 | ipv6 } default

Default

The device does not perform SR-BE forwarding for packets that do not match a color-to-DSCP mapping.

Views

SR-MPLS TE policy group view

Predefined user roles

network-admin

parameters

ipv4: Enables SR-BE forwarding for IPv4 packets that do not match a color-to-DSCP mapping.

ipv6: Enables SR-BE forwarding for IPv6 packets that do not match a color-to-DSCP mapping.

Usage guidelines

Segment Routing Best Effort (SR-BE) uses IGP to calculate the optimal SRLSP to the destination by using the shortest path first algorithm. In networks that use DSCP-based traffic steering, you can execute this command to enable SR-BE forwarding for packets that do not match a color-to-DSCP mapping.

When the device receives a packet of an IPv4 or IPv6 address family that does not match a color-to-DSCP mapping, it forwards the packet as follows:

·     If a default SR-MPLS TE policy is specified in the address family and the SR-MPLS TE policy is valid, the device uses this SR-MPLS TE policy to forward the packet.

·     If SR-BE is enabled for packets that do not match a color-to-DSCP mapping in the address family and SR-BE is valid, the device uses SR-BE to forward the packet.

·     If a default SR-MPLS TE policy is specified in the other address family and the SR-MPLS TE policy is valid, the device uses this SR-MPLS TE policy to forward the packet.

·     If SR-BE is enabled for packets that do not match a color-to-DSCP mapping in the other address family and SR-BE is valid, the device uses SR-BE to forward the packet.

·     If color-to-DSCP mappings exist in the address family, and the SR-MPLS TE policy mapped to the smallest DSCP value is valid, the device uses this SR-MPLS TE policy to forward the packet.

·     If color-to-DSCP mappings exist in the other address family, and the SR-MPLS TE policy mapped to the smallest DSCP value is valid, the device uses this SR-MPLS TE policy to forward the packet.

Examples

# Enable SR-BE forwarding for IPv4 packets that do not match a color-to-DSCP mapping in SR-MPLS TE policy group 10.

<Sysname> system-view

[Sysname] segment-routing

[Sysname-segment-routing] traffic-engineering

[Sysname-sr-te] policy-group 10

[Sysname-sr-te-policy-group-10] best-effort ipv4 default

Related commands

color match dscp

bfd echo

Use bfd echo to configure echo-mode BFD for an SR-MPLS TE policy.

Use undo bfd echo to restore the default.

 

 

NOTE:

This command is available in Release R5111 and later.

 

Syntax

bfd echo { disable | enable [ source-ip ipv4-address ] [ template template-name ] [ backup-template backup-template-name ] }

undo bfd echo

Default

Echo-mode BFD is not configured for the SR-MPLS TE policy. The configuration in SR TE view applies.

Views

SR-MPLS TE policy view

Predefined user roles

network-admin

Parameters

disable: Disables echo-mode BFD for the SR-MPLS TE policy.

enable: Enables echo-mode BFD for the SR-MPLS TE policy.

source-ip ipv4-address: Specifies the source IP address of the BFD session. If you do not specify this option, the configuration in SR TE view applies.

template template-name: Specifies a BFD template by its name, a case-sensitive string of 1 to 63 characters. If you do not specify this option, the template specified in SR TE view applies.

backup-template backup-template-name: Specifies a BFD template for the backup SID list. The backup-template-name argument indicates the template name, a case-sensitive string of 1 to 63 characters. If you do not specify this option, the template specified by the template template-name option applies. If neither the template template-name or the backup-template backup-template-name option is specified, the template specified in SR TE view applies.

Usage guidelines

You can enable echo-mode BFD for all SR-MPLS TE policies globally in SR TE view or for a specific SR-MPLS TE policy in SR-MPLS TE policy view. The policy-specific configuration takes precedence over the global configuration. An SR-MPLS TE policy uses the global configuration only when it has no policy-specific configuration.

If you do not specify the source-ip keyword, you must enable echo-mode BFD for the SR-MPLS TE policy in SR TE view for successful establishment of the BFD session.

You can detect an SR-MPLS TE policy by configuring the bfd echo or sbfd command. If both commands are configured, only the sbfd command takes effect.

If you execute the source-ip command but do not execute the bfd echo-source-ip command in system view, the IP address specified with the source-ip keyword is used as both the source and destination IP addresses of BFD echo packets. To avoid network congestion due to large numbers of ICMP redirect packets sent from the peer, make sure the IP address specified for the bfd echo-source-ip command in system view does not belong to the subnets attached to any local interfaces.

For successful BFD session establishment, make sure the specified source IP address is reachable on the remote device.

Examples

# Enable echo-mode BFD for SR-MPLS TE policy 1 and specify the source IP address for the BFD session as 1.2.3.4.

<Sysname> system-view

[Sysname] segment-routing

[Sysname-segment-routing] traffic-engineering

[Sysname-sr-te] policy 1

[Sysname-sr-te-policy-1] bfd echo enable source-ip 1.2.3.4

Related commands

bfd echo-source-ip (High Availability Command Reference)

display segment-routing te bfd

sr-policy bfd echo

binding-sid

Use binding-sid to configure an BSID for an SR-MPLS 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-MPLS TE policy.

Views

SR-MPLS 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-MPLS TE policy or leave the SR-MPLS TE policy to obtain a BSID automatically. If an SR-MPLS TE policy has only color and endpoint configuration, the SR-MPLS 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 SR-MPLS 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-MPLS TE policy have the same BSID.

Examples

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

<Sysname> system-view

[Sysname] segment-routing

[Sysname-segment-routing] traffic-engineering

[Sysname-sr-te] policy srpolicy

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

Related commands

color end-point

candidate-paths

Use candidate-paths to create and enter the candidate path view for an SR-MPLS 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-MPLS TE policy does not exist.

Views

SR-MPLS TE policy view

Predefined user roles

network-admin

Examples

# Create the SR-MPLS 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-MPLS TE policy.

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

Syntax

color color-value end-point ipv4 ipv4-address

undo color

Default

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

Views

SR-MPLS 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 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-MPLS 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

color match dscp

Use color match dscp to create color-to-DSCP mappings for an SR-MPLS TE policy group.

Use undo color match dscp to delete color-to-DSCP mappings for the SR-MPLS TE policy group.

Syntax

color color-value match dscp { ipv4 | ipv6 } dscp-value-list

undo color color-value match dscp { ipv4 | ipv6 } dscp-value-list

color color-value match dscp { ipv4 | ipv6 } default

undo color color-value match dscp { ipv4 | ipv6 } [ default ]

Default

No color-to-DSCP mappings are created for an SR-MPLS TE policy group.

Views

SR-MPLS TE policy group view

Predefined user roles

network-admin

Parameters

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

ipv4: Specifies DSCP values of IPv4 packets.

ipv6: Specifies DSCP values of IPv6 packets.

dscp-value-list: Specifies a space-separated list of up to 32 DSCP value items. Each item specifies a DSCP value in the range of 0 to 63 or a range of DSCP values in the form of dscp-value1 to dscp-value2. The value for the dscp-value2 argument must be greater than the value for the dscp-value1 argument.

default: Specifies a default color-to-DSCP mapping. Packets that do not match any mappings are steered to the default SR-MPLS TE policy for forwarding.

Usage guidelines

You can map the color values of only valid SR-MPLS TE policies to DSCP values.

You can configure color-to-DSCP mappings separately for the IPv4 address family and IPv6 address family. For a specific address family, a DSCP value can be mapped to only one color value.

Use the color match dscp default command to specify the default SR-MPLS TE policy for an address family. If no SR-MPLS TE policy in an SR-MPLS TE policy group matches a specific DSCP value, the default SR-MPLS TE policy is used to forward packets containing the DSCP value. Only one default SR-MPLS TE policy can be specified for an address family.

When the device receives a packet of an IPv4 or IPv6 address family that does not match a color-to-DSCP mapping, it forwards the packet as follows:

·     If a default SR-MPLS TE policy is specified in the address family and the SR-MPLS TE policy is valid, the device uses this SR-MPLS TE policy to forward the packet.

·     If SR-BE is enabled for packets that do not match a color-to-DSCP mapping in the address family and SR-BE is valid, the device uses SR-BE to forward the packet.

·     If a default SR-MPLS TE policy is specified in the other address family and the SR-MPLS TE policy is valid, the device uses this SR-MPLS TE policy to forward the packet.

·     If SR-BE is enabled for packets that do not match a color-to-DSCP mapping in the other address family and SR-BE is valid, the device uses SR-BE to forward the packet.

·     If color-to-DSCP mappings exist in the address family, and the SR-MPLS TE policy mapped to the smallest DSCP value is valid, the device uses this SR-MPLS TE policy to forward the packet.

·     If color-to-DSCP mappings exist in the other address family, and the SR-MPLS TE policy mapped to the smallest DSCP value is valid, the device uses this SR-MPLS TE policy to forward the packet.

Examples

# Map DSCP value 30 to color value 20 for SR-MPLS TE policy group 10 so that IPv4 packets with a matching DSCP value are steered to the associated SR-MPLS TE policy.

<Sysname> system-view

[Sysname] segment-routing

[Sysname-segment-routing] traffic-engineering

[Sysname-sr-te] policy-group 10

[Sysname-sr-te-policy-group-10] color 20 match dscp ipv4 30

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

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

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

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

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

Examples

# Display brief information about all BGP IPv4 SR 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 policy route, comprised of the following elements:

·     SR-MPLS TE policy candidate path preference.

·     SR-MPLS 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 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 encapsulation info:

    Type: 15 (SR Policy)

     Preference: 102

     Binding SID: 10485

     Path: 1

      Weight: 1

      SIDs: {3}

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 policy route [102][2][5.6.7.8], where:

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

·     [2] is the SR-MPLS 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-MPLS TE policy.

Preference

Candidate path preference.

PolicyName

SR-MPLS TE policy name.

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 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 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 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 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 policy routes.

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

 

 Total number of routes: 3

display segment-routing te bfd

Use display segment-routing te bfd to display BFD information for SR-MPLS TE policies.

Syntax

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

 

 

NOTE:

This command is available in Release R5111 and later.

 

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

down: Displays BFD information for SR-MPLS TE policies in down state.

policy: Displays BFD information for the specified SR-MPLS TE policy.

color color-value: Specifies an SR-MPLS TE policy by its color attribute value in the range of 0 to 4294967295.

end-point ipv4 ipv4-address: Specifies an SR-MPLS TE policy by its endpoint IPv4 address.

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

up: Displays BFD information for SR-MPLS TE policies in up state.

Usage guidelines

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

Examples

# Display BFD information for all SR-MPLS TE policies.

<Sysname> display segment-routing te bfd

 Color: 10

 Endpoint: 1.2.3.4

 BSID: 15000

 Policy name: p1

 State: Up

 

   NID: 2149580801

   BFD type: ECHO

   Source IP: 1.2.3.4

   State: Up

   Timer: 37

   Template name: abc

Table 6 Command output

Field

Description

Color

Color attribute value of the SR-MPLS TE policy.

Endpoint

Endpoint IPv4 address of the SR-MPLS TE policy.

BSID

SID value of the ingress node.

Policy name

Name of the SR-MPLS TE policy.

State

State of the SR-MPLS TE policy:

·     Up

·     Down

NID

Forwarding entry index for an SID list.

BFD type

BFD session mode. Only echo packet mode is supported in the current software version.

Source IP

Source IP address of the BFD session.

State

BFD session state:

·     Up

·     Down

Timer

SBFD session timer, in seconds.

Template name

BFD template name. If no BFD template is specified, this field displays a hyphen (-).

display segment-routing te forwarding

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

Syntax

display segment-routing te forwarding [ policy { name 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-MPLS TE policy. If you do not specify an SR-MPLS TE policy, this command displays SR TE forwarding information of all SR policies.

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

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

end-point ipv4 ip-address: Specifies the endpoint IPv4 address of an SR-MPLS 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-MPLS TE policies.

<Sysname> display segment-routing te forwarding

Total forwarding entries: 1

 

Policy name/ID: p1/0

 Binding SID: 15200

 Policy NID: 20971521

 Forwarding status: Active

  Main path:

   Seglist Name/ID: 1

     Seglist NID: 24117250

     Weight: 50

     Forwarding status: Active

       Outgoing NID: 23068673

         OutLabels: 3

         Interface: HGE1/0/1

         NextHop: 1.2.0.2

       Outgoing NID: 23068674

         OutLabels: 3

         Interface: HGE1/0/2

         NextHop: 1.2.1.2

  Backup path:

   Seglist Name/ID: 2/1

     Seglist NID: 24117251

     Weight: 100

     Forwarding status: Active

       Outgoing NID: 23068675

         OutLabels: 3

         Interface: HGE1/0/1

         NextHop: 1.2.0.2

       Outgoing NID: 23068676

         OutLabels: 3

         Interface: HGE1/0/2

         NextHop: 1.2.1.2

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

<Sysname> display segment-routing te forwarding verbose

Total forwarding entries: 1

 

Policy name/ID: p1/0

 Binding SID: 15200

 Policy NID: 20971521

 Forwarding status: Active

 Inbound statistics:

   Total octets: 1500

   Total packets: 1

   Erroneous packets: 0

   Dropped packets: 0

 Main path:

   Seglist Name/ID: 1/1

     Seglist NID: 24117250

     Weight: 50

     Forwarding status: Active

       Outgoing NID: 23068673

         OutLabels: 3

         Interface: HGE1/0/1

         NextHop: 1.2.0.2

         PathID: 1

         Label stack: {16300, 16400, 16500}

       Outbound statistics:

         Total octets: 750

         Total packets: 1

         Erroneous packets: 0

         Dropped packets: 0

       Outgoing NID: 23068674

         OutLabels: 3

         Interface: HGE1/0/2

         NextHop: 1.2.1.2

         PathID: 1

         Label stack: {16300, 16400, 16500}

       Outbound statistics:

         Total octets: 750

         Total packets: 1

         Erroneous packets: 0

         Dropped packets: 0

 Backup path:

   Seglist Name/ID: 2/1

     Seglist NID: 24117251

     Weight: 100

     Forwarding status: Active

       Outgoing NID: 23068675

         OutLabels: 3

         Interface: HGE1/0/1

         NextHop: 1.2.0.2

         PathID: 1

         Label stack: {16300, 16400, 16500}

       Outgoing NID: 23068676

         OutLabels: 3

         Interface: HGE1/0/2

         NextHop: 1.2.1.2

         PathID: 1

         Label stack: {16300, 16400, 16500}

Table 7 Command output

Field

Description

Policy name/ID

Name/ID of the SR-MPLS TE policy.

Binding SID

Label value of the ingress node.

Policy NID

Index of the NHLFE entry for the SR-MPLS TE policy.

Forwarding status

Forwarding status of the SR-MPLS TE policy:

·     Active—The SR-MPLS TE policy is available to forward traffic.

·     Inactive—The SR-MPLS TE policy cannot forward traffic.

Inbound statistics

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

Total octets

Total number of forwarded bytes.

Total packets

Total number of forwarded packets.

Erroneous packets

Number of erroneous packets.

Dropped packets

Number of dropped packets.

Main path

Main traffic forwarding path.

Backup path

Backup traffic forwarding path.

Seglist Name/ID

SID list name and ID.

Seglist NID

NHLFE entry index of the SID list.

Delay timer type

Type of the delay timer:

·     LSP—Timer that delays to refresh LSPs.

·     SBFD—Timer that delays to clear the SBFD DOWN bit.

Delay time

Up delay time in milliseconds.

Remaining time

Remaining delay time for the up state.

OutLabel

Outgoing label value.

If the outgoing label is invalid, this field displays a hyphen (-).

Interface

Brief name of the outgoing interface.

Nexthop

Nexthop IP address.

PathID

Path ID  assigned to the SID list by the SR-MPLS TE policy.

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-MPLS TE policy information.

Syntax

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

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

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

down: Specifies the SR policies in down state.

up: Specifies the SR policies in up state.

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

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

Usage guidelines

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

Examples

# Display information about all SR-MPLS TE policies.

<Sysname> display segment-routing te policy

Name/ID: abc/0

 Color: 10

 Endpoint: 4.4.4.4

 BgpName: <none>

 BSID:

  Mode: Explicit           Type: Type_1              Request state: Succeeded

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

 Reference counts: 3

 Flags: A/BS

 Status: Up

 Forwarding status: Active

 Up time: 2019-10-25 11:16:15

 Down time: 2019-10-25 11:16:00

 Hot-standby: Not configured

 SBFD: Not configured

 BFD echo: Not configured

 PolicyNid: 6201

 Service-class: -

 Candidate paths state: Configured

 Candidate paths statistics:

  CLI paths: 2          BGP paths: 0          PCEP paths: 0

 Candidate paths:

  Preference : 10

   CPathName: <none>

   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                 NID: 5

    State: Up                 State(-): -

Table 8 Command output

Field

Description

Name/ID

SR-MPLS TE policy name/ID.

Color

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

Endpoint

Endpoint IP address of the SR-MPLS TE policy. If the endpoint is not configured, this field displays None.

BgpName

SR-MPLS TE policy name obtained through BGP. This field diisplays <none> if the SR-MPLS TE policy name is not obtained.

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-MPLS TE policy has been referenced.

Flags

SR-MPLS TE policy flags:

·     A—Active SR-MPLS TE policy.

·     C—Optimal SR-MPLS TE policy.

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

·     BA—Requesting BSID.

·     BS—Optimal BSID.

·     D—Deleted SR-MPLS TE policy.

·     CF—Conflicted with an existing BSID.

Status

SR-MPLS TE policy status:

·     Up—Active state.

·     Down—Inactive state.

Forwarding status

Forwarding status of the SR-MPLS TE policy:

·     Active—The SR-MPLS TE policy is available to forward traffic.

·     Inactive—The SR-MPLS TE policy cannot forward traffic.

Up time

Time when the SR-MPLS TE policy came up.

Down time

Time when the SR-MPLS TE policy went down.

Hot-standby

Status of the hot standby feature: Enabled, Disabled, or Not configured.

SBFD

Status of the SBFD feature: Enabled, Disabled, or Not configured.

BFD echo

Echo packet mode BFD status for the SR-MPLS TE policy:

·     Enabled.

·     Disabled.

·     Not configured.

Source IPv4 address

Source IPv4 address of the echo packet mode BFD session.

Echo template name

Name of the echo BFD template.

Echo backup-template name

Name of the echo BFD template for the backup SID list.

PolicyNid

NHLFE entry index of the SR-MPLS TE policy.

Service-class

Service class value of the SR-MPLS TE policy. If the default service class is used, this field displays a hyphen (-).

Candidate paths status

Whether candidate paths are configured:

·     Configured.

·     Not configured.

Candidate paths statistics

Number of candidate paths.

CLI paths

Number of manually configured candidate paths.

BGP paths

Number of candidate paths obtained through BGP SR-MPLS TE policy routes.

PCEP paths

This field is not supported in the current software version.

Number of candidate paths obtained through Path Computation Element Protocol (PCEP).

Candidate paths

SR-MPLS TE policy candidate path information.

Preference

SR-MPLS TE policy candidate path preference.

CPathName

Name of the candidate path obtained through BGP routes. This field displays <none> if the candidate path name is not obtained.

Instance ID

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

ASN

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

Node address

BGP node address.

For a manually configured SR-MPLS TE policy, the node address is 0.0.0.0. For an SR-MPLS 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-MPLS TE policy, the peer address is 0.0.0.0. For an SR-MPLS 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-MPLS 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-MPLS TE policy.

ID

SID list index.

Name

SID list name.

Weight

Weight of the SID list in the candidate path.

NID

NHLFE entry index of the SID list.

State

SID list state: Up or Down.

State

Echo BFD or SBFD state of the SID list:

·     Up—The session is up.

·     Down—The session is down.

·     Path inactive—No SID list is available in the candidate path.

·     Unknown—The detection result is unknown.

·     If SBFD or echo BFD is not configured, this field displays a hyphen (-).

display segment-routing te policy statistics

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

Syntax

display segment-routing te policy statistics

Views

Any view

Predefined user roles

network-admin

network-operator

Examples

# Display SR-MPLS TE policy statistics.

<Sysname> display segment-routing te policy statistics

            TE Policy Database 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 9 Command output

Field

Description

Total policies

Total number of SR policies:

·     up—Number of SR policies in up state.

·     down—Number of SR 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 SR policies.

·     deleted—Number of BGP-deleted SR policies.

Total candidate paths

Total number of SR-MPLS TE policy candidate paths.

Total SID lists

Total number of SID lists.

display segment-routing te policy-group

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

Syntax

display segment-routing te policy-group [ group-id ] [ verbose ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

group-id: Specifies an SR-MPLS TE policy group by its ID in the range of 1 to 4294967295. If you do not specify this argument, the command displays information about all SR-MPLS TE policy groups.

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

Examples

# Display brief information about all SR-MPLS TE policy groups.

<Sysname> display segment-routing te policy-group

Total number of policy groups: 3

 

GroupID      GroupState    Endpoint          UPMappings     TotalMappings

1            Up            1.1.1.1           0              0

2            Up            2.2.2.2           0              0

3            Up            3.3.3.3           0              0

# Display detailed information about all SR-MPLS TE policy groups.

<Sysname> display segment-routing te policy-group verbose

Total number of policy groups: 1

GroupID: 1                        GroupState: Up

GroupNID: 24117249                Best-effort NID: 23068674

Referenced: 1                     Flags: None

Endpoint: 1.1.1.1                 Up/Total mappings: 1/4

IPv4 Best-effort: Configured      IPv6 Best-effort: Not configured

   Color    Type       DSCP

   1        IPv4       3, 10~20, default

   2        IPv4       30, 40, 60

   1        IPv6       3, 10~20, default

   2        IPv6       30, 40, 60

Table 10 Command output

Field

Description

Total number of policy groups

Total number of SR-MPLS TE policy groups.

GroupID

SR-MPLS TE policy group ID.

GroupState

SR-MPLS TE policy group state: Down or Up.

GroupNID

NHLFE entry index of the SR-MPLS TE policy group.

Referenced

Number of times the SR-MPLS TE policy group has been used.

Flags

SR-MPLS TE policy group flags:

·     A—Assign the NHLFE entry index of the SR-MPLS TE policy group.

·     F—Issue the NHLFE entry of the SR-MPLS TE policy group.

·     W—Waiting for assigning the NHLFE entry index of the SR-MPLS TE policy group.

·     D—Delete the SR-MPLS TE policy group.

·     None—The SR-MPLS TE policy group is in initial state.

Endpoint

Destination node IP address of the SR-MPLS TE policy group. None indicates not configured.

UPMappings

Number of valid color-to-DSCP mappings in the SR-MPLS TE policy group.

TotalMappings

Total number of color-to-DSCP mappings in the SR-MPLS TE policy group.

Up/Total mappings

Valid color-to-DSCP mappings/total number of color-to-DSCP mappings in the SR-MPLS TE policy group.

Color

Color value

Type

Packet type, which is IPv4.

DSCP

DSCP value.

end-point

Use end-point to configure the endpoint IP address for the SR-MPLS TE policy group.

Use undo end-point to delete the endpoint IP address of the SR-MPLS TE policy group.

Syntax

end-point ipv4 ipv4-address

undo end-point ipv4

Default

No endpoint IP address is configured for the SR-MPLS TE policy group.

Views

SR-MPLS TE policy group view

Predefined user roles

network-admin

Parameters

ipv4 ipv4-address: Specifies the endpoint IP address for the SR-MPLS TE policy group.

Usage guidelines

The SR-MPLS TE policies added to the SR-MPLS TE policy group must use the same endpoint IP address as the SR-MPLS TE policy group.

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

Examples

# Configure the endpoint IP address as 10.1.1.1 for SR-MPLS TE policy group 1.

<Sysname> system-view

[Sysname] segment-grouting

[Sysname-segment-grouting] traffic-engineering

[Sysname-sr-te] policy-group 1

[Sysname-sr-te-policy-group-1] end-point ipv4 10.1.1.1

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-MPLS 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-MPLS TE policy uses the SID list specified for the highest-preference candidate path as a traffic forwarding subpath.

An SR-MPLS 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-MPLS 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-pref-20] 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 sr-policy

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

Views

BGP IPv4 SR policy address family view

Predefined user roles

network-admin

Usage guidelines

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

Examples

# In BGP IPv4 SR policy address family view, enable BGP to redistribute routes from the BGP IPv4 SR 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-MPLS TE policy and enter its view, or enter the view of an existing SR-MPLS TE policy.

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

Syntax

policy policy-name

undo policy policy-name

Default

No SR policies exist.

Views

SR TE view

Predefined user roles

network-admin

Parameters

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

Examples

# Create an SR-MPLS 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]

policy-group

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

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

Syntax

policy-group group-id

undo policy-group group-id

Default

No SR-MPLS TE policy groups exist.

Views

SR TE view

Predefined user roles

network-admin

Parameters

group-name: Specifies an SR-MPLS TE policy group by its ID in the range of 1 to 4294967295.

Usage guidelines

You can add SR-MPLS TE policies to an SR-MPLS TE policy group to implement SR-MPLS TE policy based forwarding according to DSCP values of packets.

Examples

# Create SR-MPLS TE policy group 1 and enter its view.

<Sysname> system-view

[Sysname] segment-grouting

[Sysname-segment-grouting] traffic-engineering

[Sysname-sr-te] policy-group 1

[Sysname-sr-te-policy-group-1]

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 preference-value

undo preference preference-value

Default

No candidate path preferences are set.

Views

Candidate path view

Predefined user roles

network-admin

Parameters

preference-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-MPLS TE policy.

Examples

# Set the preference of an SR-MPLS 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-pref-20]

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

sbfd

Use sbfd to configure SBFD for an SR-MPLS TE policy.

Use undo sbfd to restore the default.

Syntax

sbfd { disable | enable }

undo sbfd

Default

SBFD is disabled for an SR-MPLS TE policy.

Views

SR-MPLS TE policy view

Predefined user roles

network-admin

Parameters

disable: Disables SBFD for the SR-MPLS TE policy.

enable: Enables SBFD for the SR-MPLS TE policy.

Usage guidelines

This command enables an SR-MPLS TE policy to use SBFD to detect availability of SID lists. If all SID lists for the current candidate path are faulty, another candidate path takes over to minimize service interruption.

You can enable SBFD for all SR-MPLS TE policies globally in SR TE view or for a specific SR-MPLS TE policy in SR-MPLS TE policy view. The policy-specific configuration takes precedence over the global configuration. An SR-MPLS TE policy uses the global configuration only when it has no policy-specific configuration.

To avoid SBFD session flapping, make sure the candidate paths of the SR-TE policy contain only a single path.

Examples

# Enable SBFD for SR-MPLS TE policy 1.

<Sysname> system-view

[Sysname] segment-grouting

[Sysname-segment-grouting] traffic-engineering

[Sysname-sr-te] policy 1

[Sysname-sr-te-policy-1] sbfd enable

Related commands

sr-policy sbfd enable

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]

service-class

Use service-class to set a service class value for an SR-MPLS TE policy.

Use undo service-class to restore the default.

 

 

NOTE:

This command is available in Release R5111 and later.

 

Syntax

service-class service-class-value

undo service-class

Default

No service class value is set for an SR-MPLS TE policy. An SR-MPLS TE policy uses service class 255, which has the lowest forwarding priority.

Views

SR-MPLS TE policy view

Predefined user roles

network-admin

Parameters

service-class-value: Specifies a service class value in the range of 1 to 15. The smaller the service class value, the lower the SR-MPLS TE policy forwarding priority. An SR-MPLS TE policy that is not assigned a service class value uses service class 255, which has the lowest forwarding priority.

Usage guidelines

The device compares the service class value of the traffic with the service class values of SR-MPLS TE policies and forwards the traffic to a matching tunnel. The device uses the following rules to select an SR-MPLS TE policy to forward the traffic:

·     If the traffic matches only one SR-MPLS TE policy, the device uses this SR-MPLS TE policy.

·     If the traffic matches multiple SR-MPLS TE policies, the device selects an SR-MPLS TE policy based on the flow forwarding mode:

¡     If only one flow exists and flow-based forwarding is used, the device randomly selects a matching SR-MPLS TE policy for packets of the flow.

¡     If multiple flows exist or if one flow exists but packet-based forwarding is used, the device uses all matching SR-MPLS TE policies to load share the packets.

For more information about the flow identification and load sharing mode, see the ip load-sharing mode command.

·     If the traffic does not match any SR-MPLS TE policy, the device randomly selects an SR-MPLS TE policy from all SR-MPLS TE policies with the lowest priority. (The smaller the service class value, the lower the SR-MPLS TE policy priority. An SR-MPLS TE policy that is not assigned a service class value has the lowest priority.)

To set a service class value for traffic, use the remark service-class command in traffic behavior view.

Examples

# Set the service class value to 5 for SR-MPLS TE policy.

<Sysname> system-view

[Sysname] segment-routing

[Sysname-segment-routing] traffic-engineering

[Sysname-sr-te] policy 1

[Sysname-sr-te-policy-1] service-class 5

Related commands

ip load-sharing mode (Layer 3IP Services Command Reference)

remark service-class (ACL and QoS Command Reference)

sr-policy backup hot-standby enable

Use sr-policy backup hot-standby enable to enable hot standby for all SR-MPLS TE policies.

Use undo sr-policy backup hot-standby enable to disable hot standby for all SR-MPLS TE policies.

Syntax

sr-policy backup hot-standby enable

undo sr-policy backup hot-standby enable

Default

Hot standby is disabled for all SR-MPLS TE policies.

Views

SR TE view

Predefined user roles

network-admin

Usage guidelines

The hot standby feature takes the candidate path with the greatest preference value in the SR-MPLS TE policy as the primary path and that with the second greatest preference value as the standby path. When the forwarding paths corresponding to all SID lists of the primary path fails, the standby path immediately takes over to minimize service interruption.

You can enable hot standby for all SR-MPLS TE policies globally in SR TE view or for a specific SR-MPLS TE policy in SR-MPLS TE policy view. The policy-specific configuration takes precedence over the global configuration. An SR-MPLS TE policy uses the global configuration only when it has no policy-specific configuration.

Examples

# Enable hot standby for all SR-MPLS TE policies.

<Sysname> system-view

[Sysname] segment-routing

[Sysname-segment-routing] traffic-engineering

[Sysname-sr-te] sr-policy backup hot-standby enable

Related commands

backup hot-standby

sr-policy bfd echo

Use sr-policy bfd echo to enable the echo packet mode BFD for all SR-MPLS TE policies.

Use undo sr-policy bfd echo to disable the echo packet mode BFD for all SR-MPLS TE policies.

 

 

NOTE:

This command is available in Release R5111 and later.

 

Syntax

sr-policy bfd echo source-ip ipv4-address [ template template-name ] [ backup-template backup-template-name ]

undo sr-policy bfd echo

Default

The echo packet mode BFD is disabled for all SR-MPLS TE policies.

Views

SR TE view

Predefined user roles

network-admin

Parameters

source-ip ipv4-address: Specifies the source IP address of the BFD session.

template template-name: Specifies a BFD session parameter template by its name, a case-sensitive string of 1 to 63 characters. If you do not specify this option, the BFD session uses multihop BFD session settings configured in system view.

backup-template backup-template-name e: Specifies a BFD session parameter template for the backup SID list. The backup-template-name argument indicates the template name, a case-sensitive string of 1 to 63 characters. If you do not specify this option, the BFD session uses multihop BFD session settings configured in system view.

Usage guidelines

You can configure the echo packet mode BFD for all SR-MPLS TE policies globally in SR TE view or for a specific SR-MPLS TE policy in SR-MPLS TE policy view. The policy-specific configuration takes precedence over the global configuration. An SR-MPLS TE policy uses the global configuration only when it has no policy-specific configuration.

If you do not specify the source-ip keyword in the bfd echo command for an SR-MPLS TE policy, you must enable the echo packet mode BFD globally in SR TE view. Otherwise, the device cannot establish a BFD session for the SR-MPLS TE policy.

The device supports the echo packet mode BFD and the SBFD for an SR-MPLS TE policy. If both modes are configured for the same SR-MPLS TE policy, the SBFD takes effect.

If you execute this command but do not execute the bfd echo-source-ip command in system view, the IP address specified with the source-ip keyword is used as both the source and destination IP addresses of BFD echo packets. To avoid network congestion due to large numbers of ICMP redirect packets sent from the peer, make sure the IP address specified for the bfd echo-source-ip command in system view does not belong to the subnets attached to any local interfaces.

For successful BFD session establishment, make sure the specified source IP address is reachable on the remote device.

Examples

# Enable the echo packet mode BFD for all SR-MPLS TE policies, and specify the source IP address of the BFD session as 1.2.3.4.

<Sysname> system-view

[Sysname] segment-routing

[Sysname-segment-routing] traffic-engineering

[Sysname-sr-te] sr-policy bfd echo source-ip 1.2.3.4

Related commands

bfd echo

bfd echo-source-ip (High Availability Command Reference)

display segment-routing te bfd

sr-policy log enable

Use sr-policy log enable to enable SR-MPLS TE policy logging.

Use undo sr-policy log enable to disable SR-MPLS TE policy logging.

Syntax

sr-policy log enable

undo sr-policy log enable

Default

SR-MPLS TE policy logging is disabled.

Views

SR TE view

Predefined user roles

network-admin

Usage guidelines

This feature enables the device to log SR-MPLS TE policy state changes to facilitate audit of SR-MPLS TE policy operations. The SR-MPLS TE policy log messages are sent to the information center and output as configured in the information center. For more information about information center, see Network Management and Monitoring Configuration Guide.

Examples

# Enable SR-MPLS TE policy logging.

<Sysname> system-view

[Sysname] segment-routing

[Sysname-segment-routing] traffic-engineering

[Sysname-sr-te] sr-policy log enable

sr-policy sbfd enable

Use sr-policy sbfd enable to enable SBFD for all SR-MPLS TE policies.

Use undo sr-policy sbfd enable to disable SBFD for all SR-MPLS TE policies.

Syntax

sr-policy sbfd enable

undo sr-policy sbfd enable

Default

SBFD is disabled for all SR-MPLS TE policies.

Views

SR TE view

Predefined user roles

network-admin

Usage guidelines

This command enables SR-MPLS TE policies to use SBFD to detect availability of SID lists. If all SID lists for the current candidate path are faulty, another candidate path takes over to minimize service interruption.

You can enable SBFD for all SR-MPLS TE policies globally in SR TE view or for a specific SR-MPLS TE policy in SR-MPLS TE policy view. The policy-specific configuration takes precedence over the global configuration. An SR-MPLS TE policy uses the global configuration only when it has no policy-specific configuration.

Examples

# Enable SBFD for all SR-MPLS TE policies.

<Sysname> system-view

[Sysname] segment-routing

[Sysname-segment-routing] traffic-engineering

[Sysname-sr-te] sr-policy sbfd enable

Related commands

sbfd

sr-policy up-delay

Use sr-policy up-delay to set the delay time for bringing up SR-MPLS TE policies.

Use undo sr-policy up-delay to restore the default.

Syntax

sr-policy up-delay delay-time

undo sr-policy up-delay

Default

The device does not delay bringing up SR-MPLS TE policies.

Views

SR TE view

Predefined user roles

network-admin

Parameters

delay-time: SR-MPLS TE policy-up delay time, in the range of 1 to 600000 milliseconds.

Usage guidelines

After an SR-MPLS TE policy recovers from a fault, the device waits for the delay time before bringing up the SR-MPLS TE policy. This is to ensure that the fault is completely removed so as to avoid packet loss caused by SR-MPLS TE policy flapping.

After this command is executed, the device starts different delay timers for an SR-MPLS TE policy according to the SBFD configuration for the SR-MPLS TE policy.

·     If SBFD is not enabled, the device starts an LSP delay timer when the SID list state changes from Down to Up.

·     If SBFD is enabled, the device starts an SBFD delay timer when the SBFD session state changes from Down to Up.

To view the SBFD configuration, SID list state, and SBFD session state, execute the display segment-routing te policy command.

Set a proper SR-MPLS TE policy-up delay time according to your network conditions. A very long delay time will cause an SR-MPLS TE policy to be unable to process user traffic for a long time.

You can set the delay time for all SR-MPLS TE policies globally in SR TE view or for a specific SR-MPLS TE policy in SR-MPLS TE policy view. The policy-specific configuration takes precedence over the global configuration. An SR-MPLS TE policy uses the global configuration only when it has no policy-specific configuration.

If you execute this command for multiple times, the most recent configuration takes effect. A new delay time setting does not apply to the SR-MPLS TE policies that are already in a delay process.

Examples

# Set the policy-up delay time to 10000 milliseconds for all SR-MPLS TE policies.

<Sysname> system-view

[Sysname] segment-routing

[Sysname-segment-routing] traffic-engineering

[Sysname-sr-te] sr-policy up-delay 10000

Related commands

display segment-routing te policy

up-delay

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]

up-delay

Use up-delay to set the delay time for bringing up an SR-MPLS TE policy.

Use undo up-delay to restore the default.

Syntax

up-delay delay-time

undo up-delay

Default

No policy-up delay time is set for an SR-MPLS TE policy, and the policy-up delay time set in SR TE view applies.

Views

SR-MPLS TE policy view

Predefined user roles

network-admin

Parameters

delay-time: SR-MPLS TE policy-up delay time, in the range of 1 to 600000 milliseconds.

Usage guidelines

After an SR-MPLS TE policy recovers from a fault, the device waits for the delay time before bringing up the SR-MPLS TE policy. This is to ensure that the fault is completely removed so as to avoid packet loss caused by SR-MPLS TE policy flapping.

After this command is executed, the device starts different delay timers for an SR-MPLS TE policy according to the SBFD configuration for the SR-MPLS TE policy.

·     If SBFD is not enabled, the device starts an LSP delay timer when the SID list state changes from Down to Up.

·     If SBFD is enabled, the device starts an SBFD delay timer when the SBFD session state changes from Down to Up.

To view the SBFD configuration, SID list state, and SBFD session state, execute the display segment-routing te policy command.

Set a proper SR-MPLS TE policy-up delay time according to your network conditions. A very long delay time will cause an SR-MPLS TE policy to be unable to process user traffic for a long time.

You can set the delay time for all SR-MPLS TE policies globally in SR TE view or for a specific SR-MPLS TE policy in SR-MPLS TE policy view. The policy-specific configuration takes precedence over the global configuration. An SR-MPLS TE policy uses the global configuration only when it has no policy-specific configuration.

If you execute this command for multiple times, the most recent configuration takes effect. A new delay time setting does not apply to the SR-MPLS TE policies that are already in a delay process.

Examples

# Set the policy-up delay time to 10000 milliseconds for SR-MPLS TE policy p1.

<Sysname> system-view

[Sysname] segment-routing

[Sysname-segment-routing] traffic-engineering

[Sysname-sr-te] policy p1

[Sysname-sr-te-policy-p1] up-delay 10000

Related commands

display segment-routing te policy

sr-policy up-delay

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