Support Forum
The Forums are a place to find answers on a range of Fortinet products from peers and product experts.
Ravina
New Contributor

port details on which mac address is learned

Hi everyone

 

I have a core switch connected to different access switches. when any user connected on any access switch through LAN then how should i know the user is connected to which access switch from that user's MAC address.

16 REPLIES 16
Ravina
New Contributor

Hi,

So, you are saying we cant get port number of core switch from which user's mac entry is coming, we need to go on each access switch and check the mac table for each access switch

Yurisk

Not exactly - on Core switch you can search and find the MAC address of the end user and  via which interface it was learned by Core switch, this way you will know the Access switch on this interface and thus user will be connected to this Access switch. To actually know on what physical port in the Access switch the user is connected you would need to trace user's MAC address from Core switch down to the last Access switch by user's MAC address. 

https://yurisk.info
https://yurisk.info
Ravina
New Contributor

How can we search and find the mac address of the end user and via which interface it was learned by core switch ?

Yurisk

Sorry for the late reply, on standalone Fortiswitch (i.e. not managed by Fortigate), it would be:

 

diagnose switch mac-address list

  

Depending on the FSW version, you may also have grep available to search for a specific MAC:

diagnose switch mac-address list | grep aa.bb.cc
https://yurisk.info
https://yurisk.info
Ravina
New Contributor

Hello Team,

 

This is the output of the given command, but there is no specific interface is mentioned in the outputIMG-20250704-WA0002.jpg

Yurisk

It is - the MAC belongs to VLAN 16 which is seen on Trunk  "Floor Uplink" , so this Trunk   is the bundle with another switch which you have to check next, you may use 

diagnose switch trunk summary

to get list of all trunks on the local switch 

https://yurisk.info
https://yurisk.info
VinayHM
Staff
Staff

Use the command 

get system arp | grep port  <- on which port you want to see the learned MAC address

 

reference article

https://community.fortinet.com/t5/FortiGate/Technical-Tip-Using-get-system-arp-command-on-the-FortiG...

Vinay HM
Announcements
Check out our Community Chatter Blog! Click here to get involved
Labels
Top Kudoed Authors