Search code examples
javamac-addressipv4

MAC address to IP conversion


While there are many tutorials on IP to MAC address conversion not much is available for the reverse process. I've checked out RARP(which is just the protocol). Is there a method for MAC to IP conversion. Thanks!


Solution

  • On Linux you can get this type of information using arp command:

    $ sudo arp -n
    Address                  HWtype  HWaddress           Flags Mask            Iface
    192.168.1.5              ether   01:00:00:11:44:11   C                     eth0
    192.168.1.6              ether   02:00:00:44:33:22   C                     eth0