< Home

trace mac

Function

The trace mac command locates a link connectivity fault between the local device and the destination device. The operation is called GMAC trace.

Format

trace mac mac-address vlan vlan-id [ interface interface-type interface-number | -t timeout | -h ]*

Parameters

Parameter Description Value

mac-address

Specifies the MAC address of the destination node. The destination node can be a MEP or a MIP.

An MP's MAC address can be a bridge MAC address or the MAC address of the interface where the MP is configured. The MAC address depends on the configured MP address model:
  • If the shared MP address model is configured, an MP uses a bridge MAC address as its own MAC address.

  • If the independent MP address model is configured, an MP uses the MAC address of the interface where the MP is configured.

The value is in H-H-H format. An H is a hexadecimal number of 1 to 4 digits. The value cannot be a broadcast or multicast MAC address.

vlan vlan-id

Specifies the ID of a VLAN.

The value is an integer that ranges from 1 to 4094.

interface interface-type interface-number

Specifies the outbound interface on the local device for sending trace packets.

  • interface-type specifies the interface type.

  • interface-number specifies the interface number.

  • If this parameter is specified, the device sends trace packets directly through the interface.

  • If this parameter is not specified, the device searches the MAC address table based on the specified destination MAC address and VLAN ID.

    If the forwarding entry is found, the device sends trace packets according to the entry.

    If the forwarding entry is not found but there is one interface in the VLAN, the device sends trace packets from this interface. If there is more than one interface in the VLAN, the device discards trace packets directly.

-

-t timeout

Specifies the timeout interval for waiting for an LTR.

The value is an integer that ranges from 1 to 65535, in milliseconds. The default value is 2000 ms.

-h

Specifies the host name and IP address of a device that an LTM passes through.

-

Views

All views

Default Level

0: Visit level

Usage Guidelines

Usage Scenario

To perform GMAC trace, run this command.

Prerequisites

GMAC trace has been enabled using the trace mac enable command.

Precautions

A MEP is not required to initiate GMAC trace. The destination node can be not a MEP or MIP. That is, GMAC trace can be implemented without configuring the MD, MA, or MEP on the source device, intermediate device, and the destination device. All the intermediate devices can respond with an LTR.

The two devices must be configured with IEEE 802.1ag of the same version. If the local device is configured with IEEE 802.1ag Draft 7 and the peer device is configured with IEEE Standard 802.1ag-2007, the trace mac command does not take effect. That is, the connectivity fault cannot be located.

-h is only supported by the device running IEEE Standard 802.1ag-2007.

Example

# Trace the destination device with the MAC address as aa99-6600-5600. The device belongs to VLAN 2.

<HUAWEI> system-view
[HUAWEI] trace mac enable
[HUAWEI] trace mac aa99-6600-5600 vlan 2
Tracing the route to aa99-6600-5600 over a maximum of 255 hops:
 Hops  Ingress MAC    Ingress Port                Ingress Action    Relay Action
       Egress MAC     Egress Port                 Egress Action
 1     aa99-6600-5600 GigabitEthernet0/0/1        IngOK             RlyHit
       --             --                          --
Info: Succeed in tracing the destination address aa99-6600-5600.   

# Trace the destination device with the MAC address as 0025-9efb-923d. The device belongs to VLAN 2.

<HUAWEI> system-view
[HUAWEI] trace mac enable
[HUAWEI] trace mac 0025-9efb-923d vlan 2 -h
Tracing the route to 0025-9efb-923d over a maximum of 255 hops:
 Hops  Host Name (IP Address)
       Ingress MAC    Ingress Port                Ingress Action    Relay Action
       Egress MAC     Egress Port                 Egress Action
 1     173 (10.137.126.173)
       0025-9efb-923d GigabitEthernet0/0/1        IngOK             RlyHit
       --             --                          --
Info: Succeed in tracing the destination address 0025-9efb-923d.    
Table 1 Description of the trace mac command output

Item

Description

Hops

Number of hops.

Ingress Action

Action taken by the inbound interface to process LTMs:
  • IngOK: The inbound interface forwards LTMs successfully.

  • If this field is empty, the inbound interface fails to forward LTMs.

Relay Action

Action taken by the device to process LTMs:
  • RlyFDB: The device forwards LTMs to the next hop device.

  • RlyHit: The device forwards LTMs to the destination device.

Egress Action

Action taken by the outbound interface to process trace packets:
  • EgrOK: The outbound interface forwards LTMs successfully.

  • If this field is empty, the outbound interface does not or fails to forward LTMs.

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