How do I display a MAC Address on a port in CLI - Currently have OS 7.4.2. This should be very simple but cannot find any documentation. Also, in the GUI, how do I clear the MAC and IP info when a new device is plugged into the port. It shows the old MAC and IP even if I bounce the port.
Not seeing any instructions
Hello @DTNappo ,
You can see the Mac address table with this command.
diagnose switch mac-address list
And also, you can find cli commands for FortiSwitches in this link.
Went though all the commands and can't seem to find what I am looking for, I'm an old Cisco guy and still learning the Fortinet. SO what I am looking for is to see a Certain MAC address coming off a Certain Interface on a switchport.
You can use this command with "grep". For example;
diagnose switch mac-address list | grep "aa:bb:cc:dd:ee"
FortiswitchOS doesn't support "grep".
Toshi
Created on ‎04-24-2024 07:21 AM Edited on ‎04-24-2024 07:22 AM
or does it?
Looks like does it. Sorry.
Toshi
I don't have a FSW managed by a FGT to test. But it seems to be "diag switch-controller mac-host-switch-port" at least 6 years ago according to this reddit post. I seems to show all switches' all ports though.
https://www.reddit.com/r/fortinet/comments/7vglnk/fortiswitches_managed_by_a_fortigate_question/
Toshi
Sorry. Looks like you're looking for FSW CLI, not managed by FGT.
Toshi
In order to view the MAC address connected to a specific port of a FortiSwitch managed by a FortiGate (FortiLink), first apply a filter, then apply the show.
Create filter:
diagnose switch-controller mac-cache filter intf-name [port]
Show MACs:
diagnose switch-controller mac-cache show
Clear filter:
diagnose switch-controller mac-cache filter clear
User | Count |
---|---|
2609 | |
1390 | |
804 | |
664 | |
455 |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.