简体   繁体   中英

Find out IP address associated with MAC Address in servlet web application

I'm trying to find out the IP address associated with an MAC address in servlet programming. Is it possible ?

I have the MAC address. Using MAC address how can I find out the IP Address ?

As soon as you are in a Servlet , you can get the IP of the client with request.getRemoteAddr() and since it seems that you already have the Mac address... that's it.

As simple as that... if the the Mac address that you have is effectively the one of the client making the request (which isn't very clear in your question).

A MAC address doesn't have a unique IP address, only one one within the subnet the MAC address appears in. Your question therefore diesnt really make sense.

The question also arises how you're getting this MAC address in the first place, and why, and what uses you intend to put it to. You need to understand that MAC addresses can be changed by the user, or his net admin, and aren't usable as unique system identifiers.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM