Added functionality to get the mac address as ping-result#8
Added functionality to get the mac address as ping-result#8PcTim wants to merge 5 commits intoBlakeFoster:masterfrom
Conversation
|
MAC addresses are part of the link layer, which means that they are only relevant on your local network. If your ICMP request passes through an IP router*, you'll get the MAC address of the router rather than the MAC address of the destination. IP routing hides the technology used by the destination network interface from you. It could, in theory, not have a MAC address. * Note: although a residential gateway is often called a router, these devices only use IP routing for destinations outside your network. Everything internal is MAC. It's analogous to an Ethernet switch plugged into a router with only 2 interfaces (with the other interface connected to the outside world). |
|
You're right. Thank you for your explanation. As you say MAC addresses are relevant on my local network and such this functionality is useful if you want to check which device is assigned to which IP address. |
I've included a command to get the mac address of the pinged device. I also included this function to the Ping examples.