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

CLI Command to view MAC on a specific managed switch port

We have multiple Fortiswitches managed by a Fortigate.  I need a command to see the MAC addresses on a specific port on a managed switch.  For example, I need to see the MAC addresses on port 1 of switch "1234." 

 

I can use this command to see "port1":

 

diagnose switch-controller switch-info mac-table | grep port1

 

But this command lists all the port 1s for all the managed switches.

 

I need a command that let's me specify which managed switch I want to view.

 

Thanks.

1 Solution
ozkanaltas
Valued Contributor III

Hello @peter-supply ,

 

Can you try like that?

 

diagnose switch-controller switch-info mac-table <SW_Serial_Number> | grep port1
If you have found a solution, please like and accept it to make it easily accessible to others.
NSE 4-5-6-7 OT Sec - ENT FW

View solution in original post

If you have found a solution, please like and accept it to make it easily accessible to others.NSE 4-5-6-7 OT Sec - ENT FW
3 REPLIES 3
ozkanaltas
Valued Contributor III

Hello @peter-supply ,

 

Can you try like that?

 

diagnose switch-controller switch-info mac-table <SW_Serial_Number> | grep port1
If you have found a solution, please like and accept it to make it easily accessible to others.
NSE 4-5-6-7 OT Sec - ENT FW
If you have found a solution, please like and accept it to make it easily accessible to others.NSE 4-5-6-7 OT Sec - ENT FW
peter-supply
New Contributor II

Thank you!  That works!  Should have tried that before I posted.  I greatly appreciate your help.

ozkanaltas
Valued Contributor III

Hello @peter-supply ,

 

I'm happy that it worked. 

 

If you mark as solution to my answer, they can easily find a solution who face with same issue. 

If you have found a solution, please like and accept it to make it easily accessible to others.
NSE 4-5-6-7 OT Sec - ENT FW
If you have found a solution, please like and accept it to make it easily accessible to others.NSE 4-5-6-7 OT Sec - ENT FW
Announcements
Check out our Community Chatter Blog! Click here to get involved
Labels
Top Kudoed Authors