The mtrace command enables the system to trace the multicast path or Reverse Path Forwarding (RPF) path from a multicast source to a querier or to a destination host, and output information about each hop.
mtrace [ -g group | [ -gw last-hop-router | -d ] -r receiver | [ -gw last-hop-router | -b | -d ] -r receiver -g group ] [ { -mr | -ur resp-dest } | -a source-ip-address | -l [ stat-times ] [ -st stat-int ] | -m max-ttl | -q nqueries | -ts tsttl | -tr trttl | -v | -w timeout ] * source source-address
Parameter | Description | Value |
---|---|---|
-g group |
Specifies a multicast group address. It cannot be a reserved multicast address. |
The value is in dotted decimal notation. |
-gw last-hop-router |
Specifies a last-hop device address when unicast packets can be transmitted between the current device and the last-hop device. After this parameter is specified, the initiating mode of MTrace is set to last-hop. IGMP query messages are sent to the last-hop device address. |
The value is in dotted decimal notation. |
-d |
Sets the initiating mode of MTrace to destination when unicast packets can be transmitted between the current device and the destination host. IGMP query messages that carry the Router Alert option are sent to the specified destination host. |
- |
-r receiver |
Specifies the IP address of a destination host. |
The value is in dotted decimal notation. |
-b |
Sets the initiating mode of MTrace to all-router when you cannot determine whether the device directly connected to the destination host is the last-hop device. IGMP query messages are sent to 224.0.0.2. |
- |
-mr |
Indicates that the response address is the traced multicast group address. This parameter applies to scenarios where the querier is in the multicast distribution tree (MDT). |
- |
-ur resp-dest |
Specifies a unicast response address. It must be the IP address of a local interface. |
The value is in dotted decimal notation. |
-a source-ip-address |
Specifies a source address for IGMP tracert query messages. It must be the IP address of a local interface. This parameter is not supported when the multicast path or RPF path from a multicast source to the current device is traced. |
The value is in dotted decimal notation. |
-l |
Performs MTrace detection repeatedly and outputs traffic rate and statistics.
|
- |
stat-times |
Specifies the number of times that MTrace detection is performed. |
The value is an integer ranging from 2 to 65535. The default value is 65535. |
-st stat-int |
Specifies an interval at which hop information is output when MTrace detection is performed repeatedly. |
The value is an integer ranging from 10 to 60, in seconds. The default value is 10. |
-m max-ttl |
Specifies the maximum number of hops for MTrace detection. |
The value is an integer ranging from 1 to 255. The default value is 255. |
-q nqueries |
Specifies the number of retry times for MTrace detection. |
The value is an integer ranging from 1 to 65535. The default value is 3. |
-ts tsttl |
Specifies the maximum number of hops traced in hop-by-hop mode. |
The value ranges from 1 to 255. The default value is 30. |
-tr trttl |
Specifies a TTL value for IGMP tracert response messages sent in multicast mode. |
The value is an integer ranging from 1 to 255. The default value is 30. |
-v |
Indicates message details, including output time and statistics. |
- |
-w timeout |
Specifies a timeout period for IGMP tracert response messages. |
The value is an integer ranging from 1 to 60, in seconds. The default value is 3. |
source source-address |
Specifies a multicast source address. |
The value is in dotted decimal notation. |
Usage Scenario
The mtrace command mainly has the following uses:
Precautions
According to the standard protocol, IGMP tracert query messages sent in unicast mode to the destination and IGMP tracert response messages replied in multicast mode must carry the Router Alert option. Currently, messages of the device do not carry the Router Alert option. To ensure interconnection with devices whose messages carry the Router Alert option, specify the -gw last-hop-router parameter to set a last-hop device address and the -ur resp-dest parameter to set a unicast response address.
Specify -gw last-hop-router, -b, and -d based on the network. They help trace a path fast and accurately.<HUAWEI> mtrace -b -r 10.1.6.4 -g 225.0.0.1 -tr 5 source 10.1.0.1
Press Ctrl+C to break multicast traceroute facility
From the receiver(10.1.6.4), trace (10.1.0.1, 225.0.0.1)'s reverse path according to multicast routing-table
Num Reverse-Path FwdTTL Protocol
0 10.1.6.4
- 1 10.1.5.1 1 PIM
- 2 10.1.2.1 1 PIM
- 3 10.1.0.1 1 PIM
In maximum-hop mode, received the response message, and multicast traceroute finished.
<HUAWEI> mtrace -gw 10.1.6.3 -r 10.1.6.4 -v source 10.1.0.1
Press Ctrl+C to break multicast traceroute facility
From the receiver(10.1.6.4), trace reverse path to source (10.1.0.1) according to RPF rules
Num Reverse-Path FwdTTL Protocol
0 10.1.6.4
- 1 10.1.5.1 1 PIM
Incoming Interface Address: 10.1.5.1
Outgoing Interface Address: 10.1.6.3
Previous-Hop Router Address: 10.1.5.2
Input packet count on incoming interface: 0xffffffff
Output packet count on outgoing interface: 0xffffffff
Total number of packets for this source-group pair: 0xffffffff
Forwarding TTL: 1
Forwarding Code: NO_ERROR
- 2 10.1.2.1 1 PIM
Incoming Interface Address: 10.1.2.1
Outgoing Interface Address: 10.1.5.2
Previous-Hop Router Address: 10.1.2.2
Input packet count on incoming interface: 0xffffffff
Output packet count on outgoing interface: 0xffffffff
Total number of packets for this source-group pair: 0xffffffff
Forwarding TTL: 1
Forwarding Code: NO_ERROR
- 3 10.1.0.1 1 PIM
Incoming Interface Address: 10.1.0.1
Outgoing Interface Address: 10.1.2.2
Previous-Hop Router Address: 0.0.0.0
Input packet count on incoming interface: 0xffffffff
Output packet count on outgoing interface: 0xffffffff
Total number of packets for this source-group pair: 0xffffffff
Forwarding TTL: 1
Forwarding Code: NO_ERROR
In maximum-hop mode, received the response message, and multicast traceroute finished.
<HUAWEI> mtrace -g 225.0.0.1 -l 2 -st 10 source 10.1.0.1
Press Ctrl+C to break multicast traceroute facility
From the receiver(10.1.5.1), trace (10.1.0.1, 225.0.0.1)'s reverse path according to multicast routing-table
In calculating-rate mode, current statistic times is: 1
- 1 10.1.5.1
Incoming Interface Address: 10.1.5.1 Input packets rate: 0xffffffff
Outgoing Interface Address: 0.0.0.0 Output packets rate: 0xffffffff
Forwarding Cache (10.1.0.1, 225.0.0.1) Forwarding packets rate: 0
The packet loss rate of (10.1.0.1, 225.0.0.1) is 0.00%
- 2 10.1.2.1
Incoming Interface Address: 10.1.2.1 Input packets rate: 0xffffffff
Outgoing Interface Address: 10.1.5.2 Output packets rate: 0xffffffff
Forwarding Cache (10.1.0.1, 225.0.0.1) Forwarding packets rate: 0
The packet loss rate of (10.1.0.1, 225.0.0.1) is 0.00%
- 3 10.1.0.1
Incoming Interface Address: 10.1.0.1 Input packets rate: 0xffffffff
Outgoing Interface Address: 10.1.2.2 Output packets rate: 0xffffffff
Forwarding Cache (10.1.0.1, 225.0.0.1) Forwarding packets rate: 0
********************************************************
In calculating-rate mode, reach the demanded number of statistic,and multicast traceroute finished.
<HUAWEI> mtrace source 10.1.0.1
Press Ctrl+C to break multicast traceroute facility
From the receiver(10.1.5.1), trace reverse path to source (10.1.0.1) according to RPF rules
Num Reverse-Path FwdTTL Protocol
0 10.1.5.1
- 1 10.1.5.1 1 PIM
- 2 10.1.2.1 1 PIM
- 3 10.1.0.1 1 PIM
In maximum-hop mode, received the response message, and multicast traceroute finished.
Item | Description |
---|---|
Press Ctrl+C to break multicast traceroute facility | You can press Ctrl+C to abort the ongoing MTrace detection. |
From the receiver(10.1.5.1), trace reverse path to source (10.1.0.1) according to RPF rules | RPF path from the destination host to the multicast source. |
From the receiver(10.1.5.1), trace (10.1.0.1, 225.0.0.1)'s reverse path according to multicast routing-table | Multicast path from the destination host to the multicast source. |
Num | Number of traced hops. |
Reverse-Path | Reverse path of multicast traffic. |
FwdTTL | Minimum TTL value for multicast packet forwarding. |
Protocol | Multicast routing protocol used on the device. |
- 1 10.1.5.1 | Last hop with the address 10.1.5.1. |
In maximum-hop mode, received the response message, and multicast traceroute finished. | IGMP tracert response messages are received in maximum hop tracing mode, and MTrace detection ends. |
In calculating-rate mode, current statistic times is | Calculating rate mode. The current rate is calculated for the first time. |
In calculating-rate mode, reach the demanded number of statistic,and multicast traceroute finished. | The required number of calculating times in calculating rate mode is reached, and MTrace detection ends. |
Incoming Interface Address | IP address of a multicast inbound interface. |
Outgoing Interface Address | IP address of a multicast outbound interface. |
Previous-Hop Router Address | Previous-hop device address. |
Input packets rate | Message receiving rate on a multicast inbound interface. |
Input packet count on incoming interface | Number of messages received on a multicast inbound interface. |
Output packets rate | Message sending rate on a multicast outbound interface. |
Output packet count on outgoing interface | Number of messages sent on a multicast outbound interface. |
Total number of packets for this source-group pair | Number of messages forwarded along a multicast path. |
Forwarding Cache (10.1.0.1, 225.0.0.1) Forwarding packets rate | Rate at which a device forwards multicast packets of the (S, G) entry. |
Forwarding TTL | TTL value for multicast forwarding. |
Forwarding Code | Multicast forwarding code. |
The packet loss rate of (10.1.0.1, 225.0.0.1) is 0.00% | Packet loss rate of multicast packets of the (S, G) entry. |