chrome - How to get the client ip and mac address through java under linux system?
某草草
某草草 2017-05-16 13:23:46
0
1
973

This is the command I passed

cmd = { "/bin/sh", "-c", "ping " + ip + " -c 2 && arp -a" };

The mac address obtained, but the mac address is not the client address I want, but the address on my cluster server. Is there any good way to obtain the client mac address through IP?

某草草
某草草

reply all(1)
世界只因有你

In fact, if you want to get the client's mac address, there is no way, because when the datagram passes through the router, the mac address in the message will be rewritten by the router, because the mac address of the sender in the link layer needs to be recorded , the general process is as follows:

You can also refer to this article:
Network-The MAC address and IP address of the data packet change or remain unchanged during the routing and forwarding process

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!