Execute custom FortiSwitch commands
From the FortiGate, you can execute FortiSwitch commands on the managed FortiSwitch.
This feature adds a simple scripting mechanism for users to execute generic commands on the switch.
NOTE: FortiOS 5.6.0 introduces additional capabilities related to the managed FortiSwitch.
Create a command
Use the following syntax to create a command file:
config switch-controller custom-command edit <cmd-name> set command ” <FortiSwitch commands>”
Next, create a command file to set the STP max-age parameter:
config switch-controller custom-command edit “stp-age-10” set command “config switch stp setting set max-age 10
Execute a command
After you have created a command file, use the following command on the FortiGate to execute the command file on the target switch: exec switch-controller custom-command <cmd-name> <target-switch>
The following example runs the stp-age-10 command on the specified target FortiSwitch:
# exec switch-controller custom-command stp-age-10 S124DP3X15000118
View and upgrade the FortiSwitch firmware version
Having trouble configuring your Fortinet hardware or have some questions you need answered? Check Out The Fortinet Guru Youtube Channel! Want someone else to deal with it for you? Get some consulting from Fortinet GURU!
Don't Forget To visit the YouTube Channel for the latest Fortinet Training Videos and Question / Answer sessions!
- FortinetGuru YouTube Channel
- FortiSwitch Training Videos