8.4. Configuring L2 ping

Overview

Function Introduction

The tool L2 ping is a useful application which’s purpose is detecting the connection between two switches. The L2 ping tool is not same with the well-known ‘ping IP-ADDRESS’ in the WINDOWS system. The normal “ping” is realized by the protocol ICMP which is dependent on the IP layer, so it may be inapplicable if the destination device is only Layer 2 switch. But the protocol used by L2 ping is only relying on Layer 2 ethernet packets.

When L2 ping is started, the L2 ping protocol packet (with ether type 36873(0x9009)) is sent from a specified physical port to another specified destination port. At the destination end, the L2 ping protocol will be sent back via non 802.1ag loopback, or via a configuration “l2 ping response”. The device which is pinging, will receive the ping response packet, and print the ping result.

Principle Description

N/A

Configuration

image

Fig. 8.5 Ping a switch port

The configurations are almost same on Switch1 and Switch2, except the parts which are specially pointed out.

step 1 Enter the configure mode

Switch# configure terminal

step 2 Enter the interface configure mode and turn up the interface

Switch(config)# interface eth-0-1
Switch(config-if)# no shutdown

step 3 Enable the L2 ping response function

Configure on Switch2:

Switch(config-if)# l2 ping response enable

step 4 Exit the configure mode

Switch(config-if)# end

step 5 Using L2 ping

Operate on Switch1:

Switch# l2 ping 0058.3F08.58f1 interface eth-0-1 count 10 interval 1000 timeout 2000
Sending 10 L2 ping message(s):
64 bytes from 0058.3F08.58f1: sequence = 0, time = 10ms
64 bytes from 0058.3F08.58f1: sequence = 1, time = 15ms
64 bytes from 0058.3F08.58f1: sequence = 2, time = 13ms
64 bytes from 0058.3F08.58f1: sequence = 3, time = 12ms
64 bytes from 0058.3F08.58f1: sequence = 4, time = 20ms
64 bytes from 0058.3F08.58f1: sequence = 5, time = 21ms
64 bytes from 0058.3F08.58f1: sequence = 6, time = 12ms
64 bytes from 0058.3F08.58f1: sequence = 7, time = 16ms
64 bytes from 0058.3F08.58f1: sequence = 8, time = 14ms
64 bytes from 0058.3F08.58f1: sequence = 9, time = 17ms
L2 ping completed.
 -----------------------------------
10 packet(s) transmitted, 10 received, 0 % packet loss

0058.3F08.58f1 is the MAC address of the interface on Switch2. It can be gained by command “show interface eth-0-1” on Switch2.

Application cases

N/A