1

I am developing an application in which it is very important that I can know the mac address of the client hitting the server.

  • Clients are connected to wifi router (W).
  • Multiple wifi routers (W) are connected to a switch (SW).
  • A server (SE) is connected to the switch (SW) which acts as internet gateway for all the wifi routers (W).
  • The application I am developing is hosted on the server (SE).

After multiple clients have made the requests, I check arp -a to get the mac address.

What I want is, in arp cache each client IP should be associated with its mac address.

I know that client mac doesn't survive the routing. But is there any way that I can configure the router such that mac address survives the routing?

  • 2
    You cannot do it per the normal TCP/IP protocol. You need to get a side channel to obtain it, either with an agent, or getting it directly from the infra-structure. Or do way with the requirement of knowing the MAC, and using locally installed X.509 certs as an alternative, for instance. – Rui F Ribeiro May 30 '16 at 14:21
  • 3
    Or with IPv6 everywhere you could embed the MAC into the v6 addresses used. – thrig May 30 '16 at 15:43
  • Locking in applications to host parameters like mac/network addresses is a bad thing. – user140866 May 31 '16 at 17:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.