Identify mac connected to switch port

DavidSack
Here to help

Identify mac connected to switch port

We have a MS-125 switch and I have tried several methods to consistently identify what client mac address is connected to a specific switch port.  I have tried:

 

BASE_URL}/devices/{switch_serial}/liveTools/macTable/{mac_table_id}

 

forwarding_table = dashboard.switch.getDeviceSwitchForwardingTable(switch_serial)

 

url = f"{BASE_URL}/devices/{serial}/switch/ports/{port_number}/clients"
 
url = f"{BASE_URL}/devices/{serial}/clients?perPage=1000"
 
and they show sometimes but not others.  Any assistance would be greatly appreciated.
 
Thanks
Dave

 

 

14 Replies 14
alemabrahao
Kind of a big deal
Kind of a big deal

Use the forwarding table (getDeviceSwitchForwardingTable) as your primary source. It’s the most direct way to map MAC addresses to ports and refresh it periodically to catch new entries.

I am not a Cisco Meraki employee. My suggestions are based on documentation of Meraki best practices and day-to-day experience.

Please, if this post was useful, leave your kudos and mark it as solved.
DavidSack
Here to help

When I try to use:

 

forwarding_table = dashboard.switch.getDeviceSwitchForwardingTable(switch_serial)
 
I recieve the following error:
 
Error retrieving forwarding table: 'Switch' object has no attribute 'getDeviceSwitchForwardingTable'
 
Dave
Mloraditch
Kind of a big deal
Kind of a big deal

I do not recognize and cannot find an API call with that name. Where did you find that? It may have existed in the past and been replaced by the live tools call for the mac table. They would be duplicative I believe.

If you found this post helpful, please give it Kudos. If my answer solves your problem please click Accept as Solution so others can benefit from it.
DavidSack
Here to help

I think it was an AI issue.  I'll take a closer look.

 

Thanks

Dave

Mloraditch
Kind of a big deal
Kind of a big deal

The mac table is going to be the most accurate information at any given time. 


MAC tables are live from the switch showing devices connected in the last 300s.


Forwarding Tables are MAC Tables

Client info is going to have a bit of a delay in showing up, and it includes historical info for up to 30 days. I would stick with the mac table if you are looking for live data.

If you found this post helpful, please give it Kudos. If my answer solves your problem please click Accept as Solution so others can benefit from it.
DavidSack
Here to help

Definetly looking at live data.  The weird thing is that the entries come and go even though I have the same equipment connected.  The equipment does power on on off periodically, would that reset the 300s?

Mloraditch
Kind of a big deal
Kind of a big deal

The mac timer is 300s since the port has seen the mac, if the port goes offline, the entry should clear regardless of the timer. If the device stops responding, power save, etc, basically anything where it doesn't generate any traffic, it can also drop out.

If you found this post helpful, please give it Kudos. If my answer solves your problem please click Accept as Solution so others can benefit from it.
alemabrahao
Kind of a big deal
Kind of a big deal

If the device is offline and not sending traffic, the switch will eventually remove its MAC from the forwarding table.

 

 

I am not a Cisco Meraki employee. My suggestions are based on documentation of Meraki best practices and day-to-day experience.

Please, if this post was useful, leave your kudos and mark it as solved.
DavidSack
Here to help

The devices are online and are sending traffic.  I will keep poking at it to see if I can find a trigger that is causing the drop.  I am suprised that there is not a solid way to read a mac from a port as soon as the device becomes live.

 

Thanks

Dave

Mloraditch
Kind of a big deal
Kind of a big deal

If something is missing from the live mac table and you are sure it's generating traffic, I would open a support case, as that would be a bug of some sort. Should be pretty easy to prove and log to get a bug filed.

If you found this post helpful, please give it Kudos. If my answer solves your problem please click Accept as Solution so others can benefit from it.
Oren
Meraki Employee All-Star Meraki Employee All-Star
Meraki Employee All-Star

Does it show up in the ARP table in Dashboard?

DavidSack
Here to help

We're on 17.2.2 on an MS 125 switch, I have been unable to locate the ARP page for the switch.  

 

Thanks

Dave

Oren
Meraki Employee All-Star Meraki Employee All-Star
Meraki Employee All-Star

MAC forwarding table, under tools.

 

IMG_6250.jpeg

DavidSack
Here to help

Found it.  Was looking for ARP table, sorry for the confusion.

Get notified when there are additional replies to this discussion.