- Table of Contents
-
- 07-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-Guard route commands
- 13-Routing policy commands
- 14-MTR commands
- 15-DCN commands
- 16-RIR commands
- Related Documents
-
Title | Size | Download |
---|---|---|
14-MTR commands | 74.76 KB |
Contents
MTR commands
apply topology
Use apply topology to specify a topology for the MTR policy node.
Use undo apply topology to remove the configuration.
Syntax
apply topology topo-name
undo apply topology
Default
No topology is specified for the MTR policy node.
Views
MTR policy node view
Predefined user roles
network-admin
Parameters
topo-name: Specifies a topology by its name, a case-sensitive string of 1 to 31 characters.
Examples
# Specify topology topo1 for node 0 of MTR policy mtr.
<Sysname> system-view
[Sysname] mtr-policy mtr node 0
[Sysname-mtr-policy-mtr-0] apply topology topo1
display mtr-policy
Use display mtr-policy to display MTR policy information.
Syntax
display mtr-policy [ name mtr-policy-name ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
name mtr-policy-name: Specifies an MTR policy by its name, a case-sensitive string of 1 to 63 characters. If you do not specify this option, the command displays information about all MTR policies.
Examples
# Display information about all MTR policies.
MTR-policy: mtr
Node: 0
if-match ip precedence critical
if-match ip acl 3333
apply topology 1
MTR-policy: p
Node: 1
if-match ip precedence routine
if-match ip dscp cs1
if-match ip acl 3501
MTR-policy: q
Node: 0
if-match ip precedence network
if-match ip dscp ef
if-match ip acl 3001
apply topology 1
Node: 1
MTR-policy: w
Node: 0
if-match ip precedence routine
if-match ip dscp 3
Table 1 Command output
Field |
Description |
MTR-policy |
MTR policy name. |
Node |
MTR policy node. |
display topology
Use display topology to display topology information.
Syntax
display topology [ name topo-name ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
name topo-name: Specifies a topology by its name, a case-sensitive string of 1 to 31 characters. If you do not specify this option, the command displays brief information about all topologies.
Examples
# Display brief information about all topologies.
<Sysname> display topology
Total topologies : 4
Topology Address-family VRF
base IPv4 default
mt1 IPv4 default
mt2 IPv4 default
mt3 IPv4 default
# Display detailed information about topology mt1.
<Sysname> display topology name mt1
Topology Name and Index: mt1, 1
Address-family: IPv4
Interfaces: LoopBack0, GigabitEthernet1/0,
GigabitEthernet2/0, GigabitEthernet3/0,
GigabitEthernet4/0
Maximum routes limit : 100
Threshold value(%): 90
Table 2 Command output
Field |
Description |
Total topologies |
Total number of topologies. |
Topology |
Topology name. |
Address-family |
Address family to which the topology belongs. |
VRF |
VPN to which the topology belongs. |
Topology Name and Index |
Topology name and index number. |
Interfaces |
Interface with which the topology is associated. |
Maximum routes limit |
Maximum number of route prefixes supported by the topology. |
Threshold value(%) |
Warning threshold for routes supported by the topology. |
global-address-family ipv4
Use global-address-family ipv4 to create the global address family and enter its view.
Use undo global-address-family ipv4 to delete the global address family and all configurations in the view.
Syntax
global-address-family ipv4 [ unicast ]
undo global-address-family ipv4 [ unicast ]
Default
No global address family view exists.
Views
System view
Predefined user roles
network-admin
Parameters
unicast: Specifies the IPv4 unicast address family. If you do not specify this keyword, the command also specifies the IPv4 unicast address family.
Usage guidelines
Before you configure MTR, enter global address family view by using this command.
Examples
# Enter global address family view.
[Sysname] global-address-family ipv4 unicast
[Sysname-af]
if-match ip acl
Use if-match ip acl to configure an ACL match criterion.
Use undo if-match ip acl to restore the default.
Syntax
if-match ip acl acl-number
undo if-match ip acl
Default
No ACL match criterion is configured.
Views
MTR policy node view
Predefined user roles
network-admin
Parameters
acl-number: Specifies an advanced ACL by its number in the range of 3000 to 3999.
Usage guidelines
You can configure the ACL, DSCP, and IP precedence match criteria for an MTR node at the same time. The match criteria are in an OR relationship. If a packet matches one of the criteria, it matches the node, as well as the MTR policy. If a packet fails to match a node, it goes to the next node for a match.
Examples
# Configure an ACL match criterion for node 0 of MTR policy mtr, allowing packets matching ACL 3333 to pass.
<Sysname> system-view
[Sysname] mtr-policy mtr node 0
[Sysname-mtr-policy-mtr-0] if-match ip acl 3333
if-match ip dscp
Use if-match ip dscp to configure a DSCP match criterion.
Use undo if-match ip dscp to restore the default.
Syntax
if-match ip dscp dscp-value
undo if-match ip dscp
Default
No DSCP match criterion is configured.
Views
MTR policy node view
Predefined user roles
network-admin
Parameters
dscp-value: Specifies a DSCP value in the range of 0 to 63. You can also specify the DSCPs, as shown in Table 3, by description.
Table 3 Description of DSCP values
Description |
DSCP value (binary) |
DSCP value (decimal) |
default |
000000 |
0 |
af11 |
001010 |
10 |
af12 |
001100 |
12 |
af13 |
001110 |
14 |
af21 |
010010 |
18 |
af22 |
010100 |
20 |
af23 |
010110 |
22 |
af31 |
011010 |
26 |
af32 |
011100 |
28 |
af33 |
011110 |
30 |
af41 |
100010 |
34 |
af42 |
100100 |
36 |
af43 |
100110 |
38 |
cs1 |
001000 |
8 |
cs2 |
010000 |
16 |
cs3 |
011000 |
24 |
cs4 |
100000 |
32 |
cs5 |
101000 |
40 |
cs6 |
110000 |
48 |
cs7 |
111000 |
56 |
ef |
101110 |
46 |
Usage guidelines
You can configure the ACL, DSCP, and IP precedence match criteria for an MTR node at the same time. The match criteria are in an OR relationship. If a packet matches one of the criteria, it matches the node, as well as the MTR policy. If a packet fails to match a node, it goes to the next node for a match.
Examples
# Configure a DSCP match criterion for node 0 of MTR policy mtr, allowing packets with a DSCP value of 5 to pass.
<Sysname> system-view
[Sysname] mtr-policy mtr node 0
[Sysname-mtr-policy-mtr-0] if-match ip dscp 5.
if-match ip precedence
Use if-match ip precedence to configure an IP precedence match criterion.
Use undo if-match ip precedence to restore the default.
Syntax
if-match ip precedence precedence
undo if-match ip precedence
Default
No IP precedence match criterion is configured.
Views
MTR policy node view
Predefined user roles
network-admin
Parameters
precedence: Specifies an IP precedence value in the range of 0 to 7. You can also specify an IP precedence by its description. For more information, see Table 4.
Table 4 Description of IP precedence
Description |
IP precedence |
routine |
0 |
priority |
1 |
immediate |
2 |
flash |
3 |
flash-override |
4 |
critical |
5 |
internet |
6 |
network |
7 |
Usage guidelines
You can configure the ACL, DSCP, and IP precedence match criteria for an MTR node at the same time. The match criteria are in an OR relationship. If a packet matches one of the criteria, it matches the node, as well as the MTR policy. If a packet fails to match a node, it goes to the next node for a match.
Examples
# Configure an IP precedence match criterion for node 0 of MTR policy mtr, allowing packets with an IP precedence of 5 to pass.
<Sysname> system-view
[Sysname] mtr-policy mtr node 0
[Sysname-mtr-policy-mtr-0] if-match ip precedence 5
mtr-policy
Use mtr-policy to create an MTR policy node and enter its view, or enter the view of an existing MTR policy node.
Use undo mtr-policy to delete the specified MTR policy node.
Syntax
mtr-policy policy-name node node-value
undo mtr-policy policy-name [ node node-value ]
Default
No MTR policy nodes exist.
Views
System view
Predefined user roles
network-admin
Parameters
policy-name: Specifies an MTR policy by its name, a case-sensitive string of 1 to 63 characters.
node node-value: Specifies an MTR policy node by its number in the range of 0 to 255.
Usage guidelines
An MTR policy comprises multiple nodes that are in an OR relationship. If a packet matches one of the nodes, it matches the MTR policy.
Use the undo mtr-policy policy-name node node-value command to delete the specified node from the specified MTR policy. If the MTR policy has only one node, the command also deletes the MTR policy.
Use the undo mtr-policy policy-name command to delete the specified MTR policy.
Examples
# Create MTR policy mtr and node 0, and enter MTR policy node view.
<Sysname> system-view
[Sysname] mtr-policy mtr node 0
[Sysname-mtr-policy-mtr-0]
routing-table limit
Use routing-table limit to configure the maximum number of active routes supported by the topology.
Use undo routing-table limit to restore the default.
Syntax
routing-table limit number { warn-threshold | simply-alert }
undo routing-table limit
Default
A topology supports a maximum of 100000 active routes.
Views
Topology view
Predefined user roles
network-admin
Parameters
number: Specifies the maximum number of active routes supported by the topology. The value range for this argument is 0 to 6000000.
warn-threshold: Specifies a warning threshold in the range of 1 to 100 in percentage. When the percentage of the number of existing active routes to the maximum number of active routes exceeds the specified threshold, the system generates an alarm message but still allows new active routes. If active routes in the topology reach the maximum, no more active routes are added.
simply-alert: Enables the topology to add new active routes but generate a system log message when the maximum number of active routes is exceeded.
Examples
# Configure the maximum number of active routes supported by topology mt1 as 1000. Enable the topology to add new active routes but generate a system log message when the maximum number of active routes is exceeded.
<Sysname> system-view
[Sysname] global-address-family ipv4 unicast
[Sysname-af-topology-mt1] routing-table limit 1000 simply-alert
topology
Use topology to create a topology and enter its view.
Use undo topology to remove a topology.
Syntax
topology topo-name
undo topology topo-name
Default
No topologies exist.
Views
Global address family view
Predefined user roles
network-admin
Parameters
topo-name: Specifies a topology by its name, a case-sensitive string of 1 to 31 characters.
Examples
# Create topology mt and enter its view.
<Sysname> system-view
[Sysname] global-address-family ipv4 unicast
[Sysname-af] topology mt
[Sysname-af-topology-mt]
topology ipv4
Use topology ipv4 to associate the interface with a topology and enter IPv4 unicast topology view of the interface.
Use undo topology ipv4 to remove the association between an IPv4 unicast topology and the interface.
Syntax
topology ipv4 [ unicast ] topo-name
undo topology ipv4 [ unicast ] topo-name
Default
An interface is not associated with any topologies.
Views
Interface view
Predefined user roles
network-admin
Parameters
unicast: Specifies the unicast topology. If you do not specify this keyword, the command also specifies the unicast topology.
topo-name: Specifies a topology by its name, a case-sensitive string of 1 to 31 characters.
Usage guidelines
Before you associate the interface with a topology, you must create the topology.
If the topology name is unicast, you must specify the unicast keyword for the command. Otherwise, the command cannot take effect.
Examples
# Associate interface Loopback 0 with topology mt1 and enter IPv4 unicast topology view of the interface.
<Sysname> system-view
[Sysname] interface loopback 0
[Sysname-LoopBack0] topology ipv4 unicast mt1
[Sysname-LoopBack0-topology-1]
topology-routing mtr-policy
Use topology-routing mtr-policy to enable an MTR policy.
Use undo topology-routing mtr-policy to disable the MTR policy.
Syntax
topology-routing mtr-policy policy-name
undo topology-routing mtr-policy
Default
An MTR policy is disabled.
Views
Global address family view
Predefined user roles
network-admin
Parameters
policy-name: Specifies an MTR policy by its name, a case-sensitive string of 1 to 63 characters.
Examples
# Enable MTR policy mtr.
<Sysname> system-view
[Sysname] global-address-family ipv4
[Sysname-global-ipv4] topology-routing mtr-policy mtr