- Table of Contents
-
- 05-Layer 3—IP Routing Command Reference
- 00-Preface
- 01-Basic IP routing commands
- 02-Static routing commands
- 03-RIP commands
- 04-OSPF commands
- 05-IS-IS commands
- 06-BGP commands
- 07-Policy-based routing commands
- 08-IPv6 static routing commands
- 09-RIPng commands
- 10-OSPFv3 commands
- 11-IPv6 policy-based routing commands
- 12-Routing policy commands
- 13-DCN commands
- 14-Dual-stack PBR commands
- 15-Adaptive routing commands
- Related Documents
-
| Title | Size | Download |
|---|---|---|
| 15-Adaptive routing commands | 136.07 KB |
adaptive-routing dynamic-flow delay
adaptive-routing udp-source-ip
advertise link-quality interval
display adaptive-routing device status
display adaptive-routing flow statistics
display adaptive-routing link-quality
link-quality fluctuation-threshold
Adaptive routing commands
adaptive-routing enable
Use adaptive-routing enable to enable adaptive routing globally and enter adaptive routing view.
Use undo adaptive-routing enable to disable adaptive routing.
Syntax
adaptive-routing enable
undo adaptive-routing enable
Default
Adaptive routing is disabled globally.
Views
System view
Predefined user roles
network-admin
Usage guidelines
Application scenarios
As a network routing technology, adaptive routing enables routers to detect network-wide topology or traffic changes, and dynamically perform path selection based on the changes. This can optimize network performance, ensure packet forwarding efficiency, reduce latency, avoid congestion, and enhance the overall reliability and efficiency of the network.
Restrictions and guidelines
Use this command to enable or disable adaptive routing globally for a device. If adaptive routing is disabled globally, all adaptive routing settings cannot take effect on the device. Disabling adaptive routing globally will remove adaptive routing settings from the interfaces on the device.
Examples
# Enable adaptive routing globally and enter adaptive routing view.
<Sysname> system-view
[Sysname] adaptive-routing enable
[Sysname-adaptive-routing]
adaptive-routing detect
Use adaptive-routing detect to enable adaptive routing for an interface and advertise the local device ID to the peer device.
Use undo adaptive-routing detect to restore the default.
Syntax
adaptive-routing detect
undo adaptive-routing detect
Default
Adaptive routing is disabled for an interface.
Views
Interface view
Predefined user roles
network-admin
Usage guidelines
Application scenarios
Use this command to control ARN packet advertisement. An interface can send ARN packets only after you configure this command for it.
Operating mechanism
If you configure both the adaptive-routing detect and flexible-global-loadbalance commands, FGLB adaptive routing takes effect.
Restrictions and guidelines
This command can take effect only after you enable adaptive routing globally.
Examples
# Enable adaptive routing for interface Ten-GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface ten-gigabitethernet 1/0/1
[Sysname-Ten-GigabitEthernet1/0/1] adaptive-routing detect
adaptive-routing dynamic-flow delay
Use adaptive-routing dynamic-flow delay to configure the delay timer for the device to generate a traffic matrix dynamic flow table.
Use undo adaptive-routing dynamic-flow delay to restore the default.
Syntax
adaptive-routing dynamic-flow delay delay-value
undo adaptive-routing dynamic-flow delay
Default
The device generates a traffic matrix dynamic flow entry upon detecting congestion to guide traffic switchover.
Views
Adaptive routing view
Predefined user roles
network-admin
Parameters
delay-value: Specifies the delay timer for generating a traffic matrix dynamic flow entry, in the range of 10 to 10000 milliseconds in step of 10.
Usage guidelines
If multiple load-shared links exist between the spine and leaf devices, and only some links are congested, the device that detects the congestion generates a traffic matrix dynamic flow entry to switch the traffic to the remaining uncongested links.
This command delays generation of the traffic matrix dynamic flow entry by the device to prevent incorrect traffic switchover caused by transient link fluctuations, ensuring stable link operation and accurate data transmission.
Examples
# Configure the device to generate a traffic matrix dynamic flow entry with a 100-millisecond delay.
<Sysname> system-view
[Sysname] adaptive-routing enable
[Sysname-adaptive-routing] adaptive-routing dynamic-flow delay 100
adaptive-routing interval
Use adaptive-routing interval to configure the ARN packet sending interval.
Use undo adaptive-routing interval to restore the default.
Syntax
adaptive-routing interval interval-value
undo adaptive-routing interval
Default
The ARN packet sending interval is 500 milliseconds.
Views
Adaptive routing view
Predefined user roles
network-admin
Parameters
interval-value: Specifies an ARN packet sending interval in milliseconds, an integer in the range of 100 to 10000 and in steps of 100.
Usage guidelines
Adaptive routing requires the peer end to acknowledge the sent ARN packets (LS and CHG packets). If no acknowledgment packets are received, the device will retransmit the ARN packets at the specified intervals.
Examples
# Configure the ARN packet sending interval as 200 milliseconds.
<Sysname> system-view
[Sysname] adaptive-routing enable
[Sysname-adaptive-routing] adaptive-routing interval 200
adaptive-routing udp-port
Use adaptive-routing udp-port to configure the source and destination UDP port numbers for ARN packets.
Use undo adaptive-routing udp-port to restore the default.
Syntax
adaptive-routing udp-port port-number
undo adaptive-routing udp-port
Default
The source and destination UDP port numbers for ARN packets are both 4780.
Views
Adaptive routing view
Predefined user roles
network-admin
Parameters
port-number: Specifies a port number in the range 1024 to 50000.
Usage guidelines
You must specify the UDP port numbers as the same value for the devices that receive and send ARN packets.
Examples
# Configure the source and destination UDP port numbers for ARN packets as 4955.
<Sysname> system-view
[Sysname] adaptive-routing enable
[Sysname-adaptive-routing] adaptive-routing udp-port 4955
adaptive-routing udp-source-ip
Use adaptive-routing udp-source-ip to configure the source IPv4 address for ARN packets.
Use undo adaptive-routing udp-source-ip to restore the default.
Syntax
adaptive-routing udp-source-ip ipv4-address
undo adaptive-routing udp-source-ip
Default
The source IPv4 address for ARN packets is 1.1.1.1.
Views
Adaptive routing view
Predefined user roles
network-admin
Parameters
ipv4-address: Specifies the source IPv4 address of ARN packets.
Examples
# Configure the source IPv4 address for ARN packets as 2.2.2.2.
<Sysname> system-view
[Sysname] adaptive-routing enable
[Sysname-adaptive-routing] adaptive-routing udp-source-ip 2.2.2.2
advertise link-quality interval
Use advertise link-quality interval to configure the intervals for sending ARN packets for link quality advertisement.
Use undo advertise link-quality interval to restore the default.
Syntax
advertise link-quality interval interval-value
undo advertise link-quality interval
Default
ARN packets for link quality advertisement are sent every 5 seconds.
Views
Adaptive routing view
Predefined user roles
network-admin
Parameters
interval-value: Specifies a sending interval in the range of 1 to 60 seconds.
Usage guidelines
With FGLB adaptive routing enabled, the spine device periodically collects quality of the link to each leaf device, and generates ARN packets for link quality advertisement to each leaf device. Use this command to control the sending interval for ARN packets used for link quality advertisement.
Examples
# Configure the intervals for sending ARN packets for link quality advertisement as 2 seconds.
<Sysname> system-view
[Sysname] adaptive-routing enable
[Sysname-adaptive-routing] advertise link-quality interval 2
Related commands
flexible-global-loadbalance
bandwidth high-threshold
Use bandwidth high-threshold to configure the upper threshold for the bandwidth usage level.
Use undo bandwidth high-threshold to restore the default.
Syntax
bandwidth high-threshold high-threshold-value
undo bandwidth high-threshold
Default
The upper threshold for the bandwidth usage level is 1.
Views
Adaptive routing view
Predefined user roles
network-admin
Parameters
high-threshold-value: Specifies the upper threshold for the bandwidth usage level, in the range of 1 to 7.
Usage guidelines
Application scenarios
This command is used in the FGLB adaptive routing network to calculate the link quality threshold. A spine device determines whether to perform traffic switchover during traffic congestion based on the link quality threshold. The device calculates a link quality threshold based on the settings in the bandwidth high-threshold, buffer high-threshold, and link-quality weight commands, and then compares the threshold with the link quality values collected on each link. When multiple load-shared links exist between the spine and leaf devices, and some of these links experience traffic congestion (determined automatically by the device), the device generates a traffic matrix dynamic flow table to switch traffic to the remaining non-congested links. The link quality value of the target link for traffic switchover cannot exceed the link quality threshold. If this condition is not met, the device does not switch traffic to that link. If only one link exists between the spine and leaf devices, or the link quality values of all links connected to the leaf devices from the spine device exceed the threshold, the spine device triggers the sending of CF packets to notify the originating leaf device of the traffic to switch traffic to another spine device. Upon receiving the CF packet, the leaf device generates a dynamic flow entry to another spine device for the traffic. Similarly, make sure the link quality value of the target link for traffic switchover does not exceed the link quality threshold. If this condition is not met, the device does not switch traffic to that link.
Operating mechanism
Bandwidth usage refers to the ratio of the used bandwidth of a specific link to the maximum bandwidth supported by that link. FGLB adaptive routing provides seven levels of bandwidth usage through algorithms. The larger the upper threshold for bandwidth usage, the more the device can "tolerate" high bandwidth usage. This indicates that the link quality value exceeds the link quality threshold only when more bandwidth is occupied.
The device calculates the link quality threshold through a comprehensive evaluation of the upper thresholds of both the bandwidth usage and queue depth levels. Changes to a single parameter threshold do not result in a linear change in the link quality threshold calculation result, but indicate a fixed trend: Higher thresholds will always lead to greater link quality threshold value, while lower thresholds will always lead to smaller link quality threshold value.
Examples
# Configure the upper threshold for the bandwidth usage level as 7.
<Sysname> system-view
[Sysname] adaptive-routing enable
[Sysname-adaptive-routing] bandwidth high-threshold 7
buffer high-threshold
Use buffer high-threshold to configure the upper threshold for the queue depth level.
Use undo buffer high-threshold to restore the default.
Syntax
buffer high-threshold high-threshold-value
undo buffer high-threshold
Default
The upper threshold for the queue depth level is 1.
Views
Adaptive routing view
Predefined user roles
network-admin
Parameters
high-threshold-value: Specifies the upper threshold for the queue depth level, an integer in the range of 1 to 7.
Usage guidelines
Application scenarios
This command is used in the FGLB adaptive routing network to calculate the link quality threshold. A spine device determines whether to perform traffic switchover during traffic congestion based on the link quality threshold. The device calculates a link quality threshold based on the settings in the bandwidth high-threshold, buffer high-threshold, and link-quality weight commands, and then compares the threshold with the link quality values collected on each link. When multiple load-shared links exist between the spine and leaf devices, and some of these links experience traffic congestion (determined automatically by the device), the device generates a traffic matrix dynamic flow table to switch traffic to the remaining non-congested links. The link quality value of the target link for traffic switchover cannot exceed the link quality threshold. If this condition is not met, the device does not switch traffic to that link. If only one link exists between the spine and leaf devices, or the link quality values of all links connected to the leaf devices from the spine device exceed the threshold, the spine device triggers the sending of CF packets to notify the originating leaf device of the traffic to switch traffic to another spine device. Upon receiving the CF packet, the leaf device generates a dynamic flow entry to another spine device for the traffic. Similarly, make sure the link quality value of the target link for traffic switchover does not exceed the link quality threshold. If this condition is not met, the device does not switch traffic to that link.
Operating mechanism
Queue depth refers to the number of data packets waiting in the buffer queue. FGLB adaptive routing provides seven levels of queue depth through algorithms. The larger the upper threshold for queue depth, the more the device can "tolerate" higher queue depth. This indicates that the link quality value exceeds the link quality threshold only when more data packets are waiting in the buffer queue.
The device calculates the link quality threshold through a comprehensive evaluation of the upper thresholds of both the bandwidth usage and queue depth levels. Changes to a single parameter threshold do not result in a linear change in the link quality threshold calculation result, but indicate a fixed trend: Higher thresholds will always lead to greater link quality threshold value, while lower thresholds will always lead to smaller link quality threshold value.
Examples
# Configure the upper threshold for the queue depth level as 7.
<Sysname> system-view
[Sysname] adaptive-routing enable
[Sysname-adaptive-routing] buffer high-threshold 7
display adaptive-routing device status
Use display adaptive-routing device status to display device ID-to-interface mapping information.
Syntax
display adaptive-routing device status [ device-id ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
device-id: Specifies a device by its device ID. If you do not specify this argument, the command displays information about all device ID-to-interface mappings.
Examples
# Display device ID-to-interface mapping information.
<Sysname> display adaptive-routing device status
Local Device Id: 3.3.3.3
Device ID: 1.1.1.1
Interface Status
GigabitEthernet1/0/1 Up
Device ID: 2.2.2.2
Interface Status
GigabitEthernet1/0/2 Up
Table 1 Command output
|
Field |
Description |
|
Device ID |
Device ID. |
|
Interface |
Name of the interface that receives the ARP packets carrying the specified device ID. |
|
Status |
Interface state. |
display adaptive-routing flow
Use display adaptive-routing flow to display information about the flow table on the device.
Syntax
display adaptive-routing flow ipv4
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
ipv4: Displays information about the IPv4 flow table.
Examples
# Display information about the flow table on the device.
<Sysname> display adaptive-routing flow ipv4
Local device ID: 3.3.3.3
SIP : 192.168.1.1
DIP : 192.168.2.2
SrcPort : 20
DstPort : 30
Protocol : 17
VNI : -
VLAN : -
VPN instance : -
Out interface name : XGE1/0/1
Out interface index : 50
Nexthop address : 10.1.1.2
Nexthop device ID : 2.2.2.2
Remote device ID : 4.4.4.4
Table 2 Command output
|
Field |
Description |
|
Local device ID |
Local device ID. |
|
SIP |
Source IP address. |
|
DIP |
Destination IP address. |
|
SrcPort |
Source port number. |
|
DstPort |
Destination port number. |
|
Protocol |
Protocol type. |
|
VNI |
VXLAN ID. This field displays a hyphen (-) if no VXLAN ID is available. |
|
VLAN |
VLAN ID. This field displays a hyphen (-) if no VLAN ID is available. |
|
VPN instance |
VPN instance name. |
|
Out interface name |
Output interface name. |
|
Out interface index |
Output interface index number. |
|
Nexthop address |
Next hop IP address. |
|
Nexthop device ID |
Device ID of the next hop, that is, device ID of the spine device. |
|
Remote device ID |
Device ID of the remote device corresponding to the next hop, that is, device ID of the remote leaf device. |
display adaptive-routing flow statistics
Use display adaptive-routing flow statistics to display statistics of the flow table on the device.
Syntax
display adaptive-routing flow statistics
Views
Any view
Predefined user roles
network-admin
network-operator
Examples
# Display statistics of the flow table on the device.
<Sysname> display adaptive-routing flow statistics
Local device ID: 3.3.3.3
--------------------------------------------------------------------------------
Active Aged
(Flows) (Flows)
--------------------------------------------------------------------------------
IPv4 4 0
Table 3 Command output
|
Field |
Description |
|
Local device ID |
Local device ID. |
|
Active (Flows) |
Number of active flows. |
|
Aged (Flows) |
Number of aged flows. |
display adaptive-routing link-quality
Use display adaptive-routing link-quality to display the link quality values collected by the device.
Syntax
display adaptive-routing link-quality [ device-id ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
device-id: Displays link quality values collected from a device specified by its ID. If you do not specify this argument, the command displays link quality values collected from all devices.
Examples
# Display the link quality values collected from all devices.
<Sysname> display adaptive-routing link-quality
Local device ID: 3.3.3.3
Device ID: 1.1.1.1
Interface LinkQuality
GigabitEthernet1/0/1 10
GigabitEthernet1/0/2 15
Remote Device ID: LinkQuality
4.4.4.4 20
Device ID: 2.2.2.2
Interface LinkQuality
GigabitEthernet1/0/3 10
Table 4 Command output
|
Field |
Description |
|
Local device ID |
Local device ID. |
|
Device ID |
Device ID of the spine device. |
|
Interface |
Name of the interface from which link quality information is received. |
|
LinkQuality |
Link quality values of the local output interfaces, or the link quality values advertised by the remote leaf devices and forwarded by the spine device. Value 4294967295 indicates an invalid value. |
|
Remote Device ID |
Received device ID of the remote leaf device forwarded by the spine device. |
extcommunity-type device-id
Use extcommunity-type device-id to configure the type value for the device ID extended community attribute.
Use undo extcommunity-type device-id to restore the default.
Syntax
extcommunity-type device-id device-type-value
undo extcommunity-type device-id
Default
The type value for the device ID extended community attribute is 84ef in hexadecimal format.
Views
BGP instance view
Predefined user roles
network-admin
Parameters
device-type-value: Specifies the type value for the device ID extended community attribute, a hexadecimal number in the range of 0 to ffff.
Usage guidelines
The device ID extended community attribute is an H3C-proprietary attribute. For interoperability purposes, you can use this command to change the type value for the device ID extended community attribute to a value that can be identified by other vendors.
Examples
# Configure the type value for the device ID extended community attribute as 0x5688.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] extcommunity-type device-id 5688
flexible-global-loadbalance
Use flexible-global-loadbalance to enable FGLB adaptive routing globally.
Use undo flexible-global-loadbalance to disable FGLB adaptive routing globally.
Syntax
flexible-global-loadbalance [ ls-advertise ]
undo flexible-global-loadbalance
Default
FGLB adaptive routing is disabled.
Views
Adaptive routing view
Predefined user roles
network-admin
Parameters
ls-advertise: Enables the device to collect quality information for the link to the peer device and advertise the information to other devices. If you do not specify this keyword, the device cannot forward collected link quality information. In the FGLB adaptive routing architecture, you must specify this keyword on the spine devices. You do not need to specify this keyword on the leaf devices.
Usage guidelines
Examples
# Enable FGLB adaptive routing globally to process link state information.
<Sysname> system-view
[Sysname] adaptive-routing enable
[Sysname-adaptive-routing] flexible-global-loadbalance
Related commands
adaptive-routing enable
adaptive-routing detect
adaptive-routing interval
peer advertise device-id
link-quality fluctuation-threshold
Use link-quality fluctuation-threshold to configure the report threshold for local link quality fluctuations.
Use undo link-quality fluctuation-threshold to remove the configuration.
Syntax
link-quality fluctuation-threshold threshold-value
undo link-quality fluctuation-threshold
Default
The report threshold for local link quality fluctuations is 10%.
Views
Adaptive routing view
Predefined user roles
network-admin
Parameters
threshold-value: Specifies the report threshold for link quality fluctuations. When the percentage change in link quality value of the local interface exceeds the specified threshold, the device driver immediately reports the most recent link quality value to the adaptive routing module. The value range for this argument is 1 to 100, in percentage.
Usage guidelines
Application scenarios
In an adaptive routing network, traffic path switchover decisions are made based on calculated link quality values. By default, the device driver reports the link quality value of the local interface to the adaptive routing module at fixed intervals. In dynamic network environments, link quality values might change frequently. If the values are not updated in time, the calculation results of the adaptive routing module might be different from the actual link conditions, resulting in traffic path switchover errors.
Operating mechanism
To address the previous issues, the device introduced a real-time local link quality report and update mechanism. When the percentage change in the link quality value of the local interface exceeds the report threshold specified in this command, the device driver immediately reports the most recent link quality value to the adaptive routing module. This mechanism ensures that the adaptive routing module can perform correct calculations based on current link conditions, enhancing the stability and accuracy of traffic path switchover.
Examples
# Configure the report threshold for local link quality fluctuations as 20%.
[Sysname] adaptive-routing enable
[Sysname-adaptive-routing] link-quality fluctuation-threshold 20
link-quality weight
Use link-quality weight to configure the calculation weights for the link quality parameters.
Use undo link-quality weight to remove the configuration.
Syntax
link-quality weight { bandwidth bandwidth-weight | buffer buffer-weight } *
undo link-quality weight [ bandwidth | buffer ]
Default
The bandwidth usage and queue depth calculation weights are both 100.
Views
Adaptive routing view
Predefined user roles
network-admin
Parameters
bandwidth bandwidth-weight: Specifies the weight for the link quality calculation based on bandwidth usage, in the range of 1 to 100.
buffer buffer-weight: Specifies the weight for the link quality calculation based on queue depth, in the range of 1 to 100.
Usage guidelines
Application scenarios
This command is used in the FGLB adaptive routing network to calculate the following values:
· Link quality value—The link quality value of the local link on a device is calculated from the real-time bandwidth usage and queue depth based on the weight configured in this command. Additionally, the spine device can advertise the collected link quality values (for links to leaf devices) to leaf devices through LQ packets.
· Link quality threshold—The device determines whether to perform traffic switchover during traffic congestion based on the link quality threshold. The device calculates a link quality threshold based on the settings in the bandwidth high-threshold, buffer high-threshold, and link-quality weight commands, and then compares the threshold with the link quality values collected on each link. When multiple load-shared links exist between the spine and leaf devices, and some of these links experience traffic congestion (determined automatically by the device), the device generates a traffic matrix dynamic flow table to switch traffic to the remaining non-congested links. The link quality value of the target link for traffic switchover cannot exceed the link quality threshold. If this condition is not met, the device does not switch traffic to that link. If the spine device has only one link to the leaf device, or the link quality values of all other links connected to the leaf devices from the spine device exceed the threshold, the spine device triggers the sending of CF packets to notify the originating leaf device of the traffic to switch traffic to another spine device.
Operating mechanism
Restrictions and guidelines
When you execute the link-quality weight command, if you specify only the bandwidth bandwidth-weight option, the default value 100 applies to the buffer buffer-weight option. If you specify only the buffer buffer-weight option, the default value 100 applies to the bandwidth bandwidth-weight option.
When you execute the undo link-quality weight command, if you specify the bandwidth bandwidth-weight or buffer buffer-weight option, the command sets the weight for the specified parameter to 100.
Examples
# Configure the calculation weights for the link quality parameters.
<Sysname> system-view
[Sysname] adaptive-routing enable
[Sysname-adaptive-routing] link-quality weight bandwidth 50 buffer 50
peer advertise device-id
Use peer advertise device-id to advertise the device ID extended community attribute to a peer or peer group.
Use undo peer advertise device-id to restore the default.
Syntax
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } advertise device-id
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } advertise device-id
Default
BGP does not advertise the device ID extended community attribute to a peer or peer group.
Views
BGP IPv4 unicast address family view
BGP IPv6 unicast address family view
Predefined user roles
network-admin
Parameters
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet, this command applies to all dynamic peers in the subnet.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet, this command applies to all dynamic peers in the subnet.
Usage guidelines
Application scenarios
Adaptive routing requires advertising the device ID extended community attribute in BGP routes to implement fast path switchover.
Operating mechanism
The device can advertise the device ID extended community attribute in BGP routes only when the peer advertise-ext-community command is configured. The device ID is the global router ID configured for the local device.
Restrictions and guidelines
If a device does not support advertising the device ID extended community attribute, the device cannot process the device ID extended community attribute in received BGP routes. In addition, the device cannot carry the device ID extended community attribute when forwarding the BGP routes.
The device ID extended community attribute is an H3C-proprietary attribute. For interoperability purposes, you can use extcommunity-type device-id command to change the type value for the device ID extended community attribute to a value that can be identified by other vendors.
Examples
# In BGP IPv4 unicast address family view, enable BGP to advertise the device ID extended community attribute to the peer 1.1.1.1.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family ipv4 unicast
[Sysname-bgp-default-ipv4] peer 1.1.1.1 advertise device-id
