how to get a client’s MAC address from HttpServlet?

You’re probably not going to get what you want. (the client’s MAC address)

If the server is close enough (directly connected via hub or maybe a switch) you can ARP for the MAC Address. If you do this for an IP across the Internet you’re probably going to get the inside interface of the closest Router or Switch.

Because of the way TCP/IP works the MAC address used in the ‘frame’ will get ripped off and re-assembled each at each hop the information takes between the server and the host.

alt text

Encapsulation

Leave a Comment