Main Site Documentation

MAC Address of Client


#1

Is it possible to get the MAC address of a remote client? I am using the Cerberus with 4.3.

Thanks


#2

TCP address, yes, but MAC address, no. Why do you need it ? It is only ever used in ARP requests on local network segments, so you knowing it means nothing.

What is your use case / scenario where that’s important? What do you want to achieve?


#3

The Cerberus is acting as a gateway device; collecting data from devices on the local network and forwarding to the cloud using a cell modem. I use the MAC address from the devices to identify them since it is globally unique. Other gateway devices I use, like Win CE, Win 7 or Linux have full blown IP stack so its no problem to get the MAC address from a remote device.

If there is no easy way with .NET MF than I will add it to the devices data packet that gets sent to the Cerb.


#4

If you mean, can my tcp client find out the mac address of another system by IP address the answer is no - unless you’re on the same LAN. ( e.g. ARP -A to show MAC table). But if there are any layer 2 devices between you, then no. You ou couldn’t know my MAC if I gave you my IP addresss, just as you couldn’t really determine whether my LAN is WIFI or phsical copper.

[A} tcp ->ethernet->physical media ----------- physical media ->ethernet->tcp [B]

The cheat to this is if the cilent software on [B] interrogates hardware for device capabilities and sends a message back.

Is this the scenario you’re asking? Can a NETMF device query it’s own MAC?


#5

@ Dr9 - all devices are on the same LAN. I want the MAC of the device on the network, not my own MAC on the Cerb. I don’t see anything in the .netmf TCP/IP stack that allows me to get the MAC of a device on the network. I know its in the device somewhere but might be more work than its worth.

I control the software on the remote devices so I can embed the MAC in the data packet that gets sent to the Cerb. However, I was hoping to avoid a software update to those devices. Up until this point I have used bigger OS’s (Win CE, Linux, etc) that had full ARP capabilities.