Tag Archives: fortiswitch

How to get Fiber light levels from Fortiswitch

I needed to track down the power of one of our fiber ports – and had a hard time finding how through google-foo. Decided to document it. I did find this link if it helps anyone:

https://community.fortinet.com/t5/FortiSwitch/Troubleshooting-Tip-SFP-SFP-transceivers-port-fiber-link-is-not/ta-p/193940

In this case it was a Fortigate running 7.0.17, and Fortiswitch (Controlled via fortilink) running 7.2.7.

Connect into CLI on the switch through the gui and you can run these commands:

S148FFTF24032152 # get switch modules status port49


Port(port49)
temperature 48.769531 C
voltage 3.343900 volts
alarm_flags 0x0000
warning_flags 0x0000
laser_bias 1.944000 mAmps
tx_power -5.774101 dBm
rx_power -10.074465 dBm
options 0x000F ( TX_DISABLE TX_FAULT RX_LOSS TX_POWER_LEVEL1 )
options_status 0x0008 ( TX_POWER_LEVEL1 )

And there we go!

Getting Fortiswitch interface statistics

I am more impressed with Fortiswitches every time I work with them. The ability to implement light NAC features, INTRAvlan firewall policies and overall management really gives these switches a feature set to checkout when deciding on new switches.

Below are the steps to quickly get the interface stats such as errors/packets, etc. The commands are ran on the Fortigate, which in this case is controlling the Fortiswitch.

Drop into CLI on the FGT and check what switches are connected by running the command

get switch-controller managed-switch

This command will bring back the names of the manged switches. Locate the switch you want to check the port stats on. For example, we will use the name “FS1D24T419001174”

the command to get the stats are:

diag switch-controller switch-info port-stats FS1D24T419001174 port1

The output is in the image below:

using the top level command diag switch-controller switch-info you can also get LLDP, Power, and lots more info of the managed switch.