fortiSwitchOS 6.0.2 CLI Ref PDF
fortiSwitchOS 6.0.2 CLI Ref PDF
fortiSwitchOS 6.0.2 CLI Ref PDF
CLI Reference
Version 6.0.2
FORTINET DOCUMENT LIBRARY
https://docs.fortinet.com
FORTINET VIDEO GUIDE
https://video.fortinet.com
FORTINET KNOWLEDGE BASE
http://kb.fortinet.com
FORTINET BLOG
https://blog.fortinet.com
CUSTOMER SERVICE & SUPPORT
https://support.fortinet.com
FORTINET COOKBOOK
http://cookbook.fortinet.com
FORTIGUARD CENTER
https://fortiguard.com
FORTICAST
http://forticast.fortinet.com
https://www.fortinet.com/corporate/about-us/privacy.html
FEEDBACK
Email: techdocs@fortinet.com
Change Log 12
Introduction 13
FortiSwitch models 13
How this guide is organized 13
Typographical conventions 13
CLI command syntax conventions 14
Entering configuration data 16
Entering text strings (names) 16
Entering numeric values 16
config 18
config log 18
config log custom-field 18
config log eventfilter 19
config log gui 19
config log memory filter 20
config log memory global-setting 21
config log memory setting 21
config log {syslogd | syslogd2 | syslogd3} filter 22
config log {syslogd | syslogd2 | syslogd3} setting 23
config router 25
config router access-list 25
config router aspath-list 26
config router bgp 27
config router community-list 37
config router isis 38
config router key-chain 43
config router multicast 45
config router multicast-flow 46
config router ospf 47
config router prefix-list 53
config router rip 54
config router route-map 59
config router setting 62
config router static 63
config switch 65
config switch acl egress 65
config switch acl ingress 67
config switch acl policer 70
config switch acl prelookup 71
config switch acl service custom 72
config switch acl settings 74
config switch auto-isl-port-group 74
config switch global 75
config switch igmp-snooping globals 79
config switch interface 80
config switch ip-mac-binding 84
config switch lldp profile 85
config switch lldp settings 88
config switch mirror 89
config switch network-monitor directed 89
config switch network-monitor settings 90
config switch phy-mode 91
config switch physical-port 92
config switch qos dot1p-map 95
config switch qos ip-dscp-map 96
config switch qos qos-policy 97
config switch security-feature 99
config switch static-mac 101
config switch storm-control 102
config switch stp instance 103
config switch stp settings 104
config switch trunk 105
config switch virtual-wire 108
config switch vlan 108
config system 112
config system accprofile 112
config system admin 113
config system arp-table 116
config system bug-report 117
config system certificate ca 117
config system certificate crl 119
config system certificate local 119
config system certificate ocsp 121
config system certificate remote 121
config system console 122
config system dns 122
config system fsw-cloud 123
config system global 124
config system interface 131
config system link-monitor 139
config system ntp 140
config system password-policy 141
config system settings 143
config system sflow 143
config system snmp community 144
config system snmp sysinfo 146
config system snmp user 148
config user 148
config user group 149
config user ldap 150
config user local 152
config user radius 153
config user setting 156
config user tacacs+ 158
diagnose 160
diagnose bpdu-guard display status 162
diagnose debug application 162
diagnose debug authd 164
diagnose debug cli 165
diagnose debug config-error-log 165
diagnose debug console 166
diagnose debug crashlog 166
diagnose debug disable 167
diagnose debug enable 167
diagnose debug info 167
diagnose debug kernel level 167
diagnose debug packet_test 167
diagnose debug port-mac 168
diagnose debug report 169
diagnose debug reset 170
diagnose flapguard status 170
diagnose hardware 171
diagnose ip address 172
diagnose ip arp 172
diagnose ip route 173
diagnose ip router bfd 175
diagnose ip router bgp 178
diagnose ip router command 178
diagnose ip router isis 179
diagnose ip router launch-info show 180
diagnose ip router ospf 181
diagnose ip router pim 185
diagnose ip router rip 186
diagnose ip router terminal monitor 189
diagnose ip router zebra 189
diagnose ip rtcache list 192
diagnose ip tcp 192
diagnose ip udp 193
diagnose ipv6 address 194
diagnose ipv6 devconf 195
diagnose ipv6 ipv6-tunnel 196
diagnose ipv6 neighbor-cache 196
diagnose ipv6 route 197
diagnose ipv6 sit-tunnel 198
diagnose log alertconsole 198
diagnose loop-guard instance status 200
diagnose settings 200
diagnose sniffer packet 201
diagnose snmp 203
diagnose stp instance list 204
diagnose stp mst-config list 205
diagnose stp vlan list 206
diagnose switch 802-1x status 207
diagnose switch acl counter 207
diagnose switch arp-inspection stats clear 208
diagnose switch egress list 208
diagnose switch ip-mac-binding entry 209
diagnose switch mac-address 210
diagnose switch mclag 211
diagnose switch modules 212
diagnose switch network-monitor 213
diagnose switch pdu-counters 214
diagnose switch physical-ports 215
diagnose switch poe status 221
diagnose switch trunk list 222
diagnose switch trunk summary 223
diagnose switch vlan 224
diagnose sys checkused 226
diagnose sys cpuset 227
diagnose sys dayst-info 227
diagnose sys fan status 227
diagnose sys flash 227
diagnose sys fsw-cloud-mgr 228
diagnose sys kill 228
diagnose sys link-monitor 229
diagnose sys mpstat 229
diagnose sys ntp status 230
diagnose sys pcb temp 230
diagnose sys process 230
diagnose sys psu status 230
diagnose sys top 231
diagnose sys vlan list 232
diagnose test application 232
diagnose test authserver 233
diagnose user radius coa 234
execute 235
execute 802-1x clear interface 236
execute acl clear-counter 236
execute backup config 237
execute backup full-config 238
execute backup memory 238
execute batch 239
execute bpdu-guard 240
execute cfg reload 240
execute cfg save 241
execute clear switch igmp-snoop 241
execute clear system arp table 242
execute cli check-template-status 242
execute cli status-msg-only 242
execute date 242
execute dhcp-snooping 243
execute disconnect-admin-session 243
execute factoryreset 244
execute factoryresetfull 244
execute flapguard reset 244
execute interface dhcpclient-renew 245
execute interface pppoe-reconnect 245
execute license add 245
execute license enhanced-debugging 245
execute license status 246
execute log delete 246
execute log delete-all 246
execute log display 247
execute log filter 247
execute log-report reset 248
execute loop-guard reset 248
execute mac clear 248
execute mac-limit-violation reset 249
execute ping 250
execute ping-options 250
execute ping6 252
execute ping6-options 252
execute poe-reset 253
execute reboot 254
execute restore 254
execute revision 256
execute router clear bgp 256
execute router clear ospf 257
execute router restart 257
execute router tech-support 257
execute set-next-reboot 257
execute shutdown 258
execute ssh 258
execute stage 259
execute sticky-mac 259
execute switch-controller get-conn-status 259
execute system certificate ca 259
execute system certificate crl import auto 260
execute system certificate local export tftp 261
execute system certificate local generate 261
execute system certificate local import tftp 262
execute system certificate remote 263
execute telnet 263
execute time 263
execute traceroute 264
execute tracert6 264
execute upload config 265
execute verify image 266
get 267
get hardware cpu 269
get hardware memory 269
get hardware status 270
get log custom-field 271
get log eventfilter 271
get log gui 272
get log memory 272
get log syslogd 274
get log syslogd2 274
get log syslogd3 275
get router access-list 276
get router info bfd neighbor 277
get router info bgp 277
get router info fwd 278
get router info gwdetect 278
get router info isis 278
get router info kernel 279
get router info multicast 279
get router info ospf 280
get router info rip 281
get router info routing-table 282
get router info vrrp 283
get router key-chain 284
get router ospf 284
get router prefix-list 285
get router rip 285
get router route-map 286
get router setting 287
get router static 287
get switch acl 287
get switch dhcp-snooping 289
get switch flapguard settings 289
get switch global 290
get switch igmp-snooping 291
get switch interface 292
get switch ip-mac-binding 292
get switch lldp 292
get switch mac-limit-violations 293
get switch mirror 294
get switch modules 295
get switch network-monitor 296
get switch phy-mode 296
get switch physical-port 297
get switch poe inline 297
get switch qos 298
get switch security-feature 299
get switch static-mac 299
get switch storm-control 299
get switch stp instance 300
get switch stp settings 300
get switch trunk 301
get switch virtual-wire 301
get switch vlan 301
get system accprofile 302
get system admin list 302
get system admin status 303
get system arp 304
get system arp-table 304
get system auto-update 304
get system bug-report 305
get system certificate 305
get system cmdb status 306
get system console 307
get system dns 307
get system fsw-cloud 308
get system fsw-cloud-mgr connection-info 308
get system global 309
get system info admin ssh 310
get system info admin status 310
get system interface physical 311
get system link-monitor 312
get system ntp 312
get system password-policy 312
get system performance firewall statistics 313
get system performance status 313
get system performance top 314
get system settings 315
get system sflow 315
get system snmp sysinfo 316
get system source-ip status 316
get system startup-error-log 317
get system status 317
get test 317
get user group 318
get user ldap 318
get user local 319
get user radius 319
get user setting 319
get user tacacs+ 320
Appendix: FortiSwitch QoS template 321
Change Log
Change Log
July 15, 2019 Updated the “config switch global” and “config switch physical-port” sections.
August 20, 2019 Updated the “config system snmp user” section.
Introduction
This manual describes the command line interface (CLI) commands for FortiSwitchOS.
FortiSwitch models
This guide is applicable to all FortiSwitch models that are supported by FortiSwitchOS.
See the Release Notes for information about the software features supported on each of the models.
The chapters in this document describe the commands available for each of the top-level CLI commands:
l config—commands that allow you to configure various components of the FortiSwitch unit.
l diagnose—commands that help with troubleshooting.
l execute—commands that perform immediate operations.
l get—commands that provide information about FortiSwitch operation.
Typographical conventions
Convention Example
Emphasis HTTP connections are not secure and can be intercepted by a third party.
<HTML><HEAD><TITLE>Firewall Authentication</TITLE></HEAD>
File content
<BODY><H4>You must authenticate to use this service.</H4>
Convention Example
Type a name for the remote VPN peer or client, such as Central_
Keyboard entry
Office_1.
This guide uses the following conventions to describe the syntax to use when entering commands in the
Command Line Interface (CLI).
Convention Description
Angle brackets < > A word constrained by data type. To define acceptable input, the angled
brackets contain a descriptive name followed by an underscore ( _ ) and
suffix that indicates the valid data type.
For example: <retries_int>
indicates that you should enter a number of retries, such as 5.
<xxx_pattern> A regular expression or word with wild cards that matches possible
variations, such as *@example.com to match all email addresses ending
in @example.com.
Convention Description
<xxx_int> An integer number that is not another data type, such as 15 for the number
of minutes.
A uniform resource locator (URL) and its associated protocol and host
<xxx_url> name prefix, which together form a uniform resource identifier (URI), such
as http://www.fortinet./com/.
Square brackets [ ] A non-required word or series of words. For example: [verbose {1 | 2 | 3}]
indicates that you can either omit or type both the verbose word and its
accompanying option, such as:
verbose 3
Options delimited by vertical Mutually exclusive options. For example: {enable | disable}
bars | indicates that you must enter either enable or disable but must not
enter both.
NOTE: To change the options, you must re-type the entire list. For
Options delimited by spaces
example, to add snmp to the previous example, you would type:
If the option adds to or subtracts from the existing list of options, instead of
replacing it, or if the list is comma-delimited, the exception will be noted.
The switch configuration is stored as a series of configuration settings in the FortiSwitchOS configuration
database. To change the configuration, you can use the CLI to add, delete, or change configuration settings.
These configuration changes are stored in the configuration database as they are made.
Individual settings in the configuration database can be text strings, numeric values, selections from a list of
allowed options, or on/off (enable/disable).
NOTE: The tree command output also shows the number of characters allowed for other firewall address name
settings. For example, the fully qualified domain name (fqdn ) field can contain up to 256 characters.
CLI help includes information about allowed numeric value ranges.The CLI prevents you from entering invalid
numbers.
config
Use the config commands to configure various components of the FortiSwitch unit:
config log
Use the config log commands to set the logging type, the logging severity level, and the logging location for
the system:
Syntax
<id > Enter the identification string for the custom log . No default
value <int> Enter an integer value to associate with the log. No default
Example
Syntax
event {enable | disable} Log event messages. Must be enabled to make the enable
following fields available.
Example
Syntax
log-device memory Select the device from which logs are displayed in the memory
Web-based manager.
Currently, only logging to memory is available.
Syntax
severity Select the logging severity level. The system logs all information
{alert | critical | debug | messages at and above the logging severity level you
emergency | error | information select. For example, if you select error, the system logs
| notification | warning} error, critical, alert and emergency level
messages.
l emergency — The system is unusable.
l alert — Immediate action is required.
l critical — Functionality is affected.
l error — An erroneous condition exists and
functionality is probably affected.
l warning— Functionality might be affected.
l notification — Information about normal
events.
l information — General information about
system operations.
l debug — Information used for diagnosing or
debugging the system.
Example
The FortiSwitch system memory has a limited capacity and displays only the most recent log entries. Traffic logs
are not stored in the memory buffer, due to the high volume of traffic information. After all available memory is
used, by default, the system begins to overwrite the oldest log messages. All log entries are deleted when the
system restarts.
Syntax
hourly-upload {disable |
Enter enable to have log uploads occur hourly. disable
enable}
max-size <int> Enter the maximum size of the memory buffer log, in 98304
bytes.
Example
This example shows how to configure log threshold warnings and the maximum buffer lines:
config log memory global-setting
set full-final-warning-threshold 45
set full-first-warning-threshold 25
set full-second-warning-threshold 45
set hourly-upload enable
set max-size 12288
end
The system memory has a limited capacity and only displays the most recent log entries. Traffic logs are not
stored in the memory buffer, due to the high volume of traffic information. After all available memory is used, by
default, the system begins to overwrite the oldest messages. All log entries are deleted when the system restarts.
Syntax
status {disable | enable} Enter enable to enable logging to system memory. disable
diskfull overwrite Overwrite the oldest log when the log device is full. No default
Example
Syntax
severity Select the logging severity level. The system logs all information
{alert | critical | debug | messages at and above the logging severity level you
emergency | error | information | select. For example, if you select error, the system
notification | warning} logs error, critical, alert and emergency level
messages.
l emergency — The system is unusable.
l alert — Immediate action is required.
l critical — Functionality is affected.
l error — An erroneous condition exists and
functionality is probably affected.
l warning— Functionality might be affected.
l notification — Information about normal
events.
l information — General information about
system operations.
l debug — Information used for diagnosing or
debugging the system.
Example
The system memory has a limited capacity and only displays the most recent log entries. Traffic logs are not
stored in the memory buffer, due to the high volume of traffic information. After all available memory is used, by
default, the system begins to overwrite the oldest messages. All log entries are deleted when the system restarts.
Syntax
status {disable | enable} Enter enable to enable logging to system memory. disable
reliable disable This field is available with status is set to enable. disable
Disable the reliable delivery for syslog.
csv {enable | disable} This field is available with status is set to enable. disable
Enable or disable comma-separated values.
source-ip <IPv4_address> This field is available with status is set to enable. 0.0.0.0
Enter the source IPv4 address of the syslog.
Example
config router
Use the config router commands to configure options related to routing protocols and packet forwarding:
Syntax
action {deny | permit} Set whether the rule allows or denies the IP address. permit
prefix {<xxx.xxx.xxx.xxx> Set the prefix to define regular filter criteria, such as any any
<xxx.xxx.xxx.xxx> | any} or subnets.
exact-match {enable | disable} Set whether the rule looks for an exact match with the disable
value in the prefix field.
Example
Use the config router aspath-list command to define an access list that examines the AS_PATH
attributes of BGP routes to match routes. Each entry in the list defines a rule for matching and selecting routes
based on the setting of the AS_PATH attribute.
Syntax
action {deny | permit} Set whether to permit or deny route-based operations, No default
based on the routeʼs AS_PATH attribute.
Syntax
keepalive-timer <0-65535> How often (in seconds) the router sends out 60
keepalive messages to neighbor routers to
maintain those sessions.
fast-external-failover {disable | Reset peer BGP session if link goes down. enable
enable}
confederation-identifier <1-
Confederation identifier. 0
4294967295>
config admin-distance
route-list <string> The list of routes this distance will be applied to. No default
config aggregate-address
summary-only {disable | enable} Filter more specific routes from updates. disable
config neighbor
attribute-unchanged {as-path | MED | Propagate unchanged BGP attributes to the BGP No default
next-hop} neighbor using one of the following methods
(IPv4):
l To advertise unchanged next-hop
attributes, select as-path.
l To advertise unchanged MULTI_EXIT_
DISC attributes, select med.
l To keep the next-hop attribute as is, select
next-hop.
l An empty set (default) is a supported
value.
activate {disable | enable} Enable address family IPv4 for this neighbor. enable
capability-orf {both | none | receive | Enable advertising of Outbound Routing Filter none
send} (ORF) prefix-list capability to the BGP neighbor
using one of the following methods (IPv4):
l none: disable the advertising of ORF
prefix-list capability.
l receive: enable receive capability.
l send: enable send capability.
l both: enable send and receive capability.
capability-default-originate {disable |
Advertise default IPv4 route to this neighbor. disable
enable}
ebgp-enforce-multihop {disable |
Allow multi-hop EBGP neighbors. disable
enable}
next-hop-self {disable | enable} Disable IPv4 next-hop calculation for this disable
neighbor.
strict-capability-match {disable |
Enable strict capability matching. disable
enable}
distribute-list-out <string> Limit route updates to the BGP neighbor based on No default
the NLRI defined in the specified access list
(IPv4). You must create the access list before it
can be selected here. See config router access-list
on page 25.
aspath-filter-list-out <string> BGP AS path filter for IPv4 outbound routes. You No default
must create the AS path list before it can be
selected here. See config router aspath-list on
page 26.
prefix-list-in <string> Limit route updates from a BGP neighbor based No default
on the Network Layer Reachability Information
(NLRI) in the specified prefix list (IPv4). The prefix
list defines the NLRI prefix and length advertised
in a route. You must create the prefix list before it
can be selected here. See config router prefix-list
on page 53.
keep-alive-timer <0-65535> How often (in seconds) the router sends out No default
keepalive messages to neighbor routers to
maintain those sessions.
config network
prefix <IP_address_netmask> Set the network prefix. Use the class IP address 0.0.0.0
and netmask with correction. 0.0.0.0
route-map <string> Specify the name of the route map that identifies No default
the routes to redistribute. If a route map is not
specified, all routes are redistributed to BGP. You
must create the route map before it can be
selected here. See config router route-map on
page 59.
Syntax
IS-IS is a link state protocol that is well-suited to smaller networks. It is quick to configure and works well if there
are no redundant paths. However, IS-IS updates are sent out node-by-node, so it can be slow to find a path
around network outages. IS-IS also lacks good authentication, can not choose routes based on different quality-
of-service methods, and can create network loops if you are not careful. IS-IS uses Djikstra’s algorithm to find the
best path, like OSPF.
While OSPF is more widely known, IS-IS is a viable alternative to OSPF in enterprise networks and ISP
infrastructures, largely due to its native support for IPv6 and its nondisruptive methods for splitting, merging,
migrating, and renumbering network areas.
Syntax
auth-mode-domain {md5 |
IS-IS domain (level-2) authentication mode. password
password}
auth-sendonly-domain {enable
IS-IS domain (level-2) authentication send-only. disable
| disable}
default-information-level Distribute default route into levelʼs link-state packet (LSP). level-2
{level-1 | level-1-2 | level-2}
default-information-metric <0-
Default information metric. 10
4261412864>
default-information-route-map
The default information route map. No default
<string>
overload-bit {disable | enable} Signal other routers not to use this bit in shortest-path-first disable
(SPF).
redistribute-l1 {disable |
Redistribute level-1 routes into level 2. enable
enable}
config isis-interface
{IS-IS interface name} Select the IS-IS interface name to configure. No default
auth-keychain-hello <string> Hello protocol data unit (PDU) authentication keychain. No default
This command is applicable when the hello packetʼs
authentication mode is md5.
auth-mode-hello {md5 |
Hello PDU authentication mode. password
password}
bfd {enable | disable} Enable or disable bidirectional forwarding detection (BFD). enable
circuit-type {level-1 | level-1-2 | Set the IS-IS circuit type to use for this interface: level-1-2
level-2} l level-1: intra-area
l level-1-2: both intra-area and inter-area
l level-2-only: inter-area
hello-padding {disable |
Enable padding to IS-IS hello packets. enable
enable}
status {disable | enable} Enable or disable the interface for IS-IS. enable
config isis-net
status {disable | enable} Enable or disable the redistribution of routes from other disable
routing protocols using IS-IS.
metric-type {external | internal} Select external or internal for the metric type. external
routemap <string> Enter the route map name. You must create the route No default
map before selecting it. See config router route-map on
page 59.
config summary-address
<summary address entry Enter the summary address entry ID. The value range is 0-
identifier> 4294967295.
prefix <IP address and Set the IP address and netmask for the prefix. 0.0.0.0
netmask> 0.0.0.0
Syntax
send-lifetime <START> Enter the lifetime of a sent authentication key. START and No default
<END> END use the format of HH:MM:SS DAY MONTH YEAR
where:
l HH:MM:SS is the time of day then the lifetime
starts in hours, minutes, and seconds.
l DAY is the day of the month to start. The range is
1-31.
l MONTH is the month of the year to start. The
range is 1-12.
l YEAR is the year to start. The range is 1993-2035.
END can also be set to infinite or <duration>, which is
the number of seconds that the key is valid. the range of
<duration> is 1-2147483646.
Example
You can configure a FortiSwitch unit to support PIM using the config router multicast CLI command.
When PIM is enabled, the FortiSwitch unit allocates memory to manage mapping information. The FortiSwitch
unit communicates with neighboring PIM routers to acquire mapping information and, if required, processes the
multicast traffic associated with specific multicast groups.
Syntax
{interface_name | internal |
Set which interface to configure for multicast routing. No default
mgmt}
pim-mode ssm-mode Set the PIM operation mode to SSM mode. ssm-mode
query-interval <1-65535> Set the interval between queries to IGMP hosts (in 125
seconds).
query-max-response-time <1- Set the maximum time to wait for an IGMP query
10
25> response (in seconds).
Syntax
group-addr <224-
Enter the multicast group address (IPv4). 0.0.0.0
239.xxx.xxx.xxx>
source-addr <IP_address> Enter an IP address for the multicast source (IPv4). 0.0.0.0
NOTE: You must have an advanced features license to use OSPF routing.
Open shortest path first (OSPF) is a link-state interior routing protocol that is widely used in large enterprise
organizations. OSPF provides routing within a single autonomous system (AS). This differs from BGP, which
provides routing between autonomous systems.
An OSPF AS can contain only one area, or it may consist of a group of areas connected to a backbone area. A
router connected to more than one area is an area border router (ABR). Routing information is contained in a link
state database. Routing information is communicated between routers using link state advertisements (LSAs).
You can enable bidirectional forwarding detection (BFD) with OSPF. BFD is used to quickly locate hardware
failures in the network. Routers running BFD communicate with each other, and, if a timer runs out on a
connection, that router is declared to be down. BFD then communicates this information to OSPF, and the
routing information is updated.
Syntax
router-id <MANDATORY_ Mandatory. Enter the IPv4 address of the OSPF router. No default
router_ipv4>
distance-external <external_ Set the OSPF route administrative external distance. The 0
int> value range is from 0 to 255.
default-information-metric Set the metric value for the default route. The value range 10
<metric_int> is from 1 to 16777214.
default-information-metric-
Set the metric type for the default route. 2
type {1 | 2}
bfd {disable | enable} Enable or disable bidirectional forwarding detection (BFD). disable
config area
shortcut {default | disable | Enable or disable whether shortcuts are allowed in the default
enable} area.
default-cost <cost_int> If the area type is stub or not-so-stubby area (NSSA), set 1
the cost of default-summary link state advertisements
(LSAs) announced to stubby areas. The value range is 0-
2147483647.
stub-type {no-summary | If the area type is stub or NSSA, set whether inter-area
summary
summary} summaries can be used.
nssa-translator-role {always | If the area type is NSSA, set the type of NSSA translator candidate
candidate | never} role.
config filter-list
Set the direction to or from the area for the prefix list and
direction {in | out} out
access list.
list <list_str> Enter the access-list name or prefix-list name for the area. No default
config range
substitute {enable | disable} Enable or disable whether the substitute prefix is used disable
instead of the prefix.
config virtual-link
peer <peer_ipv4> Enter the IP address of the virtual link neighbor. 0.0.0.0
retransmit-interval
Enter the retransmit interval. 5
<retransmit_int>
config ospf-interface
bfd {disable | enable | global} Enable or disable BFD on this interface. Set this option to global
global to use the global configuration.
mtu-ignore {disable | enable} Set whether to use the MTU size. disable
Set the router priority for this interface. the router with the
highest priority is more eligible to become the designated
priority <priority_int> router. Setting the option to 0 makes the router ineligible 1
to become the designated router. The value range is 0-
255.
config network
config distribute-list
routemap <routemap_str> Enter the route map name to filter the redistributed routes. No default
Example
This example shows how to set the router identifier, create an area, create the network (set the network prefix
and associate with an area), configure the OSPF interface, and redistribute the routes:
config router ospf
config area
edit 0.0.0.0
next
end
config network
edit 1
set area 0.0.0.0
set prefix 10.11.101.0 255.255.255.0
next
end
config ospf-interface
edit "1"
set cost 100
set interface "vlan10"
set priority 100
next
end
end
Syntax
{prefix <xxx.xxx.xxx.xxx> Set the prefix to define regular filter criteria, such as any or 0.0.0.0
<xxx.xxx.xxx.xxx> | any} subnets. 0.0.0.0
NOTE: You must have an advanced features license to use RIP routing.
The Routing Information Protocol (RIP) is a distance-vector routing protocol that works best in small networks
that have no more than 15 hops. Each router maintains a routing table by sending out its routing updates and by
asking neighbors for their routes. RIP is relatively simple to configure on FortiSwitch units but slow to respond to
network outages. RIP is better than static routing but less scalable than open shortest path first (OSPF).
l RIP version 1 uses classful addressing and broadcasting to send out updates to router neighbors. It does not
support different sized subnets or classless inter-domain routing (CIDR) addressing.
l RIP version 2 supports classless routing and subnets of various sizes. Router authentication supports MD5 and
authentication keys. Version 2 uses multicasting to reduce network traffic.
RIP uses three timers:
l The update timer determines the interval between routing updates. The default setting is 30 seconds.
l The timeout timer is the maximum time that a route is considered reachable while no updates are received for the
route. The default setting is 180 seconds. The timeout timer setting should be at least three times longer than the
update timer setting.
l The garbage timer is the is the how long that the FortiSwitch advertises a route as being unreachable before
deleting the route from the routing table. The default setting is 120 seconds.
You can enable bidirectional forwarding detection (BFD) with RIP. BFD is used to quickly locate hardware failures
in the network. Routers running BFD communicate with each other, and, if a timer runs out on a connection, that
router is declared to be down. BFD then communicates this information to RIP, and the routing information is
updated.
Syntax
default-information-originate
Enable or disable whether a default route is advertised. disable
{disable | enable}
default-metric <defaultmetric_ Enter the default metric for redistributed routes. This 1
int> setting does not affect connected routes. Use the config
redistribute connected or config offset-
list command to set the metric value for connected
routes.
passive-interface <name_str> Specify which interface to set to passive mode. In passive No default
mode, multicast and unicast RIP packets are sent only to
RIP neighbors.
update-timer <update_int> Enter the number of seconds between when the complete 30
routing table is sent to neighboring RIP routers.
version {1 | 2} Set the RIP version for receiving and sending RIP packets. 2
config distance
access-list <access_string> Enter the access list for the route destination. The default No default
RIP distance is used only when the routeʼs source
IP address matches the specified prefix and the specified
access list.
config distribute-list
interface <interface_str> Enter the RIP interface name for the distribute list. No default
status {disable | enable} Enable or disable whether the distribute list is used. disable
config interface
auth-keychain <keychain_str> Enter the name of the keychain to use for this interface. No default
auth-mode {md5 | none | text} Set the authentication mode used for packets. none
receive-version {1 | 2 | both | Set which version of RIP packets are accepted on this global
global} interface. Setting this option to both accepts RIP version
1 and 2. Setting this option to global uses the global RIP
version. This setting overrides the global RIP version
setting.
split-horizon {poisoned |
Set the split-horizon type. regular
regular}
config neighbor
<neighbor_ipv4> Enter an IP address for a RIP neighbor. Use this command 0.0.0.0
if a RIP neighbor does not accept multicast packets.
config network
config offset-list
interface {in | out} Set whether to filter incoming or outgoing packets. No default
status {disable | enable} Enable or disable whether the offset list is used. disable
redistribute {bgp | connected | Redistribute routes so that they are included in RIP connected
isis | ospf | staticc} routing.
status {disable | enable} Enable or disable whether the routes are redistributed. disable
metric <metric_int> Enter the metric of the redistributed routes. The value 0
range is between 0 and 16.
routemap <routemap_str> Enter the route map name to filter the redistributed routes. No default
Example
This example shows how to configure the RIP router and add authentication:
config router rip
config network
edit 1
set prefix 170.38.65.0/24
next
edit 2
set prefix 128.8.0.0/16
next
end
config interface
edit "vlan35"
set auth-mode text
set auth-string simplepw1
next
end
end
NOTE: You must have an advanced features license to use OSPF or RIP routing.
Syntax
<routemap_str> Enter the name for the individual route map. No default
protocol {bgp | isis | ospf | rip} Set the protocol to BGP, IS-IS, OSPF, or RIP. No default
action {deny | permit} Set whether the rule permits or denies routes permit
that match this rule.
match-community <string> BGP only. Match the BGP community list. No default
set-aggregator-as <1-4294967295> BGP only. Set the BGP aggregator AS. No default
set-aspath <1-4294967295> BGP only. Prepend the BGP AS path attribute. No default
Use quotation marks for repeating numbers,
for example: "1 1 2"
set-ip-nexthop <class_ipv4> BGP and RIP only. Enter the IP address of the 0.0.0.0
next hop.
set-metric <setmetric_int> Enter the route metric value. The value range 0
is 0-2147483647.
set-origin {egp | igp | incomplete | none} BGP only. Set the BGP origin code: none
l egp—Set the value to the NLRI
learned from the Exterior Gateway
Protocol (EGP).
l igp—Set the value to the NLRI learned
from a protocol internal to the
originating AS.
l incomplete—If not egp or igp.
l none—Disable the ORIGIN attribute.
set-originator-id <IP_address> BGP only. Set the BGP originator ID attribute. 0.0.0.0
set-tag <settag_int> BGP and RIP only. Enter the route tag value. 0
The value range is 0-2147483647.
Example
This example shows how to configure the RIP router and add authentication:
config router route-map
edit myroutemap
set comments "route map for RIP routing"
set protocol rip
config rule
edit 1
set action permit
set match-interface internal
set match-metric 12
set match-tag 36
set set-ip-nexthop 128.8.0.0
set auth-mode text
set set-metric 48
set set-tag 72
end
end
NOTE: You must have an advanced features license to use OSPF or RIP routing.
Syntax
end
end
Example
This example shows how to configure the RIP router and add authentication:
config router setting
config filter-list
edit 2
set protocol ospf
set route-map myroutemap
end
end
You add static routes to manually control traffic exiting the FortiSwitch unit. You configure routes by specifying
destination IP addresses and network masks and adding gateways for these destination addresses. Gateways
are the next-hop routers to which traffic that matches the destination addresses in the route are forwarded.
You can adjust the administrative distance of a route to indicate preference when more than one route to the
same destination is available. The lower the administrative distance, the greater the preferability of the route. If
the routing table contains several entries that point to the same destination (the entries may have different
gateways or interface associations), the system compares the administrative distances of those entries, selects
the entries having the lowest distances, and installs them as routes in the FortiSwitch forwarding table. Any ties
are resolved by comparing the routes’ priority, with lowest priority being preferred. As a result, the forwarding
table only contains routes having the lowest distances to every possible destination.
After the system selects static routes for the forwarding table based on their administrative distances, the
sequence numbers of those routes determines routing priority. When two routes to the same destination exist in
the forwarding table, the system selects the route having the lowest sequence number.
Syntax
The dst and gateway fields are required when blackhole is disabled. When
blackhole is enabled, the dst field is required. All other fields are optional.
<sequence_number> Enter a sequence number for the static route. The No default
sequence number may influence routing priority in the
forwarding table.
blackhole {enable | disable} Enable or disable dropping all packets that match this disable
route. This route is advertised to neighbors through
dynamic routing protocols as any other static route.
dst <destination-address_ Enter the destination IPv4 address and network mask for 0.0.0.0
ipv4mask> this route. You can enter 0.0.0.0/0 to create a new 0.0.0.0
static default route.
Example
config switch
Use the config switch commands to configure options related to switching functionality:
Syntax
edit <policy_ID>
set description <string>
set interface <port_name>
config classifier
set cos <802.1Q CoS value to match>
set dscp <DSCP value to match>
set dst-ip-prefix <IP_address> <mask>
set dst-mac <MAC_address> <mask>
set ether-type <integer>
set service <service_ID>
set src-ip-prefix <IP_address> <mask>
set src-mac <MAC_address> <mask>
set vlan-id <VLAN_ID>
end
config action
set count {enable | disable}
set drop {enable | disable}
set outer-vlan-tag <integer>
set policer <policer>
set remark-dscp <0-63>
end
end
config classifier
cos <802.1Q CoS value to Enter the 802.1Q CoS value to match. No default
match>
dscp <DSCP value to match> Enter the DSCP value to match. No default
dst-mac <MAC_address>
Destination MAC address to be matched. 00:00:00:00:00:00
<mask>
src-mac <MAC_address>
Source MAC address to be matched. 00:00:00:00:00:00
<mask>
config action
Syntax
config classifier
dscp <DSCP value to match> Enter the DSCP value to match. No default
config action
egress-mask {<physical_
List of physical ports to be configured in egress mask. No default
port_name> | internal}
remark-cos <0-7> Set the CoS marking value. The range is 0-7. No default
remark-dscp <0-63> Set the DSCP marking value. The range is 0-63. No default
Examples
In the following example, traffic from VLAN 3 is blocked to a specified destination IP subnet (10.10.0.0/16) but
allowed to all other destinations:
config switch acl ingress
edit 1
config action
set count enable
set drop enable
end
config classifier
set dst-ip-prefix 10.10.0.0 255.255.0.0
set vlan-id 3
end
set ingress-interface-all enable
next
edit 2
config classifier
set vlan-id 3
end
set ingress-interface-all enable
next
end
In the following example, packets are classified by matching both the CoS and DSCP values. Both the CoS and
DSCP marking values are set:
config switch acl ingress
edit 1
config classifier
set src-mac 11:22:33:44:55:66
set cos 2
set dscp 10
end
config action
set count enable
set remark-cos 4
set remark-dscp 20
end
set ingress-interface port2
end
Syntax
Example
Syntax
config classifier
cos <802.1Q CoS value to Enter the 802.1Q CoS value to match. No default
match>
dscp <DSCP value to match> Enter the DSCP value to match. No default
dst-mac <MAC_address>
Destination MAC address to be matched. 00:00:00:00:00:00
<mask>
src-mac <MAC_address>
Source MAC address to be matched. 00:00:00:00:00:00
<mask>
config action
remark-cos <0-7> Set the CoS marking value. The range is 0-7. No default
Syntax
color <0-32> Set the icon color to use in the Web-based manager. A 0
value of zero sets the default color (1).
icmptype <0-255> If you set the protocol to ICMP, set the ICMP type. 0
icmpcode <0-255> If you set the protocol to ICMP, set the ICMP code. 0
tcp-portrange For TCP services, enter the destination and source port No default
ranges.
Notes:
Example
In the following example, Server Message Block (SMB) traffic received on port 1 is mirrored to port 3. SMB
protocol uses port 445:
config switch acl service custom
edit "SMB"
set tcp-portrange 445
next
end
config switch acl ingress # apply policy to port 1 ingress and send to port 3
edit 1
set description "cnt_n_mirror_smb"
set ingress-interface "port1"
config action
set count enable
set mirror "port3"
end
config classifier
set service "SMB"
set src-ip-prefix 20.20.20.100 255.255.255.255
set dst-ip-prefix 100.100.100.0 255.255.255.0
end
next
end
Syntax
Example
Syntax
Example
Syntax
auto-fortilink-discovery Enable or disable the capability for the FortiGate unit enable
{enable | disable} to automatically discover the FortiLink interface on the
switch.
ip-mac-binding
Enable or disable IP-MAC binding for the switch disable
{enable | disable}
max-frame-size <bytes_int> Set the maximum frame size. The range is 68 to 9216
16360.
max-path-in-ecmp-group
Set the maximum path in one ECMP group. 8
<integer>
mclag-peer-info-timeout Enter the MCLAG peer info timeout. The value range is 30
<integer> 30 to 600 seconds.
mclag-stp-aware {enable | Enable or disable whether the STP can be used within
enable
disable} the MCLAG.
poe-alarm-threshold
Enter the threshold (a specified percentage of the total
<threshold (percent of total
power budget) above which an alarm event is 80
power budget) above which
generated.
an alarm event is generated>
poe-guard-band <integer> Enter the power (W) to reserve in case of a spike in PoE 19
consumption.
poe-power-mode {first-come- Set the PoE power mode to priority based or first-
priority
first-served | priority} come, first-served.
trunk-hash-mode
Set the trunk hash mode to default or enhanced default
{default| enhanced}
virtual-wire-tpid <0x0001- TPID value used by virtual-wires. The value range is 0xdee5
0xfffe> from 0x0001 to 0xfffe.
Choose a value unlikely to be seen as a TPID or
ethertype in your network.
config port-security
Example
Syntax
query-interval <10-1200> Enter the maximum number of seconds between IGMP 120
queries.
Example
Command
allowed-vlans
Enter the names of the VLANs permitted on this interface. No default
{vlan1 vlan2 ...}
discard-mode {all-tagged | all- Set the discard mode for this interface. none
untagged | none}
dhcp-snooping {trusted |
Set the interface to trusted or untrusted. untrusted
untrusted}
dhcp-snoop-learning-limit- Enable or disable whether there is a limit for how many IP disable
check {disable | enable} addresses are in the DHCP snooping binding database for
this interface.
edge-port {enabled | disabled} Enable if the port does not have another switch connected disable
to it.
igmp-snooping {allowed | not- Allow or disallow this interface from taking part in
not-allowed
allowed } IGMP snooping.
ip-mac-binding Enable or disable IP-MAC binding for this interface. Set disable
{enable | disable | global} the value to 'global', the interface inherits the global ip-
mac-binding configuration value.
loop-guard {enable | disable} Enable or disable loop guard for this interface. disable
native-vlan <vlan_int> Enter the native (untagged) VLAN for this interface. 1
qos-policy {<string> | default} Enter the name of the QoS egress CoS queue policy. default
Default is the
snmp-index <integer> Enter the SNMP index for this interface.
port number
sticky-mac {disable | enable} Enable or disable whether dynamically learned MAC disable
addresses are persistent when the status of a FortiSwitch
port changes (goes down or up).
stp-root-guard {disabled | Enable or disable STP root guard protection. To use STP
disabled
enabled} root guard, you must enable stp-state.
stp-state {enabled | disabled} Enable or disable Spanning Tree Protocol (STP) on this enabled
interface.
config port-security
Set the security mode for the port. Set the security mode
to 802.1X for port-based authentication or 802.1Xmac-
port-security-mode {none |
based for MAC-based authentication. If you change the none
802.1X | 802.1X-mac-based}
security mode from none, you must set the security group
with the set security-groups command.
framevid-apply {disable | Enable or disable the capability to apply the EAP/MAB enable
enable} frame VLAN to the port native VLAN.
auth-fail-vlanid <VLAN_id> VLAN identifier. Mandatory field when auth-fail VLAN is 200
enabled.
eap-passthru {disable | enable} Enable or disable the EAP pass-through mode. disable
guest-vlanid <VLAN_id> VLAN identifier. Mandatory field when guest VLAN is 100
enabled.
mac-auth-bypass {enable |
Enable or disable MAC auth bypass. disable
disable}
open-auth {enable | disable} Enable or disable open authentication (monitor mode) on disable
this interface.
security-groups <security- Enter the security group name if you are using port-based No default
group-name> authentication or MAC-based authentication.
Example
The port accepts a packet only if the source IP address and source MAC address in the packet match an entry in
the IP-MAC binding table.
You can enable or disable IP-MAC binding for the whole switch, and you can override this global setting for each
port.
Syntax
<sequence_int> Enter a sequence number for the IP-MAC binding entry. No default
ip <xxx.xxx.xxx.xxx> Enter the source IP address and network mask for this
0.0.0.0 0.0.0.0
<xxx.xxx.xxx.xxx> rule.
mac <xx:xx:xx:xx:xx:xx> Enter the MAC address for this rule. 00:00:00:00:00:00
Example
The following example configures the IP-MAC binding for the FortiSwitch unit:
config switch ip-mac-binding
edit 1
set ip 172.168.20.1 255.255.255.255
set mac 00:21:cc:d2:76:72
set status enable
next
end
There are two static LLDP profiles: default and default-auto-isl. These profiles are created
automatically. They can be modified but cannot be deleted. The default-auto-isl profile always has auto-
isl enabled, and rejects any configurations which attempt to disable it.
Syntax
802.3-tlvs The only 802.3 TLV that can be enabled or disabled no TLV enabled
is max-frame-size. This TLV will send the
maximum frame size value of the port. If the value is
changed, the sent value will reflect the updated
value.
auto-isl-hello-timer <1-30> Enter a value (in seconds) for the hello timer. The 3
range is 1 to 30.
auto-isl-port-group <0-9> Enter a value for the port group. The range is 0 to 9. 0
inventory-
med-tlvs (inventory- enable the Inventory Management TLVs and/or the management
management | network-policy) Network Policy TLVs. and network-
policy
config custom-tlvs
config med-network-policy
status Enable or disable the policy for the policy type. Disabled
NOTE: LLDP-MED network policies cannot be deleted or added. To use a policy, the med-tlvs field must include
network-policy , and you must set the policy to enabled . The VLAN values on the policy are cross-checked
against the VLAN native, allowed, and untagged attributes for any interfaces that contain physical-ports using this
profile. The cross-check determines if the policy TLV should be sent (VLAN must be native or allowed), and if the
TLV should mark the VLAN as tagged or untagged (VLAN is native, or is in untagged). The network policy TLV is
automatically updated when a switch interface changes VLAN configuration, or if a physical port is added to, or
removed from, a trunk.
Example
end
set med-tlvs inventory-management network-policy
next
end
Syntax
Example
Syntax
<mirror name> Enter the mirror to be configured (or a new mirror name) No default
dst <interface> Enter the port that will act as a mirror. No default
switching-packet
Enable or disable switching functionality when mirroring. disable
{enable | disable}
Example
Syntax
<unused network monitor> Enter the number of an unused network monitor. No default
monitor-mac
Enter the MAC address to be monitored. 00:00:00:00:00:00
<xx:xx:xx:xx:xx:xx>
Example
Syntax
db-aging-interval <integer> Enter the network monitor database aging interval. The 3600
value range is 3600-86400 seconds. Set the option to 0 to
disable it.
survey-mode {disable | enable} Enable or disable the network monitor survey mode. disable
Example
Notes
Syntax
port-configuration <default | For 548D and 548D-FPOE, set this option to disable- default
disable-port54 | disable- port54 if only port 53 is splittable and port 54 is
port41-48 | 4x100G | 6x40G> unavailable.
Example
In the following example, a FortiSwitch 3032D is configured with ports 10, 14, and 28 set to 4x10G:
config switch phy-mode
set port5-phy-mode 1x40G
set port6-phy-mode 1x40G
set port7-phy-mode 1x40G
Syntax
energy-efficient-ethernet
Enable or disable energy-efficient Ethernet. disable
{enable | disable}
flapguard {enabled | disabled} Enable or disable flap guard for this port. disabled
flap-rate <1-30> After enabling the port flap guard, set how many times 5
that a portʼs status changes during a specified number of
seconds before the flap guard is triggered.
lldp-profile Enter the LLDP profile name for this port. default
max-frame-size <bytes_int> NOTE: For the eight models in the 1xxE series, this 9216
command is under the config switch global
command.
poe-port-mode {IEEE802_3AF Set the PoE port mode to IEEE802.3AFor IEEE802.3AT. IEEE802_
| IEEE802_3AT} 3AT
poe-port-priority {critical-
priority | high-priority | low- Set the port priority. low-priority
priority}
speed <speed_str> Set the speed of this port. Values depend on the switch auto
model and port. For example:
l 1000auto—Auto-negotiation (1 Gbps full-duplex
only).
l 100full—100 Mbps full-duplex.
l 100half—100 Mbps half-duplex.
l 10full—10 Mbps full-duplex.
l 10half—10 Mbps half-duplex.
l auto—Auto-negotiation.
l 10000cr—10 Gbps copper interface.
l 10000full—10 Gbps full-duplex.
l 10000sr—10 Gbps SFI interface.
l 1000full—1 Gbps full-duplex.
l auto-module—Maximum speed supported by
module.
Example
Syntax
Example
Values that are not explicitly included in the map will follow the default mapping, which maps each priority (0-7) to
queue 0.
If an incoming packet contains no CoS value, the switch assigns a CoS value of zero. Use the set default-
cos <interface> command to configure a different default CoS value. The valid range is from 0 to 7. The
configured default CoS only applies if you also set trust-dot1p-map on the interface.
Syntax
value <dscp raw value> enter the raw value of DSCP (0 - 63). No default
Example
Values that are not explicitly included in the map will follow the default mapping, which assigns queue 0 for all
DSCP values.
In a QoS policy, you set the scheduling mode (Strict, Round Robin, Weighted Round Robin) for the policy, and
configure one or more CoS queues.
Syntax
max-rate <rate kbps> If you set the rate-by to kbps, enter the maximum rate in 0
kbps. Set the value to 0 to disable.
max-rate-percent If you set the rate-by to percent, enter the maximum rate 0
<percentage> as a percentage of the link speed.
min-rate-percent If you set the rate-by to percent, enter the minimum rate
0
<percentage> as a percentage of the link speed.
Example
tcp-syn-data TCP SYN packet contains additional data (possible DoS attack). disable
tcp-udp-port-zero TCP or UDP packet has source or destination port set to zero. disable
tcp_flag_FUP TCP packet with FIN, URG and PSH flag set. disable
tcp_flag_SF TCP packet with SYN and FIN flag set. disable
tcp_flag_SR TCP packet with SYN and RST flag set. disable
sip-eq-dip TCP packet with a source IP address equal to the destination IP disable
address.
tcp-port-eq TCP packet with source and destination TCP ports equal. disable
TCP packet with FIN, URG and PSH flags set, and sequence
tcp-flag-FUP disable
number is zero.
tcp-flag-SF TCP packet with SYN and FIN flag set. disable
udp-port-eq IP packet with source and destination UDP ports equal. disable
macsa-eq-macda Packet with source MAC address equal to destination MAC disable
address.
allow-sa-mac-all-zero Ethernet packet whose source MAC address is all zeros. enable
Example
Syntax
type {sticky | static} Set the MAC address as a persistent (sticky) addres or static
a static address.
Example
Syntax
unknown-unicast
Enable or disable storm control for unknown unicast traffic. disable
{enable | disable}
Example
Syntax
vlan-range <vlan_map> Enter the VLANs to which STP applies. <vlan_map> is a No default
comma-separated list of VLAN IDs or VLAN ID ranges, for
example “1,3-4,6,7,9-100” .
config stp-port
priority <priority_int> Enter the priority of this interface. Use set priority ? 128
to list the acceptable priority values.
Example
Syntax
Example
Syntax
mclag-icl {disable | enable} Enable or disable the MCLAG inter-chassis link (ICL). disable
members <intf1 ... intfn> Enter the names of the interfaces that belong to this No default
trunk. Separate the names with spaces.
Heartbeat Trunk
When you set the trunk mode to fortinet-trunk, the following configuration fields are available:
config switch trunk
edit hb-trunk
set mode fortinet-trunk
set port-selection-criteria {src-ip | src-mac | dst-ip | dst-mac | src-dst-ip | src-
dst-mac}
set description <description_str>
set members <port> [<port>] ... [<port>]
set member-withdrawal-behavior {block | forward}
set max-miss-heartbeats <3-32>
set hb-out-vlan <int>
set hb-in-vlan <int>
set hb-src-ip <x.x.x.x>
set hb-dst-ip <x.x.x.x>
members <port> [<port>] ... Enter the names of the ports that belong to this trunk. No default
[<port>] Separate the names with spaces.
member-withdrawal-behavior Set the port behavior after it withdraws because of the loss
block
{block | forward} of control packets.
hb-src-ip Enter the source IP address for the heartbeat packet. 0.0.0.0
hb-dst-ip Enter the destination IP address for the heartbeat packet. 0.0.0.0
hb-src-udp-port Enter the source UDP port value for the heartbeat packet. 0
Example
NOTE: Virtual-wire ports will not be able to transmit or receive packets from other members of the VLAN or other
virtual-wires that use the same VLAN. The VLAN should not have complex configurations such as private VLAN.
Syntax
Example
Syntax
igmp-snooping {enable
Enable or disable IGMP snooping on the VLAN. disable
| disable}
igmp-snooping-querier Enable or disable whether periodic IGMP queries are sent disable
{enable | disable} to get IGMP reports. This field is only available if igmp-
snooping is enabled.
Enter the IPv4 address for the IGMP querier. This field if
querier-addr <IPv4_address> only available if igmp-snooping and igmp- 0.0.0.0
snooping-querier are enabled.
config member-by
Use this command to assign VLANs based on specific fields in the packet (source MAC address, source
IP address, or layer-2 protocol).
config switch vlan
edit <vlan id>
config member-by-mac
edit <id>
set mac XX:XX:XX:XX:XX:XX
set description <128 byte string>
next
end
config member-by-ipv4
edit <id>
set address a.b.c.d/e
set description <128-byte string>
next
end
config member-by-ipv6
edit <id>
set prefix xx:xx:xx:xx::/prefix
set description <128-byte string>
next
end
config member-by-proto
edit <id>
set frametypes {ethernet2 | 802.3d | llc}
set protocol <6-digit hex value>
end
config member-by-mac
config member-by-ipv4
address a.b.c.d/e Enter an IPv4 address and network mask. If the source 0.0.0.0 0.0.0.0
IP address of an incoming packet matches this value,
the associated VLAN will be assigned to the packet.
The subnet mask must be a value in the range of 1-32.
config member-by-ipv6
config member-by-proto
frametypes {ethernet2 | Enter one or more Ethernet frame type. Set this value ethernet2 802.3d
802.3d | llc} to llc for logical link control. Set this value to llc
802.3d for 802.3d and SNAP.
Example
next
end
end
end
config system
Use the config system commands to configure options related to the overall operation of the FortiSwitch
unit:
access, allow read only, or allow both read and write access to FortiSwitch features.
Syntax
loggrp {none | read | read- Set the access permission for loggrp. none
write}
routegrp {none | read | read- Set the access permission for routegrp. none
write}
Example
This example shows how to configure an access profile with just read-only permission:
config system accprofile
edit profile1
set admingrp read
set loggrp read
set netgrp read
set routegrp read
set sysgrp read
end
profile. This read-only super-admin may be used in a situation where it is necessary to troubleshoot a customer
configuration without making changes.
You can authenticate administrators using a password stored on the FortiSwitch unit or you can use a RADIUS
server to perform authentication. When you use RADIUS authentication, you can authenticate specific
administrators or you can allow any account on the RADIUS server to access the FortiSwitch unit as an
administrator.
Syntax
{ip6-trusthost1 | ip6-trusthost2 |
Any IPv6 address and netmask from which the
ip6-trusthost3 | ip6-trusthost4 |
administrator can connect to the FortiSwitch unit.
ip6-trusthost5 | ip6-trusthost6 |
If you want the administrator to be able to access ::/0
ip6-trusthost7 | ip6-trusthost8 |
the system from any address, set the trusted hosts to
ip6-trusthost9 | ip6-trusthost10}
::/0.
<address_ipv6mask>
peer-group <peer-grp> Name of peer group defined under config user No default
peergrp or user group defined under config
user group. Used for peer certificate
authentication (for HTTPS admin access). This
option is available only when peer-auth has been
enabled.
remote-group <name> Enter the administrator user group name, if you are No default
using RADIUS, LDAP, or TACACS+ authentication.
This is available only when remote-auth is
enabled.
schedule <schedule-name> Restrict times that an administrator can log in. No default
Defined in config firewall schedule. No
default indicates that the administrator can log in at
any time.
ssh-public-key1 "<key-type> You can specify the public keys of up to three SSH
clients. These clients are authenticated without No default
<key-value>"
being asked for the administrator password. You
ssh-public-key2 "<key-type> must create the public-private key pair in the SSH No default
<key-value>" client application.
<key type> is ssh-dss for a DSA key or ssh-
rsa for an RSA key.
ssh-public-key3 "<key-type> <key-value> is the public key string of the SSH No default
<key-value>" client.
{trusthost1 | trusthost2 | Any IPv4 address or subnet address and netmask 0.0.0.0
trusthost3 | trusthost4 | from which the administrator can connect to the 0.0.0.0
trusthost5 | trusthost6 | system.
trusthost7 | trusthost8 | If you want the administrator to be able to access the
trusthost9 | trusthost10} system from any address, set the trusted hosts to
<address_ipv4mask> 0.0.0.0 and the netmask to 0.0.0.0.
Example
Syntax
Example
Syntax
username <name> A valid user name on the specified SMTP server. bug_report
Example
FortiSwitch includes a reserved entry named Fortinet_CA. You cannot modify this entry.
Syntax
Example
> 03RHH8yYbZ9rw0kuwTkJEo3bYDxH
> -----END CERTIFICATE-----"
Syntax
scep-cert Local certificate used for CRL update using SCEP Fortinet_
Factory
Syntax
password Password that was used to encrypt the file. The FortiCore *
system uses the password to decrypt and install the
certificate.
Example
Syntax
cert {<string> | Entrust_ Enter the name of the certificate or select one of the listed No default
802.1x_CA | Entrust_802.1x_ certificates.
G2_CA | Entrust_802.1x_L1K_
CA | Fortinet_CA | Fortinet_
CA2}
url <string> Enter the URL for the OCSP server. No default
Example
Syntax
baudrate <speed> Set the console port baudrate. Select one of 9600, 19200, 115200
38400, 57600, or 115200.
output {standard | more} Set console output to standard (no pause) or more (pause more
after each screen is full and resume when a key is
pressed).
Example
Syntax
dns-cache-limit <integer> Set maximum number of entries in the DNS cache. 5000
dns-cache-ttl <int> Enter the duration, in seconds, that the DNS cache retains 1800
information.
source-ip <ipv4_addr> Enter the IP address for communications to DNS server. 0.0.0.0
Example
NOTE: To use the FortiSwitch Cloud, you must have a Cloud Management license, and your FortiSwitch unit must
be in standalone mode, connected to the Internet, and the system time must be accurate. To set the time on your
FortiSwitch unit, see config system ntp on page 140.
Syntax
end
fortiswitch-
name <string> The domain name for the FortiSwitch Cloud.
dispatch.forticloud.com
Example
Syntax
802.1x-ca-certificate {Entrust_ Set the CA certificate for port security (802.1x): Entrust_
802.1x_CA | Entrust_802.1x_ l Entrust_802.1x_CA—Select this CA if you are 802.1x_CA
G2_CA | Entrust_802.1x_L1K_ using 802.1x authentication.
CA | Fortinet_CA | Fortinet_ l Entrust_802.1x_G2_CA—Select this CA if
CA2} you want to use the Google Internet Authority G2.
l Entrust_802.1x_L1K_CA—Select this CA if
you want to use http://ocsp.entrust.net.
l Fortinet_CA—Select this CA if you want to use
the factory-installed certificate.
l Fortinet_CA2—Select this CA if you want to
use the factory-installed certificate.
admin-https-ssl-versions Set the allowed SSL/TLS versions for Web administration. tlsv1-1 tlsv1-2
{tlsv1-0 | tlsv1-1 | tlsv1-2}
admin-port <port_number> Enter the port to use for HTTP administrative access. 80
admin-sport <port_number> Enter the port to use for HTTPS administrative access. 443
admin-ssh-port <port_ Enter the port to use for SSH administrative access. 22
number>
admin-ssh-v1
Enable compatibility with SSH v1.0. disable
{enable | disable}
alertd-relog {enable | disable} Enable or disable re-logs when a sensor exceeds its disable
threshold.
allow-subnet-overlap {enable | Enable limited support for interface and VLAN disable
disable} subinterface IP address overlap for this VDOM. Use this
command to enable limited support for overlapping IP
addresses in an existing network configuration.
asset-tag LLDP uses the asset tag to help identify the unit. The No default
asset tag can be up to 32 characters, and will be added to
the LLDP-MED inventory TLV (when that TLV is enabled).
dhcps-db-per-port-learn-limit Set the maximum number of DHCP server entries that are 64
<number_of_entries> learned per interface. The range of values is 0-1024.
gui-lines-per-page <gui_lines> Set the number of lines displayed on table lists. Range is 50
from 20 - 1000 lines per page.
image-rotation {enable | Enable or disable the rotation of the partition used to enable
disable} upgrade the FortiSwitch image.
l3-host-expiry {enable |
Enable or disable layer-3 host expiry. disable
disable}
language <language> Set the display language. You can set <language> to english
one of english, french, japanese, korean,
portuguese, spanish, simch (Simplified Chinese) or
trach (Traditional Chinese).
ldapconntimeout
LDAP connection timeout in msec 500
<ldaptimeout_msec>
radius-coa-port <port_ Set the port number to be used for the RADIUS change of 3799
number> authorization (CoA).
refresh <refresh_seconds> Set the Automatic Refresh Interval, in seconds, for the 0
System Status Monitor.
Enter 0 for no automatic refresh.
strong-crypto {enable | disable} Strong encryption and only allow strong ciphers (AES, disable
3DES) and digest (SHA1) for HTTPS/SSH admin access.
When strong encryption is enabled, HTTPS is supported
by the following web browsers: Netscape 7.2, Netscape
8.0, Firefox, and Microsoft Internet Explorer 7.0 (beta).
Note that Microsoft Internet Explorer 5.0 and 6.0 are not
supported in strong encryption.
Example
This example shows how to set the lockout threshold to one attempt and the duration before the administrator
can try again to log in to five minutes:
config system global
set admin-lockout-threshold 1
set admin-lockout-duration 300
end
If you enter a name string in the edit command that is not the name of a physical
interface, the command creates a VLAN subinterface.
Syntax
alias <name_string> Enter an alias name for the interface. Once configured, No default.
the alias will be displayed with the interface name to make
it easier to distinguish. The alias can be a maximum of 25
characters. This option is only available when interface
type is physical.
bfd-desired-min-tx <interval_ Enter the minimum desired interval for the BFD transmit 50
msec> interval. Valid range is from 1 to 100 000 msec. This
option is available only when bfd is enabled.
bfd-required-min-rx <interval_ Enter the minimum required interface for the BFD receive 50
msec> interval. Valid range is from 1 to 100 000 msec. This is
available only when bfd is enabled.
dhcp-relay-service {enable | Enable to provide DHCP relay service on this interface. disable
disable} The DHCP type relayed depends on the setting of dhcp-
relay-type.
There must be no other DHCP server of the same type
(regular or ipsec) configured on this interface.
dhcp-relay-option82 {enable | Enable to allow option-82 insertion in the DHCP relay. This disable
disable} option is available only when dhcp-relay-service is
enabled.
fail-alert-method Select the signal that the system uses to signal the link link-down
{link-down | link-failed-signal} failure: Link Down or Link Failed. This option is available
only when fail-detect is enabled.
icmp-redirect {enable | disable} Disable to stop ICMP redirect from sending from this enable
interface. ICMP redirect messages are sent by a router to
notify the original sender of packets that there is a better
route available.
log {enable | disable} Enable or disable traffic logging of connections to this disable
interface. Traffic will be logged only when it is on an
administrative port. All other traffic will not be logged.
Enabling this setting may reduce system performance,
and is normally used only for troubleshooting.
dhcp-client-identifier Override the default DHCP client identifier used by this No default
interface. The DHCP client identifier is used by DHCP to
identify individual DHCP clients (in this case individual
interfaces). By default, the DHCP client identifier for each
interface is created based on the model name and the
interface MAC address. In some cases, you might want to
specify your own DHCP client identifier using this
command. This option is available only when the mode is
set to dhcp.
dns-server-override {enable | Disable to prevent this interface from using DNS server enable
disable} addresses it acquires by DHCP. This option is available
only when the mode is set to dhcp.
status {down | up} Start or stop the interface. If the interface is stopped, it up(down
does not accept or send packets. If you stop a physical for VLANs)
interface, associated virtual interfaces such as VLAN
interfaces will also stop.
vlanid <id_number> Enter a VLAN ID that matches the VLAN ID of the packets No default
to be received by this VLAN subinterface. The VLAN ID
can be any number between 1 and 4094, as 0 and 4095
are reserved, but it must match the VLAN ID added by the
IEEE 802.1Q-compliant router on the other end of the
connection. Two VLAN subinterfaces added to the same
physical interface cannot have the same VLAN ID.
However, you can add two or more VLAN subinterfaces
with the same VLAN ID to different physical interfaces,
and you can add more multiple VLANs with different VLAN
IDs to the same physical interface. This is available only
when editing an interface with a type of VLAN.
config ipv6
Configure IPv6 settings for the interface.
Syntax
end
end
ip6-allowaccess <access_ Enter the types of management access permitted on this Varies for
types> IPv6 interface. Valid types are: fgfm, http, https, each
ping, snmp, ssh, and telnet. Separate the types interface.
with spaces. If you want to add or remove an option from
the list, retype the list as required. >
config ip6-extra-addr
config secondaryip
Configure a second IP address for the interface.
Syntax
config vrrp
Add one or more VRRP virtual routers to a interface. For information about VRRP, see RFC 3768.
Syntax
priority <prio_int> Priority of this virtual router (1-255). The VRRP virtual 100
router on a network with the highest priority becomes the
master.
Example
protocol Protocols used to detect the server. Select ARP or ping. arp
failtime Number of retry attempts before bringing server down. The range is 1-10. 5
recoverytime Number of retry attempts before bringing server up. The range is 1-10. 5
update-
cascade- Enable or disable update cascade interface. enable
interface
Syntax
end
ntpsync {enable | disable} Enable to synchronize system time with the ntp server. enable
source-ip <ipv4_addr> Enter the source IP for communications to the NTP 0.0.0.0
server.
server <ipv4_addr> Enter the IPv4 address and hostname (optional) for this ntp1.fortinet.net
[/<hostname_str>] NTP server.
Example
Syntax
change-4-characters Enable to require the new password to differ from the disable
{enable | disable} old password by at least four characters. This option is
available only when status is enabled.
Example
This example shows how to configure a password policy for administrator passwords:
config system password-policy
set status enable
set apply-to admin-password
set change-4-characters enable
set minimum-length 10
set min-lower-case-letter 1
set min-upper-case-letter 1
set min-non-alphanumeric 1
set min-number 1
ECMP is a forwarding mechanism that enables load-sharing of traffic to multiple paths of equal cost. An ECMP
set is formed when the routing table contains multiple next-hop address for the same destination with equal cost.
Routes of equal cost have the same preference and metric value. If there is an ECMP set for an active route, the
switch uses a hash algorithm to choose one of the next-hop addresses. As input to the hash, the switch uses one
or more of the following fields in the packet to be routed:
l Source IP
l Destination IP
l Input port
Syntax
Example
sFlow is a network monitoring protocol described in http://www.sflow.org. FortiSwitch implements sFlow version
5. You can configure one or more FortiSwitch interfaces as sFlow agents that monitor network traffic and send
sFlow datagrams containing information about traffic flow to an sFlow collector.
sFlow is normally used to provide an overall traffic flow picture of your network. You would usually operate sFlow
agents on switches, routers, and firewall on your network, collect traffic data from all of them and use a collector
to show traffic flows and patterns.
Syntax
collector-ip <collector_ipv4> The sFlow agents send sFlow datagrams to the sFlow 0.0.0.0
collector at this IP address.
Example
You can add up to three SNMP communities. Each community can have a different configuration for SNMP
queries and traps. Each community can be configured to monitor the system for a different set of events. You can
also the add IP addresses of up to 8 SNMP managers for each community.
Whey you configure an SNMP manager, ensure that you list it as a host in a
community on the FortiSwitch that it will be monitoring. Otherwise, the SNMP monitor
will not receive any traps from that FortiSwitch unit, and will not be able to query it.
Syntax
<index_number> Enter the index number of the community in the SNMP No default
communities table. Enter an unused index number to
create a new SNMP community.
Enable the events for which the system should send traps All events
events <events_list>
to the SNMP managers in this community. enabled.
Enter the SNMP v2c query port number used for SNMP
query-v2c-port <port_number> 161
manager queries.
query-v2c-status Enable or disable SNMP v2c queries for this SNMP enable
{enable | disable} community.
trap-v1-lport <port_number> Enter the SNMP v1 local port number used for sending 162
traps to the SNMP managers.
trap-v1-status {enable | disable} Enable or disable SNMP v1 traps for this SNMP community. enable
Enter the SNMP v2c local port number used for sending
trap-v2c-lport <port_number> 162
traps to the SNMP managers.
trap-v2c-rport <port_number> Enter the SNMP v2c remote port number used for sending 162
traps to the SNMP managers.
interface <if_name> Enter the name of the FortiSwitch interface to which the No default
SNMP manager connects.
ip6 <address_ipv6> Enter the IPv6 IP address of the SNMP manager (for ::
hosts6).
Enter the source IPv4 IP address for SNMP traps sent by 0.0.0.0/
source-ip <address_ipv4/mask>
the FortiSwitch (for hosts). 0.0.0.0
source-ip6 <address_ipv6> Enter the source IPv6 IP address for SNMP traps sent by ::
the FortiSwitch (for hosts6).
Syntax
contact-info <info_str> Add the contact information for the person responsible for No default
this FortiSwitch unit. The contact information can be up to
35 characters long.
trap-log-full-threshold Enter the percentage of disk space used that will trigger 90
<percentage> the threshold SNMP trap for the log-full.
Example
This example shows how to set a warning and an alarm for specified system temperatures:
config system snmp sysinfo
FortiSwitchOS implements the user security model of RFC 3414. You can require the user to authenticate with a
password and you can use encryption to protect the communication with the user.
Syntax
query-port <port_int> Enter the number of the port used for SNMP v3 queries. If 161
multiple versions of SNMP are being supported, each
version should listen on a different port.
config user
The config user commands provide configuration of user accounts and user groups for firewall policy
authentication, administrator authentication, and some types of VPN authentication:
Syntax
authtimeout <timeout> Set the authentication timeout for the user group, range 0
1 to 480 minutes. If set to 0, the global authentication
timeout value is used.
http-digest-realm <attribute> Enter the realm attribute for MD5-digest authentication No default
member <names> Enter the names of users, peers, LDAP servers, or No default
RADIUS servers to add to the user group.
Separate the names with spaces.
To add or remove names from the group you must re-enter
the whole list with the additions or deletions required.
config match
Example
To authenticate with the FortiSwitch unit, the user enters a user name and password. The system sends this user
name and password to the LDAP server. If the LDAP server can authenticate the user, the user is successfully
authenticated with the FortiSwitch unit. If the LDAP server cannot authenticate the user, the connection is
refused by the FortiSwitch unit.
Syntax
server <domain> Enter the LDAP server domain name or IP address. No default
username <ldap_username> This field is available only if type is regular. For No default
regular authentication, you need a user name and
password. See your server administrator for more
information.
password-renewal {disable |
Enable or disable online password renewal. disable
enable}
If your LDAP server requires authentication to perform searches, use the regular type and provide values for
username and password.
Syntax
<user_name> Enter the user name. Enter a new name to create a new No default
user account or enter an existing user name to edit that
account.
Enter the name of the LDAP server with which the user
must authenticate. You can only select an LDAP server
ldap-server <server_name> No default
that has been added to the list of LDAP servers. This
option is available when type is set to ldap.
passwd <password_str> Enter the password with which the user must authenticate. No default
Passwords at least 6 characters long provide better
security than shorter passwords. This option is available
when type is set to password.
Enter the name of the RADIUS server with which the user
must authenticate. You can only select a RADIUS server
radius-server <server_name> No default
that has been added to the list of RADIUS servers. This
option is available when type is set to radius.
tacacs+-server <server_name> Enter the name of the TACACS+ server with which the No default
user must authenticate. This option is available when
type is set to tacacs+.
type <auth-type> Enter one of the following to specify how this user’s No default
password is verified:
l ldap: The LDAP server specified in ldap-server
verifies the password.
l password: The system verifies the password
against the value of the password.
l radius: The RADIUS server specified in
radius-server verifies the password.
l tacacs+: The TACACS+ server specified in
tacacs+-server verifies the password.
The default port for RADIUS traffic is 1812. If your RADIUS server is using a different port you can change the
default RADIUS port. You may set a different port for each of your RADIUS servers. The maximum number of
remote RADIUS servers that can be configured for authentication is 10.
The RADIUS server is now provided with more information to make authentication decisions, based on values in
server, nas-ip, and the config user group subcommand config match . Attributes include:
l NAS-IP-Address — RADIUS setting or IP address of FortiSwitch interface used to talk to RADIUS server, if not
configured
l NAS-Port — physical interface number of the traffic that triggered the authentication
l Called-Station-ID — same value as NAS-IP Address but in text format
l Fortinet-Vdom-Name — name of VDOM of the traffic that triggered the authentication
l NAS-Identifier — configured hostname in non-HA mode; HA cluster group name in HA mode
l Acct-Session-ID — unique ID identifying the authentication session
l Connect-Info — identifies the service for which the authentication is being performed (web-auth, vpn-ipsec, vpn-
pptp, vpn-l2tp, vpn-ssl, admin-login, test)
You can select an alternative authentication method for each server. These include CHAP, PAP, MS-CHAP, and
MS-CHAP-v2.
Syntax
<server_name> Enter a name of the RADIUS user group. Enter a new No default
name to create a new group definition or enter an existing
group name to edit that group definition.
all-usergroup {enable | disable} Enable to automatically include this RADIUS server in all disable
user groups.
auth-type {auto | chap | ms_ Select the authentication method for this RADIUS server.
auto
chap | ms_chap_v2 | pap} auto uses pap, ms_chap_v2, and chap.
radius-port <radius_port_ Change the default RADIUS port for this server. Range is 1812
num> 0-65535
server <domain> Enter the RADIUS server domain name or IP address. No default
source-ip <ipv4_addr> Enter the source IP for communications to RADIUS server. 0.0.0.0
config acct-server
server <accounting_server_ Enter the IPv4 address of the RADIUS server that will be
No default
ipv4_addr> receiving the accounting messages.
secret <accounting_server_ Enter the shared secret key for the RADIUS accounting *
secret> server.
source-ip <acccounting_ Enter the IPv4 address of the server that will be sending 0.0.0.0
source_ip> accounting messages.
The number of seconds that a user context entry can remain in the user context list without the system receiving a
communication session from the carrier end point. If a user context entry is not being looked up, then the user
must no longer be connected to the network.
This timeout is only required if the system doesn’t receive the RADIUS Stop record. However, even if the
accounting system does send RADIUS Stop records this timeout should be set in case the FortiSwitch misses a
Stop record.
The default user context entry timeout is 28800 seconds (8 hours). You can keep this timeout relatively high
because its not usually a problem to have a long list, but entries that are no longer used should be removed
regularly.
You might want to reduce this timeout if the accounting server does not send RADIUS Stop records. Also if
customer IP addresses change often you might want to set this timeout lower so that out of date entries are
removed from the list.
If this timeout is too low the FortiSwitch could remove user context entries for users who are still connected.
Set the timeout to 0 if you do not want the FortiSwitch to remove entries from the list except in response to
RADIUS Stop messages.
none — Disable writing event log messages for dynamic profile events.
accounting-event — Enable to write an event log message when the system does not find the expected
information in a RADIUS Record. For example, if a RADIUS record contains more than the expected number of
addresses.
accounting-stop-missed — Enable to write an event log message whenever a user context entry timeout
expires indicating that the system removed an entry from the user context list without receiving a RADIUS Stop
message.
context-missing — Enable to write an event log message whenever a user context creation timeout expires
indicating that the system was not able to match a communication session because a matching entry was not
found in the user context list.
profile-missing — Enable to write an event log message whenever the system cannot find a profile group
name in a RADIUS start message that matches the name of a profile group added to the system.
protocol-error — Enable to write an event log message if RADIUS protocol errors occur. For example, if a
RADIUS record contains a RADIUS secret that does not match the one added to the dynamic profile.
radiusd-other — Enable to write event log messages for other events. The event is described in the log
message. For example, write a log message if the memory limit for the user context list is reached and the oldest
entries in the table have been dropped.
Example
Syntax
edit <auth-table-entry-id>
set port <port_int>
set type {ftp | http | https | telnet}
end
end
auth-http-basic {disable | Enable or disable support for HTTP basic authentication disable
enable} for identity-based firewall policies. HTTP basic
authentication usually causes a browser to display a pop-
up authentication window instead of displaying an
authentication web page. Some basic web browsers, for
example, web browsers on mobile devices, may only
support HTTP basic authentication.
auth-multi-group This option can be disabled if the Active Directory structure enable
{enable | disable} is setup such that users belong to only 1 group for purpose
of firewall authentication.
auth-type {ftp | http | https | Set the user authentication protocol support for firewall No Default
telnet} policy authentication. User controls which protocols should
support the authentication challenge.
config auth-ports
<auth-table-entry-id> Create an entry in the authentication port table if you are No Default
using non-standard ports.
type {ftp | http | https | telnet} Specify the protocol to which port applies. http
Syntax
authen-type{ascii | auto | chap Set the authentication type. Auto will use PAP, MSCHAP,
auto
| mschap | pap} and CHAP (in that order).
Example
This example shows how to configure a TACACS user account for login authentication::
config user tacacs+
edit tacserver
set authen-type ascii
set authorization enable
set key temporary
set server tacacs_server
end
diagnose
Use this command to display the status of the spanning tree protocol (STP) bridge protocol data unit (BPDU)
guard:
diagnose bpdu-guard display status
To configure STP BPDU guard, see config switch interface on page 80.
Example output
Portname State Status Timeout(m) Count Last-Event
_________________ _______ _________ ___________ _____ _______________
port1 disabled - - - -
port2 disabled - - - -
port3 disabled - - - -
port4 disabled - - - -
port5 disabled - - - -
port6 disabled - - - -
port9 disabled - - - -
port10 disabled - - - -
port11 disabled - - - -
port12 disabled - - - -
port13 disabled - - - -
port14 disabled - - - -
port15 disabled - - - -
port16 disabled - - - -
port17 disabled - - - -
port18 disabled - - - -
port19 disabled - - - -
port20 disabled - - - -
port21 disabled - - - -
port22 disabled - - - -
port23 disabled - - - -
port24 disabled - - - -
port25 disabled - - - -
port26 disabled - - - -
port27 disabled - - - -
port28 disabled - - - -
port29 disabled - - - -
port30 enabled - 60 0 -
Use this command to set the debug level for application daemons. Some applications must be set to level 8 or
higher to enable output for other diagnose debug commands. If you do not specify the debugging level, the
current debugging level is returned.
diagnose debug application <application> [<debugging_level>]
Example output
S524DF4K15000024 # diagnose debug application flgd
Variable Description
fsso filter group <group_name> List only the logons by the specified FSSO group.
fsso filter server <FSSO_agent_name> List only the logons for the specified FSSO agent.
fsso filter user <user_name> List only the logons by the specified user.
Variable Description
Example output
diag debug authd fsso server-status
Use this command to set or find the debug level for the CLI:
diagnose debug cli [<0-8>]
Example output
S524DF4K15000024 # diagnose debug cli
Use this command to display information about the configuration error log:
diagnose debug config-error-log {clear | read}
Variable Description
Variable Description
no-user-log-msg {enable | disable} Enable or disable the display of user log messages on the console.
Variable Description
Example output
S524DF4K15000024 # diagnose debug crashlog get
Rk9SVP94nDK0NLPUNTTSNTZUMDSzMjCwMjVXSErOjc9IzEvJSY3PTM8tKI5Pzk2x
UvB1dgwO0Q1xdPJx1Q32jHK1MjQwMuECCCAjA0NzXQNLXQMzBUOgZgMrQ0uFkoxU
hezMnJzUFIWUxNTc/DyFzGIF/aTMPP301JKSSiuF4pLEktJiW4MKAy6AAELWb2gF
dIKJKUn6AQIIVb+JmZWpCUn6AQIIWb+RlYGxlbExSfoBAghZv7GVqamVEWn+Bwgg
ZP0mVgYWwCAkST9AAKHqNzQHxR8p+gECCFW/MdALhiToN+ICCCA0/WZWxqTpBwgg
ZP3AwDMGJkGS3A8QQKj6TYBJwIIk/QABhKbfBBiFJLkfIIDQ9JtaGZNivxEXQAAh
6zcDxb8RafEHEECo+oH+NyAt/QMEEKp+UP41Ikk/QADB9ZuD8r+RpRXQIOL1GxsY
cAEEEKoJphakpgCAAELWbwgKQQPSQhAggFD1A3OAMWkhABBAaPotrUxIsx8ggJD1
A0sgU1JzMEAAIesHZl8jICJJP0AAIesHpgBz0koAAy6AAELWb24FTgQk6QcIIFT9
JkD3k5KCDLgAAghNPzD+SbMfIIBQ9ZsaAyshkvQDBBCyfqDlwEKYtBIIIIBQ9QOj
0IS08AcIIDT9ZqSlHyMugABC1W8EDH/SakCAAELVD8w/JMY/QAAh6wcWH0bAJECS
foAAguu3UDAwtzIClmCklB+gEggggJBNsLQCV8MkuQAggND0A+sA0lIQQACh6jcC
1mGklYAAAYSkH1gCGZkCnUCSfoAAQtUPKgFJsx8ggFD1mwBzEGklGEAAoek3AUYi
...
Example output
S524DF4K15000024 # diagnose debug info
debug output: enable
console timestamp: disable
console no user log message: disable
fsmgr debug level: 16 (0x10)
CLI debug level: 8
Use this command to display or set the debugging level for the kernel:
diagnose debug kernel level [<integer>]
Example output
S524DF4K15000024 # diagnose debug kernel level
Use this command to display a report about the specified port for technical support:
diagnose debug packet_test <port_ID>
Example output
S524DF4K15000024 # diagnose debug packet_test 30
Send: 2, Recv: 2
Use this command to display the mapping between MAC addresses and ports:
diagnose debug port-mac {check-mac | list}
Variable Description
Example output
S524DF4K15000024 # diagnose debug port-mac check-mac 08:5b:0e:f1:95:e4
Input MAC address 08:5b:0e:f1:95:e4 found in range
08:5b:0e:e5:4f:d6--08:5b:0e:f1:9b:a4
90:6c:ac:30:19:22--90:6c:ac:7b:d6:d0
Allocated split-port MAC for port 32 is 00:00:00:00:00:00.
port14 14 0 08:5b:0e:f1:95:f3
port15 15 0 08:5b:0e:f1:95:f4
port16 16 0 08:5b:0e:f1:95:f5
port17 17 0 08:5b:0e:f1:95:f6
port18 18 0 08:5b:0e:f1:95:f7
port19 19 0 08:5b:0e:f1:95:f8
port20 20 0 08:5b:0e:f1:95:f9
port21 21 0 08:5b:0e:f1:95:fa
port22 22 0 08:5b:0e:f1:95:fb
port23 23 0 08:5b:0e:f1:95:fc
port24 24 0 08:5b:0e:f1:95:fd
port25 25 0 08:5b:0e:f1:95:fe
port26 26 0 08:5b:0e:f1:95:ff
port27 27 0 08:5b:0e:f1:96:00
port28 28 0 08:5b:0e:f1:96:01
port29 29 0 08:5b:0e:f1:96:02
port30 30 0 08:5b:0e:f1:96:03
internal 31 0 08:5b:0e:f1:95:e4
Use this command to display a detailed debugging report for technical support:
diagnose debug report
Example output
S524DF4K15000024 # diagnose debug report
----------------------------------------------------------------
Serial Number: S524DF4K15000024 Diagnose output
----------------------------------------------------------------
Use this command to reset all debugging levels to the default levels:
diagnose debug reset
Use this command to get flap-guard information for all switch ports:
diagnose flapguard status
Example output
S524DF4K15000024 # diagnose flapguard status
port1 disabled - 5 30 0 -
port2 disabled - 5 30 0 -
port3 disabled - 5 30 0 -
port4 disabled - 5 30 0 -
port5 disabled - 5 30 0 -
port6 disabled - 5 30 0 -
port7 disabled - 5 30 0 -
port8 disabled - 5 30 0 -
port9 disabled - 5 30 0 -
port10 enabled - 5 30 0 -
port11 disabled - 5 30 0 -
port12 disabled - 5 30 0 -
port13 disabled - 5 30 0 -
port14 disabled - 5 30 0 -
port15 enabled - 5 30 0 -
port16 disabled - 5 30 0 -
port17 disabled - 5 30 0 -
port18 disabled - 5 30 0 -
port19 disabled - 5 30 0 -
port20 disabled - 5 30 0 -
port21 disabled - 5 30 0 -
port22 disabled - 5 30 0 -
port23 disabled - 5 30 0 -
port24 disabled - 5 30 0 -
port25 disabled - 5 30 0 -
port26 disabled - 5 30 0 -
port27 disabled - 5 30 0 -
port28 disabled - 5 30 0 -
port29 disabled - 5 30 0 -
port30 disabled - 5 30 0 -
diagnose hardware
Use these commands to diagnose the hardware. You must be logged in as a super user for these commands.
diagnose hardware certificate
diagnose hardware deviceinfo
diagnose hardware ioport {byte <value> | long <arguments> | word <arguments>}
diagnose hardware ipsec
diagnose hardware pciconfig
diagnose hardware sysinfo
Variable Description
certificate Verify which certificates are present on the FortiSwitch and that all
installed certificates are valid.
ioport {byte <value> | long Read and write data using the input/output port.
<arguments> | word <arguments>}
ipsec Get information about the ASICʼs Internet Protocol Security (IPSec).
Example output
S524DF4K15000024 # diagnose hardware certificate
diagnose ip address
Variable Description
list List all IP addresses and which interfaces they are assigned to.
Example output
S524DF4K15000024 # diagnose ip address list
diagnose ip arp
Use these commands to manage the Address Resolution Protocol (ARP) table:
diagnose ip arp add <interface_name> <IPv4_address> <MAC_address>
diagnose ip arp delete <interface_name> <IPv4_address>
diagnose ip arp flush <interface_name>
diagnose ip arp list
Variable Description
arp add <interface_name> <IPv4_ Add an Address Resolution Protocol (ARP) entry for the IP address on
address> the specified interface.
arp delete <interface_name> Delete an Address Resolution Protocol (ARP) entry for the IP address
<IPv4_address> on the specified interface.
arp flush <interface_name> Delete the ARP table for the specified interface.
Example output
S524DF4K15000024 # diagnose ip arp list
diagnose ip route
Use these commands to manage static routes and the routing table:
diagnose ip route add <interface_name> <IPv4_address> <IP_network_mask>
diagnose ip route delete <interface_name> <IPv4_address>
diagnose ip route flush
diagnose ip route list [<arguments>]
diagnose ip route verify <interface_name> <IPv4_address> <IP_network_mask>
Variable Description
Example output
S524DF4K15000024 # diagnose ip route list
NOTE: To enable bidirectional forwarding detection (BFD) debugging, you must use the diagnose debug
application bfdd to set the debugging level to 8 or higher. To configure BFD, see config system interface on
page 131.
Variable Description
debug fsm {enable | disable} Enable or disable BFD FortiGate Storage Modules (FSM) debugging.
debug show Display the BFD debugging level and which kinds of BFD debugging
are enabled.
debug zebra {enable | disable} Enable or disable communication with the core router daemon.
Example output
S524DF4K15000024 # diagnose ip router bfd cpu-usage show
CPU (user+system): Real (wall-clock):
Runtime(ms) Invoked Avg uSec Max uSecs Avg uSec Max uSecs Type Thread
0.000 1 0 0 181 181 E zclient_connect
0.000 91 0 0 64 125 R zclient_read
0.000 26 0 0 40 82 W vty_flush
0.000 26 0 0 93 200 R vty_read
0.000 4 0 0 104 168 R vty_accept
0.000 148 0 0 66 200 RWTEXB TOTAL
Variable Description
debug {all | appl | as4 | bfd | events | Display BGP debugging information:
filters | fsm | keepalives | normal | show l all—Enable or disable all BGP debugging.
| updates | zebra} l appl—Enable or disable most applicable BGP debugging.
l as4—Enable or disable BGP AS version-4 debugging.
l bfd—Enable or disable BGP BFD debugging.
l events—Enable or disable BGP event debugging.
l filters—Enable or disable BGP filters debugging.
l fsm—Enable or disable BGP FSM debugging.
l keepalives—Enable or disable BGP keepalives debugging.
l normal—Enable or disable normal BGP debugging.
l show—Display the BGP debugging level and which kinds
of BGP debugging are enabled.
l updates—Enable or disable BGP updates debugging.
l zebra—Enable or disable communication with the core
router daemon.
Variable Description
bfd {cmd <arguments>| cmd-conf- Send commands to the BFD daemon in enable mode (cmd) or in
term <arguments>} configure terminal mode (cmd-conf-term).
bgp {cmd <arguments>| cmd-conf- Send commands to the BGP daemon in enable mode (cmd) or in
term <arguments>} configure terminal mode (cmd-conf-term).
isis {cmd <arguments>| cmd-conf- Send commands to the IS-IS daemon in enable mode (cmd) or in
term <arguments>} configure terminal mode (cmd-conf-term).
ospf {cmd <arguments>| cmd-conf- Send commands to the OSPF daemon in enable mode (cmd) or in
term <arguments>} configure terminal mode (cmd-conf-term).
pim {cmd <arguments>| cmd-conf- Send commands to the PIM daemon in enable mode (cmd) or in
term <arguments>} configure terminal mode (cmd-conf-term).
rip {cmd <arguments>| cmd-conf- Send commands to the RIP daemon in enable mode (cmd) or in
term <arguments>} configure terminal mode (cmd-conf-term).
zebra {cmd <arguments>| cmd-conf- Send commands to the core router daemon in enable mode (cmd) or
term <arguments>} in configure terminal mode (cmd-conf-term).
Variable Description
Variable Description
Use this command to display information about the process launch of the BFD daemon, OSPF daemon,
RIP daemon, and core routing daemon:
diagnose ip router launch-info show
Example output
S524DF4K15000024 # diagnose ip router launch-info show
NOTE: To enable open shortest path first (OSPF) debugging, you must use the diagnose debug
application ospfd to set the debugging level to 8 or higher. To configure OSPF routing, see config router
ospf on page 47.
Variable Description
crash-backtrace {clear | read} Erase or display the OSPF crash backtrace information.
debug ism {enable | disable} Enable or disable OSPF interface state machine (ISM) debugging.
debug lsa {enable | disable} Enable or disable OSPF link state advertisement (LSA) debugging.
debug nsm {enable | disable} Enable or disable OSPF neighbor state machine (NSM) debugging.
debug nssa {enable | disable} Enable or disable OSPF Not So Stubby areas (NSSA) debugging.
debug zebra {enable | disable} Enable or disable communication with the core router daemon.
ism-debug all {enable | disable} Enable or disable all OSPF ISM debugging.
ism-debug events {enable | disable} Enable or disable OSPF ISM event debugging.
ism-debug status {enable | disable} Enable or disable OSPF ISM status debugging.
ism-debug timers {enable | disable} Enable or disable OSPF ISM timers debugging.
lsa-debug all {enable | disable} Enable or disable all OSPF LSA debugging.
lsa-debug flooding {enable | disable} Enable or disable OSPF LSA flooding debugging.
lsa-debug install {enable | disable} Enable or disable OSPF LSA installation and removal debugging.
lsa-debug refresh {enable | disable} Enable or disable OSPF LSA refresh debugging.
nsm-debug all {enable | disable} Enable or disable all OSPF NSM debugging.
nsm-debug events {enable | disable} Enable or disable OSPF NSM event debugging.
Variable Description
nsm-debug status {enable | disable} Enable or disable OSPF NSM status debugging.
nsm-debug timers {enable | disable} Enable or disable OSPF NSM timers debugging.
packet-debug all {enable | disable} Enable or disable all OSPF packet debugging.
packet-debug ls-ack {enable | Enable or disable link state acknowledgment packet debugging.
disable}
packet-debug ls-update {enable | Enable or disable link statue update packet debugging.
disable}
zebra-debug all {enable | disable} Enable or disable all OSPF core router debugging.
zebra-debug redistribute {enable | Enable or disable OSPF core router redistribution debugging.
disable}
Example output
S524DF4K15000024 # diagnose ip router ospf cpu-usage show
CPU (user+system): Real (wall-clock):
Runtime(ms) Invoked Avg uSec Max uSecs Avg uSec Max uSecs Type Thread
0.000 1 0 0 130 130 E zclient_connect
0.000 1332 0 0 23 90 T ospf_lsa_refresh_
walker
0.000 1 0 0 145 145 T ospf_spf_calculate_
timer
0.000 1 0 0 56 56 T ospf_abr_task_timer
10.001 98 102 10001 124 6396 R zclient_read
0.000 444 0 0 27 36 T ospf_lsa_maxage_
walker
0.000 393 0 0 130 10301 W vty_flush
150.011 392 382 10001 369 10470 R vty_read
0.000 1 0 0 41 41 T ospf_ase_calculate_
timer
0.000 6 0 0 101 211 R vty_accept
0.000 1 0 0 36 36 T (ospf_maxage_lsa_
remover)
160.012 2670 59 10001 94 10470 RWTEXB TOTAL
OSPF top : 1
OSPF area : 1
OSPF LSA : 7
OSPF LSA data : 7
OSPF LSDB : 2
OSPF ext. info : 6
OSPF if info : 76
OSPF if params : 76
-----------------------------
Variable Description
Variable Description
NOTE: To enable RIP debugging, you must use the diagnose debug application ripd to set the
debugging level to 8 or higher. To configure RIP routing, see "config router" on page 54.
Variable Description
crash-backtrace {clear | read} Erase or display the RIP crash backtrace information.
debug packet-rx {enable | disable} Enable or disable received RIP packet debugging.
debug packet-tx {enable | disable} Enable or disable transmitted RIP packet debugging.
debug show Display the RIP debugging level and which kinds of RIP debugging are
enabled.
debug zebra {enable | disable} Enable or disable communication with the core router daemon.
Example output
S524DF4K15000024 # diagnose ip router rip cpu-usage show
CPU (user+system): Real (wall-clock):
Runtime(ms) Invoked Avg uSec Max uSecs Avg uSec Max uSecs Type Thread
0.000 2947 0 0 350 463 T rip_update
0.000 1 0 0 685 685 E zclient_connect
0.000 5904 0 0 13 76 R rip_read
10.000 95 105 10000 260 17090 R zclient_read
10.001 134 74 10001 170 9266 W vty_flush
0.000 2 0 0 202 287 T rip_interface_wakeup
0.000 5 0 0 158 407 T rip_triggered_inter-
val
30.002 133 225 10001 364 10672 R vty_read
0.000 3 0 0 227 314 E rip_triggered_update
0.000 7 0 0 87 167 R vty_accept
50.003 9231 5 10001 131 17090 RWTEXB TOTAL
Use this command to enable or disable the display of router information on the terminal:
diagnose ip router terminal monitor {enable | disable}
NOTE: To enable debugging of the core router daemon, you must use the diagnose debug application
zebra to set the debugging level to 8 or higher.
Variable Description
Erase or display the crash backtrace information for the core router
crash-backtrace {clear | read}
daemon.
debug all {enable | disable} Enable or disable all debugging for the core router daemon.
debug events {enable | disable} Enable or disable event debugging for the core router daemon.
debug fpm {enable | disable} Enable or disable hardware offload debugging for the core router
daemon.
debug packet-rx {enable | disable} Enable or disable general debugging of received packets for the core
router daemon.
Variable Description
debug packet-rx-detail {enable | Enable or disable detailed debugging of received packets for the core
disable} router daemon.
packet-tx {enable | disable} Enable or disable general debugging of transmitted packets for the
core router daemon.
debug packet-tx-detail {enable | Enable or disable detailed debugging of transmitted packets for the
disable} core router daemon.
debug rib {enable | disable} Enable or disable routing table debugging for the core router daemon.
debug rib-queue {enable | disable} Enable or disable routing queue debugging for the core router daemon.
debug show Display the debugging level of the core router daemon and which kinds
of debugging of the core router daemon are enabled.
Example output
S524DF4K15000024 # diagnose ip router zebra cpu-usage show
CPU (user+system): Real (wall-clock):
Runtime(ms) Invoked Avg uSec Max uSecs Avg uSec Max uSecs Type Thread
0.000 38 0 0 55 1042 B work_queue_run
0.000 4 0 0 63 73 R zebra_accept
0.000 7 0 0 48 119 R zfpm_read_cb
0.000 1 0 0 299 299 T zfpm_connect_cb
0.000 92 0 0 158 5277 W vty_flush
0.000 9167 0 0 15 26 T zfpm_stats_timer_cb
10.001 28 357 10001 924 24068 R zebra_client_read
10.001 91 109 10001 202 914 R vty_read
10.000 98 102 10000 43 173 R kernel_read
0.000 1 0 0 34 34 B zfpm_conn_up_thread_
cb
0.000 16 0 0 67 142 W zfpm_write_cb
10.001 11 909 10001 107 234 R vty_accept
40.003 9554 4 10001 22 24068 RWTEXB TOTAL
connect_calls 1 0
connect_no_sock 0 0
read_cb_calls 7 0
write_cb_calls 16 0
write_calls 13 0
partial_writes 0 0
max_writes_hit 0 0
t_write_yields 0 0
nop_deletes_skipped 8 0
route_adds 13 0
route_dels 0 0
updates_triggered 21 0
non_fpm_table_triggers 0 0
redundant_triggers 5 0
dests_del_after_update 0 0
t_conn_down_starts 0 0
t_conn_down_dests_processed 0 0
t_conn_down_yields 0 0
t_conn_down_finishes 0 0
t_conn_up_starts 1 0
t_conn_up_dests_processed 8 0
t_conn_up_yields 0 0
t_conn_up_aborts 0 0
t_conn_up_finishes 1 0
Hash : 1
Hash Bucket : 12
Hash Index : 1
Route table : 86
Route node : 45
Access List : 3
Access List Str : 3
Access Filter : 3
Prefix List : 2
Prefix List Entry : 2
Prefix List Str : 2
Route map name : 2
Command desc : 7201
Logging : 1
Work queue : 2
Work queue name string : 1
Priority queue : 2
Priority queue data : 2
Host config : 4
-----------------------------
VRF : 1
VRF name : 1
Nexthop : 25
RIB : 25
Static IPv4 route : 2
RIB destination : 19
RIB table info : 4
-----------------------------
BFD candidate table : 1
-----------------------------
diagnose ip tcp
Example
S524DF4K15000024 # diagnose ip tcp list
diagnose ip udp
Example
S524DF4K15000024 # diagnose ip udp list
sl local_address rem_address st tx_queue rx_queue tr tm->when retrnsmt uid
timeout inode ref pointer drops
24: 00000000:E818 00000000:0000 07 00000000:00000000 00:00000000 00000000 0
0 4097 2 e69e38c0 0
53: 00000000:0035 00000000:0000 07 00000000:00000000 00:00000000 00000000 0
0 1972 2 e6029440 0
67: 00000000:0043 00000000:0000 07 00000000:00000000 00:00000000 00000000 0
0 964 2 e5fd2d80 0
67: 00000000:0043 00000000:0000 07 00000000:00000000 00:00000000 00000000 0
0 963 2 e5fd2b40 0
68: 00000000:0044 00000000:0000 07 00000000:00000000 00:00000000 00000000 0
0 1961 2 e6029200 0
181: 00000000:90B5 00000000:0000 07 00000000:00000000 00:00000000 00000000 0
0 7681206 2 e6b94b40 0
350: 00000000:C15E 00000000:0000 07 00000000:00000000 00:00000000 00000000 0
0 3301 2 e69e2b40 0
370: 0100007F:1972 00000000:0000 07 00000000:00000000 00:00000000 00000000 0
0 1793 2 e6028fc0 0
404: 00000000:B994 00000000:0000 07 00000000:00000000 00:00000000 00000000 0
0 112 2 e5fd2000 0
415: 00000000:859F 00000000:0000 07 00000000:00000000 00:00000000 00000000 0
0 11905 2 e5fd38c0 0
415: 00000000:C99F 00000000:0000 07 00000000:00000000 00:00000000 00000000 0
0 3113 2 e6029d40 0
450: 00000000:E9C2 00000000:0000 07 00000000:00000000 00:00000000 00000000 0
0 157 2 e5fd2480 0
520: 00000000:0208 00000000:0000 07 00000000:00000000 00:00000000 00000000 0
0 2196 2 e5fd3680 0
546: 00000000:CA22 00000000:0000 07 00000000:00000000 00:00000000 00000000 0
0 2156 2 e5fd3440 0
549: 00000000:9225 00000000:0000 07 00000000:00000000 00:00000000 00000000 0
0 2057 2 e5fd2fc0 0
653: 00000000:AE8D 00000000:0000 07 00000000:00000000 00:00000000 00000000 0
0 775 2 e5fd2900 0
654: 00000000:B68E 00000000:0000 07 00000000:00000000 00:00000000 00000000 0
0 1977 2 e6029b00 0
688: 00000000:12B0 00000000:0000 07 00000000:00000000 00:00000000 00000000 0
0 3321 2 e69e2fc0 0
712: 00000000:0EC8 00000000:0000 07 00000000:00000000 00:00000000 00000000 0
0 3320 2 e69e2d80 0
713: 00000000:0EC9 00000000:0000 07 00000000:00000000 00:00000000 00000000 0
0 3322 2 e69e3200 0
763: 00000000:92FB 00000000:0000 07 00000000:00000000 00:00000000 00000000 0
0 9848617 2 e6ad7200 0
788: 0100007F:0714 00000000:0000 07 00000000:00000000 00:00000000 00000000 0
0 3224 2 e69e2240 0
805: 0100007F:A725 0100007F:0714 01 00000000:00000000 00:00000000 00000000 0
0 3292 2 e69e2900 0
882: 00000000:8372 00000000:0000 07 00000000:00000000 00:00000000 00000000 0
0 1974 2 e60298c0 0
972: 00000000:B7CC 00000000:0000 07 00000000:00000000 00:00000000 00000000 0
0 3260 2 e69e26c0 0
981: 00000000:EBD5 00000000:0000 07 00000000:00000000 00:00000000 00000000 0
0 39752 2 e69e3b00 0
990: 00000000:BBDE 00000000:0000 07 00000000:00000000 00:00000000 00000000 0
0 4357 2 e69e3d40 0
Variable Description
add <interface_name> <IPv6_ Add an IPv6 address to the specified interface. Use the following
address> format for the IPv6 address:
xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx/xxx
Variable Description
delete <interface_name> <IPv4_ Delete an IPv6 address from the specified interface. Use the following
address> format for the IPv6 address:
xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx/xxx
list List all IPv6 addresses and which interfaces they are assigned to.
Example output
S524DF4K15000024 # diagnose ipv6 address list
Variable Description
Variable Description
add <tunnel_name> <interface_ Create a tunnel between two IPv6 addresses on the specified
name> <source_IPv6_address> interface. Use the following format for the IPv6 addresses:
<destination_IPv6_address> xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx
Example output
S524DF4K15000024 # diagnose ipv6 ipv6-tunnel list
Use these commands to manage the IPv6 Address Resolution Protocol (ARP) table:
diagnose ipv6 neighbor-cache add <interface_name> <IPv6_address> <MAC_address>
diagnose ipv6 neighbor-cache delete <interface_name> <IPv4_address>
diagnose ipv6 neighbor-cache flush <interface_name>
diagnose ipv6 neighbor-cache list
Variable Description
add <interface_name> <IPv6_ Add an ARP entry for the IPv6 address on the specified interface.
address>
flush <interface_name> Delete the ARP table for the specified interface.
Example output
S524DF4K15000024 # diagnose ipv6 neighbor-cache list
Variable Description
Example output
S524DF4K15000024 # diagnose ipv6 route list
Variable Description
add <tunnel_name> <interface_ Create a tunnel between two IPv4 addresses on the specified
name> <source_IPv4_address> interface. Use the following format for the IPv4 addresses:
<destination_IPv4_address> XXX.XXX.XXX.XXX
Example output
S524DF4K15000024 # diagnose ipv6 sit-tunnel list
Variable Description
Example output
S524DF4K15000024 # diagnose log alertconsole list
Use this command to display which ports have loop guard enabled:
diagnose loop-guard instance status
To enable loop guard on a port, see config switch interface on page 80.
Example output
S524DF4K15000024 # diagnose loop-guard instance status
port1 lo disabled - - - -
port2 disabled - - - -
port3 disabled - - - -
port4 disabled - - - -
port5 disabled - - - -
port6 disabled - - - -
port9 disabled - - - -
port10 enabled - 45 0 -
port11 disabled - - - -
port12 disabled - - - -
port13 disabled - - - -
port14 disabled - - - -
port15 disabled - - - -
port16 disabled - - - -
port17 disabled - - - -
port18 disabled - - - -
port19 disabled - - - -
port20 enabled - 45 0 -
port21 disabled - - - -
port22 disabled - - - -
port23 disabled - - - -
port24 disabled - - - -
port25 disabled - - - -
port26 disabled - - - -
port27 disabled - - - -
port28 disabled - - - -
port29 disabled - - - -
port30 enabled - 45 0 -
diagnose settings
Variable Description
Example output
S524DF4K15000024 # diagnose settings info
Variable Description
<interface_name | any> Enter the name of a network interface or enter any to examine packets
received on all interfaces.
Variable Description
Enter a logical filter or none. Use the following format for the filter:
'[[src|dst] host<IP_address>] [[src|dst] host<IP_
address>] [[arp|ip|gre|esp|udp|tcp] [port_number]]
[[arp|ip|gre|esp|udp|tcp] [port_number]]'
For example, to examine UDP packets received at port 1812 from host
forti1 and host forti2 or forti3:
'udp and port 1812 and host forti1 and \( forti2
or forti3 \)'
Example output
S524DF4K15000024 # diagnose sniffer packet any
interfaces=[any]
filters=[none]
0.977537 arp who-has 192.168.0.10 tell 192.168.1.99
0.977755 127.0.0.1 -> 0.0.0.0: icmp: type-#20
1.057565 224.0.0.18 -> 33.5.255.1: ip-proto-10 (frag 65392:4294967276@1336+)
diagnose snmp
Variable Description
trap send Generate a trap event and send it to the SNMP daemon.
Example output
S524DF4K15000024 # diagnose snmp ip frags
ReasmTimeout = 0
ReasmReqds = 0
ReasmOKs = 0
ReasmFails = 0
FragOKs = 0
FragFails = 0
FragCreates = 0
Use this command to display information about Multiple Spanning Tree Protocol (MSTP) instances:
diagnose stp instance list <STP_ID> <port_number>
To create an STP instance, see config switch stp instance on page 103.
Variable Description
<STP_ID> Enter the STP identifier (0-15). If you enter a higher number than 15,
results for all STP instances are displayed. If no STP identifier is
specified, results for all STP instances are displayed.
Enter the port number. If no port number is specified, results for all
<port_number>
physical ports are displayed.
Example output
S524DF4K15000024 # diagnose stp instance list 0
Instance ID 0 (CST)
Config Priority 32768
Bridge MAC 085b0ef195e4, MD5 Digest 40d5eca178c657835c83bbcb16723192
Active Times Forward Time 15, Max Age 20, Remaining Hops 20
TCN Events Triggered 1 (1d 0h 19m 56s ago), Received 0 (1d 0h 19m 56s ago)
Flags: EN(STP enable), ED(Edge), LP(Loop Protection), RG(Root Guard Triggered), BG(BPDU Guard
Triggered)
To configure an MSTP instance, see config switch stp settings on page 104.
Example output
S524DF4K15000024 # diagnose stp mst-config list
Unit: primary
MST Configuration Name: region1
MST Configuration Revision: 1
MST Configuration Digest: ac36177f50283cd4b83821d8ab26de62
Use this command to display the MSTP information for a specific VLAN:
diagnose stp vlan list <VLAN_ID>
Variable Description
Example output
S524DF4K15000024 # diagnose stp vlan list 10
Instance ID : 0
Use this command to display the status of a port using IEEE 802.1x authentication:
diagnose switch 802-1x status [<port_name>]
Variable Description
[<port_name>] Enter the port name. If the port is not specified, the status of all 802.1x-
authenticated ports is returned.
To enable IEEE 802.1x authentication on a port, see config switch interface on page 80.
Example output
S524DF4K15000024 # diagnose switch 802-1x status
Use these commands to display information about access control lists (ACLs):
diagnose switch acl counter all
diagnose switch acl counter app <name>
diagnose switch acl counter id <policy_ID>
diagnose switch acl counter list-apps
Variable Description
id <policy_ID> List the ACL counter for this ACL policy identifier.
Example output
S524DF4K15000024 # diagnose switch acl counter list-apps
_______________________________________________
loop-gaurd (2049-2049)
l3-arp-req (2050-2050)
l3-arp-reply (2051-2051)
dst-mac (2052-2052)
bfd-single-hop (2053-2053)
bfd-multi-hop (2054-2054)
ospf (2055-2055)
rip (2056-2056)
mclag (2057-2057)
mclag-l3-arp-req (2058-2058)
mclag-l3-arp-reply (2059-2059)
mclag-bfd-single-hop (2060-2060)
mclag-bfd-multi-hop (2061-2061)
mclag-ospf (2062-2062)
mclag-rip (2063-2063)
fortilink (2064-2064)
fortilink-1 (2065-2065)
mclag-fortilink (2066-2066)
mclag-icl (2067-2067)
mac-sa-mcast (2068-2068)
forti-trunk (2069-2069)
vwire (2304-2367)
vwire-acl (2368-133503)
dhcp-snooping (133504-141695)
arp-snooping (141696-145792)
access-vlan (145793-149889)
network-monitor (149890-149930)
Variable Description
To enable dynamic ARP inspection on a VLAN, see config switch vlan on page 108.
Variable Description
Example output
S524DF4K15000024 # diagnose switch egress list port1
Use this command to display the counters for an IP-MAC binding entry:
diagnose switch ip-mac-binding entry <entry_ID>
Variable Description
Example output
S524DF4K15000024 # diagnose switch ip-mac-binding entry 1
Binding Entry: 1
Binding IP: 1.20.168.172 255.255.255.255
Binding MAC: 00:21:CC:D2:76:72
Status: Enabled
Statistic:
Permit packets: 0x00
Variable Description
delete {all | entry Delete all MAC address entries or a specific MAC address entry.
<xx:xx:xx:xx:xx:xx>}
filter clear Delete the filter for the MAC address table list.
filter flags <flag bit pattern> Specify the flag bit pattern to match. Use this pattern to mask
important bits. This value is hexadecimal.
List the port identifiers to display MAC addresses for. Separate the port
filter port-id-map <port-ID list>
identifiers with commas. For example: 1,3,5-17,19
filter show Display the filter for the MAC address table list.
List the trunk identifiers to display MAC addresses for. Separate the
filter trunk-id-map <trunk-ID list>
trunk identifiers with commas. For example: 1,2-4,77
filter vlan-map <VLAN_list> List the VLAN identifiers to display MAC addresses for. Separate the
VLAN identifiers with commans. For example: 1,2-4,77
list List the MAC address entries and the total number of entries.
Example output
S524DF4K15000024 # diagnose switch mac-address filter show
Total Displayed: 2
Total MACs : 30
MAC-1 : 08:5b:0e:f1:95:e6
MAC-2 : 08:5b:0e:f1:95:e8
MAC-3 : 08:5b:0e:f1:95:ea
MAC-4 : 08:5b:0e:f1:95:ec
MAC-5 : 08:5b:0e:f1:95:ee
MAC-6 : 08:5b:0e:f1:95:f0
MAC-7 : 08:5b:0e:f1:95:f2
MAC-8 : 08:5b:0e:f1:95:f4
MAC-9 : 08:5b:0e:f1:95:f6
MAC-10 : 08:5b:0e:f1:95:f8
MAC-11 : 08:5b:0e:f1:95:fa
MAC-12 : 08:5b:0e:f1:95:fc
MAC-13 : 08:5b:0e:f1:95:fe
MAC-14 : 08:5b:0e:f1:96:00
MAC-15 : 08:5b:0e:f1:96:02
MAC-16 : 08:5b:0e:f1:95:e7
MAC-17 : 08:5b:0e:f1:95:e9
MAC-18 : 08:5b:0e:f1:95:eb
MAC-19 : 08:5b:0e:f1:95:ed
MAC-20 : 08:5b:0e:f1:95:ef
MAC-21 : 08:5b:0e:f1:95:f1
MAC-22 : 08:5b:0e:f1:95:f3
MAC-23 : 08:5b:0e:f1:95:f5
MAC-24 : 08:5b:0e:f1:95:f7
MAC-25 : 08:5b:0e:f1:95:f9
MAC-26 : 08:5b:0e:f1:95:fb
MAC-27 : 08:5b:0e:f1:95:fd
MAC-28 : 08:5b:0e:f1:95:ff
MAC-29 : 08:5b:0e:f1:96:01
MAC-30 : 08:5b:0e:f1:96:03
Variable Description
clear-stats {all | icl | mclag} Delete statistics for all MCLAGs, delete MCLAG ICLs, or delete the
statistics for the MCLAG with the specified trunk.
list <trunk_name> Display statistics for the MCLAG with the specified trunk.
Example output
S524DF4K15000024 # diagnose switch mclag icl
MCLAG-ICL-trunk
icl-ports port15 port16
egress-block-ports none
interface-mac 08:5b:0e:f1:95:e5
lacp-serial-number S524DF4K15000024
peer-info N/A
keepalive interval 1
keepalive timeout 30
Counters
Use these commands to display information about physical layer (PHY) modules:
diagnose switch modules eeprom <physical_port_name>
diagnose switch modules state-machine <physical_port_name>
Variable Description
trap send Generate a trap event and send it to the SNMP daemon.
Example output
S524DF4K15000024 # diagnose switch modules state-machine port10
DMI Status
----------------------------------
monitor_interval 10 minutes
next_monitor_in 0:44
dmi_trace 0
alarm_trap_enabled 0
num_ports 30
mod_pres 0x0000000000000000
mod_rxlos 0x0000000000000000
state_runs 62380
state_transitions 6
Variable Description
Example output
S524DF4K15000024 # diagnose switch network-monitor cfg-stats
Network Monitor Configuration Statistics:
----------------------------------
Adds : 1
Deletes : 0
Free Entries : 19
Use these commands to manage information from switch packet PDU counters:
Variable Description
Example output
S524DF4K15000024 # diagnose switch pdu-counters list
Variable Description
cable-diag <port_name> Display the results of a time-domain reflectometer (TDR) diagnostic test
on the specified port.
Variable Description
eee-status [<port_name>] Display whether the specified port has energy-efficient Ethernet (EEE)
enabled. If the port is not specified, the status of all ports is displayed.
Delete the statistics for input and output packets for the specified ports.
io-stats clear-local <port_list>
Use commas to separate ports. For example: 1,3,4-6
io-stats cumulative Display the cumulative statistics for input and output packets for all
ports.
List the statistics for input and output packets for the specified ports. If
io-stats list [<port_list>]
the ports are not specified, the statistics for all ports are displayed.
linerate [<port_list>] Display the number of packets received and transmitted on the specified
ports as well as the line rate. Use commas to separate ports. If the ports
are not specified, the statistics for all ports are displayed.
Display the details for the specified port. If the port is not specified, the
list [<port_name>]
details for all ports are displayed.
port-stats [<port_list>] Display statistics for the specified ports. Use commas to separate ports.
If the ports are not specified, the statistics for all ports are displayed.
Delete the QoS statistics for the specified ports. If the ports are not
qos-stats clear [<port_list>]
specified, the statistics for all ports are deleted.
qos-stats list [<port_list>] Display the QoS statistics for the specified ports. If the ports are not
specified, the statistics for all ports are displayed.
Delete the statistics for received and transmitted packets for the
stats clear-local <port_list> specified ports for only the local session. Use commas to separate ports.
For example: 1,3,4-6
stats list [<port_list>] List the statistics for received and transmitted packets for the specified
ports. Use commas to separate ports. If the ports are not specified, the
statistics for all ports are displayed.
Variable Description
Display a summary about the specified physcial port. If the port is not
summary [<port_name>]
specified, summaries for all ports are displayed.
Example output
S524DF4K15000024 # diagnose switch physical-ports cable-diag port1
port1: cable (4 pairs, length +/- 10 meters)
pair A Open, length 0 meters
pair B Open, length 0 meters
pair C Open, length 0 meters
pair D Open, length 0 meters
ctrl-c to stop
ctrl-c to stop
Rx Bytes: 0
Rx Packets: 0
Rx Unicasts: 0
Rx NUnicasts: 0
Rx Multicasts: 0
Rx Broadcasts: 0
Rx Discards: 0
Rx Errors: 0
Rx Oversize: 0
Rx Pauses: 0
Rx IPMC Dropped: 0
Rx 64 Octets Packets: 0
Rx 65-127 Octets Packets: 0
Rx 128-255 Octets Packets: 0
Rx 256-511 Octets Packets: 0
Rx 512-1023 Octets Packets: 0
Rx 1024-1518 OctetsPackets: 0
Rx 1519-2047 Octets Packets: 0
Rx 2048-4095 Octets Packets: 0
Rx 4096-9216 Octets Packets: 0
Rx 9217-16383 Octets Packets: 0
Rx L3 Packets: 0
Tx Bytes: 0
Tx Packets: 0
Tx Unicasts: 0
Tx NUnicasts: 0
Tx Multicasts: 0
Tx Broadcasts: 0
Tx Discards: 0
Tx Errors: 0
Tx Oversize: 0
Tx Pauses: 0
Tx IPMC Dropped: 0
Tx 64 Octets Packets: 0
Tx 65-127 Octets Packets: 0
Tx 128-255 Octets Packets: 0
Tx 256-511 Octets Packets: 0
Tx 512-1023 Octets Packets: 0
Tx 1024-1518 Octets Packets: 0
Tx 1519-2047 Octets Packets: 0
Tx 2048-4095 Octets Packets: 0
Tx 4096-9216 Octets Packets: 0
Tx 9217-16383 Octets Packets: 0
Fragments: 0
Undersize: 0
Jabbers: 0
Collisions: 0
CRC Alignment Errors: 0
IPMC Bridged: 0
IPMC Routed: 0
----------------------------------------------------------------------------------
queue | ucast drop pkts | ucast drop bytes | mcast drop pkts | mcast drop bytes
----------------------------------------------------------------------------------
0 | 0 | 0 | 0 | 0
1 | 0 | 0 | 0 | 0
2 | 0 | 0 | 0 | 0
3 | 0 | 0 | 0 | 0
4 | 0 | 0 | 0 | 0
5 | 0 | 0 | 0 | 0
6 | 0 | 0 | 0 | 0
7 | 0 | 0 | 0 | 0
----------------------------------------------------------------------------------
port18 | 0 | 0 || 0 | 0 | 0 |
port19 | 0 | 0 || 0 | 0 | 0 |
port20 | 0 | 0 || 0 | 0 | 0 |
port21 | 0 | 0 || 0 | 0 | 0 |
port22 | 0 | 0 || 0 | 0 | 0 |
port23 | 0 | 0 || 0 | 0 | 0 |
port24 | 0 | 0 || 0 | 0 | 0 |
port25 | 0 | 0 || 0 | 0 | 0 |
port26 | 0 | 0 || 0 | 0 | 0 |
port27 | 0 | 0 || 0 | 0 | 0 |
port28 | 0 | 0 || 0 | 0 | 0 |
port29 | 0 | 0 || 0 | 0 | 0 |
port30 | 0 | 0 || 0 | 0 | 0 |
internal | 393 | 9343000 || 0 | 0 | 0 |
Use this command to display power over Ethernet (PoE) information for a specific port:
diagnose switch poe status <physicial_port_name>
Variable Description
Example output
S524DF4K15000024 # diagnose switch poe status port1
Variable Description
[<trunk_name>] Display link aggregation information for the specified trunk. If the trunk is
not specified, link aggregation information for all trunks is displayed.
Example output
S524DF4K15000024 # diagnose switch trunk list trunk1
port1 BLOCK
port2 BLOCK
port15 BLOCK
port16 BLOCK
status: down
ports: 2
LACP mode: active
LACP speed: slow
aggregator ID: 1
actor key: 0
actor MAC address: 08:5b:0e:f1:95:f4
partner key: 1
partner MAC address: 00:00:00:00:00:00
slave: port15
status: down
link failure count: 0
permanent MAC addr: 08:5b:0e:f1:95:f4
actor state: ASAIDD
partner state: PSIODD
aggregator ID: 1
slave: port16
status: down
link failure count: 0
permanent MAC addr: 08:5b:0e:f1:95:f5
actor state: ASAODD
partner state: PSIODD
aggregator ID: 2
port2 BLOCK
Variable Description
[<trunk_name>] Display a summary of the link aggregation information for the specified trunk. If the
trunk is not specified, a summary for all trunks is displayed.
Example output
S524DF4K15000024 # diagnose switch trunk summary
Variable Description
assignment ether-proto flush Delete all VLAN entries assigned by Ethernet frame type and protocol.
assignment ether-proto list Display VLAN assignments by Ethernet frame type and protocol. Use
[{sorted-by-protocol | sorted-by- sorted-by-protocol to list VLAN entries by protocol. Use
vlan}] sorted-by-vlan to list VLAN entries by the VLAN identifier.
assignment ipv4 flush Delete all VLAN entries assigned by IPv4 address or subnet.
Variable Description
assignment ipv4 list [{sorted-by- Display VLAN assignments by IPv4 address or subnet. Use sorted-
address | sorted-by-vlan}] by-address to list VLAN entries by the mask length and IP address.
Use sorted-by-vlan to list VLAN entries by the VLAN identifier.
assignment ipv6 flush Delete all VLAN entries assigned by IPv6 address or subnet.
assignment ipv6 list [{sorted-by- Display VLAN assignments by IPv6 address or subnet. Use sorted-
address | sorted-by-vlan}] by-address to list VLAN entries by the mask length and IP address.
Use sorted-by-vlan to list VLAN entries by the VLAN identifier.
assignment mac flush Delete all VLAN entries assigned by MAC address.
assignment mac list [{sorted-by- Display VLAN assignments by MAC address. Use sorted-by-mac to
mac | sorted-by-vlan}] list VLAN entries by the MAC address. Use sorted-by-vlan to list
VLAN entries by the VLAN identifier.
list [<VLAN_ID>] Display which ports are assigned to the specified VLAN identifier. If the
VLAN identifier is not specified, the information for all VLAN identifiers
is displayed.
Example output
S524DF4K15000024 # diagnose switch vlan assignment capabilities
Assignment modes supported:
Port based assignment
IPv4 address/subnet based assignment
IPv6 address/subnet based assignment
MAC address based assignment
Ethernet Protocol based assignment
[ port17] Force[disabled]
[ port18] Force[disabled]
[ port19] Force[disabled]
[ port20] Force[disabled]
[ port21] Force[disabled]
[ port22] Force[disabled]
[ port23] Force[disabled]
[ port24] Force[disabled]
[ port25] Force[disabled]
[ port26] Force[disabled]
[ port27] Force[disabled]
[ port28] Force[disabled]
[ port29] Force[disabled]
[ port30] Force[disabled]
[internal] Force[disabled]
Private-VLANs:
Use the following commands to check which tables are using the entry:
diagnose sys checkused <path.object.mkey>
Variable Description
Example output
S524DF4K15000024 # diagnose sys checkused switch.physical-port.name
Use this command to display information about which CPU set uses a specific process:
diagnose sys cpuset <process_ID> <CPU_set_mask>
Variable Description
<process_ID> <CPU_set_mask> Specify the process identifier and CPU set mask to find out which CPU
set uses the process.
Example output
S524DF4K15000024 # diagnose sys dayst-info
The current timezone '(GMT-8:00)Pacific Time(US&Canada).' daylight saving time
starts at Sun Mar 8 02:00:00 1970, ends at Sun Nov 1 01:00:00 1970
Example output
S524DF4K15000024 # diagnose sys fan status
Module Status
___________________________________
Fan OK
Fan speed is set to 50.0%.
Variable Description
Example output
S524DF4K15000024 # diagnose sys flash list
Partition Image TotalSize(KB) Used(KB) Use% Active
(*) 1 S524DF-3.6.3-FW-build0390-171020 53248 22922 43% Yes
4096 448 11% Yes
2 53248 0 0% No
Use these commands to manage the SSL tunnel for FortiSwitch cloud management:
diagnose sys fsw-cloud-mgr close-access-socket
diagnose sys fsw-cloud-mgr shutdown-ssl
Variable Description
close-access-socket Restart the SSL tunnel between a FortiSwitch and FortiSwitch cloud
management by closing the socket.
Variable Description
To find out which processes are currently running, see diagnose sys vlan list on page 232.
To configure the link health monitor, see config system link-monitor on page 139.
Variable Description
status {entry | all} Display information about a specified link-monitor entry or all link-
monitor entries.
Variable Description
<delay> <loops> Display information about the CPU use after the specified number of
seconds (default is 5) and for the specified number of loops (default is
1,000,000). If the values for <delay> <loops> are not specified, there is no
delay, and the output continues until a key is pressed.
Example output
S524DF4K15000024 # diagnose sys mpstat
Use this command to display the configuration of the Network Time Protocol (NTP) servers:
diagnose sys ntp status
To configure the NTP servers, see config system ntp on page 140.
Use this command to display the printed circuit board (PCB) temperature:
diagnose sys pcb temp
Example output
S524DF4K15000024 # diagnose sys pcb temp
Module Status
__________________________________
Sensor1 42.0 C
Variable Description
To find out which processes are currently running, see diagnose sys vlan list on page 232.
Use this command to display information about the power supply unit (PSU):
diagnose sys psu status
Example output
S524DF4K15000024 # diagnose sys psu status
PSU1 is OK.
PSU2 is not present.
Use this command to list the processes currently running on your FortiSwitch unit:
diagnose sys top <delay> <lines>
Variable Description
<delay> <lines> Enter the number of seconds to delay (the default is 5) and the
maximum lines of output (the default is 20).
In the output, the codes displayed on the second output line mean the following:
l U is % of user space applications using CPU. In the example, 0U means 0% of the user space applications are
using CPU.
l S is % of system processes (or kernel processes) using CPU. In the example, 0S means 0% of the system
processes are using the CPU.
l I is % of idle CPU. In the example, 98I means the CPU is 98% idle.
l T is the total FortiOS system memory in Mb. In the example, 123T means there are 123 Mb of system memory.
l F is free memory in Mb. In the example, 25F means there is 25 Mb of free memory.
Each additional line of the command output displays the following information for each of the processes running
on the FortiSwitch (from left to right):
l Process name
l Process identifier
l State that the process is running in. The process state can be:
o R for running
o S for sleep
o Z for zombie
o D for disk sleep
l Amount of CPU that the process is using. CPU usage can range from 0.0 for a process that is sleeping to higher
values for a process that is taking a lot of CPU time.
l Amount of memory that the process is using. Memory usage can range from 0.1 to 5.5 and higher.
Example output
S524DF4K15000024 # diagnose sys top 5 5
Variable Description
dnsproxy <test_level> Specify the test level for the DNS proxy daemon:
1. Clear DNS cache
2. Show statistics
3. Dump DNS setting
4. Reload the fully qualified domain name (FQDN)
5. Requery the FQDN
6. Dump the FQDN
fpmd <test_level> Specify the test level for the hardware offload daemon.
radiusd <test_level> Specify the test level for the RADIUS daemon:
l 2: Clear the RADIUS server database
l 3: Show the RADIUS server database
l 33: Show the RADIUS server database (with start time)
l 4: Show the RADIUS server database information
l 9: Check the high availability (HA) context table checksums
l 11: Show the HA synchronization connection status
l 20: Show the RADIUS server configuration cache
l 21: Show the RADIUS server interface configuration cache
l 99: Restart
Variable Description
snmpd <test_level> Specify the test level for the SNMP daemon:
l 1: Display daemon process identifier
l 2: Display SNMP statistics
l 3: Clear SNMP statistics
l 4: Generate test trap
l 99: Restart daemon
Example output
S524DF4K15000024 # diagnose test application dnsproxy 2
config: alloc=1
DNS_CACHE: alloc=0
DNS UDP: req=6680, res=0, fwd=26720, hits=0, alloc=0
cur=90 v6_cur=0
DNS TCP: req=0, alloc=0
Variable Description
Variable Description
Test the connection to an LDAP server. For the server_name, use the
ldap <server_name> <user_name>
name of the LDAP object, not the LDAP server name. Use credentials
<password>
that you have used in the LDAP object itself.
radius <server_name> <chap | pap | Test the connection to the RADIUS server.
mschap | mschap2> <user_name>
<password>
radius-direct <server_name _or_IP_ Test the connection to the RADIUS server. For the port number, enter
address> <port_number> <secret> -1 to use the default port. Otherwise, enter the port number to check.
Use this command to display information about RADIUS authentication and RADIUS accounting:
diagnose user radius coa
To configure RADIUS authentication and RADIUS accounting, see config user radius on page 153.
execute
Use the execute commands perform immediate operations on the FortiSwitch unit:
Example
This example shows how to remove all authorizations from port 1:
execute 802-1x clear interface port1
Use this command to clear the ACL counters associated with the specified policy:
execute acl clear-counter {all | ingress | egress | prelookup}
Variable Description
Example
This example deletes all ACL counters:
execute acl clear-counter all
Use the execute backup config commands to perform a partial backup of the FortiSwitch configuration to
a flash disk, FTP server, or TFTP server.
Syntax
execute backup config flash <comment>
execute backup config ftp <filename_str> <server_ipv4[:port_int] | server_fqdn[:port_int]>
[<username_str> [<password_str>]] [<backup_password_str>]
execute backup config tftp <filename_str> <server_ipv4> [<backup_password_str>]
Variable Description
config flash <comment> Back up the system configuration to the flash disk. Optionally,
include a comment.
config tftp <filename_str> <server_ipv4> Back up the system configuration to a file on a TFTP server.
[<backup_password_str>] Optionally, you can specify a password to protect the saved
data.
Example
This example shows how to perform a partial backup of the FortiSwitch configuration to a file named fgt.cfg
on a TFTP server at IP address 192.168.1.23.
execute backup config tftp fgt.cfg 192.168.1.23
Use the execute backup full-config commands to back up the full FortiSwitch configuration to a TFTP
or FTP server.
Syntax
execute backup full-config ftp <filename_str> <server_ipv4[:port_int] | server_fqdn[:port_
int]> [<username_str> [<password_str>]] [<backup_password_str>]
execute backup full-config tftp <filename_str> <server_ipv4> [<backup_password_str>]
Variable Description
full-config ftp <filename_str> <server_ Back up the full system configuration to a file on an FTP server.
ipv4[:port_int] | server_fqdn[:port_int]> You can optionally specify a password to protect the saved data.
[<username_str> [<password_str>]]
[<backup_password_str>]
full-config tftp <filename_str> <server_ Back up the full system configuration to a file on a TFTP server.
ipv4> [<backup_password_str>] You can optionally specify a password to protect the saved data.
Example
This example shows how to back up the full FortiSwitch configuration to a file named fgt.cfg on a TFTP server
at IP address 192.168.1.23.
execute backup full-config tftp fgt.cfg 192.168.1.23
Use the execute backup memory commands to back up the FortiSwitch logs to a TFTP or FTP server.
Syntax
execute backup memory alllogs ftp <server_ipv4[:port_int] | server_fqdn[:port_int]>
[<username_str> <password_str>]
execute backup memory alllogs tftp <server_ipv4>
execute backup memory log ftp <server_ipv4[:port_int] | server_fqdn[:port_int]> <username_
str> <password_str> {app-ctrl | event | ids | im | spam | virus | voip | webfilter}
execute backup memory log tftp <server_ipv4> {app-ctrl | event | ids | im | spam | virus |
voip | webfilter}
Variable Description
memory alllogs ftp <server_ipv4[:port_int] Back up either all memory or all hard disk log files for to an FTP
| server_fqdn[:port_int]> [<username_str> server.
<password_str>] The disk option is available on FortiSwitch models that log to a
hard disk.
Back up either all memory or all hard disk log files for this
memory alllogs tftp <server_ipv4> FortiSwitch to a TFTP server. he disk option is available on
FortiSwitch models that log to a hard disk.
memory log ftp <server_ipv4[:port_int] | Back up the specified type of log file from either hard disk or
server_fqdn[:port_int]> <username_str> memory to an FTP server.
<password_str> {app-ctrl | event | ids | im | The disk option is available on FortiSwitch models that log to a
spam | virus | voip | webfilter} hard disk.
Back up the specified type of log file from either hard disk or
memory log tftp <server_ipv4> {app-ctrl |
memory to an FTP server.
event | ids | im | spam | virus | voip |
The disk option is available on FortiSwitch models that log to a
webfilter}
hard disk.
Example
This example shows how to back up all FortiSwitch log files to a file named fgt.cfg on a TFTP server at IP
address 192.168.1.23.
execute backup memory alllogs tftp fgt.cfg 192.168.1.23
execute batch
Syntax
execute batch [<cmd_cue>]
Example
execute bpdu-guard
Use this command to reset a port that goes down after receiving a BPDU:
execute bpdu-guard reset {internal | port<number>}
Example
This example shows how to reset port 1 after it receives a BPDU and goes down:
execute bpdu-guard reset port1
Use this command to restore the saved configuration when the configuration change mode is manual or
revert. This command has no effect if the mode is automatic, the default. The set cfg-save command
in system global sets the configuration change mode.
When you reload the saved system configuration, the your session ends and the FortiSwitch performs a restart.
In the default configuration change mode, automatic, CLI commands become part of the saved system
configuration when you execute them by entering either next or end.
In manual mode, commands take effect but do not become part of the saved configuration unless you execute
the execute cfg save command. When the system restarts, the saved configuration is loaded.
Configuration changes that were not saved are lost.
The revert mode is similar to manual mode, except that configuration changes are saved automatically if the
administrative session is idle for more than a specified timeout period. This provides a way to recover from an
erroneous configuration change, such as changing the IP address of the interface you are using for
administration. You set the timeout in system global using the set cfg-revert-timeout command.
Syntax
execute cfg reload
Example
This is sample output from the command when successful:
# execute cfg reload
configs reloaded. system will reboot. This is sample output from the command when not in
runtime-only configuration mode:
# execute cfg reload
no config to be reloaded.
Use this command to save configuration changes when the configuration change mode is manual or revert. If
the mode is automatic, the default, all changes are added to the saved configuration as you make them and
this command has no effect. The set cfg-save command in system global sets the configuration change
mode.
In manual mode, commands take effect but do not become part of the saved configuration unless you execute
the execute cfg save command. When the system restarts, the saved configuration is loaded.
Configuration changes that were not saved are lost.
The revert mode is similar to manual mode, except that configuration changes are reverted automatically if
the administrative session is idle for more than a specified timeout period. This provides a way to recover from an
erroneous configuration change, such as changing the IP address of the interface you are using for
administration. To change the timeout from the default of 600 seconds, go to system global and use the
set cfg-revert-timeout command.
Syntax
execute cfg save
Example
This is sample output from the command:
# execute cfg save
config saved.
This is sample output when not in runtime-only configuration mode. It also occurs when in
runtime-only configuration mode and no changes have been made:
# execute cfg save
no config to be saved.
Use this command to clear the learned and configured multicast groups from the FortiSwitch unit.
Syntax
execute clear switch igmp-snoop
Use this command to cslear all the entries in the ARP table.
Syntax
execute clear system arp table
Use this command to report the status of the secure copy protocol (SCP) script template.
Syntax
execute cli check-template-status
Use this command to enable or disable the display of standardized CLI error output messages. If executed, this
command stops other debug messages from displaying in the current CLI session.
Syntax
execute cli status-msg-only {enable | disable}
execute date
Syntax
execute date [<date_str>]
If you do not specify a date, the command returns the current system date. Shortened values, such as “06”
instead of “2006” for the year or “1” instead of “01” for month or day, are not valid.
Example
This example sets the date to 17 September 2016:
execute date 2016-09-17
execute dhcp-snooping
Use this command to remove an IP address from the DHCP-snooping client or server database on a specific
VLAN:
execute dhcp-snooping expire-client <VLAN-ID> <xx:xx:xx:xx:xx:xx>
execute dhcp-snooping expire-server <VLAN-ID> <xx:xx:xx:xx:xx:xx>
<VLAN-ID> Enter the VLAN identifier. The value range is 1-4095. No default
<xx:xx:xx:xx:xx:xx> Enter the MAC address for the IP address to remove. No default
Example
This example shows how to remove the IP address that corresponds to VLAN 100 and to the MAC address
01:23:45:67:89:01 from the DHCP-snooping client database:
execute dhcp-snooping expire-client 100 01:23:45:67:89:01
execute disconnect-admin-session
Syntax
execute disconnect-admin-session <index_number>
To determine the index of the administrator that you want to disconnect, view the list of logged-in administrators
with the following command:
execute disconnect-admin-session ?
Example
This example shows how to disconnect the logged administrator admin2:
execute disconnect-admin-session 1
execute factoryreset
Use this command to reset the FortiSwitch configuration to factory default settings.
Syntax
execute factoryreset
This procedure deletes all changes that you have made to the FortiSwitch
configuration and reverts the system to its original configuration, including resetting
interface addresses.
execute factoryresetfull
Use this command to fully reset the FortiSwitch configuration to factory default settings.
Syntax
execute factoryreset
This procedure removes all configurations, saved user and application data, and
licenses and resets the BIOS environment to the default. Images saved to the
partitions are not removed.
Use this command to reset the specified port if flap guard was triggered on that port:
execute flapguard reset <port_name>
Example
This example shows how to reset port 1 after flap guard was triggered on it:
execute flapguard reset port1
Use this command to renew the DHCP client for the specified DHCP interface and close the CLI session. If there
is no DHCP connection on the specified port, there is no output.
Syntax
execute interface dhcpclient-renew <interface>
Example output
This is the output for renewing the DHCP client on port 1 before the session closes:
# execute interface dhcpclient-renew port1
renewing dhcp lease on port1
Use this command to reconnect to the PPPoE service on the specified PPPoE interface and close the CLI
session. If there is no PPPoE connection on the specified port, there is no output.
Syntax
execute interface pppoe-reconnect <interface>
Syntax
execute license add <key>
Use this command to get information about the enhanced debugging license or to remove it.
Syntax
execute license enhanced-debugging {clear | description | get | status}
Variable Description
Variable Description
Example output
S524DF4K15000024 # execute license enhanced-debugging description
This license will enable potentially hazardous debug, such as shells and other fea-
tures.
Syntax
execute license status
Example output
S524DF4K15000024 # execute license status
License | Status
enhanced-debugging : Active
FS-SW-LIC-500 : Active
Use this command to clear all traffic log entries in memory. You will be prompted to confirm the command.
Syntax
execute log delete
Use this command to clear all log entries in memory and current log files on hard disk. If your system has no hard
disk, only log entries in system memory are cleared. You will be prompted to confirm the command.
Syntax
execute log delete-all
Use this command to display log messages that you have selected with the execute log filter command.
Syntax
execute log display
The console displays the first 10 log messages. To view more messages, run the command again. You can do
this until you have seen all of the selected log messages. To restart viewing the list from the beginning, use the
following commands:
execute log filter start-line 1
execute log display
You can restore the log filters to their default values using the following command:
execute log filter reset
Use this command to select log messages for viewing or deletion. You can view one log category on one device at
a time. Optionally, you can filter the messages to select only specified date ranges or severities of log messages.
For traffic logs, you can filter log messages by source or destination IP address.
Commands are cumulative. If you omit a required variable, the command displays the current setting.
Use as many execute log filter commands as you need to define the log messages that you want to
view.
execute log filter category <category_name>
execute log filter device {memory | faz | fds}
execute log filter dump
execute log filter field <name>
execute log filter ha-member <unitsn_str>
execute log filter max-checklines <int>
execute log filter reset
execute log filter start-line <line_number>
execute log filter view-lines <count>
category <category_name> Enter the type of log you want to select. event
For SQL logging and memory logging, one of:
utm, content, event, or traffic
device {memory | faz | fds} Device where the logs are stored. memory
Press Enter to view the fields that are available for the
field <name> associated category. Enter the fields you want, using No default
commas to separate multiple fields.
ha-member <unitsn_str> Select logs from the specified HA cluster member. Enter No default
the serial number of the system.
view-lines <count> Set lines per view. The value range is 5 to 1000. 10
Use this command to delete all logs, archives, and user configured report templates.
Syntax
execute log-report reset
Use this command to reset a port that has been put out of service by loop-guard.
execute loop-guard reset <interface>
Example
This example shows how to reset port 1 after loop guard was triggered on it:
execute loop-guard reset port1
Syntax
execute mac clear all
execute mac clear by-interface <interface>
execute mac clear by-mac-address <mac_address>
execute mac clear by-vlan <vlan_int>
execute mac clear by-vlan-and-interface <vlan_int> <interface>
execute mac clear by-vlan-and-mac-address <vlan_int> <mac_address>
Variable Description
by-mac-address <mac_address> Clear all MAC entries for a specified MAC address.
by-vlan-and-interface <vlan_int> Clear all MAC entries for a specified VLAN on a specified interface.
<interface>
by-vlan-and-mac-address <vlan_int> Clear all MAC entries for a specified VLAN that match the specified
<mac_address> MAC address.
To enable or disable the learning limit violation log for a FortiSwitch unit, see config switch global on page 75.
Syntax
execute mac-limit-violation reset all
execute mac-limit-violation reset interface <interface_name>
execute mac-limit-violation reset vlan <VLAN_ID>
Variable Description
interface <interface_name> Clear the learning limit violation log for a specific interface.
vlan <VLAN_ID> Clear the learning limit violation log for a specific VLAN.
Example
This example shows how to clear the learning limit violation log for VLAN 5:
execute mac-limit-violation reset vlan 5
execute ping
The execute ping command sends one or more ICMP echo request (ping) to test the network connection
between the FortiSwitch and another network device.
Syntax
execute ping <address_ipv4>
<address_ipv4> is an IP address.
Example
This example shows how to ping a host with the IP address 172.20.120.16.
#execute ping 172.20.120.16
execute ping-options
Use this command to set ICMP echo request (ping) options to control the way ping tests the network connection
between the FortiSwitch and another network device.
Syntax
execute ping-options data-size <bytes>
execute ping-options df-bit {yes | no}
execute ping-options interval <seconds>
execute ping-options pattern <2-byte_hex>
execute ping-options repeat-count <repeats>
execute ping-options source {auto | <source-intf_ip>}
execute ping-options timeout <seconds>
execute ping-options tos <service_type>
execute ping-options ttl <hops>
execute ping-options validate-reply {yes | no}
execute ping-options view-settings
interval <seconds> Specify the number of seconds between two pings. The No default
value must be greater than 0.
timeout <seconds> Specify, in seconds, how long to wait until ping times out. 2
ttl <hops> Specify the time to live. Time to live is the number of hops 64
the ping packet should be allowed to make before being
discarded or returned.
Example
Use the following command to increase the number of pings sent:
execute ping-options repeat-count 10
Use the following command to send all pings from the FortiSwitch interface with IP address 192.168.10.23:
execute ping-options source 192.168.10.23
execute ping6
The ping6 command sends one or more ICMP echo request (ping) to test the network connection between the
FortiSwitch and an IPv6-capable network device.
Syntax
execute ping6 {<address_ipv6> | <host-name_str>}
Example
This example shows how to ping a host with the IPv6 address 12AB:0:0:CD30:123:4567:89AB:CDEF.
execute ping6 12AB:0:0:CD30:123:4567:89AB:CDEF
execute ping6-options
Use this command to set ICMP echo request (ping) options to control the way ping tests the network connection
between the FortiSwitch and an IPv6-capable network device.
Syntax
execute ping6-options data-size <bytes>
execute ping6-options interval <seconds>
execute ping6-options pattern <2-byte_hex>
execute ping6-options repeat-count <repeats>
execute ping6-options source {auto | <source-intf_ip>}
execute ping6-options timeout <seconds>
execute ping6-options tos <service_type>
execute ping6-options ttl <hops>
execute ping6-options validate-reply {yes | no}
execute ping6-options view-settings
interval <seconds> Specify the number of seconds between two pings. The No default
value must be greater than 0.
timeout <seconds> Specify, in seconds, how long to wait until ping times out. 2
ttl <hops> Specify the time to live. Time to live is the number of hops 64
the ping packet should be allowed to make before being
discarded or returned.
Example
Use the following command to validate reply data:
execute ping6-options validate-reply yes
execute poe-reset
Syntax
execute poe-reset <port_number>
Example
Use the following command to reset the PoE power on port 1:
execute poe-reset port1
execute reboot
Abruptly powering off your system may corrupt its configuration. Use the reboot or
shutdown commands to ensure proper shutdown procedures are followed to prevent
any loss of configuration.
Syntax
execute reboot [comment “comment_string”>]
[comment <“comment_string”>]enables you to optionally add a message that will appear in the hard disk
log indicating the reason for the reboot. If the message is more than one word it must be enclosed in quotation
marks.
Example
This example shows the reboot command with a message included:
execute reboot comment “December monthly maintenance”
execute restore
Use this command to restore a configuration, firmware, or IPS signature file. The following options are available:
A backup of the system configuration from the super admin account contains the global settings and the settings
for all of the VDOMs. Only the super admin account can restore the configuration from this file.
A backup file from a regular administrator account contains the global settings and the settings for the VDOM to
which the administrator belongs. Only a regular administrator account can restore the configuration from this file.
Syntax
execute restore bios tftp <filename_str> <server_ipv4[:port_int]>
execute restore config flash <revision>
execute restore config ftp <filename_str> <server_ipv4[:port_int] | server_fqdn[:port_
int]> [<username_str> <password_str>] [<backup_password_str>]
execute restore config tftp <filename_str> <server_ipv4> [<backup_password_str>]
execute restore image ftp <filename_str> <server_ipv4[:port_int] | server_fqdn[:port_int]>
[<username_str> <password_str>]
execute restore image management-station <version_int>
execute restore image tftp <filename_str> <server_ipv4>
execute restore secondary-image ftp <filename_str> <server_ipv4[:port_int] | server_fqdn
[:port_int]> [<username_str> <password_str>]
execute restore secondary-image tftp <filename_str> <server_ipv4>
Variable Description
bios tftp <filename_str> <server_ipv4 Restore the BIOS. Download the restore file from a TFTP
[:port_int]> server.
config ftp <filename_str> <server_ipv4 Restore the system configuration from an FTP server. The new
[:port_int] | server_fqdn[:port_int]> configuration replaces the existing configuration, including
[<username_str> <password_str>] administrator accounts and passwords.
[<backup_password_str>] If the backup file was created with a password, you must specify
the password.
image ftp <filename_str> <server_ipv4 Download a firmware image from an FTP server to the
[:port_int] | server_fqdn[:port_int]> FortiSwitch unit. The FortiSwitch unit reboots, loading the new
[<username_str> <password_str>] firmware.
This command is not available in multiple VDOM mode.
image tftp <filename_str> <server_ipv4> Download a firmware image from a TFTP server to the
FortiSwitch unit. The FortiSwitch unit reboots, loading the new
firmware.
secondary-image tftp <filename_str> Download a firmware image from a TFTP server to the
<server_ipv4> FortiSwitch unit. The FortiSwitch unit saves the new firmware
image in the secondary image partition.
Example
This example shows how to upload a configuration file from a TFTP server to the FortiSwitch and restart the
FortiSwitch with this configuration. The name of the configuration file on the TFTP server is backupconfig.
The IP address of the TFTP server is 192.168.1.23.
execute restore config tftp backupconfig 192.168.1.23
execute revision
Use this command to manage configuration and firmware image files on the local disk.
Syntax
execute revision delete config <revision>
execute revision list config
execute revision show config
Variable Description
delete config <revision> Delete the specified configuration revision on the local disk.
show config Display the details of the configuration revision on the local disk.
Example
Use the following command to delete revision 1 of the configuration file on the local disk:
execute revision delete config 1
Syntax
execute router clear bgp {all | as | dampening | external | ip}
Variable Description
Example
Use the following command to delete the BGP flap-dampening information:
execute router clear bgp dampening 1.2.3.4
Use this command to clear the OSPF routing configuration from the specified interface.
Syntax
execute router clear ospf interface <interface_name>
Example
Use the following command to delete the OSPF routing configuration from the VLAN interface:
execute router clear ospf interface vlan20
Use this command to display the specified routing configuration and troubleshooting information.
Syntax
execute router tech-support {ospf | rip | bgp | isis | static}
Example
Use the following command to display the BGP routing configuration and troubleshooting information:
execute router tech-support bgp
execute set-next-reboot
Use this command to specify the flash partition for the next reboot. The system can use the boot image from
either the primary or the secondary flash partition.
NOTE: You must disable image rotation before you can use the execute set-next-reboot command.
Syntax
execute set-next-reboot <primary | secondary>
Example
This example specifies that the next reboot will use the secondary flash partition:
execute set-next-reboot secondary
execute shutdown
Use this command to shut down the system immediately. You will be prompted to confirm this command.
Abruptly powering off your system might corrupt its configuration. Using the reboot
and shutdown options in the CLI or in the Web-based manager ensure proper
shutdown procedures are followed to prevent any loss of configuration.
Syntax
execute shutdown [comment <"comment_string">]
The comment field is optional. Use it to add a message that will appear in the event log message that records the
shutdown. The comment message does not appear on the Alert Message console. If the message is more than
one word it must be enclosed in quotation marks.
Example
This example shows the reboot command with a message included:
execute shutdown comment “emergency facility shutdown”
execute ssh
Syntax
execute ssh <destination>
Example
execute ssh admin@172.20.120.122
execute stage
Syntax
execute stage image ftp <string> <ftp server>[:ftp port]
execute stage image tftp <string> <ip>
image is the image file name (including path) on the remote server.
execute sticky-mac
Use this command to manage MAC addresses that were dynamically learned and are persistent when the status
of a FortiSwitch port changes (goes down or up).
Syntax
execute sticky-mac delete-unsaved {all | interface <interface_name>}
execute sticky-mac save {all | interface <interface_name>}
Variable Description
delete-unsaved {all | interface <interface_name>} Delete all persistent MAC entries (instead of saving
them in the FortiSwitch configuration file) for all
interfaces or for the specified interface.
Use this command to display the status of the FortiLink connection. This command is valid only when the
FortiSwitch is managed by a FortiGate.
Syntax
execute switch-controller get-conn-status
Use this command to import a CA certificate from a TFTP or SCEP server to the FortiSwitch or to export a CA
certificate from the FortiSwitch to a TFTP server.
Before using this command, you must obtain a CA certificate issued by a Certificate Authority.
Syntax
execute system certificate ca export tftp <name> <file-name> <tftp_ip>
execute system certificate ca import auto <ca_server_url> [ca_identifier_str]
execute system certificate ca import tftp <file-name> <tftp_ip>
Use this command to get a certificate revocation list via LDAP, HTTP, or SCEP protocol, depending on the
autoupdate configuration.
Syntax
execute system certificate crl import auto <crl-name>
Use this command to export a local certificate from the FortiSwitch to a TFTP server.
Syntax
execute system certificate local export tftp <name> <file-name> <tftp_ip>
Variable Description
export Export or copy the local certificate from the FortiSwitch unit to a file on
the TFTP server.
Enter the name of the local certificate. Available local certificates are
<name>
Entrust_802.1x, Fortinet_Factory, and Fortinet_Firmware.
When you generate a certificate request, you create a private and public key pair for the local FortiSwitch unit.
The public key accompanies the certificate request. The private key remains confidential.
When you receive the signed certificate from the CA, use the system certificate local import
command to install it on the FortiSwitch unit.
Syntax
execute system certificate local generate <name> <key-length> <subject_str> <country>
<state> <city> <organization> <bu> <email> <SAN> <URL> <challenge> <source_IP> <CA_id>
<password>
Variable Description
Variable Description
<key-length> Enter the key size, which can be 1024, 1536, or 2048.
Enter the country name (such as canada), country code (such as ca), or
<country>
null for none.
<URL> This field is optional. Enter the URL of the CA server for signing using
SCEP.
<source_IP> This field is optional. Enter the source IP address for communicating
with the CA server.
This field is optional. Enter the CA identifier of the CA server for sign
<CA_id>
using SCEP.
<password> This field is optional. Enter the password if you are using a private key.
Use this command to import a local certificate to the FortiSwitch from a TFTP server.
Syntax
execute system certificate local import tftp <file-name> <tftp_ip>
Use this command to import a remote certificate from a TFTP server or to export a remote certificate from the
FortiSwitch unit to a TFTP server. The remote certificates are public certificates without a private key. They are
used as OCSP (Online Certificate Status Protocol) server certificates.
Syntax
execute system certificate remote import tftp <file-name> <tftp_ip>
execute system certificate remote export tftp <name> <file-name> <tftp_ip>
import Import the remote certificate from the TFTP server to the
FortiSwitch unit.
execute telnet
Use this command to create a Telnet client. You can use this tool to test network connectivity.
Syntax
execute telnet <telnet_ipv4>
execute time
Syntax
execute time [<time_str>]
You are allowed to shorten numbers to only one digit when setting the time. For example both 01:01:01 and 1:1:1
are allowed.
Example
This example sets the system time to 15:31:03:
execute time 15:31:03
execute traceroute
Use this command to test the connection between the FortiSwitch and another network device, and display
information about the network hops between the FortiSwitch and the device.
Syntax
execute traceroute {<ip_address> | <host-name>}
Example
This example shows how to test the connection with http://docs.forticare.com. In this example, the traceroute
command times out after the first hop indicating a possible problem.
#execute traceoute docs.fortinet.com
traceroute to docs.fortinet.com (65.39.139.196), 30 hops max, 38 byte packets
1 172.20.120.2 (172.20.120.2) 0.324 ms 0.427 ms 0.360 ms
2 * * *
If your FortiSwitch is not connected to a working DNS server, you will not be able to connect to remote host-
named locations with traceroute.
execute tracert6
Use this command to test the connection between the FortiSwitch and another network device using the IPv6
protocol and to display information about the network hops between the FortiSwitch and the device.
Syntax
tracert6 [-Fdn] [-f first_ttl] [-i interface] [-m max_ttl]
[-s src_addr] [-q nprobes] [-w waittime] [-z sendwait]
host [paddatalen]
Variable Description
-d Enable debugging.
-w <waittime> Set the time in seconds to wait for response to a probe. Default
is 5.
Use this command to upload system configurations to the flash disk from FTP or TFTP sources.
Syntax
execute upload config ftp <filename_str> <comment> <server_ipv4[:port_int] | server_fqdn
[:port_int]> [<username_str> [<password_str>]] [<backup_password_str>]
execute upload config tftp <filename_str> <comment> <server_ipv4>
Variable Description
Variable Description
Use this command to verify the integrity of the image in the primary or secondary (if applicable) flash partition.
Syntax
execute verify image {primary | secondary}
Example
execute verify image primary
get
The get commands provide information about the operation of the FortiSwitch unit:
Use this command to display detailed information about the CPUs installed in your FortiSwitch unit.
Syntax
get hardware cpu
Example output
S524DF4K15000024 # get hardware cpu
processor : 1
BogoMIPS : 1993.93
Use this command to display information about FortiSwitch memory use. Information includes the total memory,
memory in use, and free memory.
Syntax
get hardware memory
Example output
S524DF4K15000024 # get hardware memory
MemTotal: 2026080 kB
MemFree: 1725840 kB
Buffers: 1336 kB
Cached: 68548 kB
SwapCached: 0 kB
Active: 42724 kB
Inactive: 59596 kB
Active(anon): 32436 kB
Inactive(anon): 0 kB
Active(file): 10288 kB
Inactive(file): 59596 kB
Unevictable: 0 kB
Mlocked: 0 kB
HighTotal: 221184 kB
HighFree: 119468 kB
LowTotal: 1804896 kB
LowFree: 1606372 kB
SwapTotal: 0 kB
SwapFree: 0 kB
Dirty: 0 kB
Writeback: 0 kB
AnonPages: 32436 kB
Mapped: 14680 kB
Shmem: 0 kB
Slab: 15348 kB
SReclaimable: 3800 kB
SUnreclaim: 11548 kB
KernelStack: 776 kB
PageTables: 3556 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 1013040 kB
Committed_AS: 594696 kB
VmallocTotal: 245760 kB
VmallocUsed: 66276 kB
VmallocChunk: 163772 kB
Report information about the FortiSwitch hardware including ASIC version, CPU type, amount of memory, flash
drive size, hard disk size (if present), and USB flash size (if present). Use this information to troubleshoot, to
provide to Fortinet Support, or to confirm the features that your FortiSwitch model supports.
Syntax
get hardware status
Example output
S524DF4K15000024 # get hardware status
Model name: FortiSwitch-524D-FPOE
CPU: ARMv7 Processor rev 0 (v7l)
RAM: 1978 MB
MTD Flash: 52 MB /dev/mtd
Hard disk: not available
Switch CPLD Version: V0.4
Poe Firmware Version:2.6.3
Use this command to get information about custom log fields that have been created. To create custom log
fields, see config log custom-field on page 18.
Syntax
get log custom-field
Example output
S524DF4K15000024 # get log custom-field
== [ 1 ]
id: 1
== [ 2 ]
id: 2
This output shows that two custom fields have been created.
l Event logs show configuration changes and allow you to monitor the activities administrators perform.
l Router logs allow you to review all router activity. Router logs are available only on supported platforms if you have
the advanced features license.
l System logs show system-level activity such as IP conflicts.
l User logs show user activity such as who is logged on and when.
To enable event logging, see config log eventfilter on page 19.
Syntax
get log eventfilter
Example output
S524DF4K15000024 # get log eventfilter
event : enable
router : enable
system : enable
user : enable
Use this command to find out which device is being used to display logs in the Web-based manager.
Syntax
get log gui
Example output
S524DF4K15000024 # get log gui
log-device : memory
This output shows that logs are being displayed from memory.
Use this command to find out the current settings for logging to system memory.
Syntax
get log memory filter
get log memory global-setting
get log memory setting
Variable Description
filter Find out the severity level of log entries made in system memory. The system
logs all messages at and above the selected severity level. For example, if the
severity is error, the system logs error, critical, alert, and
emergency level messages.
l emergency — The system is unusable.
l alert — Immediate action is required.
l critical — Functionality is affected.
l error — An erroneous condition exists and functionality is probably
affected.
l warning— Functionality might be affected.
l notification — Information about normal events.
l information — General information about system operations.
l debug — Information used for diagnosing or debugging the system.
setting Find out the general settings for logging to system memory:
l diskfull — whether the oldest log entries are overwritten when the
system memory is full.
l status — whether logging to system memory is enabled.
Example output
S524DF4K15000024 # get log memory filter
severity : information
Use this command to get information about your system log 1 settings.
Syntax
get log syslogd {filter | setting}
Variable Description
filter Find out the severity level of system log 1 entries. The system logs all messages
at and above the selected severity level. For example, if the severity is error,
the system logs error, critical, alert, and emergency level messages.
Example output
S524DF4K15000024 # get log syslogd filter
severity : information
Use this command to get information about your system log 2 settings.
Syntax
get log syslogd2 {filter | setting}
Variable Description
filter Find out the severity level of system log 2 entries. The system logs all messages
at and above the selected severity level. For example, if the severity is error,
the system logs error, critical, alert, and emergency level messages.
Example output
S524DF4K15000024 # get log syslogd2 filter
severity : information
Use this command to get information about your system log 3 settings.
Syntax
get log syslogd3 {filter | setting}
Variable Description
filter Find out the severity level of system log 3 entries. The system logs all messages
at and above the selected severity level. For example, if the severity is error,
the system logs error, critical, alert, and emergency level messages.
Example output
S524DF4K15000024 # get log syslogd3 filter
severity : information
Use this command to find out if there are any access lists for RIP routing. An access list is a list of IP addresses
and the action to take for each one. Access lists provide basic route and network filtering. To create an access list,
see config router access-list on page 25.
Syntax
get router info access-list
Example output
S524DF4K15000024 # get router access-list
== [ 1 ]
name: 1
== [ router1 ]
name: router1
== [ mylist ]
name: mylist
== [ list1 ]
name: list1
This output shows that two access lists have beeen created for router1.
Use this command to find out where bidirectional forwarding detection (BFD) has been enabled.
Syntax
get router info bfd neighbor [detail]
Example output
S524DF4K15000024 # get router info bfd neighbor
Use this command to get information about the Border Gateway Protocol (BGP) routing configuration.
get router info bgp {cidr-only | community | community-info | community-list | dampening |
filter-list | inconsistent-as | neighbors | network | network-longer-prefixes | paths
| prefix-list | regexp | quote-regexp | route-map | scan | summary | memory}
Variable Description
Variable Description
network-longer-prefixes Show the BGP information for routes and more specific routes.
Display routes matching the AS path with regular expressions within quotation
quote-regexp
marks.
Syntax
get router info fwd
Syntax
get router info gwdetect
Use this command to get information about the Intermediate System to Intermediate System Protocol (IS-IS)
routing configuration.
Syntax
get router info isis {interface | neighbor | database | route | summary | summary-table |
topology}
Variable Description
Use this command to get information about the kernel routing table. The kernel routing table displays information
about all of the routes in the kernel.
Syntax
get router info kernel <routing type>
Use this command to get information about the Protocol Independent Multicast (PIM) routing configuration.
Syntax
get router info multicast {config | igmp | pim | table | table-count}
Variable Description
Variable Description
Use this command to get information about any open shortest path first (OSPF) routing that has been configured.
To set up OSPF routing, see config router ospf on page 47.
Syntax
get router info ospf {config | database | interface | route | neighbor | border-routers |
status}
Variable Description
config Display detailed information about the current OSPF configuration, including
interfaces, areas, access lists, and IP addresses.
status Display the current status of the OSPF routing, including router identifier, flags,
timers, and areas.
Example output
S524DF4K15000024 # get router info ospf status
Use this command to get information about any Routing Information Protocol (RIP) routing that has been
configured. To set up RIP routing, see config router rip on page 54.
Syntax
get router info rip {config | database | status}
Variable Description
config Display detailed information about the current RIP configuration, including keys
in the keychain, interfaces, access lists, and IP addresses.
status Display the current status of the RIP routing, including filter lists, redistribution,
RIP version, and interfaces.
Example output
S524DF4K15000024 # get router info rip status
Syntax
get router info routing-table {details <A.B.C.D>| all | rip | ospf | static | connected |
dump <a.b.c.d>}
Variable Description
details <A.B.C.D> Display the routing table entries that include the specified IP address or route
prefix.
dump <a.b.c.d> Display the details of routing table entries that include the specified IP address
or route prefix.
Example output
S524DF4K15000024 # get router info routing-table details 39.3.2.0
Routing entry for 39.3.2.0/24 using Unicast RIB
Known via "static", distance 10, metric 0, best
* 180.1.1.2, via vlan85
Use this command to get information about Virtual Router Redundancy Protocol (VRRP) groups.
Syntax
get router info vrrp
Example output
S524DF4K15000024 # get router info vrrp
Interface: vlan-8, primary IP address: 10.10.10.1
UseVMAC: 1
VRID: 5
vrip: 11.1.1.100, priority: 255, state: MASTER
adv_interval: 1, preempt: 1, start_time: 3
vrmac: 00:00:5e:00:01:05
vrdst:
vrgrp: 50
Use this command to get a list of keychains for RIP version 2 routing.
Syntax
get router key-chain
Example output
S524DF4K15000024 # get router key-chain
== [ keychain1 ]
name: keychain1
Use this command to get information about any open shortest path first (OSPF) routing that has been configured.
To set up OSPF routing, see config router ospf on page 47.
Syntax
get router ospf
Example output
S524DF4K15000024 # get router ospf
router-id : 1.1.1.2
abr-type : cisco
distance-external : 0
distance-inter-area : 0
distance-intra-area : 0
default-information-originate: disable
default-information-metric: 10
default-information-metric-type: 2
default-information-route-map: (null)
distance : 110
rfc1583-compatible : disable
spf-timers : 5 10
bfd : disable
log-neighbour-changes: enable
area:
== [ 0.0.0.4 ]
id: 0.0.0.4
ospf-interface:
== [ oi1 ]
name: oi1
network:
passive-interface:
distribute-list:
redistribute:
== [ connected ]
name: connected status: enable metric: 10
routemap: (null)
== [ static ]
name: static status: disable metric: 10 routemap:
(null)
== [ rip ]
name: rip status: disable metric: 10 routemap:
(null)
Use this command to find out which prefix lists are available for RIP routing. A prefix is an IP address and
netmask. A prefix lists specifies the prefixes to allow or deny. To create a prefix list, see config router prefix-list on
page 53.
Syntax
get router prefix-list
Example output
S524DF4K15000024 # get router prefix-list
== [ 2 ]
name: 2
== [ 3 ]
name: 3
Use this command to get information about any Routing Information Protocol (RIP) routing that has been
configured. To set up RIP routing, see config router rip on page 54.
Syntax
get router rip
Example output
S524DF4K15000024 # get router rip
bfd : disable
default-information-originate: disable
default-metric : 1
distance:
== [ 4 ]
id: 4 prefix: 0.0.0.0 0.0.0.0
distribute-list:
garbage-timer : 120
interface:
== [ vlan35 ]
name: vlan35 auth-keychain: (null) auth-mode: text
receive-version: global send-version: global split-horizon-
status: enable split-horizon: regular
neighbor:
== [ 5 ]
id: 5 ip: 0.0.0.0
network:
== [ 1 ]
id: 1 prefix: 170.38.65.0 255.255.255.0
== [ 2 ]
id: 2 prefix: 180.1.1.0 255.255.255.0
offset-list:
passive-interface:
redistribute:
== [ connected ]
name: connected status: disable metric: 0
routemap: (null)
== [ static ]
name: static status: enable metric: 0 routemap:
(null)
== [ ospf ]
name: ospf status: disable metric: 0 routemap:
(null)
timeout-timer : 180
update-timer : 30
version : 2
Use this command to list available route maps for OSPF or RIP routing. To create a route map, see config router
route-map on page 59.
Syntax
get router route-map
Example output
S524DF4K15000024 # get router route-map
== [ myroutemap ]
name: myroutemap protocol: rip
Use this command to find out which routing protocol is being used by each route map. To assign a route map, see
config router setting on page 62.
Syntax
get router setting
Example output
S524DF4K15000024 # get router setting
filter-list:
== [ 1 ]
id: 1 protocol: rip route-map: myroutemap
== [ 2 ]
id: 2 protocol: ospf route-map: myroutemap
Use this command to list static routes. To create a static route, see config router static on page 63.
Syntax
get router static
Example output
S524DF4K15000024 # get router static
== [ 1 ]
seq-num: 1
Syntax
get switch acl counters {all | egress | ingress | prelookup}
get switch acl egress
get switch acl ingress
get switch acl policer
get switch acl prelookup
get switch acl service custom
get switch acl settings
get switch acl usage
usage}
Variable Description
counters {all | egress | Display information about all ACL policies, egress ACL policies, ingress ACL
ingress | prelookup} policies, or lookup ACL policies.
egress Display information about the ACL policy for the egress stage.
ingress Display information about the ACL policy for the ingress stage.
policer List which ACL policers are available for different types of traffic.
prelookup Display information about the ACL policy for the lookup stage.
settings Display the global ACL settings for the FortiSwitch unit.
Example output
S524DF4K15000024 # get switch acl policer
== [ 1 ]
id: 1 description: policer1
0002 0 0 cnt_n_mirror31
0003 0 0 cnt_n_mirror41
Use this command to display more information about the DHCP-snooping database.
Syntax
get switch dhcp-snooping {client-db-details | database-summary | limit-db-details |
server-db-details}
Variable Description
List the number of VLANs with various features enabled, list trusted and
database-summary
untrusted ports, and report how much of the databases are used.
Example output
S524DF4K15000024 # get switch dhcp-snooping database-summary
snoop-enabled-vlans : 10
verifysrcmac-enabled-vlans : 10
option82-enabled-vlans : 10
option82-trust-enabled-intfs :
trusted ports :
untrusted ports : port1 port2 port3 port4 port5 port6 port9 port10 port11 port12
port13 port14 port15 port16 port17 port18 port19 port20 port21 port22
port23 port24 port25 port26 port27 port28 port29 port30
Client Database : 0 / 8000
Server Database : 0 / 1024
Limit Database : 0 / 256
mac vlan ip lease(sec) expiry(sec) interface hostname domainname vendor
00:01:00:00:00:01 100 xxx.x.x.xxx 86400 86398 port3
00:03:00:00:00:03 100 xxx.x.x.x 86400 86394 port5
00:03:00:00:00:04 100 xxx.x.x.x 86400 86394 port5 >
mac vlan ip interface status first-seen (sec) last-seen (sec) ACK NAC OFFER OTHER
00:11:01:00:00:01 30 192.168.5.2 port6 trusted 1503357551 0 12 0 8 0
Syntax
get switch flapguard settings
Example output
S524DF4K15000024 # get switch flapguard settings
flap-duration : 30
flap-rate : 5
status : disable
Use this command to get information about the global settings of your FortiSwitch unit.
Syntax
get switch global
Example output
S524DF4K15000024 # get switch global
name : (null)
mac-aging-interval : 150
poe-alarm-threshold : 40
poe-power-mode : first-come-first-served
poe-guard-band : 10
ip-mac-binding : enable
dmi-global-all : enable
poe-pre-standard-detect: enable
poe-power-budget : 200
trunk-hash-mode : enhanced
trunk-hash-unkunicast-src-dst: enable
auto-fortilink-discovery: enable
auto-isl : enable
mclag-peer-info-timeout: 300
auto-isl-port-group : 0
max-path-in-ecmp-group: 4
virtual-wire-tpid : 0xdee5
loop-guard-tx-interval: 15
dhcp-snooping-database-export: enable
forti-trunk-dmac : 02:80:c2:00:00:02
port-security:
link-down-auth : set-unauth
reauth-period : 60
max-reauth-attempt : 2
Use this command to get the IGMP-snooping settings of your FortiSwitch unit.
Syntax
get switch igmp-snooping {globals | group | interface | static-group}
Variable Description
interface Display the configured IGMP-snooping interfaces and their current state
Example output
FS1D243Z13000023 # get switch igmp-snooping globals
aging-time : 300
flood-unknown-multicast: disabled
VLAN ID Group-Name Multicast-addr Member-interface
_______ ______________ _______________ _________________________
11 g239-1 239:1:1:1 port6 trunk-2
11 g239-11 239:2:2:11 port26 port48 trunk-2
40 g239-1 239:1:1:1 port5 port25 trunk-2
40 g239-2 239:2:2:2 port25 port26
Use this command to get information about the interfaces, including the class of service (CoS) value, whether
sFlow is enabled on the interface, and whether dynamically learned MAC addresses are persistent on the
interface.
Syntax
get switch interface
Example output
S524DF4K15000024 # get switch interface
== [ port1 ]
name: port1 sflow-sampler: disabled port-security:
default-cos: 0 sticky-mac: disable
== [ port2 ]
name: port2 sflow-sampler: disabled port-security:
default-cos: 0 sticky-mac: disable
== [ port3 ]
name: port3 sflow-sampler: disabled port-security:
default-cos: 0 sticky-mac: disable
...
Syntax
get switch ip-mac-binding
Example output
get switch ip-mac-binding
== [ 1 ]
seq-num: 1
Syntax
get switch lldp {auto-isl-status | neighbors-detail <physical port name>| neighbors-
summary | profile | settings | stats}
Variable Description
auto-isl-status Display statistics and staus for the automatic ISL configuration.
neighbors-detail
Display details about a specific LLDP port.
<physical port name>
settings Display whether LLDP is enabled globally, the number of tx-intervals before the
local LLDP data expires, the frequency of LLDP PDU transmission, how often
the FortiSwitch transmits the first four LLDP packets when a link comes up, and
the primary management interface advertised in LLDP and CDP PDUs.
Example output
S524DF4K15000024 # get switch lldp profile
== [ default ]
name: default 802.1-tlvs: 802.3-tlvs: med-tlvs: inventory-management net-
work-policy
== [ default-auto-isl ]
name: default-auto-isl 802.1-tlvs: 802.3-tlvs: med-tlvs:
== [ 1 ]
name: 1 802.1-tlvs: 802.3-tlvs: med-tlvs: inventory-management network-
policy
== [ Forti670i ]
name: Forti670i 802.1-tlvs: 802.3-tlvs: med-tlvs: inventory-management
network-policy
Use this command to see the first MAC address that exceeded the learning limit for an interface or VLAN.
To enable the learning limit violation log for a FortiSwitch unit, see config switch global on page 75.
Syntax
get switch mac-limit-violations {all | interface <interface_name> | vlan <VLAN_ID>}
Variable Description
all Display the first MAC address that exceeded the learning limit on any
interface or VLAN. An asterisk by the interface name indicates that the
interface-based learning limit was exceeded. An asterisk by the VLAN
identifier indicates the VLAN-based learning limit was exceeded.
Display the first MAC address that exceeded the learning limit on a
interface <interface_name>
specific interface
vlan <VLAN_ID> Display the first MAC address that exceeded the learning limit on a
specific VLAN.
Example output
S524DF4K16000028 # get switch mac-limit-violations all
Port VLAN ID MAC Address Timestamp
----------------------------------------------------------------------------------
port3* 5 00:00:01:00:00:01 2017-12-05 15:55:20
port15 9* 0a:c1:08:bf:cc:80 2017-12-05 15:55:44
Use this command to get information about the mirror settings of your FortiSwitch unit. To configure a port mirror,
see config switch mirror on page 89.
Syntax
get switch mirror
Example output
# get switch mirror
dst : (null)
status : inactive
switching-packet : disable
Use this command to get information about the modules in your FortiSwitch unit.
Syntax
get switch modules {detail | limits | status | summary} [<port>]
Variable Description
detail [<port>] Display module details for a specific port or all available ports.
limits [<port>] Display module limits for a specific port or all available ports.
status [<port>] Display module status for a specific port or all available ports.
Display summary information of all modules for a specific port or all available
summary [<port>]
ports.
Example output
FS108D3W14000720 # get switch modules detail port10
____________________________________________________________
Port(port10)
identifier SFP/SFP+
connector Unk (0x00)
transceiver 1000-Base-T
encoding 8B/10B
Length Decode Common
length_smf_1km N/A
length_cable 100 meter
SFP Specific
length_smf_100m N/A
length_50um_om2 N/A
length_62um_om1 N/A
length_50um_om3 N/A
vendor FINISAR CORP.
vendor_oid 0x009065
vendor_pn FCLF-8521-3
vendor_rev A
vendor_sn PBR1X35
manuf_date 06/20/2007
Use this command to get information about network monitoring on the FortiSwitch unit.
Syntax
get switch network-monitor {directed | settings}
Variable Description
directed List the static entries for network monitoring on the switch.
settings Display the global settings for network monitoring on the switch.
Example output
S524DF4K15000024 # get switch network-monitor directed
== [ 1 ]
id: 1
Use this command to find out which split ports have been configured. to configure split ports, see config switch
phy-mode on page 91.
Syntax
get switch phy-mode
Example output
S524DF4K15000024 # get switch phy-mode
port29-phy-mode : 1x40G
port30-phy-mode : 1x40G
Use this command to get information about the physical ports of your FortiSwitch unit. To configure physical
ports, see config switch physical-port on page 92.
Syntax
get switch physical-port
Example output
S524DF4K15000024 # get switch physical-port
== [ port1 ]
name: port1 egress-drop-mode: enabled link-status: down status: up
== [ port2 ]
name: port2 egress-drop-mode: enabled link-status: down status: up
== [ port3 ]
name: port3 egress-drop-mode: enabled link-status: down status: up
...
Use this command to get information about the system’s power over Ethernet (PoE) functions.
Syntax
get switch poe inline
Example output
S524DF4K15000024 # get switch poe inline
Syntax
get switch qos (dot1p-map | ip-dscp-map | qos-policy)
Variable Description
dot1p-map List the available dot1p maps, as well as the CoS values.
Example output
S524DF4K15000024 # get switch qos dot1p-map
== [ test1 ]
name: test1 priority-0: queue-2 priority-1: queue-0 priority-2: queue-1
priority-3: queue-3 priority-4: queue-4 priority-5: queue-5 priority-6:
queue-6 priority-7: queue-7
Use this command to display the security-feature settings. To configure security checks for incoming
TCP/UDP packets, see config switch security-feature on page 99.
Syntax
get switch security-feature
Example output
S524DF4K15000024 # get switch security-feature
sip-eq-dip : enable
tcp-flag : enable
tcp-port-eq : enable
tcp-flag-FUP : enable
tcp-flag-SF : enable
v4-first-frag : enable
udp-port-eq : enable
tcp-hdr-partial : enable
macsa-eq-macda : enable
allow-mcast-sa : enable
allow-sa-mac-all-zero: enable
Syntax
get switch static-mac
Example output
S524DF4K15000024 # get switch static-mac
== [ 1 ]
seq-num: 1 interface: port5 mac: 00:21:cc:d2:76:72 vlan-id: 35
Use this command to display storm control settings on your FortiSwitch unit. To configure storm control, see
config switch storm-control on page 102.
Syntax
get switch storm-control
Example output
S524DF4K15000024 # get switch storm-control
broadcast : enable
rate : 1000
unknown-multicast : enable
unknown-unicast : enable
Use this command to get information about STP instances on your FortiSwitch unit. To configure an STP
instance, see config switch stp instance on page 103.
Syntax
get switch stp instance
Example output
# get switch stp instance
== [ 0 ]
id: 0
== [ 1 ]
id: 1
Use this command to get information about STP settings on your FortiSwitch unit. To configure STP settings, see
config switch stp settings on page 104.
Syntax
get switch stp settings
Example output
S524DF4K15000024 # get switch stp settings
forward-time : 15
hello-time : 5
max-age : 20
max-hops : 20
name : region1
revision : 1
status : enable
Use this command to get information about which trunks on the FortiSwitch unit have been configured for link
aggregation. To configure link aggregation, see config switch trunk on page 105.
Syntax
get switch trunk
Example output
# get switch trunk
== [ 1 ]
name: 1 members:
== [ port3 ]
member-name: port3
== [ port10 ]
member-name: port10
== [ port1 ]
member-name: port1
Virtual wire allows you to forward traffic between two ports with minimal filtering or packet modifications. To
configure a virtual wire, see config switch virtual-wire on page 108.
Syntax
get switch virtual-wire
Example output
S524DF4K15000024 # get switch virtual-wire
== [ 1 ]
name: 1
Use this command to get information about VLANs on the FortiSwitch unit. To configure a VLAN, see config
switch vlan on page 108.
Syntax
get switch vlan
Example output
# get switch vlan
== [ 1 ]
Use this command to view a list of all the system administration access groups. To add an access profile group,
see config system accprofile on page 112.
Syntax
get system admin accprofile
Example output
S524DF4K15000024 # get system accprofile
== [ prof_admin ]
name: prof_admin
== [ profile1 ]
name: profile1
Use this command to view a list of all the current administration sessions.
Syntax
get system admin list
Example output
# get system admin list
username local device remote started
admin sshv2 port1:172.20.120.148:22 172.20.120.16:4167 2006-08-09 12:24:20
admin https port1:172.20.120.148:443 172.20.120.161:56365 2006-08-09 12:24:20
admin https port1:172.20.120.148:443 172.20.120.16:4214 2006-08-09 12:25:29
Variable Description
device The interface, IP address, and port used by this session to connect to the system.
Variable Description
remote The IP address and port used by the originating computer to connect to the system.
Use this command to view the status of the currently logged in admin and their session. To configure an
administrator account, see config system admin on page 113.
Syntax
get system admin status
Example Output
# get system admin status
username: admin
login local: sshv2
login device: port1:172.20.120.148:22
login remote: 172.20.120.16:4167
login vdom: root
login started: 2006-08-09 12:24:20
current time: 2006-08-09 12:32:12
Variable Description
login device The login information from the FortiSwitch including interface,
IP address, and port number.
login vdom The virtual domain the admin is current logged into.
Use this command to view the ARP table entries on the FortiSwitch unit. To manually add ARP table entries to
the FortiSwitch unit, see config system arp-table on page 116.
Syntax
get system arp
Example output
S524DF4K15000024 # get system arp
Use this command to view the ARP tables on the FortiSwitch unit.
Syntax
get system arp-table
Example output
# get system arp-table
== [ 1 ]
id: 1 interface: internal ip: 10.10.10.10 mac: 01:02:03:04:05:aa
Syntax
get system auto-update {status | versions}
Variable Description
Example output
S524DF4K15000024 # get system auto-update status
Use this command to get information about configuration related to bug reporting. To configure a custom email
relay for sending problem reports to Fortinet customer support, see config system bug-report on page 117.
Syntax
get system bug-report
Example output
S524DF4K15000024 # get system bug-report
auth : no
mailto : fortiswitch@fortinet.com
password : (null)
server : fortinet.com
username : bug_report
username-smtp : bug_report
Syntax
get system certificate (ca | crl | local | oscp | remote)
Variable Description
Example output
S524DF4K15000024 # get system certificate ca
== [ Fortinet_CA ]
name: Fortinet_CA
== [ Fortinet_CA2 ]
name: Fortinet_CA2
== [ Entrust_802.1x_CA ]
name: Entrust_802.1x_CA
== [ Entrust_802.1x_L1K_CA ]
name: Entrust_802.1x_L1K_CA
== [ Entrust_802.1x_G2_CA ]
name: Entrust_802.1x_G2_CA
Use this command to view information about configuration management database (CMDB) on the FortiSwitch
unit.
Syntax
get system cmdb status
Variable Description
Variable Description
update index The updated index shows how many changes have been made
in the CMDB.
last request type Type of the last attempted access of the CMDB.
last request The number of the last attempted access of the CMDB.
Example output
# get system cmdb status
version: 1
owner id: 18
update index: 6070
config checksum: 12879299049430971535
last request pid: 68
last request type: 29
last request: 78
Use this command to get information about the console connection. To configure the console, see config system
console on page 122.
Syntax
get system console
Example output
S524DF4K15000024 # get system console
baudrate : 115200
mode : line
output : more
Use this command to get information about the DNS settings. To configure DNS, see config system dns on page
122.
Syntax
get system dns
Example output
S524DF4K15000024 # get system dns
primary : 208.91.112.53
secondary : 208.91.112.52
domain : (null)
ip6-primary : ::
ip6-secondary : ::
dns-cache-limit : 5000
dns-cache-ttl : 1800
cache-notfound-responses: disable
source-ip : 0.0.0.0
Use this command to display the configuration of the FortiSwitch Cloud. To configure the FortiSwitch Cloud, see
config system fsw-cloud on page 123.
Syntax
get system fsw-cloud
Example output
S524DF4K15000024 # get system fsw-cloud
interval : 15
name : fortiswitch-dispatch.forticloud.com
port : 443
status : enable
Syntax
get system fsw-cloud-mgr connection-info
Example output
S1D243Z14000027 # get system fsw-cloud-mgr connection-info
Stats:
========
Switch Keep Alive Tx/Reply := 2408 / 2408
Manager Keep Alive Rx/Error := 2410 / 0
Use this command to get the global settings of your FortiSwitch unit. To configure global settings, config system
global on page 124.
Syntax
get system global
Example output
S524DF4K15000024 # get system global
802.1x-ca-certificate: Entrust_802.1x_CA
802.1x-certificate : Entrust_802.1x
admin-concurrent : enable
admin-https-pki-required: disable
admin-https-ssl-versions: tlsv1-1 tlsv1-2
admin-lockout-duration: 60
admin-lockout-threshold: 3
admin-port : 80
admin-scp : disable
admin-server-cert : Fortinet_Firmware
admin-sport : 443
admin-ssh-grace-time: 120
admin-ssh-port : 22
admin-ssh-v1 : disable
admin-telnet-port : 23
admintimeout : 5
allow-subnet-overlap: disable
asset-tag : (null)
cfg-save : automatic
csr-ca-attribute : enable
daily-restart : disable
detect-ip-conflict : enable
dst : enable
gui-lines-per-page : 50
hostname : S524DF4K15000024
image-rotation : disable
kernel-crashlog : enable
language : english
ldapconntimeout : 500
radius-port : 1812
refresh : 0
remoteauthtimeout : 5
revision-backup-on-logout: enable
revision-backup-on-upgrade: enable
strong-crypto : disable
switch-mgmt-mode : local
timezone : (GMT-8:00)Pacific Time(US&Canada).
user-server-cert : Fortinet_Factory
Use this command to display information about the SSH configuration on the FortiSwitch unit such as:
Syntax
get system info admin ssh
Example output
# get system info admin ssh
SSH v2 is enabled on port 22
SSH is enabled on the following 1 interfaces:
mgmt
SSH hostkey DSA fingerprint = cd:e1:87:70:bb:f0:9c:7d:e3:7b:73:f7:44:23:a5:99
SSH hostkey RSA fingerprint = c9:5b:49:1d:7c:ba:be:f3:9d:39:33:4d:48:9d:b8:49
Use this command to display administrators that are logged into the FortiSwitch unit.
Syntax
get system info admin status
Variable Description
Example output
Index User name Login type From
0 admin CLI ssh(172.20.120.16)
1 admin WEB 172.20.120.16
Use this command to list information about the physical network interfaces.
Syntax
get system interface physical
Example output
S524DF4K15000024 # get system interface physical
== [onboard]
==[internal]
mode: static
ip: 0.0.0.0 0.0.0.0
ipv6: ::/0
status: up
speed: n/a (Duplex: n/a)
rx : 0 bytes 0 packets
tx : 8405158 bytes 160742 packets
==[mgmt]
mode: dhcp
ip: 10.105.19.3 255.255.252.0
ipv6: ::/0
status: up
speed: 1000Mbps (Duplex: full)
rx : 11558117 bytes 85986 packets
tx : 7048800 bytes 39380 packet
Use this command to list information about the physical network interfaces. To configure the link health monitor,
see config system link-monitor on page 139.
Syntax
get system link-monitor
Use this command to get information about the NTP settings. To configure an NTP server, see config system ntp
on page 140.
Syntax
get system ntp
Example output
ntpserver:
== [ 1 ]
id: 1
== [ 2 ]
id: 2
ntpsync : enable
source-ip : 0.0.0.0
syncinterval : 1
Use this command to view the password policy. To create a password policy, see config system password-policy
on page 141.
Syntax
get system password-policy
Example output
# get system password-policy
status : enable
apply-to : admin-password
minimum-length : 8
min-lower-case-letter: 2
min-upper-case-letter: 2
min-non-alphanumeric: 0
min-number : 2
change-4-characters : disable
expire-status : disable
Use this command to display a list of traffic types (such as browsing, email, and DNS) and the number of packets
and number of payload bytes accepted by the firewall for each type since the system was restarted.
Syntax
get system performance firewall statistics
Example output
get system performance firewall statistics
getting traffic statistics...
Browsing: 623738 packets, 484357448 bytes
DNS: 5129187383836672 packets, 182703613804544 bytes
E-Mail: 23053606 packets, 2 bytes
FTP: 0 packets, 0 bytes
Gaming: 0 packets, 0 bytes
IM: 0 packets, 0 bytes
Newsgroups: 0 packets, 0 bytes
P2P: 0 packets, 0 bytes
Streaming: 0 packets, 0 bytes
TFTP: 654722117362778112 packets, 674223966126080 bytes
VoIP: 16834455 packets, 10 bytes
Generic TCP: 266287972352 packets, 8521215115264 bytes
Generic UDP: 0 packets, 0 bytes
Generic ICMP: 0 packets, 0 bytes
Generic IP: 0 packets, 0 bytes
Use this command to display FortiSwitch CPU usage, memory usage, network usage, sessions, virus, IPS
attacks, and system up time.
Syntax
get system performance status
Example output
S524DF4K15000024 # get system performance status
Variable Description
CPU states The percentages of CPU cycles used by user, system, nice and
idle categories of processes. These categories are:
user -CPU usage of normal user-space processes
Adding user, system, and nice produces the total CPU usage as
seen on the CPU widget on the web-based system status
dashboard.
Average network usage The average amount of network traffic in kbps in the last 1, 10
and 30 minutes.
Use this command to display the list of processes running on the system (similar to the Linux top command).
The following commands are available when get system performance top is running:
Syntax
get system performance top [<delay_int>] <max_lines_int>]]
Variable Description
<delay_int> The delay, in seconds, between updating the process list. The default is 5
seconds.
<max_lines_int> The maximum number of processes displayed in the output. The default is 20
lines.
Use this command to get information about equal cost multi-path (ECMP) routing. To configure ECMP routing,
see config system settings on page 143.
Syntax
get system settings
Example output
#get system settings
v4-ecmp-mode : source-ip-based
Use this command to display the sFlow settings. To configure sFlow, see config system sflow on page 143.
Syntax
get system sflow
Example output
S524DF4K15000024 # get system sflow
collector-ip : 0.0.0.0
collector-port : 6343
Use this command to get information about your system’s SNMP settings. To configure the SNMP agent, see
config system snmp sysinfo on page 146.
Syntax
get system snmp sysinfo
Example output
S524DF4K15000024 # get system snmp sysinfo
contact-info : (null)
description : (null)
engine-id : (null)
location : (null)
status : disable
trap-high-cpu-threshold: 80
trap-log-full-threshold: 90
trap-low-memory-threshold: 80
trap-temp-alarm-threshold: 60
trap-temp-warning-threshold: 50
Syntax
get system source-ip status
Example output
# get sys source-ip status
The following services force their communication to use
a specific source IP address:
service=NTP source-ip=172.18.19.101
service=DNS source-ip=172.18.19.101
vdom=root service=RADIUS name=server-pc25 source-ip=10.1.100.101
vdom=root service=TACACS+ name=tac_plus_pc25 source-ip=10.1.100.101
vdom=root service=FSAE name=pc26 source-ip=172.18.19.101
vdom=V1 service=RADIUS name=pc25-Radius source-ip=172.16.200.101
vdom=V1 service=TACACS+ name=pc25-tacacs+ source-ip=172.16.200.101
vdom=V1 service=FSAE name=pc16 source-ip=172.16.200.101
Use this command to display information about system startup errors. This command only displays information if
an error occurs when the system starts up.
Syntax
get system startup-error-log
Syntax
get system status
Example output
S524DF4K15000024 # get system status
get test
Use this command to display information about applications on this FortiSwitch unit:
Syntax
get test {dnsproxy | fpmd | radiusd | sflowd | snmpd} <test_level_int>
Variable Description
Example output
S524DF4K15000024 # get test fpmd 1
ROUTE_V4_ADD : 9
INTF_V4_ADDR_ADD : 14
ROUTE_V4_MGMT_FWD_DISABLED : 4
ROUTE_ADD_INVALID_FAMILY : 3
ROUTE_ADD_INET127 : 1
Use this command to list all user groups. To add a user group, see config user group on page 149.
Syntax
get user group
Example output
S524DF4K15000024 # get user group
== [ group1 ]
name: group1
== [ radgroup ]
name: radgroup
Use this command to list LDAP users. To add an LDAP user, see config user ldap on page 150.
Syntax
get user ldap
Use this command to list local users. To add a local user, see config user local on page 152.
Syntax
get user local
Example output
S524DF4K15000024 # get user local
== [ user1 ]
name: user1
Use this command to list RADIUS users. To add a RADIUS user, see config user radius on page 153.
Syntax
get user radius
Example output
S524DF4K15000024 # get user radius
== [ serve2 ]
name: serve2
== [ radone ]
name: radone
Use this command to get information about all the system’s user settings.
Syntax
get user setting
Example output
S524DF4K15000024 # get user setting
auth-blackout-time : 0
auth-cert : (null)
auth-http-basic : disable
auth-invalid-max : 5
auth-multi-group : enable
auth-ports:
== [ 1 ]
id: 1
auth-secure-http : disable
auth-timeout : 5
auth-timeout-type : idle-timeout
auth-type : http https ftp telnet
Syntax
get user tacacs+
Example output
S524DF4K15000024 # get user tacacs+
== [ tacserver ]
name: tacserver
next
edit "queue-6"
next
edit "queue-7"
next
end
set schedule round-robin
next
edit "voice_egr_policy"
config cos-queue
edit "queue-0"
next
edit "queue-1"
set weight 0
next
edit "queue-2"
set weight 6
next
edit "queue-3"
set weight 37
next
edit "queue-4"
set weight 12
next
edit "queue-5"
next
edit "queue-6"
next
edit "queue-7"
next
end
set schedule weighted
next
end
edit "port5"
...
set trust-dot1p-map " voice-dot1p "
set trust-ip-dscp-map " voice-dscp "
next
edit "port6"
...
set trust-dot1p-map " voice-dot1p "
set trust-ip-dscp-map " voice-dscp "
next
edit "port7"
...
set trust-dot1p-map " voice-dot1p "
set trust-ip-dscp-map " voice-dscp "
next
end
edit "port14"
...
set qos-policy "voice_egr_policy"
end