The trace mac command locates a link connectivity fault between the local device and the destination device. The operation is called GMAC trace.
trace mac mac-address vlan vlan-id [ interface interface-type interface-number | -t timeout | -h ]*
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:
|
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.
|
- |
-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. |
- |
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.
# 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.
Item |
Description |
---|---|
Hops |
Number of hops. |
Ingress Action |
Action taken by the inbound interface to process LTMs:
|
Relay Action |
Action taken by the device to process LTMs:
|
Egress Action |
Action taken by the outbound interface to process trace packets:
|