But I could not find a way to get an IP address from a MAC address. Hi, If you have root privileges, you can use ifconfig -a, which will display the MAC address along with the IPs. It will be very nice if I can use the same method on Mac, Linux and Windows machines.Īs far as I know, I have to broadcast a ARP packet to the network in order to retrieve a MAC address from a known IP address. I would like to know how to retrieve the IP address in a more sophisticated way. Find the known MAC address and the corresponding IP address from the list.Execute arp -a to print a list of IP and MAC addresses.Execute ping command ping 192.168.0.2 (NOTE: the instrument does not respond to ping). But I need to know the IP address before opening a socket (WinSock on Windows, sys/socket on OS X and Linux).Ĭurrently I use a very dirty way as shown below. I would like to write a C/C++ application which talks with the instrument using a socket connection. Select one of the available VPN options or get a special offer with tigerVPN. I know the MAC address of the instrument, but please assume that its IP address is unknown. If you don’t have any VPN accounts saved, hit the plus button. The PC and the instrument are directly connected over a UDP socket with a CAT5 cable. In my case, there are only two devices: a very normal PC (192.168.0.1) and a scientific instrument which has an arbitrary IP address (192.168.0.xxx) hard coded in its ROM. I am looking for an easy way to convert a MAC address to the corresponding IP address in a local network.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |