ping mac

Function

The ping mac command monitors connectivity of the links between a source device and a destination device. This mechanism is called GMAC ping.

Format

ping mac mac-address vlan vlan-id [ interface { interface-name | interface-type interface-number } | -c count | -s packetsize | -t timeout | -p priority-value ] *

ping mac mac-address { vsi vsi-name | l2vc l2vc-id { raw | tagged } } [ interface { interface-name | interface-type interface-number } | { pe-vid pe-vid-value ce-vid ce-vid-value | dot1q-vlan dot1q-vlan-value } | -c count | -s packetsize | -t timeout | -p priority-value ] *

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.

-

-c count

Specifies the number of times that a ping can be performed.

The value is an integer ranging from 1 to 4294967295. The default value is 5.

-s packetsize

Specifies the size of a ping message to be sent.

The value is an integer ranging from 95 to 9000, in bytes. The default value is 95 bytes. The value indicates the size of the message with the layer 2 frame header removed.

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

-p priority-value

Specifies a priority value for ping messages.

The value is an integer that ranges from 0 to 7 .

The default value is 7.

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

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

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 dot1q-vlan-value

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 ping enabled, the source device does not need to be a MEP, and the destination device does not need to be a MEP or MIP. In other words, on the source, intermediate, or destination device, an MD, MA, or MEP is not configured to implement GMAC ping. The only requirement is to specify the VLAN on which the destination node resides.

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.

    Different types of interfaces process packets differently, as shown in following lists.

    Packet processing on the inbound interface:
  • VLANIF interface, raw encapsulation (ethernet encapsulation) is default mode means no action is performed and trunk mode means the outer tags are stripped. Tagged encapsulation (VLAN encapsulation) is default mode means adds a tag (default VLAN ID of the interface) and trunk mode means no action is required.
  • Ethernet main interface, tags are stripped in raw encapsulation. Tags are Reserved and no action is required in tagged encapsulation.
  • Dot1q sub-interface, one tag is stripped in raw encapsulation. Tags are reserved and no action is required in tagged encapsulation.
  • Dot1q termination sub-interface, one tag is stripped in raw encapsulation. Tags are Reserved and no action is required in tagged encapsulation.
  • QinQ termination sub-interface (in symmetric mode), the outer tag is stripped in raw encapsulation. Double tags are reserved and no action is required in tagged encapsulation.
  • QinQ termination sub-interface (in asymmetric mode), double tags are stripped in raw encapsulation. Two tags are stripped and then one tag is added in tagged encapsulation.

    Packet processing on the outbound interface:
  • VLANIF interface, raw encapsulation (ethernet encapsulation) is default mode means no action is performed and trunk mode means a specific tag is added. Tagged encapsulation (VLAN encapsulation) is default mode means the tag is stripped and trunk mode means the tag is replaced.
  • Ethernet main interface, a specific tag is added in raw encapsulation. The tag is replaced in tagged encapsulation.
  • Dot1q sub-interface, one tag is added in raw encapsulation. The tag is replaced with the tag that is encapsulated on the outbound interface in tagged encapsulation.
  • Dot1q termination sub-interface, one tag is added in raw encapsulation. The tag is replaced with the tag that is encapsulated on the outbound interface in tagged encapsulation.
  • QinQ termination sub-interface (in symmetric mode), the outer tag is added in raw encapsulation. The outer tag is replaced with the tag that is encapsulated on the outbound interface.
  • QinQ termination sub-interface (in asymmetric mode), double tags are added in raw encapsulation. The outer tag is removed and then two tags that are encapsulated are added.

    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 ping mac enable command.

Precautions

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

Example

# Ping a device twice. Set the size of the ping message to 112 bytes.The device resides in l2vc 1. The MAC address of the device is 00e0-fc12-3456.
<HUAWEI> system-view
[~HUAWEI] ping mac enable
[*HUAWEI] commit
[~HUAWEI] ping mac 00e0-fc12-3456 l2vc 1 raw -c 2 -s 112
Reply from 00e0-fc12-3456: bytes = 112 time < 1ms
Reply from 00e0-fc12-3456: bytes = 112 time < 1ms
Packets: Sent = 2, Received = 2, loss = 0 (0.00% loss)
Minimum = 1ms, Maximum = 1ms, Average = 1ms
# Ping a device twice. Set the size of the ping message to 112 bytes. The device resides in vsi1. The MAC address of the device is 00e0-fc12-3456.
<HUAWEI> system-view
[~HUAWEI] ping mac enable
[*HUAWEI] commit
[~HUAWEI] ping mac 00e0-fc12-3456 vsi vsi1 -c 2 -s 112
Reply from 00e0-fc12-3456: bytes = 112 time < 1ms
Reply from 00e0-fc12-3456: bytes = 112 time < 1ms
Packets: Sent = 2, Received = 2, loss = 0 (0.00% loss)
Minimum = 1ms, Maximum = 1ms, Average = 1ms
# Ping a device twice. Set the size of the ping message to 112 bytes. The device resides in VLAN 10. The MAC address of the device is 00e0-fc12-3456.
<HUAWEI> system-view
[~HUAWEI] ping mac enable
[*HUAWEI] commit
[~HUAWEI] ping mac 00e0-fc12-3456 vlan 10 -c 2 -s 112
Reply from 00e0-fc12-3456: bytes = 112 time < 1ms
Reply from 00e0-fc12-3456: bytes = 112 time < 1ms
Packets: Sent = 2, Received = 2, loss = 0 (0.00% loss)
Minimum = 1ms, Maximum = 1ms, Average = 1ms
Table 1 Description of the ping mac command output
Item Description
Reply from 00e0-fc12-3456: bytes = 112 time < 1msReply from 00e0-fc12-3456: bytes = 112 time < 1ms

Size and round trip time (RTT) of a reply message sent by the destination device.

If the RTT value is less than 1 ms, "time < 1ms" is displayed.

Packets: Sent = 2, Received = 2, loss = 0 (0.00% loss)

Number of ping request messages, number of ping response messages, number of discarded ping messages, and percentage of the discarded ping messages.

Minimum

Minimum RTT.

Maximum

Maximum RTT.

Average

Average RTT.

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