Skip to main content
Ravina
New Member
July 4, 2025
Question

port details on which mac address is learned

  • July 4, 2025
  • 8 replies
  • 2953 views

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.

8 replies

mahesh_pm
Explorer
July 4, 2025

Hi,

 

if you are using fortigate and fortiswitch.
the use fortiswitch client tab

Capture.JPG

Ravina
RavinaAuthor
New Member
July 4, 2025

Hi ,

Fortiswitch is not managed by Fortigate

mahesh_pm
Explorer
July 4, 2025

Hi,

if option not available in gui could you please try below cmd in switch cli.

get system arp
get system arp-table


Ravina
RavinaAuthor
New Member
July 4, 2025

Hii,

 

This commands only display's ip, mac address as shown below:image.png

mahesh_pm
Explorer
July 4, 2025

Hi,

also try this 
get switch lldp neighbors-summary

Ravina
RavinaAuthor
New Member
July 4, 2025

Hi,

I tried this "get switch lldp neighbors-detail" command and get below output.IMG-20250704-WA0006.jpg

mahesh_pm
Explorer
July 4, 2025

Hi,

You're currently getting information from the access switch that's connected to the core switch.
Please run the same command directly on the access switch to verify if it meets your requirement.

Ravina
RavinaAuthor
New Member
July 4, 2025

Hii,

This is not my requirement. i want that i should get port number of core switch from which mac entry is coming, so i can check which access switch is connected to that port and can check on that particular access switch.

Yurisk
SuperUser
SuperUser
July 4, 2025

You cannot learn it on Fortigate which does not manage those switches, you'd have to manually enter each switch, list its mac-address table and look for the user's MAC address. 

 

Unrelated: managing FortiSwitches as stand-alone devices is an exercise in frustration, fortunately it happens very rarely in real life. 

Ravina
RavinaAuthor
New Member
July 4, 2025

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
SuperUser
SuperUser
July 4, 2025

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. 

Ravina
RavinaAuthor
New Member
July 4, 2025

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

Yurisk
SuperUser
SuperUser
July 7, 2025

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
Ravina
RavinaAuthor
New Member
July 7, 2025

Hello Team,

 

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

VinayHM
Staff
July 8, 2025

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-FortiGate/ta-p/334336