How To Ping Mac Address?

Today internet and computer networks use popular protocols like TCP/IP, Ethernet, etc. Ethernet is the most popular protocol used in Layer 2 which is called Media Access Control simply MAC. Every ethernet card has a MAC address in order to identify it uniquely. Normally MAC addressed are configured statically into the Ethernet cards, wireless cards, etc. but recently they can be modified with the operating system configuration.

Why Ping Mac Address?

MAC address is used inside the LAN for communication. Every device has a unique MAC address and generally communicate with the gateway and other devices by using its MAC address. The IP address is mainly used to give a unique number which can change in different situations and in different networks.

  • Specify the remote system MAC address.
  • Filter the remote system according to its MAC address.
  • Pair multiple devices according to their MAC addresses.

Ping MAC Address with ping Command

By default, the Windows, Linux, and MacOSX operating systems do not provide a specific command to ping the MAC address. But there is an alternative way to execute MAC ping operations. First, we will ping the remote system IP address with the ping command.

> ping 192.168.142.133

The output will be like below for the ping command and responses.

Pinging 192.168.142.133 with 32 bytes of data:
Reply from 192.168.142.133: bytes=32 time=2ms TTL=64
Reply from 192.168.142.133: bytes=32 time<1ms TTL=64
Reply from 192.168.142.133: bytes=32 time<1ms TTL=64
Reply from 192.168.142.133: bytes=32 time<1ms TTL=64
Ping statistics for 192.168.142.133:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 2ms, Average = 0ms

After the ping command is completed successfully the MAC address of the target will be stored in the ARP cache. ARP cache is a cache or temporary storage used to store IP addresses and related MAC addresses. The MAC address can be listed with the arp command by providing the -a parameter to list all ARP entries.

> arp -a

The output will be as below. As you can see every interface will have different ARP tables because every interface may have a different network connection.

Interface: 192.168.142.130 --- 0x8
Internet Address Physical Address Type
192.168.142.2 00-50-56-ec-77-85 dynamic
192.168.142.128 00-0c-29-60-d4-26 dynamic
192.168.142.132 00-0c-29-60-d4-26 dynamic
192.168.142.133 00-0c-29-e0-58-54 dynamic
192.168.142.254 00-50-56-eb-7a-b6 dynamic
192.168.142.255 ff-ff-ff-ff-ff-ff static
224.0.0.22 01-00-5e-00-00-16 static
224.0.0.251 01-00-5e-00-00-fb static
224.0.0.252 01-00-5e-00-00-fc static
239.255.255.250 01-00-5e-7f-ff-fa static
255.255.255.255 ff-ff-ff-ff-ff-ff static

Leave a Comment