trace mac

Function

The trace mac command locates faults in the links between a source device and a destination device. This mechanism is called GMAC trace.

Format

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

trace mac mac-address { vsi vsi-name | l2vc l2vc-id { raw | tagged } } [ interface { interface-name | interface-type interface-number } | { [ pe-vid pe-vid ce-vid ce-vid ] | [ dot1q-vlan vlan-id ] } | -t timeout | -h ] *

Parameters

Parameter Description Value
mac-address

Specifies the bridge MAC address of a destination device.

The value is a 12-digit hexadecimal number, in the format of H-H-H. Each H is 4 digits. If an H contains fewer than 4 digits, the left-most digits are padded with zeros. For example, e0 is displayed as 00e0. It cannot be a broadcast or multicast MAC address.

vlan vlan-id

Specifies a VLAN ID.

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

interface interface-name

Specifies the interface name of an outbound interface for sending a ping message.

-

interface-type

Specifies the interface type of an outbound interface for sending a ping message.

-

interface-number

Specifies the interface number of an outbound interface for sending a ping message.

-

-t timeout

Specifies the timeout period during which the device waits for a reply.

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

-h

Specifies to display the host name and IP address of each hop.

-

vsi vsi-name

Specifies the name of a virtual switch instance (VSI).

The value is a string of 1 to 31 characters.

l2vc l2vc-id

Specifies the ID of a Layer 2 virtual circuit.

The value is an integer ranging from 1 to 4294967295.

raw

Specifies that the VLAN tag is stripped.

-

tagged

Specifies that the VLAN tag is attached.

-

pe-vid pe-vid

Specifies the ID of the VLAN to which the PE belongs. This is the value of the outer VLAN tag.

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

ce-vid ce-vid

Specifies the ID of the VLAN to which the CE belongs. This is the value of the inner VLAN tag.

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

dot1q-vlan vlan-id

Specifies the VLAN ID carried by the packet.

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

Views

All views

Default Level

0: Visit level

Task Name and Operations

Task Name Operations
sla execute

Usage Guidelines

Usage Scenario

On a network with GMAC trace enabled, the source device does not need to be a MEP, and the intermediate or destination device does not need to be a MEP or MIP. In other words, GMAC trace can be implemented without the need to configure an MD, MA, or a MEP on the source, intermediate, or destination device. The only requirement is to enable all intermediate devices to reply with LTRs.

If devices between PEs are interconnected through a L2VPN,

  • When packets received by PEs carry double tags, use the QinQ tag termination sub-interface that is bound to the L2VC/VSI to access the L2VPN. If you need to determine connectivity between PEs, specify the parameter pe-vid and ce-vid.
  • When packets received by PEs carry one tag, use the Dot1q tag termination sub-interface that is bound to the L2VC/VSI to access the L2VPN. If you need to determine connectivity between PEs, specify the parameter dot1q-vlan vlan-id.
  • When the destination of GMAC trace is the MAC address of the device, Ingress Port is the name of the interface where the PW resides and the ingress MAC address is the MAC address of the device.

    The MAC address specified in the general MAC ping must be the physical MAC address of the physical interface in the Layer 2 scenario.

Prerequisites

The GMAC ping function has been enabled using the trace mac enable command.

Precautions

The two devices must be enabled with 802.1ag of the same version.

Example

# Trace the destination device whose MAC address is 00e0-fc12-3458.The device resides in l2vc 1.
<HUAWEI> system-view
[~HUAWEI] trace mac enable
[*HUAWEI] commit
[~HUAWEI] trace mac 00e0-fc12-3458 l2vc 1 raw
Tracing the route to 00e0-fc12-3458 over a maximum of 255 hops:
 Hops  Host Name (IP Address)
       Mac             Ingress                   Ingress Action    Relay Action
       Forwarded       Egress                    Egress Action  
 1     HUAWEIA (10.10.10.16)
       00e0-fc22-3459  GigabitEthernet0/1/9           IngOK             RlyFDB
       Forwarded       GigabitEthernet0/1/1.1         EgrOK              
 2     HUAWEIB (10.10.10.13)
       00e0-fc12-3458  GigabitEthernet0/1/17           IngOK             RlyHit
       Not Forwarded 
Info: Succeeded in tracing the destination address 00e0-fc12-3458.
# Trace the destination device whose MAC address is 00e0-fc12-3458.The device resides in vsi1.
<HUAWEI> system-view
[~HUAWEI] trace mac enable
[*HUAWEI] commit
[~HUAWEI] trace mac 00e0-fc12-3458 vsi vsi1 -h
Tracing the route to 00e0-fc12-3458 over a maximum of 255 hops:
 Hops  Host Name (IP Address)
       Mac             Ingress                   Ingress Action    Relay Action
       Forwarded       Egress                    Egress Action  
 1     HUAWEIA (10.10.10.16)
       00e0-fc22-3459  GigabitEthernet0/1/9           IngOK             RlyFDB
       Forwarded       GigabitEthernet0/1/1.1         EgrOK              
 2     HUAWEIB (10.10.10.13)
       00e0-fc12-3458  GigabitEthernet0/1/17           IngOK             RlyHit
       Not Forwarded 
Info: Succeeded in tracing the destination address 00e0-fc12-3458.
# Monitor the destination device with the MAC address 00e0-fc23-3459. The device resides in VLAN 2.
<HUAWEI> system-view
[~HUAWEI] trace mac enable
[*HUAWEI] commit
[~HUAWEI] trace mac 00e0-fc23-3459 vlan 2
Tracing the route to 00e0-fc23-3459 over a maximum of 255 hops:
-------------------------------------------------------------------------------
Hops     Mac                Ingress                     Ingress Action      Relay Action
          Forwarded         Egress                      Egress Action                   
--------------------------------------------------------------------------------
1     00e0-fc12-3459      GigabitEthernet0/1/9      IngOK                 RlyFDB       
      Forwarded            GigabitEthernet0/1/1       EgrOK      
2     00e0-fc12-3457      GigabitEthernet0/1/1       IngOK                RlyFDB       
      Forwarded            GigabitEthernet0/1/0       EgrOk        
3     00e0-fc23-3459      GigabitEthernet0/1/0       IngOK                RlyHit       
      Not Forwarded
Info: Succeed in tracing the destination address 00e0-fc23-3459.
Table 1 Description of the trace mac command output
Item Description
Hops

Number of hops.

Mac

Bridge MAC address of the device on which the intermediate node or destination node resides.

Ingress

Name of an inbound interface for receiving the trace message on the intermediate node or destination node.

In an L2VPN scenario, when the destination of GMAC trace is the MAC address of the device, Ingress Port is the name of the interface where the PW resides and Ingress Mac is the MAC address of the device.

Ingress Action

Whether the trace message is forwarded by the inbound interface successfully.

  • This field is IngOK if the inbound interface forwards the trace message successfully.
  • This field is null if the inbound interface does not forward the trace message.
Relay Action

Local device's response to a trace message:

  • RlyFDB: The local device forwards the trace message to a next-hop device.
  • RlyHit: The local device sends the trace message directly to the destination device.
Forwarded

Whether the trace message can be forwarded to a next-hop device:

  • Forwarded: The trace message continues to be forwarded.
  • Not Forwarded: The trace message is not forwarded.

On a link that traverses devices A, B, and C in sequence, if device A sends a trace message to device C, the egress on device B will be displayed and Forwarded will be displayed as the value of this parameter.

Egress

Name of an outbound interface for forwarding the trace message on an intermediate node.

Egress Action

Whether the trace message is forwarded by the outbound interface successfully:

  • This field is EgrOK if the outbound interface forwards the trace message successfully.
  • This field is null if the outbound interface does not forward or fails to forward the trace message.
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >