Fortinet Document Library

Version:


Table of Contents

CLI Reference

6.0.6
Download PDF
Copy Link

switch-controller

Use this command to establish an ssh session with another system.

History

The following table shows all newly added, changed, or removed entries as of FortiOS 6.0.1.

Command Description

execute switch-controller diagnose-connection <fortiswitch-id>

Get FortiSwitch connection diagnostics, including FortiLink verification, FortiLink L-2 status check, and CAPWAP L-3 status check.

execute switch-controller mac-limit-violation reset all <fortiswitch-id>

execute switch-controller mac-limit-violation reset interface <fortiswitch-id> <port>

execute switch-controller mac-limit-violation reset vlan <fortiswitch-id> <vlan-id>

Reset all MAC learning limit violations, on a FortiSwitch interface, or on a FortiSwitch VLAN.

The following table shows all newly added, changed, or removed entries as of FortiOS 6.0.

Command Description

execute switch-controller get-physical-conn dot <fortiswitch-stack-id>

 

execute switch-controller get-physical-conn standard <fortiswitch-stack-id>

Original get-physical-conn command has been split in order to see FortiSwitch stack connectivity graph either in dot or standard output format.

execute switch-controller get-sync-status {all | group | name | switch-id <fortiswitch-id>}

Show various synchronization status information for FortiSwitch.

execute switch-controller restart-swtp-delayed all

execute switch-controller restart-swtp-delayed sn

execute switch-controller restart-swtp-delayed switch-group

Restart delay for all FortiSwitch devices, for specific devices identified by serial number, and/or for those devices belonging to a switch group.

execute switch-controller stage-tiered-swtp-image all

execute switch-controller stage-tiered-swtp-image sn

execute switch-controller stage-tiered-swtp-image switch-group

Stage FortiSwitch image to all managed FortiSwitch devices in a stack, for specific devices identified by serial number, and/or for those devices belonging to a switch group.

execute switch-controller trigger-config-sync <fortiswitch-id>

Trigger configuration synchronization to FortiSwitch.

execute switch-controller virtual-port-pool request <fortiswitch-id> <port>

 

execute switch-controller virtual-port-pool return <fortiswitch-id> <port>

 

execute switch-controller virtual-port-pool show

 

execute switch-controller virtual-port-pool show-by-pool <pool-name>

 

execute switch-controller virtual-port-pool show-by-property <property-name>

 

execute switch-controller virtual-port-pool show-by-tag <tag-name>

Show various multi-tenancy virtual pool details.

Syntax

Reset FortiSwitch BPDU guard
execute switch-controller bpdu-guard-reset  Reset BPDU guard on switch-interface.
        {switch}   FortiSwitch device ID.
            {port}   FortiSwitch port.

Clear FortiSwitch MAC entries from an interface
execute switch-controller clear-802-1X-interface  Clear FortiSwitch MAC entries on a single interface.
        {FortiSwitch-id}   FortiSwitch device ID.
            {port}   FortiSwitch port.

Clear FortiSwitch IGMP snooping multicast groups and queries
execute switch-controller clear-igmp-snoop  Clear FortiSwitch IGMP snooping multicast Groups and Queriers.
        {FortiSwitch-id}   FortiSwitch device ID.

Execute a custom command to a managed FortiSwitch
execute switch-controller custom-command  Push a FortiSwitch custom command to a FortiSwitch device.
        {cmd-name}   Names of commands to be pushed to this FortiSwitch device, as configured under config switch-controller custom-command.
            {target-switch}   FortiSwitch device to push the custom command to.

Delete a FortiSwitch firmware image
execute switch-controller delete-swtp-image  Delete FortiSwitch image.
        {filename}   FortiSwitch image filename.

Display FortiSwitch connection diagnostics
execute switch-controller diagnose-connection  Get FortiSwitch connection diagnostics.
        {fortiswitch-id}   FortiSwitch device ID.

Reset a FortiSwitch to factory default settings
execute switch-controller factory-reset  Set FortiSwitch to factory default settings.
        switch   FortiSwitch device ID.

Display a FortiSwitch's connection status
execute switch-controller get-conn-status  Get FortiSwitch connection status.
        {fortiswitch-id}   FortiSwitch device ID.

View FortiSwitch stack connectivity in dot output
execute switch-controller get-physical-conn dot  Get FortiSwitch stack connectivity graph in dot output format.
        {FortiSwitch-Stack-ID}   FortiSwitch stack ID.

View FortiSwitch stack connectivity in standard output
execute switch-controller get-physical-conn standard  Get FortiSwitch stack connectivity graph in standard output format.
        {FortiSwitch-Stack-ID}   FortiSwitch stack ID.

View FortiSwitch sync status
execute switch-controller get-sync-status all  Get FortiSwitch sync status.

View FortiSwitch sync status by group
execute switch-controller get-sync-status group   Get FortiSwitch sync status by group.
        {group}   Group Name.

View FortiSwitch sync status by name
execute switch-controller get-sync-status name   Get FortiSwitch sync status by name.
        {name}   Name.

View FortiSwitch sync status by switch
execute switch-controller get-sync-status switch-id  Get FortiSwitch sync status by switch.
        {fortiswitch-id}   FortiSwitch device ID.

List FortiSwitch firmware images
execute switch-controller list-swtp-image  List FortiSwitch image.

Reset FortiSwitch loop guard data
execute switch-controller loop-guard-reset  Reset loop-guard on switch-interface.
        {switch}   FortiSwitch device ID.
            {port}   FortiSwitch port.

Reset MAC learning limit violations in FortiSwitch
execute switch-controller mac-limit-violation reset all  Reset all MAC learning limit violations in FortiSwitch.
        {switch}   FortiSwitch device ID.

Reset MAC learning limit violations on a FortiSwitch interface
execute switch-controller mac-limit-violation reset interface  Reset MAC learning limit violations on a FortiSwitch interface.
        {switch}   FortiSwitch device ID.
            {port}   FortiSwitch ports.

Reset MAC learning limit violations on a FortiSwitch VLAN
execute switch-controller mac-limit-violation reset vlan  Reset MAC learning limit violations on a FortiSwitch VLAN.
        {switch}   FortiSwitch device ID.
            {vlan-id}   FortiSwitch VLAN ID.

Reset a FortiSwitch's PoE interface
execute switch-controller poe-reset  Reset PoE port on FortiSwitch.
        {fortiswitch-id}   FortiSwitch device ID.
            {port}   FortiSwitch port.

Upload a FortiSwitch image to a managed FortiSwitch
execute switch-controller push-swtp-image  Upgrade FortiSwitch image to a managed FortiSwitch device.
        {fortiswitch-id}   FortiSwitch device ID.
            {filename}   FortiSwitch image filename.

Restart the FortiSwitch process
execute switch-controller restart-acd  Restart switch-controller daemon.

Restart all managed FortiSwitches
execute switch-controller restart-swtp all  Restart all FortiSwitch devices.

Restart a managed FortiSwitch using its serial number
execute switch-controller restart-swtp sn  Restart FortiSwitch device identified by serial number.
        {fortiswitch-id}   FortiSwitch device ID.

Restart all managed FortiSwitches in a switch group
execute switch-controller restart-swtp switch-group  Restart FortiSwitch devices belonging to switch-group.
        {switch-group ID}   Switch group ID.

Restart the switch controller process running on a managed FortiSwitch
execute switch-controller restart-swtpd  Restart switch-controller daemon in FortiSwitch device.
        {fortiswitch-id}   FortiSwitch device ID.

Restart delay for all managed FortiSwitch devices
execute switch-controller restart-swtp-delayed all  Restart delay all FortiSwitch devices.

Restart delay for those FortiSwitch devices identified by serial
execute switch-controller restart-swtp-delayed sn  Restart delay FortiSwitch device identified by serial number.
        {fortiswitch-id}   FortiSwitch device ID.

Restart delay for those FortiSwitch belonging to switch-group
execute switch-controller restart-swtp-delayed switch-group  Restart delay FortiSwitch devices belonging to switch-group.
        {switch-group ID}   Switch group ID.

Revert a managed FortiSwitch to standalone mode

This command effectively turns off FortiLink mode and the FortiSwtch will no longer be managed by the FortiGate.

execute switch-controller set-standalone  Set FortiSwitch to local/non-FortiLink mode.
        switch   FortiSwitch device ID.

Upload a FortiSwitch firware image to a manage FortiSwitch
execute switch-controller stage-swtp-image  Stage FortiSwitch image to a managed FortiSwitch device.
        {fortiswitch-id}   FortiSwitch device ID.
            {filename}   FortiSwitch image filename.

Upload a FortiSwitch firware image to all managed FortiSwitch devices
execute switch-controller stage-tiered-swtp-image all  Stage image to all FortiSwitch devices.
        {filename}   FortiSwitch image filename.

Upload a FortiSwitch firware image to those FortiSwitch devices identified by serial
execute switch-controller stage-tiered-swtp-image sn  Stage image to FortiSwitch device identified by serial number.
        {fortiswitch-id}   FortiSwitch device ID.
            {filename}   FortiSwitch image filename.

Upload a FortiSwitch firmage image to those FortiSwitch devices belonging to switch-group
execute switch-controller stage-tiered-swtp-image switch-group  Stage image to FortiSwitch devices belonging to switch-group.
        {switch-group ID}   Switch group ID.
            {filename}   FortiSwitch image filename.

Trigger full configuration synchronization for FortiSwitch
execute switch-controller trigger-config-sync  Triggers full configuration synchronization for FortiSwitch.
        {switch}   FortiSwitch device ID.

Upload a FortiSwitch firware image to a manage FortiSwitch from an FTP server
execute switch-controller upload-swtp-image ftp  Upload a FortiSwitch image from FTP server.
        {string}   FortiSwitch image name on the FTP server.
            {ftp server}[:ftp port]   FTP server IP, can be attached with port.
                {Enter}|{user}   FTP username may be needed.
                    {passwd}   FTP password.

Upload a FortiSwitch firware image to a manage FortiSwitch from a TFTP server
execute switch-controller upload-swtp-image tftp  Upload a FortiSwitch image from TFTP server.
        {string}   FortiSwitch image name on the TFTP server.
            {ip}   IP address of TFTP server.

Request virtual port from pool
execute switch-controller virtual-port-pool request  Request virtual port from pool.
        {switch}   FortiSwitch device ID.
            {port}   FortiSwitch port.

Return virtual port to pool
execute switch-controller virtual-port-pool return  Return virtual port to pool.
        {switch}   FortiSwitch device ID.
            {port}   FortiSwitch port.

View details of virtual ports in pool
execute switch-controller virtual-port-pool show  Show details of virtual ports in pool.

View details of virtual ports by pool name
execute switch-controller virtual-port-pool show-by-pool  Show details of virtual ports in pool by pool name.
        {pool}   Pool Name.

View details of virtual ports by property name
execute switch-controller virtual-port-pool show-by-property  Show details of virtual ports in pool by property name.
        {property}   Property Name.

View details of virtual ports by tag name
execute switch-controller virtual-port-pool show-by-tag  Show details of virtual ports in pool by tag name.
        {tag}   Tag Name.

switch-controller

Use this command to establish an ssh session with another system.

History

The following table shows all newly added, changed, or removed entries as of FortiOS 6.0.1.

Command Description

execute switch-controller diagnose-connection <fortiswitch-id>

Get FortiSwitch connection diagnostics, including FortiLink verification, FortiLink L-2 status check, and CAPWAP L-3 status check.

execute switch-controller mac-limit-violation reset all <fortiswitch-id>

execute switch-controller mac-limit-violation reset interface <fortiswitch-id> <port>

execute switch-controller mac-limit-violation reset vlan <fortiswitch-id> <vlan-id>

Reset all MAC learning limit violations, on a FortiSwitch interface, or on a FortiSwitch VLAN.

The following table shows all newly added, changed, or removed entries as of FortiOS 6.0.

Command Description

execute switch-controller get-physical-conn dot <fortiswitch-stack-id>

 

execute switch-controller get-physical-conn standard <fortiswitch-stack-id>

Original get-physical-conn command has been split in order to see FortiSwitch stack connectivity graph either in dot or standard output format.

execute switch-controller get-sync-status {all | group | name | switch-id <fortiswitch-id>}

Show various synchronization status information for FortiSwitch.

execute switch-controller restart-swtp-delayed all

execute switch-controller restart-swtp-delayed sn

execute switch-controller restart-swtp-delayed switch-group

Restart delay for all FortiSwitch devices, for specific devices identified by serial number, and/or for those devices belonging to a switch group.

execute switch-controller stage-tiered-swtp-image all

execute switch-controller stage-tiered-swtp-image sn

execute switch-controller stage-tiered-swtp-image switch-group

Stage FortiSwitch image to all managed FortiSwitch devices in a stack, for specific devices identified by serial number, and/or for those devices belonging to a switch group.

execute switch-controller trigger-config-sync <fortiswitch-id>

Trigger configuration synchronization to FortiSwitch.

execute switch-controller virtual-port-pool request <fortiswitch-id> <port>

 

execute switch-controller virtual-port-pool return <fortiswitch-id> <port>

 

execute switch-controller virtual-port-pool show

 

execute switch-controller virtual-port-pool show-by-pool <pool-name>

 

execute switch-controller virtual-port-pool show-by-property <property-name>

 

execute switch-controller virtual-port-pool show-by-tag <tag-name>

Show various multi-tenancy virtual pool details.

Syntax

Reset FortiSwitch BPDU guard
execute switch-controller bpdu-guard-reset  Reset BPDU guard on switch-interface.
        {switch}   FortiSwitch device ID.
            {port}   FortiSwitch port.

Clear FortiSwitch MAC entries from an interface
execute switch-controller clear-802-1X-interface  Clear FortiSwitch MAC entries on a single interface.
        {FortiSwitch-id}   FortiSwitch device ID.
            {port}   FortiSwitch port.

Clear FortiSwitch IGMP snooping multicast groups and queries
execute switch-controller clear-igmp-snoop  Clear FortiSwitch IGMP snooping multicast Groups and Queriers.
        {FortiSwitch-id}   FortiSwitch device ID.

Execute a custom command to a managed FortiSwitch
execute switch-controller custom-command  Push a FortiSwitch custom command to a FortiSwitch device.
        {cmd-name}   Names of commands to be pushed to this FortiSwitch device, as configured under config switch-controller custom-command.
            {target-switch}   FortiSwitch device to push the custom command to.

Delete a FortiSwitch firmware image
execute switch-controller delete-swtp-image  Delete FortiSwitch image.
        {filename}   FortiSwitch image filename.

Display FortiSwitch connection diagnostics
execute switch-controller diagnose-connection  Get FortiSwitch connection diagnostics.
        {fortiswitch-id}   FortiSwitch device ID.

Reset a FortiSwitch to factory default settings
execute switch-controller factory-reset  Set FortiSwitch to factory default settings.
        switch   FortiSwitch device ID.

Display a FortiSwitch's connection status
execute switch-controller get-conn-status  Get FortiSwitch connection status.
        {fortiswitch-id}   FortiSwitch device ID.

View FortiSwitch stack connectivity in dot output
execute switch-controller get-physical-conn dot  Get FortiSwitch stack connectivity graph in dot output format.
        {FortiSwitch-Stack-ID}   FortiSwitch stack ID.

View FortiSwitch stack connectivity in standard output
execute switch-controller get-physical-conn standard  Get FortiSwitch stack connectivity graph in standard output format.
        {FortiSwitch-Stack-ID}   FortiSwitch stack ID.

View FortiSwitch sync status
execute switch-controller get-sync-status all  Get FortiSwitch sync status.

View FortiSwitch sync status by group
execute switch-controller get-sync-status group   Get FortiSwitch sync status by group.
        {group}   Group Name.

View FortiSwitch sync status by name
execute switch-controller get-sync-status name   Get FortiSwitch sync status by name.
        {name}   Name.

View FortiSwitch sync status by switch
execute switch-controller get-sync-status switch-id  Get FortiSwitch sync status by switch.
        {fortiswitch-id}   FortiSwitch device ID.

List FortiSwitch firmware images
execute switch-controller list-swtp-image  List FortiSwitch image.

Reset FortiSwitch loop guard data
execute switch-controller loop-guard-reset  Reset loop-guard on switch-interface.
        {switch}   FortiSwitch device ID.
            {port}   FortiSwitch port.

Reset MAC learning limit violations in FortiSwitch
execute switch-controller mac-limit-violation reset all  Reset all MAC learning limit violations in FortiSwitch.
        {switch}   FortiSwitch device ID.

Reset MAC learning limit violations on a FortiSwitch interface
execute switch-controller mac-limit-violation reset interface  Reset MAC learning limit violations on a FortiSwitch interface.
        {switch}   FortiSwitch device ID.
            {port}   FortiSwitch ports.

Reset MAC learning limit violations on a FortiSwitch VLAN
execute switch-controller mac-limit-violation reset vlan  Reset MAC learning limit violations on a FortiSwitch VLAN.
        {switch}   FortiSwitch device ID.
            {vlan-id}   FortiSwitch VLAN ID.

Reset a FortiSwitch's PoE interface
execute switch-controller poe-reset  Reset PoE port on FortiSwitch.
        {fortiswitch-id}   FortiSwitch device ID.
            {port}   FortiSwitch port.

Upload a FortiSwitch image to a managed FortiSwitch
execute switch-controller push-swtp-image  Upgrade FortiSwitch image to a managed FortiSwitch device.
        {fortiswitch-id}   FortiSwitch device ID.
            {filename}   FortiSwitch image filename.

Restart the FortiSwitch process
execute switch-controller restart-acd  Restart switch-controller daemon.

Restart all managed FortiSwitches
execute switch-controller restart-swtp all  Restart all FortiSwitch devices.

Restart a managed FortiSwitch using its serial number
execute switch-controller restart-swtp sn  Restart FortiSwitch device identified by serial number.
        {fortiswitch-id}   FortiSwitch device ID.

Restart all managed FortiSwitches in a switch group
execute switch-controller restart-swtp switch-group  Restart FortiSwitch devices belonging to switch-group.
        {switch-group ID}   Switch group ID.

Restart the switch controller process running on a managed FortiSwitch
execute switch-controller restart-swtpd  Restart switch-controller daemon in FortiSwitch device.
        {fortiswitch-id}   FortiSwitch device ID.

Restart delay for all managed FortiSwitch devices
execute switch-controller restart-swtp-delayed all  Restart delay all FortiSwitch devices.

Restart delay for those FortiSwitch devices identified by serial
execute switch-controller restart-swtp-delayed sn  Restart delay FortiSwitch device identified by serial number.
        {fortiswitch-id}   FortiSwitch device ID.

Restart delay for those FortiSwitch belonging to switch-group
execute switch-controller restart-swtp-delayed switch-group  Restart delay FortiSwitch devices belonging to switch-group.
        {switch-group ID}   Switch group ID.

Revert a managed FortiSwitch to standalone mode

This command effectively turns off FortiLink mode and the FortiSwtch will no longer be managed by the FortiGate.

execute switch-controller set-standalone  Set FortiSwitch to local/non-FortiLink mode.
        switch   FortiSwitch device ID.

Upload a FortiSwitch firware image to a manage FortiSwitch
execute switch-controller stage-swtp-image  Stage FortiSwitch image to a managed FortiSwitch device.
        {fortiswitch-id}   FortiSwitch device ID.
            {filename}   FortiSwitch image filename.

Upload a FortiSwitch firware image to all managed FortiSwitch devices
execute switch-controller stage-tiered-swtp-image all  Stage image to all FortiSwitch devices.
        {filename}   FortiSwitch image filename.

Upload a FortiSwitch firware image to those FortiSwitch devices identified by serial
execute switch-controller stage-tiered-swtp-image sn  Stage image to FortiSwitch device identified by serial number.
        {fortiswitch-id}   FortiSwitch device ID.
            {filename}   FortiSwitch image filename.

Upload a FortiSwitch firmage image to those FortiSwitch devices belonging to switch-group
execute switch-controller stage-tiered-swtp-image switch-group  Stage image to FortiSwitch devices belonging to switch-group.
        {switch-group ID}   Switch group ID.
            {filename}   FortiSwitch image filename.

Trigger full configuration synchronization for FortiSwitch
execute switch-controller trigger-config-sync  Triggers full configuration synchronization for FortiSwitch.
        {switch}   FortiSwitch device ID.

Upload a FortiSwitch firware image to a manage FortiSwitch from an FTP server
execute switch-controller upload-swtp-image ftp  Upload a FortiSwitch image from FTP server.
        {string}   FortiSwitch image name on the FTP server.
            {ftp server}[:ftp port]   FTP server IP, can be attached with port.
                {Enter}|{user}   FTP username may be needed.
                    {passwd}   FTP password.

Upload a FortiSwitch firware image to a manage FortiSwitch from a TFTP server
execute switch-controller upload-swtp-image tftp  Upload a FortiSwitch image from TFTP server.
        {string}   FortiSwitch image name on the TFTP server.
            {ip}   IP address of TFTP server.

Request virtual port from pool
execute switch-controller virtual-port-pool request  Request virtual port from pool.
        {switch}   FortiSwitch device ID.
            {port}   FortiSwitch port.

Return virtual port to pool
execute switch-controller virtual-port-pool return  Return virtual port to pool.
        {switch}   FortiSwitch device ID.
            {port}   FortiSwitch port.

View details of virtual ports in pool
execute switch-controller virtual-port-pool show  Show details of virtual ports in pool.

View details of virtual ports by pool name
execute switch-controller virtual-port-pool show-by-pool  Show details of virtual ports in pool by pool name.
        {pool}   Pool Name.

View details of virtual ports by property name
execute switch-controller virtual-port-pool show-by-property  Show details of virtual ports in pool by property name.
        {property}   Property Name.

View details of virtual ports by tag name
execute switch-controller virtual-port-pool show-by-tag  Show details of virtual ports in pool by tag name.
        {tag}   Tag Name.