Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
Hi,

I need to generate MACID from IP Address. Currently i done it by using ARP. But the problem is that When it tries to generate MACID of a device Which is other than the IP range of My working PC. This fails. I can't understand why it fails. Please provide a solution for me.

Thanks,
Satheesh
Posted

1 solution

http://compnetworking.about.com/od/tcpip/f/convertmacipadd.htm[^]

It is usually not possible for a person to get the MAC address of a computer from its IP address alone. These two addresses originate from different sources. Simply stated, a computer's own hardware configuration determines its MAC address while the configuration of the network it is connected to determines its IP address.

However, computers connected to the same TCP/IP local network can determine each other's MAC addresses. The technology called ARP - Address Resolution Protocol included with TCP/IP makes it possible. Using ARP, each computer maintains a list of both IP and MAC addresses for each device it has recently communicated with.

Most computers allow you to see the list of IP and MAC addresses that ARP has collected there. In Windows, Linux and other operating systems, the command line utility "arp" shows this information. Using "arp," you can in fact determine the MAC address of some computers from their IP address. ARP works only within the small group of computers on a local area network (LAN), though, not across the Internet. ARP is intended for use by system administrators and is not generally useful as a way to track down computers and people on the Internet.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 20-Apr-11 1:26am    
Very good explanation, my 5.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900