Using Ping/Tracert on a Layer 2 Network
The ping or tracert operations provides information used to locate Ethernet link faults.
Context
To manually monitor the connectivity between two devices, you can send test packets and wait for a reply to test whether the destination device is reachable.
- For the network on which the MD, MA, and MEP are not configured, you can implement GMAC ping to monitor the connectivity between two devices.
- For the network on which the MD, MA, and MEP are configured, you can implement 802.1ag MAC ping to monitor the connectivity between MEPs at the same maintenance level or between MEPs and MIPs at the same maintenance level.
- Using GMAC Ping to Monitor Link Connectivity on a Layer 2 Network
Generic MAC (GMAC) ping applies to a part of or a whole network for monitoring connectivity without configuring an maintenance domain (MD), maintenance association (MA), or maintenance association end point (MEP). - Using GMAC Trace to Monitor the Forwarding Path on a Layer 2 Network
Generic MAC (GMAC) trace can be used to monitor paths and locate faults in a part of or a whole network without configuring an MD, MA, or MEP. - Using 802.1ag MAC Ping to Monitor Link Connectivity on a Layer
2 Network
802.1ag MAC ping monitors connectivity between MEPs or between MEPs and MIPs within an MA. - Using 802.1ag MAC Trace to Monitor the Forwarding Path on a
Layer 2 Network
802.1ag MAC trace monitors the connectivity between MEPs or between MEPs and MIPs within an MA and provides information used to locate faults.
Using GMAC Ping to Monitor Link Connectivity on a Layer 2 Network
Generic MAC (GMAC) ping applies to a part of or a whole network for monitoring connectivity without configuring an maintenance domain (MD), maintenance association (MA), or maintenance association end point (MEP).
Context
GMAC ping has principles similar to those of 802.1ag MAC ping. The difference is that a source device does not need to be a MEP, and a destination device does not need to be a MEP or maintenance association intermediate point (MIP). In other words, GMAC ping can be implemented without the need to configure an MD, MA, or MEP on the source, intermediate, or destination device.
Enable the GMAC ping function on the source and destination devices. The intermediate devices must have the bridge function to directly forward messages.
Procedure
- Run system-view
The system view is displayed.
- Run ping mac enable
The GMAC ping function is enabled globally.
If the GMAC ping function is enabled:
A source device starts the GMAC ping function by sending a loopback message (LBM) to a destination device.
After receiving the LBM, the destination device replies to the source device with a loopback reply (LBR).
- Run commit
The configuration is committed.
- (Optional) In
a VLAN scenario, Run ping mac mac-address vlan vlan-id [ interface interface-type interface-number | -c count | -s packetsize | -t timeout -p priority-value ] *
The VLAN connectivity is monitored.
- (Optional)
In a VLL scenario, run:
ping mac mac-address l2vc l2vc-id { raw | tagged } [ interface interface-type interface-number | { pe-vid pe-vid ce-vid ce-vid | dot1q-vlan vlan-id } -c count | -s packetsize | -t timeout | -p priority-value ] *
The VLL network connectivity is checked.
- (Optional)
In a VPLS scenario, run:
ping mac mac-address vsi vsi-name [ interface interface-type interface-number | { pe-vid pe-vid ce-vid ce-vid | dot1q-vlan vlan-id } -c count | -s packetsize | -t timeout | -p priority-value ] *
The VPLS network connectivity is checked.
Using GMAC Trace to Monitor the Forwarding Path on a Layer 2 Network
Generic MAC (GMAC) trace can be used to monitor paths and locate faults in a part of or a whole network without configuring an MD, MA, or MEP.
Context
GMAC trace has principles similar to those of 802.1ag MAC trace. The difference is that a source device does not need to be a MEP, and a 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 MEP on the source, intermediate, or destination device.
Enable the GMAC trace function on the source, intermediate, and destination devices.
Procedure
- Run system-view
The system view is displayed.
- Run trace mac enable
The GMAC trace function is enabled globally.
If the GMAC trace function is enabled:
A source device starts the GMAC trace function by sending a linktrace message (LTM) to a destination device.
After receiving the LTM, the destination device replies to the source device with a linktrace reply (LTR).
- Run commit
The configuration is committed.
- (Optional) In a VLAN scenario, Run trace mac mac-address vlan vlan-id [ interface interface-type interface-number | -t timeout ]*
Paths are monitored in a VLAN.
- (Optional) In a VLL scenario,
run:
trace mac mac-address l2vc l2vc-id { raw | tagged } [ interface interface-type interface-number | { [ pe-vid pe-vid ce-vid ce-vid ] | [ dot1q-vlan vlan-id ] } | -t timeout | -h ] *
The VPLS network connectivity is checked.
- (Optional) In a VPLS scenario, run:
trace mac mac-address vsi vsi-name [ interface interface-type interface-number | { [ pe-vid pe-vid ce-vid ce-vid ] | [ dot1q-vlan vlan-id ] } | -t timeout | -h ] *
The VPLS network connectivity is checked.
Using 802.1ag MAC Ping to Monitor Link Connectivity on a Layer 2 Network
802.1ag MAC ping monitors connectivity between MEPs or between MEPs and MIPs within an MA.
Context
Similar to the ping operation, 802.1ag MAC ping checks whether the destination device is reachable by sending test packets and receiving response packets. In addition, the ping operation time can be calculated at the transmit end for network performance analysis.
Before performing 802.1ag MAC ping, ensure that 802.1ag has been configured. For more information, see Configuring Basic Ethernet CFM Functions.
Procedure
- A device is usually configured with multiple MDs and MAs.
To monitor the connectivity of a link between two or more devices,
perform either of the following steps on the router with a MEP on one end of the link to be monitored.
In the MA view:
Run system-view
The system view is displayed.
Run cfm md md-name
The MD view is displayed.
Run ma ma-name
The MA view is displayed.
Run ping mac-8021ag mep mep-id mep-id [ md md-name ma ma-name ] { mac mac-address | remote-mep mep-id mep-id } [ -c count | -s packetsize | -t timeout | -p priority-value ] *
The connectivity between a MEP and a MEP or a MIP on other devices is tested.
In all views except the MA view:
Run ping mac-8021ag mep mep-id mep-id md md-name ma ma-name { mac mac-address | remote-mep mep-id mep-id } [ -c count | -s packetsize | -t timeout | -p priority-value ] *
The connectivity between a MEP and a MEP or a MIP on other devices is monitored.
When implementing 802.1ag MAC ping, ensure that:
The MEP is configured in the MA.
If the outbound interface is specified, no inward-facing MEP is configured on it. The interface must be added to the VLAN associated with the MA.
If the destination node is a MEP, either mac mac-address or remote-mep mep-id mep-id can be selected. If remote-mep mep-id mep-id is selected, the remote maintenance association end point (RMEP) must already be created using the remote-mep command.
If the destination node is a MIP, select mac mac-address.
The intermediate device on the link to be tested only forwards LBMs and LBRs. Therefore, the MD, MA, or MEP does not need to be configured on the intermediate device.
Using 802.1ag MAC Trace to Monitor the Forwarding Path on a Layer 2 Network
802.1ag MAC trace monitors the connectivity between MEPs or between MEPs and MIPs within an MA and provides information used to locate faults.
Context
Similar to traceroute or tracert, 802.1ag MAC trace tests the path between the local device and a destination device or locates failure points by sending test packets and receiving reply packets.
Before performing 802.1ag MAC trace, ensure that 802.1ag has been configured. For more information, see Configuring Basic Ethernet CFM Functions.
Procedure
- A device is usually configured with multiple MDs and MAs.
To determine the forwarding path for sending packets from a MEP to
another MEP or a MIP in an MA or failure points, perform either of
the following operations on the router with a MEP at one end of the link to be tested.
In the MA view:
Run system-view
The system view is displayed.
(Optional) Run cfm portid-tlv type
The portid-tlv type for trace packets is set.
Run cfm md md-name
The MD view is displayed.
Run ma ma-name
The MA view is displayed.
Run trace mac-8021ag mep mep-id mep-id [ md md-name ma ma-name ] { mac mac-address | remote-mep mep-id mep-id } [ -t timeout | ttl ttl ] *
The connectivity fault between the local router and the remote router is located.
Run the trace mac-8021ag command without md md-name ma ma-name in the MA view to monitor a forwarding path or locate a failure point in the current MA.
Run the trace mac-8021ag md md-name ma ma-name command in the MA view to monitor a forwarding path or locate a failure point in the specified MA.
In all views except the MA view:
(Optional) Run cfm portid-tlv type
The portid-tlv type for trace packets is set.
Run trace mac-8021ag mep mep-id mep-id md md-name ma ma-name { mac mac-address | remote-mep mep-id mep-id } [ -t timeout | ttl ttl ] *
The connectivity fault between the local router and the remote router is located.
When implementing 802.1ag MAC trace, ensure that:
The MEP is configured in the MA.
If the outbound interface is specified, no inward-facing MEP is configured on it. The interface must be added to the VLAN associated with the MA.
If the destination node is a MEP, either mac mac-address or remote-mep mep-id mep-id can be selected. If remote-mep mep-id mep-id is selected, the RMEP must already be created using the remote-mep command.
If the destination node is a MIP, select mac mac-address.
If the forwarding entry of the destination node does not exist in the MAC address table, interface interface-type interface-number must be specified.