Networking
cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a command that turns an IP address into a MAC address?

 
SOLVED
Go to solution
Stuart Abramson_2
Honored Contributor

Is there a command that turns an IP address into a MAC address?

 
6 REPLIES 6
Stuart Abramson_2
Honored Contributor

Re: Is there a command that turns an IP address into a MAC address?

I want to:

# ip2mac 205.22.202.101

0x0010836D72B4
Jeff Schussele
Honored Contributor
Solution

Re: Is there a command that turns an IP address into a MAC address?

Hi Stuart,

The arp command can do this - run

arp xxx.xxx.xxx.xxx

The output will include the MAC as well as hostname.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
T G Manikandan
Honored Contributor

Re: Is there a command that turns an IP address into a MAC address?

That should not be possible as mac addresses are unique.

The way you can use is

#arp -a
#arp -a|grep 205.22.202.101
Patrick Wallek
Honored Contributor

Re: Is there a command that turns an IP address into a MAC address?

There is no algorithm that will turn an IP addy into a MAC address.

You can check the arp table to see what IP addresses are associated with which MAC addresses by doing an 'arp -a' but there is guarantee that that will show you what you want.
Highlighted
Ken Hubnik_2
Honored Contributor

Re: Is there a command that turns an IP address into a MAC address?

Using the arp command with the hostname or ip address will return the mac address.

arp hostname
arp IPadress
Sergejs Svitnevs
Honored Contributor

Re: Is there a command that turns an IP address into a MAC address?

Local subnet only:
# ping
# arp -a |grep

The MAC address for the remote host outside of the local subnet will be the MAC address of the router.

Regards,
Sergejs