< Home

mtrace

Function

The mtrace command detects the multicast path or RPF path from a multicast source to the querier or to a destination host. The querier indicates the switch on which the mtrace command is executed.

Format

mtrace -gw last-hop-router -r receiver [ -g group ] [ [ -mr | -ur resp-dest ] | -a source-ip-address | -l [ [ stat-times ] [ -st stat-int ] ] | -m max-ttl | -q nqueries | -ts ttl | -tr ttl | -v | -w timeout | -vpn-instance vpn-instance-name ] * source source-address

mtrace -b -r receiver -g group [ [ -mr | -ur resp-dest ] | -a source-ip-address | -l [ [ stat-times ] [ -st stat-int ] ] | -m max-ttl | -q nqueries | -ts ttl | -tr ttl | -v | -w timeout | -vpn-instance vpn-instance-name ] * source source-address

mtrace -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 ttl | -tr ttl | -v | -w timeout | -vpn-instance vpn-instance-name ] * source source-address

mtrace -r receiver [ -g group ] [ [ -mr | -ur resp-dest ] | -l [ [ stat-times ] [ -st stat-int ] ] | -m max-ttl | -q nqueries | -ts ttl | -tr ttl | -v | -w timeout | -vpn-instance vpn-instance-name ] * source source-address

mtrace [ -g group ] [ [ -mr | -ur resp-dest ] | -l [ [ stat-times ] [ -st stat-int ] ] | -m max-ttl | -q nqueries | -ts ttl | -tr ttl | -v | -w timeout | -vpn-instance vpn-instance-name ] * source source-address

Parameters

Parameter Description Value
-l Performs Mtrace tracking for multiple times, collects traffic statistics and rate, uses detailed display mode, and ignores the configuration of -v. If -l is not specified, Mtrace tracking is performed once.
stat-times Indicates the number of times for Mtrace tracking. The value is an integer that ranges from 2 to 65535. If -l is specified while stat-times is not specified, Mtrace tracking stops after it is performed 65535 times.
-st stat-int Sets the interval at which the rate is calculated during cyclic query. The value is an integer that ranges from 10 to 60, in seconds. The default value is 10. To configure -st, configure -l first. In addition, the cyclic count must be greater than or equal to 2.
-m max-ttl Specifies the maximum number of hops to be traced. The value is an integer that ranges from 1 to 255. The default value is 255.
-mr Indicates that the response address is specified as the traced multicast group address. The -mr is applicable only when the querier resides in a multicast distribution tree.
-q nqueries Sets the number of retry times of mtrace. The value is an integer that ranges from 1 to 65535. The default value is 3.
-tr ttl Specifies the TTL value of the IGMP Tracert Response messages sent in multicast mode. The value is an integer that ranges from 1 to 255. The default value is 30.
-ts ttl Sets the maximum number of hops to be traced in hop-by-hop mode. The value is an integer that ranges from 1 to 255. The default value is 30. When Mtrace in max-hop mode fails, Mtrace automatically enters the hop-by-hop mode. The number of hops increases by one each time a new hop is traced.
-ur resp-dest Specifies the response address as a unicast address. The value of resp-dest must be a local interface address.
NOTE:

If neither -mr nor -ur resp-dest is specified, multicast address 224.0.1.32 is used as the response address.

-
-v Sets the detailed mode and exports time and statistics. -
-vpn-instance vpn-instance-name Specifies the name of a VPN instance. The value must be an existing VPN instance name.
-w timeout Specifies the timeout period to wait for an IGMP Tracert Response message. The value is an integer that ranges from 1 to 60, in seconds. The default value is 3.
-g group Specifies the multicast group address to be traced. The address cannot be a reserved group address.
-gw last-hop-router Specifies the last-hop switch address, which ensures that unicast packets can be transmitted between the querier and the last-hop switch. After this parameter is specified, the initiating mode of Mtrace is specified as last-hop. -
-d Indicates that unicast packets can be transmitted between the querier and the destination host. After this parameter is specified, the initiating mode of Mtrace is specified as destination. -
-r receiver Specifies the destination host address. The value is in dotted decimal notation.
-a source-ip-address Specifies the source address of an IGMP Tracert Query message. The value of source-ip-address must be a local interface address.
NOTE:

When you need to detect the multicast path or the RPF path from the multicast source to the querier, -a is not supported.

The value is in dotted decimal notation.
-b Indicates that the querier is directly connected to the destination host, but whether the querier is the last-hop switch is unknown. After this parameter is specified, the initiating mode of Mtrace is specified as all-router.
NOTE:
After a VPN or RPF is specified, the initiating mode of Mtrace cannot be specified as all-router.
-
source source-address Specifies the multicast source address. The value is in dotted decimal notation.

Views

All views

Default Level

0: Visit level

Usage Guidelines

Usage Scenario

During multicast troubleshooting and routine maintenance, you can run the mtrace command to collect traffic information for locating faulty nodes, which helps reduce configuration errors, perform cyclic tracert, and collect statistics on multicast flow rates.

The mtrace command format varies according to the types of paths.

  • mtrace source source-address: detects the RPF path from the multicast source to the querier.

  • mtrace -g group source source-address: detects the multicast path from the multicast source to the querier.

    The corresponding (S, G) entry must exist on the querier.

  • mtrace [ -gw last-hop-router | -d ] -r receiver source source-address: detects the RPF path from the multicast source to the destination host.

    • The querier is directly connected to the destination host, or the querier can ping the last-hop switch or detonation host in unicast mode.

    • When multiple switches are connected to the specified host, RPF paths from different switches can be different. You can specify the last-hop switch using -gw last-hop-router to uniquely define an RPF path.

  • mtrace [ -b | -gw last-hop-router | -d ] -r receiver -g group source source-address: detects the multicast path from the multicast source to the destination host.

    The corresponding (S, G) entry must exist on the querier. In addition, one of the following conditions must be met:

    • The querier is directly connected to the destination host.

    • The querier can ping the last-hop switch or the destination host in unicast mode.

    • The querier resides in the multicast path from the multicast source to the destination host. For example, the querier is the first hop switch.

When running the mtrace [ -b | -gw last-hop-router | -d ] -r receiver -g group source source-address command to detect the multicast path from a multicast source to a destination host, specify -gw last-hop-router, -b or -d, which helps implement tracking quickly and accurately.

  • -b: indicates that the querier is directly connected to the destination host.

  • -gw last-hop-router: specifies the last-hop switch address. Unicast packets can be transmitted between the querier and the last-hop switch.

  • -d: indicates that unicast packets can be transmitted between the querier and the destination host.

  • If none of the preceding three parameters are specified, Mtrace fails unless the querier resides in the multicast path from the multicast source to the destination host.

Precautions

According to draft-fenner-traceroute-ipm-01, the Router Alert option needs to be carried in the IGMP Tracert Query messages that are sent to the destination address in unicast mode and in the IGMP Tracert Response messages that sent in response in multicast mode. However, manufacturers have not reached an agreement on this issue. Packets sent from a Huawei switch carry the Router Alert option. If Huawei switches need to communicate with devices that do not support the Router Alert option, use -gw to specify the last-hop address and -ur to specify the unicast response address.

The parameter vpn-instance is used on the PE to initiate a multicast VPN probe.

Example

  • Detect the RPF path from a multicast source to the querier.

# Detect the RPF path from the multicast source 10.1.0.1 to the querier 10.1.5.1.

<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
  In maximum-hop mode, received the response message, and multicast traceroute finished.
  • Detect the multicast path from a multicast source to the querier.

# Detect the multicast path from the multicast source 10.1.0.1 to the querier 10.1.5.1. The group address is 225.0.0.1, the cyclic count is 2, and the interval at which the rate is calculated is 10s.

<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: 0
   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

 -2 10.1.2.1
   Incoming Interface Address: 10.1.2.1 Input packets rate: 0
   Outgoing Interface Address: 10.1.5.2 Output packets rate: 0
   Forwarding Cache (10.1.0.1, 225.0.0.1) Forwarding packets rate: 0

 -3 10.1.0.1
   Incoming Interface Address: 10.1.0.1 Input packets rate: 0
   Outgoing Interface Address: 10.1.2.2 Output packets rate: 0
   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.
  • Detect the RPF path from the multicast source to the destination host.

# Detect the RPF path from the multicast source 10.1.0.1 to the destination host 10.1.6.4. The last hop address is 10.1.6.3, unicast packets can be transmitted, and the time and statistics are displayed in detail.

<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: 0
   Output packet count on outgoing interface: 0
   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: 0
   Output packet count on outgoing interface: 0
   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: 0
   Output packet count on outgoing interface: 0
   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.
  • Detect the multicast path from the multicast source to the destination host.

# Detect the multicast path from the multicast source 10.1.0.1 to the destination 225.0.0.1. The destination host address is 10.1.6.4, the querier is directly connected to the destination host, the response address is the default value 224.0.1.32, and the TTL value of a Response packet is 5.

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

# Detect the multicast path from the multicast source 10.1.0.1 to the destination 225.0.0.1. The destination host address is 10.1.6.4, the last hop address is 10.1.6.3, unicast packets are reachable, the number of cyclic times is 2, and the interval at which the rate is calculated is 12s.

<HUAWEI> mtrace -gw 10.1.6.3 -r 10.1.6.4 -g 225.0.0.1 -l 2 -st 12 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
 In calculating-rate mode, current statistic times is: 1

 -1 10.1.5.1
   Incoming Interface Address: 10.1.5.1 Input packets rate: 0
   Outgoing Interface Address: 10.1.6.3 Output packets rate: 0
   Forwarding Cache (10.1.0.1, 225.0.0.1) Forwarding packets rate: 0

 -2 10.1.2.1
   Incoming Interface Address: 10.1.2.1 Input packets rate: 0
   Outgoing Interface Address: 10.1.5.2 Output packets rate: 0
   Forwarding Cache (10.1.0.1, 225.0.0.1) Forwarding packets rate: 0

 -3 10.1.0.1
   Incoming Interface Address: 10.1.0.1 Input packets rate: 0
   Outgoing Interface Address: 10.1.2.2 Output packets rate: 0
   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.
Table 1 Description of the mtrace command output

Item

Description

Press Ctrl+C to break multicast traceroute facility

The ongoing Mtrace test is terminated after you press Ctrl+C.

From the receiver (10.1.6.4), trace reverse path to source (10.1.0.1) according to RPF rules

The RPF path from destination host 10.1.6.4 to multicast source 10.1.0.1 is detected.

From the receiver (10.1.6.4), trace (10.1.0.1, 225.0.0.1)'s reverse path according to multicast routing-table

The transmission path of multicast data (10.1.0.1, 225.0.0.1) from the destination host 10.1.6.4 to the source is tested.

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 switch.

-1 10.1.5.1 1 PIM

The address of the last hop is 10.1.5.1, the minimum TTL value for multicast forwarding is 1, and the multicast routing protocol used on the switch is PIM.

In calculating-rate mode, current statistic times is: 1

The rate is calculated for the first time in the calculating rate mode.

-1 10.1.5.1

Last hop with the address as 10.1.5.1 in calculating rate mode.

Incoming Interface Address: 10.1.5.1 Input packets rate: 0

Multicast inbound interface address and the inbound packet rate on the inbound interface in calculating rate mode.

Outgoing Interface Address: 0.0.0.0 Output packets rate: 0xffffffff

Multicast outbound interface address and the outbound packet rate on the outbound interface in calculating rate mode.

Forwarding Cache (10.1.0.1, 225.0.0.1) Forwarding packets rate: 0

Rate for a switch to forward multicast packets of the (S, G) entry in calculating rate mode.

In maximum-hop mode, received the response message, and multicast traceroute finished.

IGMP Tracert Response messages are received in maximum hop tracking mode.

In calculating-rate mode, reach the demanded number of statistic, and multicast traceroute finished.

Mtrace is complete in calculating rate mode when the required number of calculating times is reached.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >