The ping mac command enables the system to monitor connectivity between the local device and the destination device. This detection is called GMAC ping.
ping mac mac-address vlan vlan-id [ interface interface-type interface-number | -c count | -s packetsize | -t timeout | -p priority-value ] *
Parameter | Description | Value |
---|---|---|
mac-address | Specifies the MAC address of the destination node. 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 destination node can be a MEP or a MIP. 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 ping packets.
If this parameter is specified and the interface is in the specified VLAN, the device sends ping packets 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.
|
- |
-c count | Specifies the number of ping attempts. | The value is an integer that ranges from 1 to 4294967295. The default value is 5. |
-s packetsize | Specifies the size of a ping packet. On the device running IEEE 802.1ag Draft 7, the value does not contain the length of the Layer 2 packet header. On the device running IEEE Standard 802.1ag-2007, the value is the size of a ping packet. | The value is an integer that ranges from 95 to 9000, in bytes. The default value is 95. |
-t timeout | Specifies the timeout interval for waiting for a response packet. | The value is an integer that ranges from 1 to 65535, in milliseconds. The default value is 2000 ms. |
-p priority-value | Specifies the priority of ping packets. | The value is an integer that ranges from 0 to 7. The default value is 7. |
Usage Scenario
To use GMAC ping to detect connectivity, use the ping mac command.
Prerequisites
GMAC ping has been enabled using the ping mac enable command.
Precautions
A MEP is not required to initiate GMAC ping. The destination node can be not a MEP or MIP. You can perform GMAC ping without configuring the MD, MA, or MEP on the source device, intermediate device, and destination device. You must specify the VLAN on which the destination node resides.
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 ping mac command does not take effect. That is, the local device cannot ping the peer device.
# Ping the device with the MAC address of 0001-0300-0204. Send two ping packets with the size of 112 bytes each. The device is in VLAN 10.
<HUAWEI> system-view [HUAWEI] ping mac enable [HUAWEI] ping mac 0001-0300-0204 vlan 10 -c 2 -s 112 Pinging 0001-0300-0204 with 112 bytes of data: Reply from 0001-0300-0204: byte = 112 time = 9ms Reply from 0001-0300-0204: byte = 112 time = 11ms Packets: Sent = 2, Received = 2, Lost = 0 (0% Loss) Minimum = 9ms, Maximum = 11ms, Average = 10ms
Item |
Description |
---|---|
Reply from 0001-0300-0204: byte = 112 time = 9ms |
Size and response time of ping packets returned from the destination device. When the response time is less than 1 ms, "time < 1ms" is displayed. |
Packets: Sent = 2, Received = 2, Lost = 0 (0% Loss) |
Number of sent ping packets, number of received reply packets, and number and percentage of discarded packets. |
Minimum |
Minimum round-trip time (RTT). |
Maximum |
Maximum RTT. |
Average |
Average RTT. |