Finding out AP's mac address a WiFi client is connected to

Hello experts,

Here is my setup:

OpenWRT box[No-wifi] ---- Dumb L2 Switch --- Acess-Points[vendor FW, no routing/NAT] --- WiFi users.

From within the OpenWRT box, Is there any way I can find out which WiFi user [IP or mac address] is connected to which of the Access points [IP or mac address]?
I mean like using ping, tcpdump etc?

I believe the answer is NO... but still giving it a shot in case anyone has ideas.

„find out“ is probably the wrong wording,
you could redesign the network a bit:

  • enable routing on the APs, each AP will then have its own subnet
  • use a separate VLAN for each AP. this effectively means also an own subnet for each VLAN on the central router.
    So both result in dedicated IP ranges for each AP.

Maybe install and take a look at „dawn“, could be that it can give you the info as well (though it does more than that)

See DHCP Leases list.

DHCP Leases list tells APs and wifi users mac/ip addresses.
But it does not tell which wifi user is connected to which AP, does it?

If your APs have an SNMP agent in them, you probably could query the info you need via SNMP.
Look at the documentation for your APs to find out if they have SNMP and which MIBs they support. The L2 forwarding table is commonly available via the BRIDGE mib.

It looks like the OpenWrt snmp-utils package and the dependent packages may need about 650k of storage so if you have the space, you could install the snmp tools on your OpenWrt router and query the APs for the client mac address.

Alternatively, you can probably get the mac address to port mapping via SNMP on the switch if it has SNMP and you need to know which switch port connects each AP.

2 Likes

similar parallel thread, maybe also interesting for you: Marking packets from different wifi-iface

Use a VLAN per AP?

RADIUS accounting will have an AP report each connection and disconnection to a RADIUS server. In OpenWRT, RADIUS accounting can be used without RADIUS authentication, on PSK or open connections.

Thank you all for pitching in. I appreciate each of you trying to help me out.

Given my use-case, SNMP seems to be the right way.

Thank you @spence for putting me on the right track. :ok_hand:

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.