Get physical interface on a bridge

Hi,

I have a hotspot configured in a bridge, however I have to know in which physical interface the client is connected.
Among the variables that the hotspot provides, there is the attribute “$(interface-name)”, but it always returns the name of the bridge.

The moments that I need this information are in the login and logout of the client, so script is a considerable option.

Looked like this, I was able to get the hostname of the client, intersecting with the DHCP-LEASE table information

: local hostname [ip dhcp-server lease get [find address = $ address] host-name];

Can I do something like get the interface name?

thanks

Remember that the Hotspot feature is a layer3 function - so it’s going to see interfaces in terms of “IP interfaces” not “switchport” interfaces (to borrow a term from Cisco and others).

Scripting would need to use the bridge hosts table / switch hosts tables to find the exact physical interface. I’m definitely not a script guru so others would need to chime in with further suggestions, but in general, I can say that your script could capture the MAC address from the session and then cross-reference that with the layer2 forwarding tables I mentioned.