Fortiswitchos 6.4.0 Admin Guide
Fortiswitchos 6.4.0 Admin Guide
Standalone Mode
Version 6.4.0
FORTINET DOCUMENT LIBRARY
https://docs.fortinet.com
https://video.fortinet.com
http://kb.fortinet.com
FORTINET BLOG
https://blog.fortinet.com
https://support.fortinet.com
FORTINET COOKBOOK
http://cookbook.fortinet.com
https://training.fortinet.com/
FORTIGUARD CENTER
https://fortiguard.com
FORTICAST
http://forticast.fortinet.com
https://www.fortinet.com/doc/legal/EULA.pdf
https://www.fortinet.com/corporate/about-us/privacy.html
FEEDBACK
Email: [email protected]
Change log 13
Introduction 14
Supported models 14
Whatʼs new in FortiSwitchOS 6.4.0 14
GUI changes 14
CLI changes 15
REST API changes 16
Other changes 16
Feature matrix: FortiSwitchOS 6.4.0 18
Before you begin 25
How this guide is organized 25
Management ports 27
Models without a dedicated management port 27
Models with a dedicated management port 30
Remote access to the management port 32
Example configurations 33
Configuring administrator tasks 36
Setting the time and date 36
Configuring the temperature sensor 37
Upgrading the firmware 38
Verifying image integrity 39
Restore or upgrade the BIOS 39
Setting the boot partition 40
Backing up the system configuration 40
Remote authentication servers 40
RADIUS server 41
TACACS+ server 42
Configuring system administrators 43
Access control 45
Setting the idle timeout 49
Configuring administrative logins 50
Using PKI 51
Configuring security checks 52
Logging 54
Syslog server 55
Fault relay support 56
Using SSH and the Telnet client 56
Configuring SNMP 57
SNMP access 57
SNMP agent 57
SNMP community 58
Adding an SNMP v1/v2c community 58
Adding an SNMP v3 user 59
Global system and switch settings 60
Configuration file settings 60
SSL configuration 60
Configuration file revisions 61
IP conflict detection 62
Port flap guard 63
Retaining the triggered state 63
Configuring the port flap guard 64
Resetting a port 65
Viewing the port flap guard configuration 66
Link monitor 66
Configuring the link monitor 66
Unicast hashing 67
Cut-through switching mode 68
Enabling packet forwarding 68
ARP timeout value 68
Power over Ethernet configuration 69
Creating a schedule 70
Overlapping subnets 71
Configuring PTP transparent-clock mode 72
Configuring auto topology 73
Physical port settings 74
Configuring general port settings 74
Viewing port statistics 75
Configuring flow control, priority-based flow control, and ingress pause metering 76
Auto-module speed detection 77
Setting port speed (autonegotiation) 77
Link-layer discovery protocol 78
Configuring power over Ethernet on a port 78
Enabling or disabling PoE in the GUI 79
Configuring PoE in the CLI 79
Determining the PoE power capacity 79
Resetting the PoE power 79
Displaying PoE information 80
Energy-efficient Ethernet 80
Diagnostic monitoring interface module status 81
Configuring split ports 83
Configuring QSFP low-power mode 85
Configuring physical port loopbacks 86
Layer-2 interfaces 87
Switched interfaces 87
Viewing interface configuration 87
Dynamic MAC address learning 88
Configuring dynamic MAC address learning 88
Changing when MAC addresses are deleted 88
Logging dynamic MAC address events 89
Using the learning-limit violation log 89
Persistent (sticky) MAC addresses 90
Static MAC addresses 91
Loop guard 92
Configuring loop guard 92
Viewing the loop guard configuration 93
VLANs and VLAN tagging 94
Native VLAN 94
Allowed VLAN list 94
Untagged VLAN list 95
Packet processing 95
Ingress port 95
Egress port 95
Configuring VLANs 96
Example 1 96
Example 2 97
VLAN stacking (QinQ) 98
Spanning Tree Protocol 103
MSTP overview and terminology 103
Regions 103
IST 103
CST 104
Hop count and message age 104
STP port roles 104
STP loop protection 104
STP root guard 105
STP BPDU guard 105
MSTP configuration 106
Configuring STP settings 106
Configuring an MST instance 107
Configuring an STP edge port 109
Configuring STP loop protection 110
Configuring STP root guard 110
Configuring STP BPDU guard 110
Interactions outside of the MSTP region 112
Viewing the MSTP configuration 112
Support for interoperation with per-VLAN RSTP (rapid PVST+ or RPVST+) 113
Configuring rapid PVST or RPVST+ interoperation support 113
Viewing the configuration 114
Link aggregation groups 115
Configuring the trunk and LAG ports 115
Example configuration 116
Checking the trunk configuration 117
MCLAG 118
Notes 118
Example configuration 119
Detecting a split-brain state 120
Viewing the configured trunk 120
Configuring an MCLAG with IGMP snooping 120
Multi-stage load balance 122
Configuring the trunk ports 123
Heartbeats 123
Configuring heartbeats 123
LLDP-MED 125
Configuration notes 125
LLDP global settings 126
Setting the asset tag 127
Configuring the location table 127
Configuring LLDP profiles 130
Configuring an LLDP profile for the port 132
Enabling LLDP on a port 134
Checking the LLDP configuration 134
Configuration deployment example 135
Checking LLDP details 137
LLDP OIDs 137
MAC/IP/protocol-based VLANs 138
Overview 138
MAC based 138
IP based 138
Protocol based 138
Configuring MAC/IP/protocol-based VLANs 138
Example configuration 140
Checking the configuration 141
Mirroring 142
Configuring a SPAN mirror 143
Multiple mirror destination ports (MTPs) 144
Configuring an RSPAN mirror 146
Configuring an ERSPAN auto mirror 148
Configuring an ERSPAN manual mirror 149
Access control lists 153
ACL policy attributes 153
Configuring an ACL policy 154
Creating an ACL ingress policy 154
Creating an ACL egress policy 156
Creating an ACL prelookup policy 157
Creating or customizing a service 158
Creating a policer 159
Viewing counters 159
Clearing counters 160
Clearing unused classifiers 160
Configuration examples 160
Storm control 163
Configuring system-wide storm control 163
Configuring port-level storm control 164
Displaying the storm-control configuration 164
DHCP snooping 165
Configuring DHCP snooping 165
Set the system-wide DHCP-snooping options 165
Configure the VLAN settings 166
Configure the interface settings 168
Checking the DHCP-snooping configuration 169
Removing an entry from the DHCP-snooping binding database 170
IP source guard 171
Configuring IP source guard 171
Enable IP source guard 171
Configure IP source guard static entries 172
Check the IP source guard entries 172
Dynamic ARP inspection 173
Configuring DAI 173
Checking ARP packets 174
IGMP snooping 175
Notes 175
Configuring IGMP snooping 176
Configuring the IGMP querier 180
Configuring mRouter ports 181
IPv6 router advertisement guard 182
Configuring IPv6 RA guard 182
Create an IPv6 access list 182
Create an IPv6 prefix list 183
Create an IPv6 RA-guard policy 183
Apply the IPv6 RA-guard policy 184
View available IPv6 RA-guard policies 185
Private VLANs 186
Creating and enabling a PVLAN 186
Configuring the PVLAN ports 187
Private VLAN example 187
Quality of service 189
Classification 190
Marking 190
Queuing 191
Determining the egress queue 191
Packets with DSCP and CoS values 191
Packets with a CoS value but no DSCP value 192
Packets with a DSCP value but no CoS value 192
Configuring FortiSwitch QoS 192
Configure an 802.1p map 192
Configure a DSCP map 193
Configure the QoS egress policy 194
Configure the egress drop mode 195
Configure the switch ports 196
Configure QoS on trunks 196
Configure QoS on VLANs 197
Configure CoS and DSCP markings 197
Checking the QoS statistics 198
Clearing and restoring QoS statistics 202
sFlow 203
About sFlow 203
Configuring sFlow 203
Checking the sFlow configuration 205
Feature licensing 206
About licenses 206
Configuring licenses 206
Layer-3 interfaces 208
Loopback interfaces 208
Configuring loopback interfaces 208
Switched virtual interfaces 209
Configuring a switched virtual interface 209
Example SVI configuration 209
Viewing the SVI configuration 210
Layer-3 routing in hardware 210
Router activity 210
Equal cost multi-path (ECMP) routing 211
Configuring ECMP 211
Example ECMP configuration 211
Viewing ECMP configuration 213
Bidirectional forwarding detection 213
Configuring BFD 213
Viewing BFD configuration 214
Unicast reverse-path forwarding (uRPF) 214
Configuring uRPF 214
IP-MAC binding 214
Configuring IP-MAC binding 215
Viewing IP-MAC binding configuration 216
DHCP server and relay 217
Configuring a DHCP server 217
Configuring the IP address range 219
Assigning IP settings to specific MAC addresses 219
Configuring DHCP custom options 219
Excluding addresses in DHCP 220
Listing DHCP leases 220
Breaking DHCP leases 220
Detailed operation of a DHCP relay 220
Configuring a DHCP relay 221
OSPF routing 222
How OSPF works 222
Configuring OSPF 223
Check the OSPF configuration 226
Example configuration 227
RIP routing 230
Terminology 230
Configuring RIP routing 231
Checking the RIP configuration 237
Example configuration 237
VRRP 240
Configuring VRRP 240
Checking the VRRP configuration 242
BGP routing 243
Terminology 243
Configuring BGP 243
Other BGP commands 244
Sample configurations 245
Configure system interfaces 245
Internal BGP 246
External BGP 247
PIM routing 249
Terminology 249
Configuring PIM 249
Checking the PIM configuration 250
IS-IS routing 251
Terminology 251
Configuring IS-IS 251
Configuring BFD for IS-IS 252
Checking the IS-IS configuration 252
Users and user groups 253
Users 253
User groups 254
802.1x authentication 256
Dynamic VLAN assignment 257
MAC authentication bypass (MAB) 258
Configuring global settings 260
Configuring the 802.1x settings on an interface 262
Viewing the 802.1x details 266
Using the monitor mode 268
Clearing port authorizations 268
Authenticating users with a RADIUS server 269
Example: RADIUS user group 272
Example: dynamic VLAN 276
Authenticating an admin user with RADIUS 276
RADIUS accounting and FortiGate RADIUS single sign-on 279
Configuring the RADIUS accounting server and FortiGate RADIUS single sign-on 280
Example: RADIUS accounting and single sign-on 281
RADIUS change of authorization (CoA) 281
Configuring CoA and disconnect messages 283
Example: RADIUS CoA 284
Viewing the CoA configuration 284
Use cases 285
Use case 1 285
Use case 2 285
Use case 3 286
Detailed deployment notes 287
TACACS 289
Administrative accounts 289
Configuring a TACACS admin account 289
User accounts 290
Configuring a user account 290
Configuring a user group 290
Example configuration 290
Troubleshooting and support 292
Dashboard 292
Operation mode 292
FortiSwitch Cloud 293
Bandwidth 294
Losses 295
Virtual wire 295
TFTP network port 296
Cable diagnostics 296
Selective packet sampling 297
Packet capture 298
Create a packet-capture profile 299
Start the packet capture 299
Pause or stop the packet capture 300
Display or upload the packet capture 300
Delete the packet-capture file 300
Network monitoring 300
Directed mode 301
Survey mode 302
Network monitoring statistics 302
Flow tracking and export 303
Enabling packet sampling 304
Configuring flow export 304
Viewing the flow-export data 306
Deleting the flow-export data 306
Identifying a specific FortiSwitch unit 306
Deployment scenario 308
Working configuration for PC and phone for 802.1x authentication using MAC 308
Summary 308
A. Configure all devices 308
B. Authenticate phone using MAB 312
C. Authenticate the PC using EAP dot1x 314
Appendix: FortiSwitch-supported RFCs 316
Appendix: Supported attributes for RADIUS CoA and RSSO 324
Change log
Change log
April 16, 2020 Updated the first page of the “Access control lists” chapter.
April 17, 2020 Added four more RFCs to the “FortiSwitch-supported RFCs” appendix.
May 6, 2020 Added six more RFCs to the “FortiSwitch-supported RFCs” appendix.
July 22, 2020 Updated the “Enabling LLDP on a port” and “Feature matrix: FortiSwitchOS 6.4.0”
sections.
January 27, 2021 Added the “Configuring rapid PVST or RPVST+ interoperation” section.
January 28, 2021 Updated the “Configuring rapid PVST or RPVST+ interoperation support” section.
June 25, 2021 Updated the “Checking ARP packets” and “Configure the OSPF router” sections.
Introduction
This guide provides information about configuring a FortiSwitch unit in standalone mode. In standalone mode, you
manage the FortiSwitch unit by connecting directly to the unit, either using the web-based manager (also known
as the GUI) or the CLI.
If you will be managing your FortiSwitch unit using a FortiGate unit, refer to the following guide: FortiSwitch
Managed by FortiOS 6.4.
Supported models
This guide is for all FortiSwitch models that are supported by FortiSwitchOS, which includes all of the D-series and
E-series models.
GUI changes
l You can now enable or disable energy-efficient Ethernet (EEE) on the Edit Physical Port page. A new EEE column
in The Physical Switch Ports page shows which ports have EEE enabled.
l You can now add the allowed DHCP server list on the Add VLAN page and Edit VLAN page.
l You can now create RSPAN and ERSPAN (auto and manual) port mirrors in the GUI.
l You can now delete multiple router access lists at the same time on the Access Lists page.
l When configuring OSPF routing, you can now redistribute BGP and ISIS routes.
l When configuring RIP routing, you can now redistribute BGP and ISIS routes.
l You can now see the IGMP-snooping learned multicast groups by going to Switch > Monitor > IGMP Snooping.
l You can now check if BPDU guard has been triggered and on which ports by going to Switch > Monitor > BPDU
Guard.
l You can now configure IGMP static groups by going to Switch > VLAN.
l IGMP snooping is always enabled on switch interfaces and cannot be disabled.
l You can now specify the polling interval for sFlow.
l You can now create an ACL ingress policy, ACL egress policy, ACL prelookup policy, and a policer by going to the
Switch > ACL menu.
l You can now configure IP source guard static entries by going to Switch > IP Source Guard.
l LLDP-MED support for enhanced 911 emergency calls
l The default number of minutes before contacting NTP server to synchronize the time (Sync Interval) has changed
from 1 minute to 10 minutes, and the polling interval is now slower when the system time is synchronized.
CLI changes
l The time-domain reflectometer (TDR)/cable diagnostics feature is now supported on the FS-108E, FS-108E-POE,
FS-108E-FPOE, FS-124E, FS-124E-POE, FS-124E-FPOE, FS-148E, and FS-148E-POE models.
l Quality of service (QoS) is now supported on the FS-108E, FS-108E-POE, FS-108E-FPOE, FS-124E, FS-124E-
POE, FS-124E-FPOE, FS-148E, and FS-148E-POE models.
l Access control lists (ACLs) are now supported on the FS-108E, FS-108E-POE, FS-108E-FPOE, FS-124E, FS-
124E-POE, FS-124E-FPOE, FS-148E, and FS-148E-POE models.
l Static bidirectional forwarding detection (BFD) is now supported on the FSR-112D model.
l You can now use ingress pause metering to limit the input bandwidth of an ingress port.
l You can now use LLDP to advertise the energy-efficient Ethernet (EEE) configuration.
l Loop guard can now detect physical loops.
l You can now specify how an aggregator groups ports when the trunk is in LACP mode.
l You can now specify the number of microseconds that circuits are turned off to save power for EEE and the number
of microseconds during which no data is transmitted while the circuits that were turned off are being restarted.
l You can now use the diagnose switch acl schedule {egress | ingress | prelookup} command to
list ACL policies with a schedule.
l You can now use the diagnose switch acl hw-entry-index <id> command to find the hardware mapping
for the specified ACL policy identifier or the FS-108E, FS-108E-POE, FS-108E-FPOE, FS-124E, FS-124E-POE,
FS-124E-FPOE, FS-148E, and FS-148E-POE models.
l The default number of minutes before contacting NTP server to synchronize the time (syncinterval) has changed
from 1 minute to 10 minutes, and the polling interval is now slower when the system time is synchronized.
l You can now use SHA1 authentication for the NTP server.
l You can now use the set flap-timeout command to set the number of minutes before the flag guard is reset.
l IPv6 support has been expanded. You can now connect to a RADIUS server with IPv6. You can use IPv6 addresses
with the link monitor, OSPF routing, VRRP, DHCP snooping, and NTP servers.
l When you redistribute routes from OSPF, you can now configure a summary of external routes to reduce the
amount of router resources needed.
l The new diagnose ip router fwd commands display information about layer-3 forwarding.
l The new diagnose ip router ospf6 commands display information about IPv6 OSPF.
l The new diagnose ip router static commands display information about static routing.
l The new diagnose debug ospf6 commands enable or disable the debugging level for OSPF routing for IPv6
traffic.
l The new diagnose debug static commands enable or disable the debugging level for static routes.
l The new diagnose debug unit_test command enables or disables the debugging of unit tests.
l The execute router restart command was removed.
l The get router info fwd command was removed.
l The following commands were renamed:
l
Previous command New command
diagnose ip router launch-info show diagnose ip router process show
diagnose ip router {bfd | bgp | isis | ospf | diagnose debug {bfd | bgp | isis |
pim | rip | zebra} debug ospf | pim | rip | zebra}
get router info v6-routing-table get router info6 routing-table
(under config router isis) config isis-interface (under config router isis) config
interface
(under config router isis) config isis-net (under config router isis) config net
(under config router ospf) config ospf-interface (under config router ospf) config
interface
Other changes
l The following tables in the specified SNMP management information base (MIB) files are now supported:
o entityMIB (.1.3.6.1.2.1.47)
n entPhysicalTable (.1.3.6.1.2.1.47.1.1.1)
o entitySensorMIB (.1.3.6.1.2.1.99)
n entPhySensorTable (.1.3.6.1.2.1.99.1.1)
o powerEthernetMIB (.1.3.6.1.2.1.105)
n pethPsePortTable (.1.3.6.1.2.1.105.1.1)
n pethMainPseTable (.1.3.6.1.2.1.105.1.3.1)
Refer to Feature matrix: FortiSwitchOS 6.4.0 on page 18 for details about the features supported on each
FortiSwitch model.
The following table lists the FortiSwitch features in Release 6.4.0 that are supported on each series of FortiSwitch
models. All features are available in Release 6.4.0, unless otherwise stated.
200
1024D
GUI 112D- FSR- Series 500 3032D
Feature 1xxE 4xxE 1048D
supported POE 124D 400 Series 3032E
1048E
Series
CPLD software
1024D
upgrade support for — — — — — — — —
1048D
OS
IP conflict detection
ü ü ü ü ü ü ü ü ü
and notification
FortiSwitch Cloud ü ü ü ü ü ü ü ü ü
configuration
Auto topology — ü ü ü ü ü ü ü ü
802.1x MAC-based ü ü ü ü ü ü ü ü ü
security mode
User-based (802.1x)
ü ü ü ü ü ü ü ü ü
VLAN assignment
802.1x ü ü ü ü ü ü ü ü ü
enhancements,
including MAB
200
1024D
GUI 112D- FSR- Series 500 3032D
Feature 1xxE 4xxE 1048D
supported POE 124D 400 Series 3032E
1048E
Series
MAB
reauthentication — ü ü ü ü ü ü ü ü
disabled
open-auth mode ü ü ü ü ü ü ü ü ü
Support of the
RADIUS accounting Partial ü ü ü ü ü ü ü ü
server
Support of RADIUS — ü ü ü ü ü ü ü ü
CoA and disconnect
messages
EAP Pass-Through ü ü ü ü ü ü ü ü ü
Network device — — ü — ü ü ü ü ü
detection
IP-MAC binding ü — — — — — ü ü ü
sFlow ü ü ü — ü ü ü ü ü
Flow export — — ü — ü ü ü ü ü
ACL — — ü ü ü ü ü ü ü
Multistage ACL — — — — — — ü ü ü
Multiple ingress — — ü — ü ü ü ü ü
ACLs
DHCP snooping ü ü ü ü ü ü ü ü ü
DHCPv6 snooping — — — — ü ü ü ü ü
Allowed DHCP ü ü ü ü ü ü ü ü ü
server list
IP source guard ü — ü — ü ü — — —
Dynamic ARP ü — ü ü ü ü ü ü ü
inspection
200
1024D
GUI 112D- FSR- Series 500 3032D
Feature 1xxE 4xxE 1048D
supported POE 124D 400 Series 3032E
1048E
Series
Access VLANs — ü ü ü ü ü ü ü ü
RMON group 1 — ü ü ü ü ü ü ü ü
Reliable syslog — ü ü ü ü ü ü ü ü
(RFC 6587)
Packet capture — — ü — ü ü ü ü ü
Layer 2
Link aggregation
group size
24
(maximum number ü 8 8 8 8 8 24/48 24/48
64
of ports) (See Note
2.)
LAG min-max- — ü ü ü ü ü ü ü ü
bundle
IPv6 RA guard — — — — ü ü ü ü ü
IGMP snooping ü ü ü ü ü ü ü ü ü
IGMP proxy ü ü ü ü ü ü ü ü ü
IGMP querier — ü ü ü ü ü ü ü ü
LLDP-MED — ü ü ü ü ü ü ü ü
LLDP-MED: ELIN ü ü ü ü ü ü ü ü ü
support
Learning limit
violation log (See — — ü ü ü ü ü — —
Note 4.)
200
1024D
GUI 112D- FSR- Series 500 3032D
Feature 1xxE 4xxE 1048D
supported POE 124D 400 Series 3032E
1048E
Series
set mac-violation- — ü ü ü ü ü ü ü ü
timer
Sticky MAC ü ü ü ü ü ü ü ü ü
MSTP instances — 0-15 0-15 0-15 0-15 0-15 0-32 0-32 0-32
Rapid PVST — ü ü ü ü ü ü ü ü
interoperation
'forced-untagged' or
'force-tagged'
— ü ü ü ü ü ü ü ü
setting on switch
interfaces
Private VLANs ü — ü — ü ü ü ü ü
Multi-stage load
— — — — — — — ü ü
balancing
Priority-based flow — — — — — — ü ü ü
control
Ingress pause
— — — — ü ü ü ü 3032D
metering
Storm control ü ü ü ü ü ü ü ü ü
Per-port storm
ü ü ü ü ü ü ü ü ü
control
MAC/IP/protocol- ü ü ü ü ü ü ü ü ü
based VLAN
assignment
Virtual wire ü — ü — ü ü ü ü ü
Loop guard ü ü ü ü ü ü ü ü ü
200
1024D
GUI 112D- FSR- Series 500 3032D
Feature 1xxE 4xxE 1048D
supported POE 124D 400 Series 3032E
1048E
Series
Percentage rate
ü — ü — ü ü ü ü ü
control
VLAN stacking — — ü — ü ü ü ü ü
(QinQ)
VLAN mapping — — ü — ü ü ü ü ü
SPAN ü ü ü ü ü ü ü ü ü
RSPAN and
ü RSPAN ü — ü ü ü ü ü
ERSPAN
Layer 3
Hardware routing ü — ü — ü ü ü ü ü
offload (v4|v6)
Software routing
ü ü — ü — — — — —
only
Hardware-based — — — — — — ü ü ü
ECMP
Static BFD — ü ü ü ü ü ü ü ü
uRPF — — — — — — ü ü ü
200
1024D
GUI 112D- FSR- Series 500 3032D
Feature 1xxE 4xxE 1048D
supported POE 124D 400 Series 3032E
1048E
Series
High Availability
MCLAG Partial — — — ü ü ü ü ü
(multichassis link
aggregation)
STP supported in
— — — — ü ü ü ü ü
MCLAGs
IGMP snooping ü — — — ü ü ü ü ü
support in MCLAG
Quality of Service
802.1p support, ü — ü ü ü ü ü ü ü
including priority
queuing trunk and
WRED
QoS marking — — ü — ü ü ü ü ü
Summary of
configured queue ü — ü ü ü ü ü ü ü
mappings
Egress priority — — ü — ü ü ü ü ü
tagging
ECN — — — — ü — ü ü ü
Miscellaneous
PoE-pre-standard FS-
detection (See Note — ü ü 1xxE ü ü ü — —
1.) POE
200
1024D
GUI 112D- FSR- Series 500 3032D
Feature 1xxE 4xxE 1048D
supported POE 124D 400 Series 3032E
1048E
Series
Control of
— ü ü — ü ü ü ü ü
temperature alerts
TDR (time-domain
reflectometer)/cable ü — ü ü ü ü ü — —
diagnostics support
FS-
124E-
POE
Monitor system FS-
temperature 124E-
(threshold — ü ü FPOE ü ü ü ü ü
configuration and FS-
SNMP trap support) 148E
FS-
148E-
POE
Cut-through — — — — — — — ü ü
switching
Energy-efficient
ü ü ü ü ü ü ü — —
Ethernet
PTP transparent
— — — — ü ü ü 1048E ü
clock
Notes
1. PoE features are applicable only to the model numbers with a POE or FPOE suffix.
2. 24-port LAG is applicable to 524D, 524-FPOE, 1024D, and 3032D models. 48-port LAG is applicable to 548D, 548-
FPOE, and 1048D models.
3. To use the dynamic layer-3 protocols, you must have an advanced features license.
4. The per-VLAN MAC learning limit and per-trunk MAC learning limit are not supported on the 448D/448D-
POE/448D-FPOE/248E-POE/248E-FPOE/248D series.
5. Supported only in 100G mode (clause 91).
6. On the 3032E, you can split one port at the full base speed, split one port into four sub-ports of 25 Gbps each
(100G QSFP only), or split one port into four sub-ports of 10 Gbps each (40G or 100G QSFP).
Before you start administrating your FortiSwitch unit, it is assumed that you have completed the initial
configuration of the FortiSwitch unit, as outlined in the QuickStart Guide for your FortiSwitch model and have
administrative access to the FortiSwitch unit’s GUI and CLI.
Management ports
This chapter describes how to configure management ports on the FortiSwitch unit.
For FortiSwitch models without a dedicated management port, configure the internal interface as the management
port.
NOTE: For FortiSwitch models without a dedicated management port, the internal interface has a default VLAN ID of 1.
1. Go to System > Network > Interface > Physical, select Edit for the internal interface.
1. Go to System > Network > Interface > VLAN and select Add VLAN to create a management VLAN.
next
edit <vlan name>
set ip <IP_address_and_netmask>
set allowaccess <access_types>
set interface internal
set vlanid <VLAN id>
set secondary-IP enable
config secondaryip
edit <id>
set ip <IP_address_and_netmask>
set allowaccess <access_types>
end
end
For FortiSwitch models with a dedicated management port, configure the IP address and allowed access types for
the management port.
NOTE: For FortiSwitch models with a dedicated management port, the internal interface has a default VLAN identifier of
4094.
1. Go to System > Network > Interface > Physical, select Edit for the mgmt interface.
edit internal
set type physical
end
end
To provide remote access to the management port, configure a static route. Set the gateway address to the
IP address of the router.
Example configurations
In this example, the internal interface is used as an inbound management interface. Also, the FortiSwitch unit has
a default VLAN across all physical ports and its internal port.
Syntax
config system interface
edit internal
set ip 192.168.1.99 255.255.255.0
set allowaccess ping https http ssh
set type physical
end
end
In this example, an out-of-band management interface is used as the dedicated management port. You can
configure the management port for local or remote access.
Router
(192.168.0.10)
Remote
Access
You can use the default “admin” account to configure administrator accounts, adjust system settings, upgrade
firmware, create backup files, and configure security features.
For effective scheduling and logging, the system date and time must be accurate. You can either manually set the
system date and time or configure the system to automatically keep its time correct by synchronizing with a
Network Time Protocol (NTP) server.
NOTE: Some FortiSwitch models do not have a battery-backup real-time clock. For FortiSwitch models without a real-
time clock, the time is reset when the switch is rebooted. These models must be connected to an NTP server if you want
to maintain the correct system date and time.
The Network Time Protocol enables you to keep the system time synchronized with other network systems. This
will also ensure that logs and other time-sensitive settings are correct.
When the system time is synchronized, polling occurs every 2 minutes. When the system time is not synchronized
but the NTP server can be reached, polling is attempted every 2 seconds to synchronize quickly. If the NTP server
cannot be reached, polling occurs up to every 64 seconds. If DNS cannot resolve the host name, polling occurs up
to every 60 seconds.
Starting in FortiSwitchOS 6.4.0, the default Sync Interval is 10 minutes. The polling interval is one-fifth of the
configured Sync Interval.
If you use an NTP server, you can identify the IPv4 or IPv6 address for this self-originating traffic with the set
source-ip or set source-ip6 command. For example, you can set the source IPv4 address of NTP to be on
the DMZ1 port with an IP of 192.168.4.5:
config system ntp
set authentication enable
set ntpsyn enable
set syncinterval 5
set source-ip 192.168.4.5
end
If your FortiSwitch unit has a temperature sensor, you can set a warning and an alarm for when the system
temperature reaches specified temperatures. When these thresholds are exceeded, a log message and SNMP
trap are generated. The warning threshold must be lower than the alarm threshold.
By default, the FortiSwitch unit generates an alert (in the form of an SNMP trap and a SYSLOG entry) every 30
minutes when the temperature sensor exceeds its set threshold. You can change this interval with the following
commands:
config system global
set alertd-relog enable
set alert-interval <1-1440 minutes>
end
You can upgrade the firmware from the dashboard or from the system configuration page.
3. Select Apply.
You can download a firmware image from an FTP server, from a FortiManager unit, or from a TFTP server. The
FortiSwitch unit reboots and then loads the new firmware.
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>
The following example shows how to upload a configuration file from a TFTP server to the FortiSwitch unit and
restart the FortiSwitch unit 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
You can also load a firmware image from an FTP or TFTP server without restarting the FortiSwitch unit:
execute stage image ftp <string> <ftp server>[:ftp port]
execute stage image tftp <string> <ip>
If the image is corrupted or missing, the command fails with a return code of -1.
For example:
execute verify image primary
CAUTION: Only restore or upgrade the BIOS if Customer Support recommends it.
To upgrade or restore the BIOS from the CLI:
execute restore bios tftp <filename_str> <server_ipv4[:port_int]>
For example:
The example downloads the BIOS file from the TFTP server at the specified IPv4 address.
NOTE: If the BIOS upgrade fails, do not restart the FortiSwitch unit. Instead, try the CLI command again. If repeating the
CLI command does not work, the FortiSwitch unit might require a return merchandise authorization (RMA).
You can specify the flash partition for the next reboot. The system can use the boot image from either the primary
or the secondary flash partition:
execute set-next-reboot <primary | secondary>
NOTE: You must disable image rotation before you can use the execute set-next-reboot command.
If your FortiSwitch model has dual flash memory, you can use the primary and backup partitions for image
rotation. By default, this feature is enabled.
config system global
set image-rotation <enable | disable>
end
If you are using remote authentication for administrators or users, you need to configure one of the following:
l RADIUS server
l TACACS+ server
RADIUS server
The information you need to configure the system to use a RADIUS server includes:
Field Description
Name Enter a name to identify the RADIUS server on the FortiSwitch unit.
Field Description
Primary Server Secret Enter the server secret key, such as radiusSecret. This key can be a maximum
of 16 characters long.
This value must match the secret on the RADIUS primary server.
Secondary Server Secret Optionally, enter the secondary server secret key, such as radiusSecret2. This
key can be a maximum of 16 characters long.
This value must match the secret on the RADIUS secondary server.
If you know the RADIUS server uses a specific authentication protocol, select
Specify Authentication Protocol and select the protocol from the list.
Authentication Scheme
Otherwise, select Use Default Authentication Scheme. The default
authentication scheme will usually work.
NAS IP/Called Station ID Enter the IP address to be used as an attribute in RADIUS access requests.
The Called Station ID is the same value as the NAS IP address but in text
format.
When this option is enabled, this RADIUS server is automatically included in all
Include in every User
user groups. This option is useful if all users will be authenticating with the
Group
remote RADIUS server.
To configure the FortiSwitch unit for RADIUS authentication, see 802.1x authentication on page 256.
TACACS+ server
TACACS+ is a remote authentication protocol that provides access control for routers, network access servers,
and other networked computing devices using one or more centralized servers. TACACS+ allows a client to
accept a user name and password and send a query to a TACACS+ authentication server. The server host
determines whether to accept or deny the request and sends a response back that allows or denies the user
access to the network.
TACACS+ offers fully encrypted packet bodies and supports both IP and AppleTalk protocols. TACACS+ uses
TCP port 49, which is seen as more reliable than RADIUS’s UDP protocol.
Field Description
Server Key Enter the server key for the TACACS server.
To configure the FortiSwitch unit for TACACS+ authentication, see TACACS on page 289.
In addition to the default “admin” account, you might want to set up other administrators with different levels of
system access.
Administrator profiles
Administer profiles define what the administrator user can do when logged into the FortiSwitch unit. When you set
up an administrator user account, you also assign an administrator profile, which dictates what the administrator
user will see. Depending on the nature of the administrator’s work, access level, or seniority, you can allow them
to view and configure as much, or as little, as required.
The super_admin administrator is the administrative account that the primary administrator should have to log into
the FortiSwitch unit. The profile cannot be deleted or modified to ensure there is always a method to administer
the FortiSwitch unit. This user profile has access to all components of the system, including the ability to add and
remove other system administrators. For some administrative functions, such as backing up and restoring the
configuration using SCP, super_admin access is required.
On the Add Profile page, you define the components of the FortiSwitch unit that will be available to view and/or
edit. For example, if you configure a profile so that the administrator can only access System Configuration, this
admin will not be able to change Network settings. For more detail about what is covered by each access control,
see Access control on page 45.
Access control
The System Configuration access control applies to the following menus:
Adding administrators
Only the default “admin” account can create a new administrator account. If required, you can add an additional
account with read-write access control to add new administrator accounts.
If you log in with an administrator account that does not have the super_admin admin profile, the administrators
list will show only the administrators for the current virtual domain.
When adding administrators, you are setting up the administrator’s user account. An administrator account
comprises an administrator’s basic settings as well as their access profile. The access profile is a definition of
what the administrator is capable of viewing and editing.
Monitoring administrators
You can find out which administrators are logged in by looking at the System Information section of the
Dashboard. The Current Administrator row shows the administrators logged in and the total logged in. Selecting
Details displays the information for each administrator: where they are logging in from and how and when they
logged in.
1. From the admin menu in the page banner, select Change Password.
2. Enter the new password in the Password and Confirm Password fields. Passwords can be up to 64 characters in
length.
3. Select Change.
The number of attempts can be set to an alternate value, as well as the default wait time before the administrator
can try to enter a password again. You can also change this value to make it more difficult to hack. Both settings
are must be configured with the CLI
For example, to set the lockout threshold to one attempt and the duration before the administrator can try again to
log in to five minutes, enter these commands:
config system global
set admin-lockout-threshold 1
set admin-lockout-duration 300
end
o Display language
4. Select Apply.
You can configure the RADIUS server to set the access profile. This process uses RADIUS vendor-specific
attributes (VSAs) passed to the FortiSwitch unit for authorization. The RADIUS access profile override is mainly
used for administrative logins.
4. In the Administrator field, enter a name for the RADIUS system administrator.
5. Select the user group.
6. Select Wildcard.
7. Select Accprofile Override.
8. Select Add.
The following code creates a RADIUS-system admin group with accprofile-override enabled:
config system admin
edit "RADIUS_Admins"
set remote-auth enable
set accprofile no_access
set wildcard enable
set remote-group "RADIUS_Admins"
set accprofile-override enable
next
Ensure that the RADIUS server is configured to send the appropriate VSA.
To send an appropriate group membership and access profile, set VSA 1 and VSA 6, as in the following code:
VENDOR fortinet 12356
ATTRIBUTE Fortinet-Group-Name 1 <admin profile>
ATTRIBUTE Fortinet-Access-Profile 6 <access profile>
The value of VSA 1 must match the remote group, and VSA 6 must match a valid access profile.
Using PKI
You can use Public Key Infrastructure (PKI) to require administrators to provide a valid certificate when logging in
with HTTPS.
For example:
config user peer
edit pki_peer_1
set ca Fortinet_CA
next
end
For example:
config user group
edit pki_group_1
set member pki_peer_1
next
end
For example:
config system admin
edit pki_admin_1
set peer-auth enable
set peer-group pki_group_1
next
end
You can enable various security checks for incoming TCP/UDP packets. The packet is dropped if the system
detects the specified condition. Use the appropriate syntax for your FortiSwitch model:
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
tcp-port-eq TCP packet with source and destination TCP port 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 port equal. disable
Logging
FortiSwitchOS provides a robust logging environment that enables you to monitor, store, and report traffic
information and FortiSwitch events, including attempted log ins and hardware status. Depending on your
requirements, you can log to a number of different hosts.
Go to Log > Event Log > System, Log > Event Log > Router, or Log > Event Log > User.
Syslog server
Sysog is an industry standard for collecting log messages for off-site storage. You can send logs to a single syslog
server. The syslog server can be configured in the GUI or CLI. Reliable syslog (RFC 6587) can be configured only
in the CLI.
end
For example, to set the source IP address of a syslog server to have an IP address of 192.168.4.5:
config log syslogd setting
set status enable
set source-ip 192.168.4.5
end
For example:
config log syslogd setting
set status enable
set source-ip 192.168.4.5
set mode reliable
set port 6514 // This is the default port used for reliable syslog.
set enc-algorithm high-medium
set certificate "155-sub-client"
end
Fault relays are normally closed relays. When the FSR-112D-POE loses power, the relay contact is in a closed
state, and the alarm circuit is triggered.
Starting in FortiSwitchOS 6.2.0, you can use both IPv4 and IPv6 addresses with SSH and Telnet. If the IPv6
address is a link-local address, you must specify an output interface using %. For example:
execute ssh admin@fe80::926c:acff:fe7b:e059%vlan20 // vlan20 is the output interface.
execute ssh [email protected]
execute ssh 1002::21
execute ssh 12.345.6.78
execute telnet fe80::926c:acff:fe7b:e059%vlan20 // vlan20 is the output interface.
execute telnet 1002::21
execute telnet 12.345.6.78
Configuring SNMP
Simple Network Management Protocol (SNMP) enables you to monitor hardware on your network.
The FortiSwitch SNMP implementation is read-only. SNMP v1-compliant and v2c-compliant SNMP managers
have read-only access to FortiSwitch system information through queries and can receive trap messages from the
FortiSwitch unit.
To monitor FortiSwitch system information and receive FortiSwitch traps, you must first compile the Fortinet and
FortiSwitch management information base (MIB) files. A MIB is a text file that describes a list of SNMP data
objects that are used by the SNMP manager. These MIBs provide information that the SNMP manager needs to
interpret the SNMP trap, event, and query messages sent by the FortiSwitch SNMP agent.
FortiSwitch core MIB files are available for download by going to System > Config > SNMP > Settings and
selecting the FortiSwitch MIB File download link.
SNMP access
Ensure that the management VLAN has SNMP added to the access-profiles.
NOTE: Re-enter the existing allowed access types and add snmp to the list.
SNMP agent
SNMP community
An SNMP community is a grouping of devices for network administration purposes. Within that SNMP community,
devices can communicate by sending and receiving traps and other information. One device can belong to
multiple communities, such as one administrator terminal monitoring both a FortiGate SNMP and a FortiSwitch
SNMP community.
Add SNMP communities to your FortiSwitch unit so that SNMP managers can connect to view system information
and receive SNMP traps.
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 FortiSwitch unit for a different set of events.
You can also add the IP addresses of up to eight SNMP managers for each community.
SSL configuration
You can set strong cryptography and select which certificates are used by the FortiSwitch unit.
Use the following command to display the list of configuration file revisions:
execute revision list config
The FortiSwitch unit assigns a numerical ID to each configuration file. To display a particular configuration file
contents, use the following command and specify the ID of the configuration file:
execute revision show config id <ID number>
The following example displays the configuration file contents for revision ID 62:
#config-version=FS1D24-3.04-FW-build171-160201:opmode=0:vdom=0:user=admin
#conf_file_ver=1784779075679102577
#buildno=0171
#global_vdom=1
config system global
set admin-concurrent enable
...
(output truncated)
IP conflict detection
IP conflicts can occur when two systems on the same network are using the same IP address. The FortiSwitch
unit monitors the network for conflicts and raises a system log message and an SNMP trap when it detects a
conflict.
The IP conflict detection feature provides two methods to detect a conflict. The first method relies on a remote
device to send a broadcast ARP (Address Resolution Protocol) packet claiming ownership of a particular IP
address. If the IP address in the source field of that ARP packet matches any of the system interfaces associated
with the receiving FortiSwitch system, the system logs a message and raises an SNMP trap.
For the second method, the FortiSwitch unit actively broadcasts gratuitous ARP packets when any of the following
events occurs:
l System boot-up
l Interface status changes from down to up
l IP address change
If a system is using the same IP address, the FortiSwitch unit receives a reply to the gratuitous ARP. If it receives a
reply, the system logs a message.
A flapping port is a port that changes status rapidly from up to down. A flapping port can create instability in
protocols such as STP. If a port is flapping, STP must continually recalculate the role for each port. Flap guard
also prevents unwanted access to the physical ports.
The port flap guard detects how many times a port changes status during a specified number of seconds, and the
system shuts down the port if necessary. You can manually reset the port and restore it to the active state.
the “triggered” state. You can change the setting so that the triggered state remains after a switch is rebooting until
the port is reset. See Resetting a port on page 65.
The flap rate counts how many times a port changes status during a specified number of seconds. The range is 1
to 30 with a default setting of 5.
The flap duration is the number of seconds during which the flap rate is counted. The range is 5 to 300 seconds
with a default setting of 30 seconds.
The flap timeout (CLI only) is the number of minutes before the flap guard is reset. The range is 0 to 120 minutes.
The default setting of 0 means that there is no timeout.
NOTE:
l If a triggered port times out while the switch is in a down state, the port is initially in a triggered state until the switch
has fully booted up and calculated that the timeout has occurred.
l The following models do not store time across reboot; therefore, any triggered port is initially in a triggered state until
the switch has fully booted up—at which point the trigger is cleared:
o FS-1xxE
o FS-2xxD/E
o FS-4xxD
o FS-4xxE
For example:
config switch physical-port
edit port10
set flapguard enabled
set flap-rate 15
set flap-duration 100
set flap-timeout 30
end
Resetting a port
After the flap guard detects that a port is changing status rapidly and the system shuts down the port, you can
reset the port and restore it to service.
For example:
execute flapguard reset port15
For example:
show switch physical-port port10
Use the following command to display the port flap guard information for all ports:
diagnose flapguard status
Link monitor
You can monitor the link to a server. The FortiSwitch unit sends periodic ping messages to test that the server is
available. In the CLI, you can use both IPv4 and IPv6 addresses.
Variable Description
addr-mode {ipv4 |
Select whether to use IPv4 or IPv6 addresses. The default is IPv4 addresses.
ipv6}
protocol {arp | ping} Protocols used to detect the server. Select ARP or ping.
gateway-ip Gateway IPv4 address used to PING the server. This option is available only when
<IPv4 address> addr-mode is set to ipv4.
gateway-ip6 <IPv6 Gateway IPv6 address used to PING the server. This option is available only when
address> addr-mode is set to ipv6.
source-ip Source IPv4 address used in packet to the server. This option is available only when
<IPv4 address> addr-mode is set to ipv4.
source-ip6 <IPv6 Source IPv6 address used in packet to the server. This option is available only when
address> addr-mode is set to ipv6.
failtime <integer> Number of retry attempts before bringing the server down. The range is 1-10.
recoverytime
Number of retry attempts before bringing the server up. The range is 1-10.
<integer>
status {enable |
Enable or disable link monitor administrative status. The default is enabled.
disable}
Unicast hashing
You can configure the trunk hashing algorithm for unicast packets to use the source port:
config switch global
set trunk-hash-unicast-src-port {enable | disable}
end
By default, all FortiSwitch models use the store-and-forward technique to forward packets. This technique waits
until the entire packet is received, verifies the content, and then forwards the packet.
The FS-1024D, FS-1048D, and FS-3032D models also have a cut-through switching mode to reduce latency.
This technique forwards the packet as soon as the switch receives it.
NOTE: For the FS-3032D model, the cut-through switching mode is not supported on split ports.
To change the switching mode for the main buffer for these three models, use the following commands:
config switch global
set packet-buffer-mode {store-forward | cut-through}
end
NOTE: Changing the switching mode might stop traffic on all ports during the change.
NOTE: These commands apply only to the 200 Series and 400 Series.
If you want to use layer-3 interfaces and IGMP snooping on certain FortiSwitch models, you must enable the
forwarding of reserved multicast packets and IPv6 neighbor-discovery packets to the CPU. These features are
enabled by default.
config switch global
set reserved-mcast-to-cpu {enable | disable}
set neighbor-discovery-to-cpu {enable | disable}
end
By default, ARP entries in the cache are removed after 300 seconds. Use the following commands to change the
default ARP timeout value:
config system global
set arp-timeout <seconds>
end
Power over Ethernet (PoE) describes any system that passes electric power along with data on twisted pair
Ethernet cabling. Doing this allows a single cable to provide both data connection and electric power to devices
(for example, wireless access points, IP cameras, and VoIP phones).
PoE is only available on models with the POE suffix in the model number (for example, FS-
108E-POE).
When power to PoE ports is allocated by priority, lower numbered ports have higher priority so that port 1 has the
highest priority. When more power is needed than is available, higher numbered ports are disabled first.
When power to PoE ports is allocated by first-come, first-served (FCFS), connected PoE devices receive power,
but new devices do not receive power if there is not enough power.
If both priority power allocation and FCFS power allocation are selected, the physical port setting takes
precedence over the global setting.
For the other FortiSwitch PoE models, PoE pre-standard detection is set on
each port.
If your FortiSwitch unit has a PoE sensor, you can set an alarm for when the current power budget exceeds a
specified percentage of the total power budget. When this threshold is exceeded, log messages and SNMP traps
are generated. The default threshold is 80 percent.
7. Select Update.
Creating a schedule
Use schedules to control when policies are enforced. For example, you can use a schedule to control when an
access control list policy is enforced.
l Use a one-time schedule when you want a policy enforced for a specified period.
l Use a recurring schedule when you want a policy enforced for specified hours and days every week.
l Use a group schedule to combine one-time schedules and recurring schedules.
For example:
config system schedule onetime
edit schedule1
set start 07:00 2019/03/22
set end 07:00 2019/03/29
end
For example:
config system schedule recurring
edit schedule2
set day monday wednesday friday
set start 07:00
set end 08:00
end
For example:
config system schedule group
edit group1
set member schedule1 schedule2
end
Overlapping subnets
You can use the set allow-subnet-inteface command to allow two interfaces to include the same IP
address in the same subnet. The command applies only between the mgmt interface and an internal interface.
NOTE: Different interfaces cannot have overlapping IP addresses or subnets. The same IP address can be used on
different switches.
For example:
config system global
set admintimeout 480
set allow-subnet-overlap enable
set auto-isl enable
end
Use Precision Time Protocol (PTP) transparent-clock mode to measure the overall path delay for packets in a
network to improve the time precision. There are two transparent-clock modes:
end
For example:
config switch ptp settings
set mode transparent-e2e
end
Use the auto topology feature to automatically form an inter-switch link (ISL) between two switches. You need to
enable the feature and specify the mgmt-vlan. The mgmt-vlan is the VLAN to use for the native VLAN on ISL ports
and the native VLAN on the internal switch interface.
NOTE: Do not use the same VLAN for the mgmt-vlan and an exisiting switched virtual interface (SVI).
config switch auto-network
set mgmt-vlan <1-4094>
set status {enable | disable}
end
For example:
config switch auto-network
set mgmt-vlan 101
set status enable
end
The following sections describe the configuration settings that are associated with FortiSwitch physical ports:
To clear the statistics on all ports, select Select All and then select Reset Stats.
To clear the statistics on some of the ports, select the ports and then select Reset Stats.
For example:
diagnose switch physical-ports port-stats list 1,3,4-6
To clear all hardware counters (except for QoS, SNMP, and web GUI counters) on the specified ports:
diagnose switch physical-ports set-counter-zero [<list_of_ports>]
To restore hardware counters (except for QoS, SNMP, and web GUI counters) on the specified ports:
diagnose switch physical-ports set-counter-revert [<list_of_ports>]
Flow control allows you to configure a port to send or receive a “pause frame” (that is, a special packet that signals
a source to stop sending flows for a specific time interval because the buffer is full). By default, flow control is
disabled on all ports.
config switch physical-port
edit <port_name>
set flow-control {both | rx | tx | disable}
end
After you enable priority-based flow control, you then configure whether a port sends or receives a priority-based
control frame:
config switch physical-port
edit <port_name>
set priority-based-flow-control enable
set flow-control {both | rx | tx | disable}
end
When priority-based flow control is disabled, 802.3 flow control can be used.
NOTE: Priority-based flow control does not support half-duplex speed. When FortiSwitch ports are set to autonegotiate
the port speed (the default), priority-based flow control is available if the FortiSwitch model supports it. Lossless buffer
management and traffic class mapping are not supported.
If you enable flow control to transmit pause control frames (with the set flow-control tx command), you can
also use ingress pause metering to limit the input bandwidth of an ingress port. Because ingress pause metering
stops the traffic temporarily instead of dropping it, ingress pause metering can provide better performance than
policing when the port is connected to a server or end station. To use ingress pause metering, you need to set the
ingress metering rate in kilobits and set the percentage of the threshold for resuming traffic on the ingress port.
config switch physical-port
edit <port_name>
set flow-control tx
set pause-meter-rate <64–2147483647; set to 0 to disable>
set pause-resume {25% | 50% | 75%}
next
end
For example:
config switch physical-port
edit port29
set flow-control tx
set pause-meter-rate 900
set pause-resume 50%
next
end
When you enable auto-module speed detection, the system reads information from the module and sets the port
speed to the maximum speed that is advertised by the module. If the system encounters a problem when reading
from the module, it sets the default speed (default value is platform specific).
When auto-module sets the speed, the system creates a log entry noting this speed.
NOTE: Auto-speed detection is supported on 1/10G ports, but not on higher speed ports (such as 40G).
By default, all of the FortiSwitch user ports are set to autonegotiate the port speed. You can also manually set the
port speed. The port speeds available differ, depending on the port and switch.
The Fortinet data center switches support LLDP (transmission and reception). The link layer discovery protocol
(LLDP) is a vendor-neutral layer-2 protocol that enables devices on a layer-2 segment to discover information
about each other.
You can enable PoE, configure dynamic guard band, and set the priority power allocation for a specific port.
The dynamic guard band is set automatically to the expected power of a port before turning on the port. So, when
a PoE device is plugged in, the dynamic guard band is set to the maximum power of the device type based on the
AF or AT mode. The AF mode DGB is 15.4 W, and the AT mode DGB is 36 W. When the FortiSwitch unit is fully
loaded, the dynamic guard band prevents a new PoE device from turning on.
When power to PoE ports is allocated by priority, lower numbered ports have higher priority so that port 1 has the
highest priority. When more power is needed than is available, higher numbered ports are disabled first.
When power to PoE ports is allocated by first-come, first-served (FCFS), connected PoE devices receive power,
but new devices do not receive power if there is not enough power.
If both priority power allocation and FCFS power allocation are selected, the physical port setting takes
precedence over the global setting.
PoE pre-standard detection is a global setting for the following FortiSwitch models:
FSR-112D-POE, FS-548D-FPOE, FS-524D-FPOE, FS-108D-POE, FS-224D-POE,
FS-108E-POE, FS-108E-FPOE, FS-124E-POE, and FS-124E-FPOE.
For the other FortiSwitch PoE models, PoE pre-standard detection is set on each port.
Go to Switch > Port > Physical. The Power column displays the power capacity for each PoE port.
Go to Switch > Port > Physical to see information about each PoE port. Hover over the traffic column to get
specific values.
Energy-efficient Ethernet
When no data is being transferred through a port, energy-efficient Ethernet (EEE) puts the data link in sleep mode
to reduce the power consumption of the FortiSwitch unit. When data flows through the port, the port resumes
using the normal amount of power. EEE works over standard twisted-pair copper cables and supports 10 Mbps,
100 Mbps, 1 Gps, and 10 Ge. EEE does not reduce bandwidth or throughput.
If you are using the CLI, you can also specify the number of microseconds that circuits are turned off to save
power and the number of microseconds during which no data is transmitted while the circuits that were turned off
are being restarted.
In addition, you can use the LLDP 802.3 TLV to advertise the EEE configuration.
To check which ports have EEE enabled, go to Switch > Port > Physical. A green arrow in the EEE column
indicates that EEE is enabled for that port. A red arrow in the EEE column indicates that EEE is disabled for that
port.
NOTE: When you change the eee-tx-wake-time value, the port resets, and the connection is lost briefly.
config switch physical-port
edit <port_name>
set energy-efficient-ethernet {enable | disable}
set eee-tx-idle-time <0-2560>
set eee-tx-wake-time <0-2560>
end
With diagnostic monitoring interface (DMI), you can view the following information
Use the following commands to enable or disable DMI status for the port. If you set the status to global, the port
setting will match the global setting:
config switch physical-port
edit <interface>
set dmi-status {disable | enable | global}
end
Use the get switch modules detail/status command to display DMI information:
FS108E3W14000720 # 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
The following is an example of the output for the switch modules status command:
FS108E3W14000720 # get switch modules status port9
____________________________________________________________
Port(port9)
alarm_flags 0x0040
warning_flags 0x0040
temperature 18.792969 C
voltage 3.315100 volts
laser_bias 0.750800 mAmps
tx_power -2.502637 dBm
rx_power -40.000000 dBm
options 0x000F ( TX_DISABLE TX_FAULT RX_LOSS TX_POWER_LEVEL1 )
options_status 0x000C ( RX_LOSS TX_POWER_LEVEL1 )
On FortiSwitch models that provide 40G QSFP (quad small form-factor pluggable) interfaces, you can install a
breakout cable to convert one 40G interface into four 10G interfaces.
Notes
l Splitting ports is supported on the following FortiSwitch models:
o 3032D (ports 5 to 28 are splittable)
o 3032E (Ports can be split into 4 x 25G when configured in 100G QSFP28 mode or can be split into 4 x 10G
when configured in 40G QSFP mode. Use the set <port-name>-phy-mode disabled command to
disable some 100G ports to allow up to sixty 25G, 10G, or 1G ports.)
o 524D, 524D-FPOE (ports 29 and 30 are splittable)
o 548D, 548D-FPOE (ports 53 and 54 are splittable)
o 1048E (In the 4 x 100G configuration, ports 49, 50, 51, and 52 are splittable as 4 x 25G, 4 x 10G, 4 x 1G, or 2
x 50G. Only two of the available ports can be split.)
o 1048E (In the 4 x 4 x 25G configuration, ports 49, 50, 51, and 52 are splittable as 4 x 4 x 25G or 2 x 50G. All
four ports can be split, but ports 47 and 48 are disabled.)
o 1048E (In the 6 x 40G configuration, ports 49, 50, 51, 52, 53, 54 are splittable as 4 x 10G or 4 x 1G.)
Use the set port-configuration ? command to check which ports are supported for each model.
l Currently, the maximum number of ports supported in software is 64 (including the management port). Therefore,
only 10 QSFP ports can be split. This limitation applies to all of the models, but only the 3032D, the 3032E, and the
1048E models have enough ports to encounter this limit.
l Starting in FortiOS 6.2.0, splitting ports is supported in FortiLink mode (that is, the FortiSwitch unit managed by a
FortiGate unit).
l Starting in FortiSwitchOS 6.4.0, FC-FEC (cl74) is enabled as the default setting for ports that have been split to
4x25G. Use the following commands to change the setting:
config switch physical-port
edit <split_port_name>
set fec-state {cl74 | disabled}
end
In the following example, a FortiSwitch 1048E model is configured so that each port is split into four subports of 25
Gbps each.
config switch phy-mode
set port-configuration 4x4x25G
set port49-phy-mode 4x25G
set port50-phy-mode 4x25G
set port51-phy-mode 4x25G
set port52-phy-mode 4x25G
end
The system applies the configuration only after you enter the end command, displaying the following message:
This change will cause a ports to be added and removed, this will cause loss of
configuration on removed ports. The system will have to reboot to apply this
change.
Do you want to continue? (y/n)y
To configure one of the split ports, use the notation ".x" to specify the split port:
config switch physical-port
edit "port1"
set lldp-profile "default-auto-isl"
set speed 40000full
next
edit "port2"
set lldp-profile "default-auto-isl"
set speed 40000full
next
edit "port3"
set lldp-profile "default-auto-isl"
set speed 40000full
next
edit "port4"
set lldp-profile "default-auto-isl"
set speed 40000full
next
edit "port5.1"
set speed 10000full
next
edit "port5.2"
set speed 10000full
next
edit "port5.3"
set speed 10000full
next
edit "port5.4"
set speed 10000full
next
end
On FortiSwitch models with QSFP (quad small form-factor pluggable) ports, you can enable or disable the low-
power mode with the following CLI commands:
config switch physical-port
edit <port_name>
set qsfp-low-power-mode {enabled | disabled}
end
For example:
config switch physical-port
edit port12
set qsfp-low-power-mode disabled
end
You can use the CLI to loop a physical port back on itself, either locally or remotely:
l The local loopback is a physical-layer loopback. If the hardware does not support a physical-layer loopback, a MAC-
address loopback is used instead.
l The remote loopback is a physical-layer lineside loopback.
By default this feature is disabled.
Layer-2 interfaces
Switched interfaces
Default configuration will suffice for regular switch ports. By default, VLAN is set to 1, STP is enabled, and all other
optional capabilities are disabled.
You can configure optional capabilities such as Spanning Tree Protocol, sFlow , 802.1x authentication, and
Private VLANs. These capabilities are covered in subsequent sections of this document.
You can enable or disable dynamic MAC address learning on a port. The existing dynamic MAC entries are
deleted when you change this setting. If you disable MAC address learning, you can set the behavior for an
incoming packet with an unknown MAC address (to drop or forward the packet).
You can limit the number of learned MAC addresses on an interface or VLAN. The limit ranges from 1 to 128. If the
learning limit is set to zero (the default), no limit exists. When the limit is exceeded, the FortiSwitch unit adds a
warning to the system log.
NOTE: If you enable 802.1x MAC-based authorization on a port, you cannot change the l2-learning setting.
To enable or disable the learning-limit violation log, use the following commands. By default, the learning-limit
violation log is disabled. The most recent violation that occurred on each interface or VLAN is logged. After that,
no more violations are logged until the log is reset for the triggered interface or VLAN. Only the most recent 128
violations are displayed in the console.
NOTE: The set log-mac-limit-violations command is only displayed if your FortiSwitch model supports it.
config switch global
set log-mac-limit-violations {enable | disable}
end
To view the content of the learning-limit violation log, use one of the following commands:
l get switch mac-limit-violations all—to see 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.
l get switch mac-limit-violations interface <interface_name>—to see the first MAC address that
exceeded the learning limit on a specific interface
l get switch mac-limit-violations vlan <VLAN_ID>—to see the first MAC address that exceeded the
learning limit on a specific VLAN. This command is only displayed if your FortiSwitch model supports it.
To reset the learning-limit violation log, use one of the following commands:
For example:
config switch global
set log-mac-limit-violations enable
set mac-violation-timer 60
end
You can make dynamically learned MAC addresses persistent when the status of a FortiSwitch port changes
(goes down or up). By default, MAC addresses are not persistent.
NOTE:
To delete the persistent MAC addresses instead of saving them in the FortiSwitch configuration file:
Use the following command to configure the persistence of MAC addresses on an interface:
config switch interface
edit <port>
set sticky-mac <enable | disable>
next
end
You can also save persistent MAC addresses to the FortiSwitch configuration file so that they are automatically
loaded when the FortiSwitch unit is rebooted. By default, persistent entries are lost when a FortiSwitch unit is
rebooted. Use the following command to save persistent MAC addresses for a specific interface or all interfaces:
execute sticky-mac save {all | interface <interface_name>}
Use the following command to delete the persistent MAC addresses instead of saving them in the FortiSwitch
configuration file:
execute sticky-mac delete-unsaved {all | interface <interface_name>}
For example:
config switch static-mac
edit 1
set description "first static MAC address"
set interface port10
set mac d6:dd:25:be:2c:43
set type static
set vlan-id 10
end
Loop guard
A loop in a layer-2 network results in broadcast storms that have far-reaching and unwanted effects. Loop guard
helps to prevent loops. When loop guard is enabled on a switch port, the port monitors its subtending network for
any downstream loops.
The loop guard feature is designed to work in concert with STP rather than as a replacement for STP. Each port
that has loop guard enabled will periodically broadcast loop guard data packets (LGDP) packets to its network. If a
broadcast packet is subsequently received by the sending port, a loop exists downstream.
You can also have the port check for a high rate of MAC address moves per second, which indicates a physical
loop only when the rate exceeds the threshold for 6 consecutive seconds.
NOTE: If a port detects a loop, the system takes the port out of service to protect the overall network. The port returns to
service after a configured timeout duration. If the timeout value is zero, you must manually reset the port.
By default, loop guard is disabled on all ports. When loop guard is enabled, the default loop-guard-timeout is
45 minutes, and the default loop-guard-mac-move-threshold is 0, which means that the traditional loop
guard is used instead of the MAC-move loop guard.
1. Go to Switch > Interface > Physical or Switch > Interface > Trunk.
2. Select one or more interfaces to update and then select Edit.
If you selected more than one port, the port names are displayed in the name field, separated by commas.
3. Select Enable Loop Guard.
4. Select OK to save your changes.
When loop guard takes a port out of service, the system creates the following log messages:
Loop Guard: loop detected on <port_name>. Shutting down <port_name>
Go to Switch > Interface > Physical and check the Loop Guard column.
FortiSwitch ports process tagged and untagged Ethernet frames. Untagged frames do not carry any
VLAN information.
Tagged frames include an additional header (the 802.1Q header) after the Source MAC address. This header
includes a VLAN ID. This allows the VLAN value to be transmitted between switches.
The FortiSwitch unit provides port parameters to configure and manage VLAN tagging.
Native VLAN
You can configure a native VLAN for each port. The native VLAN is like a default VLAN for untagged incoming
packets. Outgoing packets for the native VLAN are sent as untagged frames.
The native VLAN is assigned to any untagged packet arriving at an ingress port.
At an egress port, if the packet tag matches the native VLAN, the packet is sent out without the VLAN header.
The allowed VLAN list for each port specifies the VLAN tag values for which the port can transmit or receive
packets.
For a tagged packet arriving at an ingress port, the tag value must match a VLAN on the allowed VLAN list or the
native VLAN.
At an egress port, the packet tag must match the native VLAN or a VLAN on the allowed VLAN list.
The untagged VLAN list on a port specifies the VLAN tag values for which the port will transmit packets without the
VLAN tag. Any VLAN in the untagged VLAN list must also be a member of the allowed VLAN list.
Packet processing
Ingress processing ensures that the port accepts only packets with allowed VLAN values (untagged packets are
assigned the native VLAN, which is implicitly allowed). At this point, all packets are now tagged with a valid VLAN.
The packet is sent to each egress port that can send the packet (because the packet tag value matches the native
VLAN or an Allowed VLAN on the port).
Ingress port
Untagged packet
l tag VLAN value must match an Allowed VLAN or the native VLAN
l packet retains the VLAN tag and is allowed to proceed
To control what types of frames are accepted by the port, use the following commands:
config switch interface
edit <interface>
set discard-mode <all-tagged | all-untagged | none>
end
Variable Description
all-tagged Tagged frames are discarded, and untagged frames can enter the switch.
all-untagged Untagged frames are discarded, and tagged frames can enter the switch.
none By default, all frames can enter the switch, and no frames are discarded.
Egress port
All packets that arrive at an egress port are tagged packets.
If the packet tag value is on the Allowed VLAN list, the packet is sent out with the existing tag.
If the packet tag value is the native VLAN or on the Untagged VLAN list, the tag is stripped, and then the packet is
sent out.
Configuring VLANs
Example 1
Purple flow
An untagged packet arriving at Port3 is assigned VLAN 100 (the native VLAN) and flows to all egress ports that
will send VLAN 100 (Port1 and Port4).
A tagged packet (VLAN 100) arriving at Port4 is allowed (VLAN 100 is allowed). The packet is sent out from Port1
and Port3. On Port3, VLAN 100 is the native VLAN, so the packet is sent without a VLAN tag.
Blue flow
An untagged packet arriving at Port 4 is assigned VLAN 300 (the native VLAN). Then it flows out all ports that will
send Vlan300 (Port 3).
A tagged packet (VLAN 300) arriving at Port3 is allowed. The packet is sent to egress from Port4. VLAN 300 is the
native VLAN on Port4, so the packet is sent without a VLAN tag.
Example 2
Green flow
Between Port1 and Port2, packets are assigned to VLAN 1 at ingress, and then the tag is removed at egress.
Blue flow
Incoming on Port 3, a tagged packet with VLAN value 100 is allowed, because 100 is the Port 3 native VLAN (the
hardware VLAN table accepts a tagged or untagged match to a valid VLAN).
The packet will be sent on port1 and port4 (with packet tag 100).
VLAN stacking allows you to have multiple VLAN headers in an Ethernet frame. The value of the EtherType field
specifies where the VLAN header is placed in the Ethernet frame.
Use the VLAN TPID profile to specify the value of the EtherType field. The FortiSwitch unit supports a maximum of
four VLAN TPID profiles, including the default (0x8100). The default VLAN TPID profile (0x8100) cannot be
deleted or changed.
124D, 224D-FPOE, 248D, 424D, 424D-POE, 424D-FPOE, 448D, 448D-POE, 448D-FPOE, 224E, 224E-
POE, 248E-POE, 248E-FPOE, 524D, 524D-FPOE, 548D, 548D-FPOE, 1024D, 1048D, 1048E, 3032D,
3032E
NOTE: The following features are not supported with VLAN stacking:
l DHCP relay
l DHCP snooping
l IGMP snooping
l IP source guard
l PVLAN
l STP
NOTE: Settings under config qnq are for customer VLANs (C-VLANs). Other settings such as set allowed-
vlans, set native-vlan, and set vlan-tpid are for service-provider VLANs (S-VLANs).
vlan-tpid <default | string> This setting is only for service-provider VLANs (S-VLANs). default
NOTE: If you are not using the default VLAN TPID profile,
you must have already defined the VLAN TPID profile with
the config switch vlan-tpid command.
config qnq
status {enable | *disable} Enable or disable VLAN stacking (QinQ) mode. disable
edge-type customer If the QinQ mode is enabled, the edge type is set to customer
customer.
remove-inner {enable | If the QinQ mode is enabled, enable or disable whether the disable
*disable} inner tag is removed upon egress.
vlan-tpid <default | string> This setting is only for service-provider VLANs (S-VLANs). default
NOTE: If you are not using the default VLAN TPID profile,
you must have already defined the VLAN TPID profile with
the config switch vlan-tpid command.
config vlan-mapping
match-c-vlan <1-4094> If the direction is set to ingress, enter the customer (inner) 0
VLAN to match.
This option is only available after you set the action to add
or replace for the ingress direction or after you set the
action to replace for the egress direction.
<VLAN_TPID_profile_name> Enter a name for the VLAN TPID profile name. No default
ether-type <0x0001-0xfffe> Enter a hexadecimal value for the EtherType field. 0x8100
l Spanning Tree Protocol, a link-management protocol that ensures a loop-free layer-2 network topology
l Multiple Spanning Tree Protocol (MSTP), which is defined in the IEEE 802.1Q standard
l Per-VLAN Rapid Spanning Tree Protocol (also known as Rapid PVST or RPVST); RSTP is defined in the IEEE
802.1w standard
This chapter covers the following topics:
MSTP supports multiple spanning tree instances, where each instance carries traffic for one or more VLANs (the
mapping of VLANs to instances is configurable).
MSTP is backward-compatible with STP and Rapid Spanning Tree Protocol (RSTP). A layer-2 network can
contain switches that are running MSTP, STP, or RSTP.
MSTP is built on RSTP, so it provides fast recovery from network faults and fast convergence times.
Regions
A region is a set of interconnected switches that have the same multiple spanning tree (MST) configuration (region
name, MST revision number, and VLAN-to-instance mapping). A network can have any number of regions.
Regions are independent of each other because the VLAN-to-instance mapping is different in each region.
The FortiSwitch unit supports 15 MST instances in a region. Multiple VLANs can be mapped to each
MST instance. Each switch in the region must have the identical mapping of VLANs to instances.
The MST region acts like a single bridge to adjacent MST regions and to non-MST STPs.
IST
Instance 0 is a special instance, called the internal spanning-tree instance (IST). IST is a spanning tree that
connects all of the MST switches in a region. All VLANs are assigned to the IST.
IST is the only instance that exchanges bridge protocol data units (BPDUs). The MSTP BPDU contains
information for each MSTP instance (captured in an M-record). The M-records are added to the end of a regular
RSTP BPDU. This allows MSTP region to inter-operate with an RSTP switch.
CST
The common spanning tree (CST) interconnects the MST regions and all instances of STP or RSTP that are
running in the network.
Within the region, a hop-count mechanism is used to age out the BPDU. The IST root sends out BPDUs with the
hop count set to the maximum number of hops. The hop count is decremented each time the BPDU is forwarded.
If the hop count reaches zero, the switch discards the BPDU and ages out the information on the receiving port.
l Designated—One designated port is elected per link (segment). The designated port is the port closest to the root
bridge. This port sends BPDUs on the link (segment) and forwards traffic towards the root bridge. In an STP
converged network, each designated port is in the STP forwarding state.
l Root—The bridge can have only one root port. The root port is the port that leads to the root bridge. In an STP
converged network, the root port is in the STP forwarding state.
l Alternate—Alternate ports lead to the root bridge but are not root ports. The alternate ports maintain the STP
blocking state.
l Backup—This is a special case when two or more ports of the same switch are connected together (either directly
or through shared media). In this case, one port is designated, and the remaining ports are backup (in the STP
blocking state).
A port remains in blocking state only if it continues to receive BPDU messages. If it stops receiving BPDUs (for
example, due to unidirectional link failure), the blocking port (alternate or backup port) becomes designated and
transitions to a forwarding state. In a redundant topology, this situation may create a loop.
If the loop-protection feature is enabled on a port, that port is forced to remain in blocking state, even if the port
stops receiving BPDU messages. It will not transition to forwarding state and does not forward any user traffic.
The loop-protection feature is enabled on a per-port basis. Fortinet recommends that you enable loop protection
on all nondesignated ports (all root, alternate, and backup ports).
MSTP configuration
Settings Guidelines
Select this checkbox if you want the STP packets arriving at any port to
pass through the switch without being processed. If you do not select this
Flood BPDU Packets checkbox, STP packets arriving at any port are blocked.
Settings Guidelines
Name Region name. All switches in the MST region must have the identical name.
Revision The MSTP revision number. All switches in the region must have the same
revision number.
The range of values is 0 to 65535.
The default value is 0.
Hello time is how often (in seconds) that the switch sends out a BPDU.
Hello Time (Seconds) The range of values is 1 to 10.
The default value is 2.
Forward Time (Seconds) Forward time is how long (in seconds) a port will spend in the listening-and-
learning state before transitioning to forwarding state.
The range of values is 4 to 30.
The default value is 15.
Max Hops Maximum hops is used inside the MST region. Hop count is decremented
each time the BPDU is forwarded. If max-hops reaches zero, the switch
discards the BPDU and ages out the information on the receiving port.
The range of values is 1 to 40.
The default value is 20.
2. Select Add Instance to create a new MST instance or select an existing instance and then select Edit.
3. Update the instance parameters as described in the following table.
4. Select Add or Update to save the settings.
Settings Guidelines
ID Instance identifier. The range is 0-32 for 5xx models and higher. For all
other models, the range is 0 - 15.
Priority is a component of bridge ID. The switch with the lowest bridge ID
becomes the root switch for this MST instance.
Priority Allowed values: 0, 4096, 8192, 12288, 16384, 20480, 24576, 28672,
32768, 36864, 40960, 45056, 49152, 53248, 57344, and 61440.
The default value is 32768.
VLAN Range The VLANs that map to this MST instance. You can specify individual
VLAN numbers or a range of numbers.
NOTE: Do not assign any VLAN to more than one MST instance.
Each VLAN number is in the range 1-4094.
Port Configuration
The switch uses port cost to select designated ports. Port cost is added to
the received BPDU root cost in any BPDU sent on this port.
A lower value is preferred. The range of values is 1 to 200,000,000.
The default value depends on the interface speed:
Cost
- 10 Gigabit Ethernet: 2,000
- Gigabit Ethernet: 20,000
- Fast Ethernet: 200,000
- Ethernet: 2,000,000
Settings Guidelines
Priority The switch uses port priority to choose among ports of the same cost. The
port with the lowest priority is put into forwarding state. The valid values are:
0, 32, 64, 96, 128, 160, 192, and 224.
The default value is 128.
Example:
config switch stp instance
edit "1"
set priority 8192
config stp-port
edit "port18"
set cost 0
set priority 128
next
edit "port19"
set cost 0
set priority 128
next
end
set vlan-range 5 7 11-20
end
l You must define the port as an edge port with the set edge-port enabled command.
l You must enable STP on the switch interface with the set stp-state enabled command.
l You must enable STP on the global level with the set status enable command.
You can set how long the port will go down for when a BPDU is received for a maximum of 120 minutes. The
default port timeout is 5 minutes. If you set the timeout value to 0, the port will not go down when a BPDU is
received, but you will have manually reset the port.
To check if BPDU guard has been triggered and on which ports, go to Switch > Monitor > BPDU Guard.
For example, to enable BPDU guard on port 30 with a timeout value of 1 hour:
config switch stp settings
set status enable
end
config switch interface
edit port30
set stp-state enabled
set edge-port enabled
set stp-bpdu-guard enabled
set stp-bpdu-guard-timeout 60
next
end
If you set the port timeout to 0, you will need to reset the port after it receives BPDUs and goes down. Use the
following command to reset the port:
execute bpdu-guard reset <port_name>
To check if BPDU guard has been triggered and on which ports, use the following command:
diagnose bpdu-guard display status
port1 disabled - - - -
port2 disabled - - - -
port3 disabled - - - -
port4 disabled - - - -
port5 disabled - - - -
port6 disabled - - - -
port7 disabled - - - -
port8 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 - - - -
port25 disabled - - - -
port26 disabled - - - -
port27 disabled - - - -
port28 disabled - - - -
port29 disabled - - - -
port30 enabled - 60 0 -
__FoRtI1LiNk0__ disabled - - - -
You can also check BPDU guard by going to the Monitor > BPDU Guard page:
A boundary port on an MST switch is a port that receives an STP (version 0) BPDU, an RSTP (version 2) BPDU,
or a BPDU from a different MST region.
If the port receives a version 0 BPDU, it will only send version 0 BPDUs on that port. Otherwise, it will send version
3 (MST) BPDUs because the RSTP switch will read this as an RSTP BPDU.
Use the following commands to display information about the MSTP instances in the network:
diagnose stp instance list
diagnose stp vlan list
Starting in FortiSwitchOS 6.2.2, FortiSwitch units can now interoperate with a network that is running RPVST+.
The existing networkʼs configuration can be maintained while adding FortiSwitch units as an extended region.
When an MSTP domain is connected with an RPVST+ domain, FortiSwitch interoperation with the RPVST+
domain works in two ways:
l If the root bridge for the CIST is within an MSTP region, the boundary FortiSwitch unit of the MSTP region duplicates
instance 0 information, creates one BPDU for every VLAN, and sends the BPDUs to the RPVST+ domain.
In this case, follow this rule: If the root bridge for the CIST is within an MSTP region, VLANs other than VLAN 1
defined in the RPVST+ domains must have their bridge priorities worse (numerically greater) than that of the CIST
root bridge within MSTP region.
l If the root bridge for the CIST is within an RPVST+ domain, the boundary FortiSwitch unit processes only the VLAN
1 information received from the RPVST+ domain. The other BPDUs (VLANs 2 and above) sent from the connected
RPVST+ domain are used only for consistency checks.
In this case, follow this rule: If the root bridge for the CIST is within the RPVST+ domain, the root bridge priority of
VLANs other than VLAN 1 within that domain must be better (numerically less) than that of VLAN 1.
Enable the RPVST+ interoperation support on the appropriate switch port or trunk.
config switch interface
edit <interface_name>
set allowed-vlans <one or more VLANs> // The VLANs must be configured for RSTP.
set rpvst-port enabled
next
end
next
end
Note: A maximum of 16 VLANs is supported; the maximum number of VLANs includes native VLANs. You must
configure the same VLANs as those used in the RPVST+ domain.
If either rule is violated, the RPVST port is flagged with “IC” in the command output, and the port is in the Discard
state.
If the VLANs used by the RPVST+ domain are not all within the VLAN range configured on the RPVST port, an “MV”
flag is displayed in the command output. NOTE: Only the ports in instance 0 show this flag.
This command shows the status of one port or all ports. If any of the ports is in the “IC” state, the command output
gives the reason: VLAN priority inconsistent, VLAN configuration mismatch, or both.
This command clears all flags and timers on the RPVST+ port.
This chapter provides information on how to configure a link aggregation group (LAG). For LAG control, the
FortiSwitch unit supports the industry-standard Link Aggregation Control Protocol (LACP). The FortiSwitch unit
supports LACP in active and passive modes. In active mode, you can optionally specify the minimum and
maximum number of active members in a trunk group.
You can also use the CLI to specify how an aggregator groups ports when the trunk is in LACP mode. Ports can
be grouped into the aggregator with the largest bandwidth or the aggregator with the most ports.
The FortiSwitch unit supports flap-guard protection for switch ports in a LAG.
end
Example configuration
The following is an example CLI configurations for trunk/LAG ports:
Trunk/LAG ports
1. Configure the trunk 1 interface and assign member ports as a LAG group:
config switch trunk
edit trunk1
set members "port1" "port2" "port3"
set description test
set mode lacp-passive
set port-selection-criteria src-dst-ip
end
2. Configure the switch ports to have native VLAN assignments and allow those VLANs on the port that will be the
uplink port:
config switch interface
edit port1
set native-vlan 1
next
edit port2
set native-vlan 2
next
edit port3
set native-vlan 3
next
edit port4
set native-vlan 4
set allowed vlans 1 2 3
next
edit port5
set native-vlan 5
set allowed-vlans 1 2 3
end
end
3. Configure the trunk 2 interface and assign member ports as a LAG group:
config switch trunk
edit trunk2
set members "port4" "port5"
set description test
set mode lacp-passive
set port-selection criteria src-dst-ip
end
end
Go to Switch > Port > Trunk or Switch > Monitor > Trunks.
MCLAG
A link aggregation group (LAG) provides link-level redundancy. A multichassis LAG (MCLAG) provides node-level
redundancy by grouping two FortiSwitch models together so that they appear as a single switch on the network. If
either switch fails, the MCLAG continues to function without any interruption, increasing network resiliency and
eliminating the delays associated with the Spanning Tree Protocol (STP).
Notes
l When min_bundle or max_bundle is combined with MCLAG, the bundle limit properties are applied only to the local
aggregate interface.
l Fortinet recommends that both peer switches be of the same hardware model and same software version.
Mismatched configurations might work but are unsupported.
l There is a maximum of two FortiSwitch models per MCLAG.
l The routing feature is not available within a MCLAG.
l Starting in FortiSwitchOS 3.6.4, by default, the MCLAG can use the STP.
l To use static MAC addresses within a MCLAG, you need to configure MAC addresses on both switches that form
the LAG.
l When you run an MCLAG, Fortinet recommends but does not require that peers use the same hardware and
software versions. Some hosts might not be dual-home supported when MCLAG peers have different hardware;
administrators need to size the layer-2 network to the MCLAG peer with the lowest capacity.
Example configuration
When the split-brain state occurs, one of switches in the MCLAG goes dormant. Any devices connected to the
dormant switch will lose network connectivity. The switch that goes dormant is the switch with the lowest
numerical MAC address between the two peers.
Starting in FortiSwitchOS 6.2.2, you can use the CLI to detect when an MCLAG is in a split-brain state when the
MCLAG ICL trunk is down. When the LACP is up again, the MCLAG trunk is reestablished. You can use this
command in both one-tier and two-tier MCLAG topologies.
By default, split-brain detection is disabled. To enable the detection of the split-brain state:
config switch global
set mclag-split-brain-detect enable
end
NOTE:
l Enabling split-brain detection can cause some traffic loss while the LACP is renegotiated.
l You can configure only one mclag-split-brain-detect at a time on a tier one or tier two of a two-tier MCLAG topology.
l Only one failure in a system is supported.
For IGMP snooping to work correctly in an MCLAG, you need to use the set mclag-igmpsnooping-aware
enable command on all FortiSwitch units in the network topology and use the set igmps-flood-reports
enable command on each MCLAG core FortiSwitch unit. For example:
config switch global
set mac-aging-interval 600
set mclag-igmpsnooping-aware enable
config port-security
set max-reauth-attempt 3
end
end
config switch interface
edit "D483Z15000094-0"
set native-vlan 4094
You can use a FortiSwitch unit to configure multi-stage load balancing on a set of FortiGate units. This capability
allows you to scale security processing while maintaining a simple basic architecture. This configuration is
commonly referred to a “firewall sandwich.”
Because the FortiGate unit provides session-aware analysis, the load distribution algorithm must be symmetric
(traffic for a given session, in both directions, must all traverse the same FortiGate unit).
For larger scale deployment, the topology uses multiple layers of load distribution to allow for far larger numbers of
FortiGate devices.
The hash at the first and second stages must be symmetric. The two stages must provide different hashing
results.
Use the following commands to configure the trunk members and set the port-selection criteria:
config switch trunk
edit <trunk name>
set description <description_string>
set members <ports>
set mode {fortinet-trunk | lacp-active | lacp-passive | static}
set port-selection-criteria src-dst-ip-xor16
end
end
Heartbeats
When in Fortinet-trunk mode, Heartbeat capability is enabled. Heartbeat messages monitor the status of
FortiGate units. If one is unavailable, the FortiSwitch unit stops sending traffic to that FortiGate unit until the
FortiGate unit becomes available.
If you enable hb-verify, each received heartbeat frame will be validated to match the signature (transmit-port
plus switch serial number) and the following configured heartbeat parameters:
l hb-in-vlan
l hb-src-ip
l hb-dst-ip
l hb-src-upd-port
l hb-dst-udp-port
The destination MAC address of the heartbeat frame is set by default to 02:80:c2:00:00:02. You can change the
value to any MAC address that is not a broadcast or multicast MAC address.
Configuring heartbeats
Configure the heartbeat fields using trunk configuration commands, as shown in this section. By default, all of the
configurable values are set to zero, and hb-verify is disabled.
Set the mode to forti-hb and set the heartbeat loss limit to a value between 3 and 32.
The heartbeat will transmit at 1-second intervals on any link in the trunk that is up. This value is not configurable.
The heartbeat frame has configurable parameters for the layer-3 source and destination addresses and the layer-
4 UDP ports. You must also specify the transmit and receive VLANs.
config switch trunk
edit hb-trunk
set mode fortinet-trunk
set members <port> [<port>] ... [<port>]
set hb-loss-limit <3-32>
set hb-out-vlan <int>
set hb-in-vlan <int>
Example
The following example creates trunk tr1 with heartbeat capability:
LLDP-MED
The Fortinet data center switches support the Link Layer Discovery Protocol (LLDP) for transmission and
reception wherein the switch will multicast LLDP packets to advertise its identity and capabilities. A switch
receives the equivalent information from adjacent layer-2 peers.
Fortinet data center switches support LLDP-MED (Media Endpoint Discovery), which is an enhancement of LLDP
that provides the following facilities:
l Auto-discovery of LAN policies (such as VLAN, layer-2 priority, and differentiated services settings), to enable plug-
and-play networking.
l Device location discovery to allow the creation of location databases and Enhanced 911 services for Voice over
Internet Protocol (VoIP).
l Extended and automated power management for power over Ethernet (PoE) endpoints.
l Inventory management, allowing network administrators to track their network devices, and determine their
characteristics (manufacturer, software and hardware versions, serial or asset number).
The switch will multicast LLDP packets to advertise its identity and capabilities. The switch receives the equivalent
information from adjacent layer-2 peers.
Starting in FortiSwitch 6.2.0, you can use the CLI to configure the location table used by LLDP-MED for enhanced
911 emergency calls.
Configuration notes
NOTE: When 802.1x and LLDP turn on at the same port, switching between LLDP profiles requires a manual
reset of all authentication sessions.
The FortiSwitch unit functions as a Network Connectivity device (that is, NIC, switch, router, and gateway), and
will only support sending TLVs intended for Network Connectivity devices.
The FortiSwitch unit accepts and parses packets using the CDP (Cisco Discovery Protocol) and count CDP
neighbors towards the neighbor limit on a physical port. If neighbors exist, the FortiSwitch unit transmits CDP
packets in addition to LLDP.
With release 3.5.1, CDP is independently controllable through cdp-status on the physical port. The FortiSwitch
unit no longer requires a neighbor to trigger it to transmit CDP; it will transmit provided cdp-status is configured as
tx-only or tx-rx. The default configuration for CDP-status is disabled. It still uses values pulled from the lldp-profile
to configure its contents.
NOTE: If a port is added into a virtual-wire (connects two ends of a controlled system using a radio frequency [RF]
medium), the FortiSwitch unit will disable the transmission and receipt of LLDP and CDP packets and remove all
neighbors from the port. This virtual-wire state is noted in the get switch lldp neighbor-summary command
output.
If the combination of configured TLVs exceeds the maximum frame size on a port, that frame cannot be sent.
Variable Description
Number of tx-intervals before the local LLDP data expires (that is, the
tx-hold packet TTL (in seconds) is tx-hold times tx-interval). The range for tx-
hold is 1 to 16, and the default value is 4.
Variable Description
How often the FortiSwitch unit transmits the first four LLDP packets when
a link comes up. The range is 2 to 5 seconds, and the default is 2
fast-start-interval seconds.
i. In the Country Subdivision field, enter the national subdivision (such as state, canton, region, province, or
prefecture). In Canada, the subdivision is province. In Germany, the subdivision is state. In Japan, the
subdivision is metropolis. In Korea, the subdivision is province. In the United States, the subdivision is
state.
j. In the County field, enter the county (Canada, Germany, Korea, and United States), parish, gun (Japan),
or district (India).
k. In the Direction field, enter N, E, S, W, NE, NW, SE, or SW for the leading street direction.
l. In the Floor field, enter the floor number, for example, 4.
m. In the Landmark field, enter the nickname, landmark, or vanity address, for example, UC Berkeley.
n. In the Language field, enter the ISO 639 language code used for the address information.
o. In the Name field, enter the person or organization associated with the address, for example, Fortinet
or Textures Beauty Salon.
p. In the Number field, enter the street address, for example, 1560.
q. In the Number Suffix field, enter any modifier to the street address. For example, if the full street address
is 1560A, enter 1560 for the number and A for the number suffix.
r. In the Place Type field, enter the type of place, for example, home, office, or street.
s. In the Post Office Box field, enter the post office box, for example, P.O. Box 1543. When the post-
office-box value is set, the street address components are replaced with this value.
t. In the Postal Community field, enter the postal community name, for example, Alviso. When the postal
community name is set, the civic community name is replaced by this value.
u. In the Primary Road field, enter the primary road or street name for the address.
v. In the Road Section field, enter the specific section or stretch of a primary road. This field is used when
the same street number appears more than once on the primary road.
w. In the Room field, enter the room number, for example, 7A.
x. In the Script field, enter the script used to present the address information, for example, Latn.
y. In the Seat field, enter the seat number in a stadium or theater or a cubicle number in an office or a booth
in a trade show.
z. In the Street field, enter the street (Canada, Germany, Korea, and United States).
aa. In the Street Name Post Mod field, enter an optional part of the street name that appears after the actual
street name. If the full street name is East End Avenue Extended, enter Extended.
ab. In the Street Name Pre Mod field, enter an optional part of the street name that appears before the actual
street name. If the full street name is Old North First Street, enter Old.
ac. In the Street Suffix field, enter the type of street, for example, Ave or Place. Valid values are listed in the
United States Postal Service Publication 28 [18], Appendix C.
ad. In the Sub Branch Road field, enter the name of a street that branches off of a branch road. This value is
used when the primary road, branch road, and subbranch road names are needed to identify the correct
street.
ae. In the Trailing Str Suffix field, enter N, E, S, W, NE, NW, SE, or SW for the trailing street direction.
af. In the Unit field, enter the unit (apartment or suite), for example, Apt 27.
ag. In the ZIP field, enter the postal or zip code for the address, for example, 94089-1345.
6. Enter the GPS coordinates.
a. Required. In the Altitude field, enter the vertical height of a location in feet or meters. The format is +/-
floating-point number, for example, 117.47.
b. Select Feet or Meters for the unit of measurement for the altitude.
c. For the Datum drop-down list, select which map is used for the location: WGS84, NAD83, or
NAD83/MLLW.
d. Required. In the Latitude field, enter the latitude. The format is floating point starting with +/- or ending
with N/S, for example, +/-16.67 or 16.67N.
e. Required. In the Longitude field, enter the longitude. The format is floating point starting with +/- or ending
with E/W, for example, +/-26.789 or 26.789E.
7. Select Add.
end
For example:
config system location
edit Fortinet
config address-civic
set country "US"
set language "English"
set county "Santa Clara"
set city "Sunnyvale"
set street "Kifer"
set street-suffix "Road"
set number "899"
set zip "94086"
set building "1"
set floor "1"
set seat "1293"
end
next
edit "Fortinet"
config elin-number
set elin-number "14082357700"
end
end
LLDP profile contains most of the port-specific configuration. Profiles are designed to provide a central point of
configuration for LLDP settings that are likely to be the same for multiple ports.
Two static LLDP profiles, default and default-auto-isl, are created automatically. They can be modified but not
deleted. The default-auto-isl profile always has auto-isl enabled and rejects any configurations that attempt to
disable it.
The “name” value for each custom TLV is neither used by nor has an effect on LLDP; it simply differentiates
between custom TLV entries:
config custom-tlvs
edit <TLVname_str>
set information-string <hex-bytes>
set oui <hex-bytes>
set subtype <integer>
next
The OUI value for each TLV must be set to three bytes. If just one of those bytes is nonzero it is accepted; any
value other than "000" is valid. The subtype is optional and ranges from 0 (default) to 255. The information string
can be 0 to 507 bytes, in hexadecimal notation.
The FortiSwitch unit does not check for conflicts either between custom TLV values or with standardized TLVs.
That is, other than ensuring that the OUI is nonzero, the FortiSwitch unit does not check the OUI, subtype (or data)
values entered in the CLI for conflicts with other Custom TLVs or with the OUI and subtypes of TLVs defined by
the 802.1, 802.3, LLDP-MED, or other standards. While this behavior could cause LLDP protocol issues, it also
allows a large degree of flexibility were you to substitute a standard TLV that is not supported yet.
802.1 TLVs
The only 802.1 TLV that can be enabled or disabled is port-vlan-id. This TLV will send the native VLAN of the port.
This value is updated when the native VLAN of the interface representing the physical port changes or if the
physical port is added to, or removed from, a trunk.
802.3 TLVs
The only 802.3 TLV that can be enabled or disabled is max-frame-size. This TLV will send the max-frame-size
value of the port. If this variable is changed, the sent value will reflect the updated value.
Auto-ISL
The auto-ISL configuration that was formerly in the switch physical-port command has been moved to the
switch lldp-profile command. All behavior and default values are unchanged.
l If the VLAN added to the interface by the LLDP profile is also listed under the set untagged-vlans configuration
in the config switch interface command, the VLAN is added as untagged.
l If the VLAN added to the interface by the LLDP profile is also the native VLAN of the port, no changes occur.
l The LLDP service determines the contents of the network-policy TLV being sent based on the current state of the
switch interface. If the LLDP VLAN assignment does not happen or the assigned VLAN is changed by another
configuration (such as the set untagged-vlans configuration in config switch interface), the LLDP
network policy TLVs being sent will reflect the actual state of the interface, not the configured value.
For example:
config med-network-policy
edit default
set status enable
set assign-vlan enable
set vlan 15
set dscp 30
set priority 3
next
Configure an LLDP profile for the port. By default, the port uses the default LLDP profile.
To enable LLDP MED on a port, set the LLDP status to receive-only, transmit-only, or receive and transmit. The
default value is TX/RX.
Use the following commands to display the LLDP information about LLDP status or the layer-2 peers for this
FortiSwitch unit:
get switch lldp (auto-isl-status | neighbors-detail | neighbors-summary | profile |
settings | stats)
To configure LLDP:
1. Configure LLDP global configuration settings using the config switch lldp settings command.
2. Create LLDP profiles using the config switch lldp profile command to configure Type Length Values
(TLVs) and other per-port settings.
3. Assign LLDP profiles to physical ports.
4. Apply VLAN to interface. (NOTE: LLDP profile values that are tied to VLANs will only be sent if the VLAN is
assigned on the switch interface.)
a. Configure the profile.
c. Connect a phone with LLDP-MED capability to the interface. NOTE: Make certain the LLDP, Learning,
and DHCP features are enabled.
d. Verify.
LLDP OIDs
Starting in FortiSwitchOS, the following object identifiers (OIDs) are supported by the LLDP management
information base (MIB) file:
l .1.0.8802.1.1.2.1.1 (lldpConfiguration)
o lldpMessageTxInterval
o lldpMessageTxHoldMultiplier
o lldpReinitDelay
o lldpTxDelay
o lldpNotificationInterval
l .1.0.8802.1.1.2.1.4.1 (lldpRemoteSystemsData.lldpRemTable)
o lldpRemChassisIdSubtype
o lldpRemChassisId
o lldpRemPortSubtype
o lldpRemPortId
l lldpRemPortDesc
l lldpRemSysName
l lldpRemSysDesc
l lldpRemSysCapSupported
l lldpRemSysCapEnabled
l .1.0.8802.1.1.2.1.4.2 (lldpRemoteSystemsData.lldpRemManAddrTable)
o lldpRemManAddrIfSubtype
o lldpRemManAddrIfId
o lldpRemManAddrOID
MAC/IP/protocol-based VLANs
The FortiSwitch unit assigns VLANs to packets based on the incoming port or the VLAN tag in the packet. The
MAC/IP/protocol-based VLAN feature enables the assignment of VLANs based on specific fields in an ingress
packet (MAC address, IP address, or layer-2 protocol).
Overview
When a MAC/IP/protocol-based VLAN is assigned to a port, the default behavior is for egress packets with that
VLAN value to include the VLAN tag. Use the set untagged-vlans <vlan> configuration command to
remove the VLAN tag from egress packets. For an example of the command, see the Example configuration on
page 140.
The MAC/IP/protocol-based VLAN feature assigns the VLAN based on MAC address, IP address, or layer-2
protocol.
MAC based
In MAC-based VLAN assignment, the FortiSwitch unit associates a VLAN with each packet based on the
originating MAC address.
IP based
In IP-based VLAN assignment, the FortiSwitch unit associates a VLAN with each packet based on the originating
IP address or IP subnet. IPv4 is supported with prefix masks from 1 to 32. IPv6 is also supported, depending on
hardware availability, with prefix lengths from 1 to 64.
Protocol based
In protocol-based VLAN assignment, the FortiSwitch unit associates a VLAN with each packet based on the
Ethernet protocol value and the frame type (ethernet2, 802.3d/SNAP, LLC).
NOTE: There are hardware limits regarding how many MAC/IP/protocol-based VLANs that you can configure. If you try
to add entries beyond the limit, the CLI will reject the configuration:
l Editing an existing VLAN—when you enter next or end on the config member-by command
l Adding a new VLAN— when you enter next or end on the edit vlan command
l When VLANS are defined by config member-by-ipv4 or config member-by-ipv6 on some FortiSwitch
platforms (2xx and higher), matching ARP traffic is included in the assigned VLANs. For example, if the ARP target
IP address or the ARP sender IP address match the member-by-ipv4 or member-by-ipv6 IP address, those ARP
packets are included in the assigned VLANs.
Example configuration
The following example shows a CLI configuration for MAC-based VLAN where a VOIP phone and a PC share the
same switch port.
In this example, a unique VLAN is assigned to the voice traffic, and the PC traffic is on the default VLAN for the
port.
1. The FortiSwitch Port 10 is connected to PC2 (a VOIP phone), with MAC address 00:21:cc:d2:76:72.
2. The phone also sends traffic from PC3 (MAC= 00:21:cc:d2:76:80).
3. Assign the PC3 traffic to the default VLAN (1) on port 10.
4. Assign the voice traffic to VLAN 100.
Mirroring
Packet mirroring allows you to collect packets on specified ports and then send them to another port to be
collected and analyzed. All FortiSwitch models support switched port analyzer (SPAN) mode, which mirrors traffic
to the specified destination interface without encapsulation.
Using remote SPAN (RSPAN) or encapsulated RSPAN (ERSPAN) allows you to send the collected packets
across layer-2 domains. You can have multiple RSPAN sessions but only one ERSPAN session. In RSPAN
mode, traffic is encapsulated in a VLAN. In ERSPAN mode, traffic is encapsulated in Ethernet, IPv4, and generic
routing encapsulation (GRE) headers.
NOTE: Some models support setting the mirror destination to “internal.” This is intended only for debugging purposes
and might prevent critical protocols from operating on ports being used as mirror sources.
NOTE: When there are multiple mirror sessions in the FS-108D-POE, FS-224D-POE, and FSR-112D-POE models,
some traffic might not be mirrored to the destination ports.
108E,
524D,
108E-FPOE, 124D, 1024D
248D, 424D, 448D, 524D-FPOE,
108E-POE, 224D-FPOE, 1048D
112D-POE 248E-FPOE, 424D-FPOE, 448D-FPOE, 548D,
124E, 224E, 3032D
248E-POE 424D-POE 448D-POE 548D-FPOE
124E-FPOE, 224E-POE 3032E
1048E
124E-POE
“dst” values Ports only Ports only Port or trunk Port or trunk Port or trunk Port or trunk Port or trunk Port or trunk
(can be in (can be in (no trunk (no trunk (no trunk (no trunk (no trunk (no trunk
trunk) trunk) members) members) members) members) members) members)
Max. sessions
(active or — — 32 32 32 32 32 32
inactive)
Max. active 7 4 6 6 6 6 8 4
sessions
Max. sessions
6 4 1 1 1 1 1 1
with src-egress
Max. sessions 6 4 4 4 4 4 4 4
with src-ingress
Max. sessions
when one has
src-ingress +
N/A N/A 3 3 3 3 3 3
src-egress and
the rest are src-
ingress
108E,
524D,
108E-FPOE, 124D, 1024D
248D, 424D, 448D, 524D-FPOE,
108E-POE, 224D-FPOE, 1048D
112D-POE 248E-FPOE, 424D-FPOE, 448D-FPOE, 548D,
124E, 224E, 3032D
248E-POE 424D-POE 448D-POE 548D-FPOE
124E-FPOE, 224E-POE 3032E
1048E
124E-POE
SPAN support Yes Yes Yes Yes Yes Yes Yes Yes
NOTE: You can use virtual wire ports as ingress and egress mirror sources. Egress mirroring of virtual wire ports will
have an additional VLAN header on all mirrored traffic.
<mirror session name> Enter the name of the mirror session to edit (or enter a No default
new mirror session name).
src-egress <interface_name> Optional. Set the source egress physical ports that will No default
be mirrored. Only one active egress mirror session is
allowed.
status {active | inactive} Set the mirror session to active or inactive. inactive
For example:
config switch mirror
edit "m1"
set mode SPAN
set dst "port5"
set src-egress "port2"
set src-ingress "port3" "port4"
set switching-packet enable
set status active
end
l Always set the destination port before setting the src-ingress or src-egress ports.
l Any port configured as a src-ingress or src-egress port in one mirror cannot be configured as a destination port in
another mirror.
l The total number of active sessions depends on your configuration.
l For switch models 124D, 124D-POE, 224D-FPOE, 248D, 248D-POE, 248D-FPOE, 224E, 224E-POE, 248E-POE,
248E-FPOE, 424D, 424D-POE, 424D-FPOE, 448D, 448D-POE, and 448D-FPOE:
o For access control lists, you can use a mirror destination that does not have src-ingress or src-egress
The following example configuration is valid for FortiSwitch-3032D. This configuration includes three ingress
ports, one egress port, and four destination ports. The port3 ingress and egress ports are mirrored to multiple
destinations.
config switch mirror
edit "m1"
set mode SPAN
set dst "port16"
set status active
set src-ingress "port3" "port5" "port7"
next
edit "m2"
set mode SPAN
set dst "port22"
set status active
set src-ingress "port3" "port5"
next
edit "m3"
set mode SPAN
set dst "port1"
set status active
set src-ingress "port3"
next
edit "m4"
set mode SPAN
set dst "port2"
set status active
set src-egress "port3"
end
The following example configuration includes three ingress ports, three egress ports and four destination ports.
Each ingress and egress port is mirrored to only one destination port.
config switch mirror
edit "m1"
set mode SPAN
set dst "port1"
set status active
set src-ingress "port2" "port7"
next
edit "m2"
set mode SPAN
set dst "port5"
set status active
set src-ingress "port2"
next
edit "m3"
set mode SPAN
set dst "port3"
set status active
set src-ingress "port6"
next
edit "m4"
set mode SPAN
set dst "port4"
set status active
set src-egress "port6" "port8"
end
NOTE: RSPAN traffic crossing a switch on a VLAN configured with “RSPAN-VLAN” enabled will appear as unknown
unicast, multicast, or broadcast traffic. This traffic is not exempt from storm control and might be rate limited as a result.
To avoid this issue, you can dedicate a port or ports to RSPAN and then disable storm control on those ports. Non-
RSPAN VLANs can be used on those ports as well, but they will not be protected by storm control.
<mirror session name> Enter the name of the mirror session to edit (or enter a No default
new mirror session name).
encap-vlan-cfi <0-1> Set the CFI or DEI bit in the ERSPAN or RSPAN VLAN 0
header.
encap-vlan-priority <0-7> Set the CoS bits in the ERSPAN or RSPAN VLAN 0
header.
src-egress <interface_name> Optional. Set the source egress physical ports that will No default
be mirrored. Only one active egress mirror session is
allowed.
status {active | inactive} Set the mirror session to active or inactive. inactive
For an ERSPAN auto mirror, traffic on specified ports is mirrored to the specified destination interface using
ERSPAN encapsulation. The header contents are automatically configured; you only need to specify the
ERSPAN collector address.
end
<mirror session name> Enter the name of the mirror session to edit (or enter a No default
new mirror session name).
encap-gre-protocol
Set the protocol value in the ERSPAN GRE header. 0x88be
<hexadecimal_integer>
encap-ipv4-tos <hexadecimal_ Set the ToS value or enter the DSCP and ECN values in 0x00
integer> the ERSPAN IP header.
encap-ipv4-ttl <0-255> Set the IPv4 TTL value in the ERSPAN IP header. 16
encap-vlan-cfi <0-1> Set the CFI or DEI bit in the ERSPAN or RSPAN VLAN 0
header.
encap-vlan-tpid <0x0001-0xfffe> Set the TPID for the encapsulating VLAN header. The 0x8100
default value, 0x8100, is for an IEEE 802.1Q-tagged
frame.
erspan-collector-ip <IPv4_ Required. Set the IPv4 address for the ERSPAN
0.0.0.0
address> collector. The range is 0.0.0.1-255.255.255.255.
src-egress <interface_name> Optional. Set the source egress physical ports that will No default
be mirrored. Only one active egress mirror session is
allowed.
status {active | inactive} Set the mirror session to active or inactive. inactive
For an ERSPAN manual mirror, traffic on specified ports is mirrored to the specified destination interface using
ERSPAN encapsulation. You need to manually configure the header contents with layer-2 and layer-3 addresses.
<mirror session name> Enter the name of the mirror session to edit (or No default
enter a new mirror session name).
encap-ipv4-tos <hexadecimal_ Set the ToS value or enter the DSCP and ECN 0x00
integer> values in the ERSPAN IP header.
encap-mac-dst <MAC_address> Set the MAC address of the next-hop or gateway 00:00:00:00:00:00
on the path to the ERSPAN collector IP address.
The range is 00:00:00:00:00:01-
FF:FF:FF:FF:FF:FF
encap-vlan-tpid <0x0001-0xfffe> Set the TPID for the encapsulating VLAN 0x8100
header. The default value, 0x8100, is for an IEEE
802.1Q-tagged frame.
erspan-collector-ip <IPv4_ Required. Set the IPv4 address for the ERSPAN
0.0.0.0
address> collector. The range is 0.0.0.1-255.255.255.255.
src-egress <interface_name> Optional. Set the source egress physical ports No default
that will be mirrored. Only one active egress
mirror session is allowed.
status {active | inactive} Set the mirror session to active or inactive. inactive
You can use access control lists (ACLs) to configure policies for three different stages in the pipeline:
NOTE: There are some limitations for ACL configuration on the FS-108E, FS-108E-POE, FS-108E-FPOE, FS-124E,
FS-124E-POE, FS-124E-FPOE, FS-148E, and FS-148E-POE models:
l The layer-4 port range is limited and might not be available in FortiSwitchOS 6.4.0.
l For the FS-108E, FS-108E-FPOE, FS-108E-POE, FS-124E, FS-124E-FPOE, and FS-124E-POE models, 256
counters are supported for the ingress stage.
l For the FS-448E, FS-448E-FPOE, and FS-448E-POE models, 504 counters are supported only for the prelookup
stage.
l If a classifier was created with only layer-2 fields, layer-3 fields cannot be added later. If a classifier was created with
only layer-3 fields, layer-2 fields cannot be added later.
l You cannot use both drop and redirect actions in the same ACL policy.
l ACL configuration is not supported in FortiLink mode.
l Only the ingress policy can be configured.
l Interface. The interface(s) on which traffic arrives at the switch. The interface can be a port, a trunk, or all interfaces.
The policy applies to ingress traffic only (not egress traffic).
l Classifier. The classifier identifies the packets that the policy will act on. Each packet can be classified based on one
or more criteria. Criteria include source and destination MAC address, VLAN id, source and destination IP address,
or service (layer 4 protocol id and port number).
l Marking involves setting bits in the packet header to indicate the priority of this packet.
l Actions. If a packet matches the classifier criteria for a given ACL, the following types of action may be applied to the
packet:
l allow or block the packet, redirect the packet, mirror the packet
l police the traffic
l mirror the packet to another port, interface, or trunk
l mirror the traffic
l CoS queue assignment
l outer VLAN tag assignment
l egress mask to filter packets
l specify a schedule when the ACL policy will be applied
l make the ACL policy active or inactive
The switch uses specialized TCAM memory to perform ACL matching.
NOTE: Each model of the FortiSwitch unit provides different ACL-related capabilities. When you configure the
ACL policy, the system will reject the request if the hardware cannot support it.
You can configure ACL policies for each stage: ingress, egress, and prelookup.
NOTE: The order of the classifiers provided during group creation (or during an ACL update in a group when new
classifiers are added ) matter. Hardware resources are allocated as best fit at the time of creation, which can cause
some fragmentation and segmentation of hardware resources because not all classifiers are available at all times.
Because the availability of classifiers is order dependent, some allocations succeed or fail at different times. Rebooting
the switch or running the execute acl key-compaction <acl-stage><group-id> command can help
reduce the classifier resource fragmentation.
edit <policy_ID>
set description <string>
set interface <port_name>
set schedule <schedule_name>
set status {active | inactive}
config classifier
set src-mac <MAC_address>
set dst-mac <MAC_address>
set ether-type <integer>
set src-ip-prefix <IP_address> <mask>
set dst-ip-prefix <IP_address> <mask>
set service <service_ID>
set vlan-id <VLAN_ID>
set cos <802.1Q CoS value to match>
set dscp <DSCP value to match>
end
config action
set count {enable | disable}
set drop {enable | disable}
set mirror <mirror_session>
set outer-vlan-tag <integer>
set policer <policer>
set redirect <interface_name>
set remark-dscp <0-63>
end
end
The FortiSwitch unit provides a set of pre-configured services that you can use. Use the following command to list
the services:
show switch acl service custom
Creating a policer
Optionally, you can create a policer if you are defining ACLs to police different types of traffic. When you create an
ACL policy (ingress or egress), you select the policer to use with the set policer <policer> command under
config action.
Each policy is assigned a unique policy ID that is automatically assigned. To view it, use the get switch acl
{egress | ingress | prelookup} command.
Viewing counters
NOTE: On the 4xxE platforms, the ACL byte counters for the prelookup stage are not available (they will always
show as 0 on the CLI). The packet counters are available.
Use the following command to display the counters associated with all policies or with an ingress, egress, or
prelookup policy:
get switch acl counters {all | egress | ingress | prelookup}
For example:
S524DF4K15000024 # get switch acl counters ingress
ingress:
Clearing counters
Use the following command to clear the counters associated with all policies or with an ingress, egress, or
prelookup policy:
execute acl clear-counter {all | egress | ingress | prelookup}
Configuration examples
Example 1
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
set status active
end
Example 2
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-all disable
set ingress-interface "port1"
set status active
config action
set count enable
set mirror mirror-1
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
Example 3
The FortiSwitch unit can map different flows (for example, based on source and destination IP addresses) to
specific outgoing ports.
In the following example, flows are redirected (based on destination IP) to different outgoing ports, connected to
separate FortiDDOS appliances. This allows you to apply different FortiDDOS service profiles to different types of
traffic:
config switch acl ingress # apply policy to port 1 ingress and send to port 3
edit 1
config action
set count enable
set redirect "port3“ # use redirect to shift selected traffic to new
destination
end
config classifier
set dst-ip-prefix 100.100.100.0 255.255.255.0
end
set description "cnt_n_mirror13"
set ingress-interface "port1"
set status active
next
edit 2
config action # apply policy to port 3 ingress and send to port 1
set count enable
set redirect "port1"
end
config classifier
set src-ip-prefix 100.100.100.0 255.255.255.0
end
set description "cnt_n_mirror31"
set ingress-interface-all disable
set ingress-interface "port3"
set status inactive
next
end
config switch acl ingress # apply policy to port 1 ingress and send to port 4
edit 3
config action
set count enable
set redirect "port4“ # use redirect to shift selected traffic to new
destination
end
config classifier
set dst-ip-prefix 20.20.20.0 255.255.255.0
end
set description "cnt_n_mirror14"
set ingress-interface "port1"
set status active
next
edit 4
config action # apply policy to port 4 ingress and send to port 1
set count enable
set redirect "port1"
end
config classifier
set src-ip-prefix 20.20.20.0 255.255.255.0
end
set description "cnt_n_mirror41"
set ingress-interface "port4"
set status inactive
next
end
Example 4
In the following example, a recurring schedule is created and then used to control when the ACL policy is active:
config system schedule recurring
edit schedule2
set day monday tuesday wednesday thursday friday saturday sunday
set start 07:00
set end 17:00
end
config switch acl ingress
edit 1
config action
set remark-cos 1
set remark-dscp 23
end
config classifier
set src-mac 00:21:cc:d2:76:72
set dst-mac d6:dd:25:be:2c:43
end
set ingress-interface-all enable
set schedule schedule2
set status active
next
end
Storm control
Storm control protects a LAN from disruption by traffic storms, which stem from mistakes in network configuration
or denial-of-service attacks. A traffic storm, which may consist of broadcast, multicast, or unicast traffic, creates
excessive traffic on the LAN and degrades network performance.
By default, storm control is disabled on a FortiSwitch unit. When enabled, it measures the data rate (in packets-
per-second) for unknown unicast, unknown multicast, and broadcast traffic. You can enable and disable storm
control for each of these traffic types individually. If the traffic rate for any of the types exceeds the configured
threshold, the FortiSwitch unit drops the excess traffic.
By default, storm control configuration is global. Starting in FortiSwitchOS 6.2.0, you can configure storm control
on a port level.
If you set the rate to zero, the system drops all packets (for the enabled traffic types):
DHCP snooping
The DHCP-snooping feature monitors the DHCP traffic from untrusted sources (for example, typically host ports
and unknown DHCP servers) that might initiate traffic attacks or other hostile actions. To prevent this, DHCP
snooping filters messages on untrusted ports by performing the following activities:
l Validating DHCP messages received from untrusted sources and filtering out invalid messages. For example, a
request to decline an DHCP offer or release a lease is ignored if the request is from a different interface than the one
that created the entry.
l Building and maintaining a DHCP snooping binding database, which contains information about untrusted hosts
with leased IP addresses.
Other security features like dynamic ARP inspection (DAI), a security feature that rejects invalid and malicious
ARP packets, also use information stored in the DHCP-snooping binding database.
In the FortiSwitch unit, all ports are untrusted by default, and DHCP snooping is disabled on all untrusted ports.
You indicate that a source is trusted by configuring the trust state of its connecting interface.
For additional security, you can specify in the CLI which DHCP servers that DHCP snooping will include in the
allowed server list.
DHCP snooping is enabled per VLAN and, by default, DHCP snooping is disabled.
l Tracking mode—By default, DHCP packets coming from a DHCP server from untrusted ports are processed by the
DHCP-snooping daemon. This mode is ideal when the DHCP servers need to be tracked on untrusted ports.
l Blocking mode—DHCP packets coming from a DHCP server from untrusted ports are dropped. This mode is useful
when users do not want to track DHCP servers on untrusted ports.
For example:
config system global
set dhcp-snoop-mode tracking
set dhcp-server-access-list enable
end
The following is the fixed format for the option-82 Circuit ID field
Circuit-ID: vlan-mod-port
vlan - [ 2 bytes ]
port - [ 1 byte ]
The following is the fixed format for the option-82 Remote ID field:
If you want to select which values appear in the Circuit ID and Remote ID fields:
l For the Circuit ID field, you can include the interface description, host name, interface name, mode, and VLAN.
l For the Remote ID field, you can include the host name, IP address, and MAC address.
7. Under the DHCP Server Whitelist, select + to add the name and IP address of an approved DHCP server.
8. In the Members by MAC Address section, select Add to add a MAC address.
9. In the Members by IP Address section, select Add to add an IPv4 address and netmask.
10. To save your changes, select Add at the bottom of the page.
NOTE: If you enable dhcp-snooping-verify-mac, the system will verify that the source MAC address in the
DHCP request from an untrusted port matches the client hardware address.
NOTE: If you enable dhcp-snooping-option82, the system inserts option-82 data into the DHCP messages for
this VLAN.
In addition, you can set a limit for how many IP addresses are in the DHCP snooping binding database for each
interface by enabling the dhcp-snoop-learning-limit-check and setting the learning-limit. By
default, dhcp-snoop-learning-limit-check is disabled, and the number of entries for an untrusted ports is
5. You can set the number of entries to 0. The maximum number of entries depends on which FortiSwitch unit you
are using. For example:
S548DN4K16000313 # show switch vlan 1
config switch vlan
edit 1
set learning-limit 100
set dhcp-snooping enable
next
end
NOTE: If the FortiSwitch unit has already learned more IP addresses than the dhcp-snoop-learning-limit
before the limit is set, the configuration is rejected because the FortiSwitch unit cannot select which IP addresses should
be kept. If the FortiSwitch unit has learned fewer IP address or the same number of IP addresses as the dhcp-snoop-
learning-limit before the limit is set, the configuration is accepted.
NOTE: The per-VLAN learning limit is not supported on dual-chip platforms (448 series).
1. Go to Switch > Interface > Physical or Switch > Interface > Trunk.
2. Select an interface.
3. Select Edit.
4. Select a Trusted or Untrusted interface for DHCP snooping.
5. If you want to accept DHCP messages with option-82 data from an untrusted interface, select the Option-82 Trust
check box.
6. Select OK.
For example:
config switch interface
edit "port5"
set native-vlan 10
set dhcp-snooping untrusted
set dhcp-snoop-learning-limit-check enable
set learning-limit 7
set dhcp-snoop-option82-trust enable
set snmp-index 5
next
end
Set dhcp-snooping to reflect the trust state of the interface. Where DHCP servers are located, you must
configure interfaces as trusted.
If you enable dhcp-snoop-option82-trust, the system accepts DHCP messages with option-82 data from
an untrusted interface.
Use the following command to view the detailed status of IPv4 and IPv6 DHCP-snooping VLANs and ports:
get switch dhcp-snooping database-summary
An entry in the DHCP snooping binding database that contains an * after the IP address indicates a temporary or
incomplete entry. For example:
08:00:27:13:16:51 2000 100.0.0.159* 10 4 port4
The DHCP server has not acknowledged this entry yet. If the DHCP server does not acknowledge the entry within
10 seconds, the entry is removed from the database. If the DHCP server does acknowledge the entry within 10
seconds, the entry will be considered “complete” (that is, no * after the IP address), and a proper expiration time is
assigned to it.
Use the following command to view the details of the IPv4 and IPv6 DHCP-snooping client and server databases:
get switch dhcp-snooping status
Use the following command to view the details of the IPv4 DHCP-snooping client database:
get switch dhcp-snooping client-db-details
Use the following command to view the details of the IPv6 DHCP-snooping client database:
get switch dhcp-snooping client6-db-details
Use the following command to view the details of the IPv4 DHCP-snooping server database:
FS1D243Z14000027 # get switch dhcp-snooping server-db-details
Use the following command to view the details of the IPv6 DHCP-snooping server database:
FS1D243Z14000027 # get switch dhcp-snooping server6-db-details
If the dhcp-server-access-list is enabled globally and the server is configured for the dhcp-server-access-list, the
svr-list column displays allowed for that server. If the dhcp-server-access-list is enabled globally and the server
is not configured in the dhcp-server-access-list, the svr-list column displays blocked for that server.
You can remove an IP address from the DHCP-snooping binding database by specifying the associated VLAN ID
and MAC address:
execute dhcp-snooping expire-client <1-4095> <xx:xx:xx:xx:xx:xx>
For example:
execute dhcp-snooping expire-client 100 01:23:45:67:89:01
IP source guard
IP source guard protects a network from IPv4 spoofing by only allowing traffic on a port from specific IPv4
addresses. Traffic from other IPv4 addresses is discarded. The discarded addresses are not logged.
l Static entries—IP addresses that have been manually associated with MAC addresses.
l Dynamic entries—IP addresses that have been learned through DHCP snooping.
By default, IP source guard is disabled. You must enable it on each port that you want protected. If you enable IP
source guard and then disable it, all static and dynamic entries are removed for that interface.
There is a maximum of 2,048 IP source guard entries. When there is a conflict between static entries and dynamic
entries, static entries take precedence over dynamic entries.
For example:
config switch interface
edit port6
set ip-source-guard enable
end
For example:
config switch ip-source-guard
edit port4
config binding-entry
edit 1
set ip 172.168.20
set mac 00:21:cc:d2:76:72
next
end
next
end
Dynamic ARP Inspection (DAI) prevents man-in-the-middle attacks and IP address spoofing by checking that
packets from untrusted ports have valid IP-MAC-address binding. To use DAI, you must first enable the DHCP
snooping feature and then enable DAI for each VLAN. See DHCP snooping on page 165.
Configuring DAI
Use the following command to see how many ARP packets have been dropped or forwarded:
#diagnose switch arp-inspection stats
IGMP snooping
The FortiSwitch unit uses the information passed in IGMP messages to optimize the forwarding of multicast traffic.
IGMP snooping allows the FortiSwitch unit to passively listen to the Internet Group Management Protocol (IGMP)
network traffic between hosts and routers. The switch uses this information to determine which ports are
interested in receiving each multicast feed. The FortiSwitch unit can reduce unnecessary multicast traffic on the
LAN by pruning multicast traffic from links that do not contain a multicast listener.
The current version of IGMP is version 3, and the FortiSwitch unit is also compatible with IGMPv1 and IGMPv2.
1. A host expresses interest in joining a multicast group. (Sends or responds to a join message).
2. The FortiSwitch unit creates an entry in the layer-2 forwarding table (or adds the hostʼs port to an existing entry).
The switch creates one table entry per VLAN per multicast group.
3. The FortiSwitch unit removes the entry when the last host leaves the group (or when the entry ages out).
In addition, you can configure the FortiSwitch unit to send periodic queries from all ports in a specific VLAN to
request IGMP reports. The FortiSwitch unit uses the IGMP reports to update the layer-2 forwarding table.
NOTE: If you want to use IGMP snooping with an MCLAG, see "Configuring an MCLAG with IGMP snooping" on
page 120.
Notes
l Starting with release 6.4.0, when an inter-switch link (ISL) is formed automatically, the igmps-flood-reports
and igmps-flood-traffic options are disabled by default.
l Starting with release 6.2.2, the following snooping table limits apply:
112D 895
200 1022
400 1022
500 1022
3032 1022
NOTE: Until FortiSwitch Release 3.5.1, the table limits were hardware only. The software limit for all platforms was
8192.
For example:
config switch igmp-snooping globals
set aging-time 500
set flood-unknown-multicast enable
end
1. Go to Switch > Interface > Physical or Switch > Interface > Trunk.
2. Select an interface.
3. Select Edit.
4. In the IGMP Snooping area, select Flood Reports, Flood Traffic, or both if needed.
5. Select OK.
For example:
config switch interface
edit port10
set native-vlan 30
set igmps-flood-reports enable
set igmps-flood-traffic enable
next
edit port2
set native-vlan 30
set igmps-flood-reports enable
set igmps-flood-traffic enable
next
edit port4
set native-vlan 30
set igmps-flood-reports enable
set igmps-flood-traffic enable
next
edit port6
set native-vlan 30
set igmps-flood-reports enable
set igmps-flood-traffic enable
next
edit port8
set native-vlan 30
set igmps-flood-reports enable
Use the following command to clear the learned/configured multicast group from an interface:
execute clear switch igmp-snoop
You can define static groups for particular multicast addresses in a VLAN that has IGMP snooping enabled. You
can specify multiple ports in the static group, separated by a space. The trunk interface can also be included in a
static group. There are two restrictions for IGMP static groups:
l The range of multicast addresses (mcast-addr) from 224.0.0.1 to 224.0.0.255 cannot be used.
l The VLAN must already be assigned as the native VLAN for a switch interface and be included in the range of
allowed VLANs for a switch interface. You can check the Physical Port Interfaces page to see which VLANs can be
used for IGMP static groups.
Starting in FortiSwitchOS 6.2.0, you can also use the CLI to enable IGMP proxy, which allows the VLAN to send
IGMP reports. After you enable igmp-proxy on a VLAN, it will start suppressing reports and leave messages.
For each multicast group, only one report is sent to the upstream interface. When a leave message is received,
the FortiSwitch unit will only send the leave message to the upstream interface when there are no more members
left in the multicast group. The FortiSwitch unit will also reply to generic queries and will send IGMP reports to the
upstream interface.
For example, to configure two static groups for the same VLAN:
config switch vlan
edit 30
set igmp-snooping enable
config igmp-static-group
edit g239-1-1-1
set mcast-addr 239.1.1.1
set members port2 port5 port28
next
edit g239-2-2-2
set mcast-addr 239.2.2.2
set members port5 port10 trunk-1
next
end
next
end
l globals: display the IGMP snooping global configuration on the FortiSwitch unit
l group: display a list of learned groups
l interface: display the configured IGMP snooping interfaces and their current state
l static-group: display the list of configured static groups
Go to Switch > Monitor > IGMP Snooping to see the learned multicast groups:
Use the following CLI command to see the learned multicast groups:
FS1D243Z13000023 # get switch igmp-snooping group
Number of Groups: 7
port of-port VLAN GROUP Age
(__port__9) 1 23 231.8.5.4 16
(__port__9) 1 23 231.8.5.5 16
(__port__9) 1 23 231.8.5.6 16
(__port__9) 1 23 231.8.5.7 16
(__port__9) 1 23 231.8.5.8 16
(__port__9) 1 23 231.8.5.9 16
(__port__9) 1 23 231.8.5.10 16
(__port__43) 3 23 querier 17
(__port__14) 8 --- flood-reports ---
(__port__10) 2 --- flood-traffic ---
To use the IGMP querier, you need to configure how often IGMP queries are sent, enable the IGMP querier for a
specific VLAN, and specify the address for the IGMP querier.
Use the following commands to specify how many seconds are between IGMP queries. The default is 120
seconds.
config switch igmp-snooping globals
set query-interval <10-1200>
end
For example:
config switch igmp-snooping globals
set aging-time 150
set flood-unknown-multicast enable
set query-interval 200
end
Use the following commands to enable the IGMP querier for a specific VLAN and specify the address that IGMP
reports are sent to:
config switch vlan
edit 100
set igmp-snooping {enable | disable}
set igmp-snooping-querier {enable | disable}
set querier-addr <IPv4_address>
next
end
For example:
config switch vlan
edit 100
set igmp-snooping enable
set igmp-snooping-querier enable
set querier-addr 1.2.3.4
next
end
NOTE: These settings are not per-VLAN, so the port will act as a querier/mRouter port for all of its associated VLANs.
config switch interface
edit <port>
set igmps-flood-reports enable
set igmps-flood-traffic enable
next
end
IPv6-enabled routers send router advertisement (RA) messages to neighboring hosts in the local network. To
prevent the spoofing of the RA messages, RA guard inspects RA messages to see if they meet the criteria
contained in an RA-guard policy. If the RA messages match the criteria in the policy, they are forwarded. If the RA
messages do not match the criteria in the policy, they are dropped.
The IPv6 RA-guard policy checks for the following criteria in each RA message:
l Whether it has been flagged with the M (managed address configuration) flag or O (other configuration) flag
l Whether the hop number is equal or more than the minimum hop limit
l Whether the hop number is equal or less than the maximum hop limit
l Whether the default router preference is set to high, medium, or low
l Whether the source IPv6 address matches an allowed address in an IPv6 access list (created with the config
router access-list6 command)
l Whether the IPv6 address prefix matches an allowed prefix in an IPv6 prefix list (created with the config router
prefix-list6 command)
l Whether the device is a host or a router. If the device is a host, all RA messages are dropped. If the device is a
router, the other criteria in the policy are checked.
IPv6 RA guard is supported on 2xx models and higher.
1. (Optional) Create lists of source IPv6 addresses and IPv6 address prefixes that are allowed in RA messages.
2. Create one or more IPv6 RA-guard policies.
3. Apply the IPv6 RA-guard policies to switch interfaces and VLANs.
For example:
config router access-list6
edit accesslist1
set comments "IPv6 access list"
config rule
edit 1
set action permit
set prefix6 fe80::a5b:eff:fef1:95e5
set exact-match disable
next
end
end
For example:
config router prefix-list6
edit prefixlist1
set comments "IPv6 prefix list"
config rule
edit 1
set action permit
set prefix6 any
set ge 50
set le 50
next
end
end
For example:
config switch raguard-policy
edit RApolicy1
set device-role router
set managed-flag On
set other-flag On
set max-hop-limit 100
set min-hop-limit 5
set max-router-preference medium
set match-src-addr accesslist1
set match-prefix prefixlist1
next
end
For example:
config switch interface
edit <interface_name>
config raguard
edit 1
set raguard-policy RApolicy1
set vlan-list 1
next
edit 2
For example:
S524DF4K15000024 # get switch raguard-policy
== [ RApolicy1 ]
name: RApolicy1
Private VLANs
A private VLAN (PVLAN) divides the original VLAN (termed the primary VLAN) into sub-VLANs (secondary
VLANs), while retaining the existing IP subnet and layer-3 configuration. Unlike a regular VLAN, which is a single
broadcast domain, a PVLAN partitions one broadcast domain into multiple smaller broadcast subdomains.
After a PVLAN VLAN is configured, the primary VLAN forwards frames downstream to all secondary VLANs.
l Isolated: Any switch ports associated with an isolated VLAN can reach the primary VLAN, but not any other
secondary VLAN. In addition, hosts associated with the same isolated VLAN cannot reach each other. Only one
isolated VLAN is allowed in one PVLAN domain.
l Community: Any switch ports associated with a common community VLAN can communicate with each other and
with the primary VLAN but not with any other secondary VLAN. You might have multiple distinct community VLANs
within one PVLAN domain.
There are mainly two types of ports in a PVLAN: promiscuous (P-Port) and host.
l Promiscuous Port (P-Port): The switch port connects to a router, firewall, or other common gateway device. This
port can communicate with anything else connected to the primary or any secondary VLAN. In other words, it is a
type of a port that is allowed to send and receive frames from any other port on the VLAN.
l Host Ports further divides into two types – isolated port (I-Port) and community port (C-port).
l Isolated Port (I-Port): Connects to the regular host that resides on isolated VLAN. This port communicates
only with P-Ports.
l Community Port (C-Port): Connects to the regular host that resides on community VLAN. This port
communicates with P-Ports and ports on the same community VLAN.
This chapter covers the following topics:
1. Enabling a PVLAN:
config switch vlan
edit 1000
set private-vlan enable
set isolated-vlan 101
set community-vlans 200-210
end
end
Quality of service
Quality of service (QoS) provides the ability to set particular priorities for different applications, users, or data
flows.
l Classification is the process of determining the priority of a packet. This can be as simple as trusting the QoS
markings in the packet header when it is received and so accept the packet. Alternatively, it can hinge on criteria
(such as incoming port, VLAN, or service) that are defined by the network administrator.
l Marking involves setting bits in the packet header to indicate the priority of this packet.
l Queuing involves defining priority queues to ensure that packets marked as high priority take precedence over
those marked as lower priority. If network congestion becomes so severe that packet drops are inevitable, the
queuing process will also select the packets to drop.
The FortiSwitch unit supports the following QoS configuration capabilities:
l Mapping the IEEE 802.1p and layer-3 QoS values (Differentiated Services and IP Precedence) to an outbound
QoS queue number.
l Providing eight egress queues on each port.
l Policing the maximum data rate of egress traffic on the interface.
NOTE: There are some differences in QoS configuration on the FS-108E, FS-108E-POE, FS-108E-FPOE, FS-
124E, FS-124E-POE, FS-124E-FPOE, FS-148E, and FS-148E-POE models:
Classification
The IEEE 802.1p standard defines a class of service (CoS) value (ranging from 0-7) that is included in the
Ethernet frame. The Internet Protocol defines the layer-3 QoS values that are carried in the IP packet
(Differentiated Services, IP Precedence). The FortiSwitch unit provides configurable mappings from CoS or IP-
DSCP values to egress queue values.
Fortinet recommends that you do not enable trust for both Dot1p and DSCP at the same time on the same
interface. If you do want to trust both Dot1p and IP-DSCP, the switch uses the latter value (DSCP) to determine
the queue. The switch will use the Dot1p value and mapping only if the packet contains no DSCP value. For
details, refer to Determining the egress queue on page 191.
Marking
l CoS marking: The priority is set with the CoS value of the 802.1Q tag. The range of CoS values is 0-7.
l Differential service code point (DSCP) marking: The priority is set with the DSCP value in the IP header. The
range of DSCP values is 0-63.
You can use one of these methods or both methods.
Whether the CoS or DSCP values of inbound packets are remarked is subject to the classification by ACL rules for
the ingress interfaces. When CoS or DSCP marking take place, the outbound queuing is not impacted, meaning it
is still based on trust maps and the original CoS or DSCP values, as described in Determining the egress queue
on page 191.
The following example shows how to use the CLI to configure an ACL policy to mark the CoS and DSCP values of
inbound packets to 4 and 48 on port1 when their CoS values are 2:
config switch acl ingress
edit 10
config action
set count enable
set remark-cos 4
set remark-dscp 48
end
config classifier
set cos 2
end
set ingress-interface "port1"
set status active
next
end
Queuing
Queuing determines how queued packets on an egress port are served. Each egress port supports eight queues,
and three scheduling modes are available:
l Strict Scheduling: The queues are served in descending order (of queue number), so higher number queues
receive higher priority. Queue7 has the highest priority, and queue0 has the lowest priority. The purpose of the strict
scheduling mode is to provide lower latency service to higher classes of traffic. However, if the interface experiences
congestion, the lower priority traffic could be starved.
l Simple Round Robin (RR): In round robin mode, the scheduler visits each backlogged queue, servicing a single
packet from each queue before moving on to the next one. The purpose of round robin scheduling is to provide fair
access to the egress port bandwidth.
l Weighted Round Robin (WRR): Each of the eight egress queues is assigned a weight value ranging from 0 to 63.
The purpose of weighted round robin scheduling is to provide prioritized access to the egress port bandwidth, such
that queues with higher weight get more of the bandwidth, but lower priority traffic is not starved.
A drop policy determines what happens when a queue is full or exceeds a minimum threshold. Depending on your
switch model, you can select from one of two drop policies:
o The tail-drop drop policy is the default and is available on all platforms. When a queue is full, additional incoming
packets are dropped until there is space available in the queue.
o The random early detection (RED) drop policy is available on 124D, 2xx, and 4xxD models. When the queue size
exceeds the minimum threshold, packets are dropped at a constant rate until the queue is full. Using the RED drop
policy helps improve the throughput during network congestion.
o The weighted random early detection (WRED) drop policy is an advanced version of RED and is available on
4xxE, 5xx, 1xxx, and 3xxx models. When the queue size exceeds the threshold, the WRED slope controls the rate at
which packets are dropped until the queue is full. The drop rate increases when the queue buffer usage increases. If
you select weighted-random-early-detection in the CLI, you can enable explicit congestion notification
(ECN) marking to indicate that congestion is occurring without just dropping packets.
To determine the egress queue value for the packet, the FortiSwitch unit uses the configured trust values (and
mappings) on the port and the QoS/CoS fields in the packet.
If the port is set to trust Dot1p and not to trust DSCP, the switch uses the packet’s CoS value to look up the queue
assignment in the Dot1p map for the port.
If the port is not set to trust Dot1p, the switch uses the default queue 0.
l If the port is set to trust Dot1p, the switch uses the packet’s CoS value to look up the queue assignment in the Dot1p
map for the port.
l If the port is not set to trust Dot1p, the switch uses the default queue 0.
If the port is set to trust Dot1p but not to trust DSCP, the switch uses the default CoS value of the port to look up
the queue assignment in the Dot1p map for the port.
If the port is not set to trust Dot1p, the switch uses the default queue 0.
FortiSwitch uses “queue-7” for network control and critical management traffic. To
avoid affecting critical network control and management traffic, do not oversubscribe
queue-7 or avoid using queue-7 for data traffic when configuring QoS.
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.
You can configure an 802.1p map, which defines a mapping between IEEE 802.1p CoS values (from incoming
packets on a trusted interface) and the egress queue values.
If you want to enable priority tagging on outgoing frames, enable the egress-pri-tagging option. This option
is disabled by default.
config switch qos dot1p-map
edit <dot1p map name>
set description <text>
set [priority-0|priority-1|priority-2|....priority-7] <queue number>
set egress-pri-tagging {disable | enable}
next
end
For example:
config switch qos dot1p-map
edit "test1"
set priority-0 queue-2
set priority-1 queue-0
set priority-2 queue-1
set priority-3 queue-3
set priority-4 queue-4
set priority-5 queue-5
set priority-6 queue-6
set priority-7 queue-7
set egress-pri-tagging enable
next
end
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 command to set a different default CoS value, ranging from 0 to 7:
config switch interface
edit port1
set default-cos <0-7>
NOTE: The set default-cos command is not available on the following FortiSwitch models: 224D-FPOE, 248D,
424D, 424D-POE, 424D-FPOE, 448D, 448D-POE, 448D-FPOE, 224E, 224E-POE, 248E-POE, and 248E-FPOE.
The following example defines a mapping for two of the DSCP values:
config switch qos ip-dscp-map
edit "m1"
config map
edit "e1"
set cos-queue 0
set ip-precedence Immediate
next
edit "e2"
set cos-queue 3
set value 13
next
end
next
end
When there are too many packets going through the same egress port, you can choose whether packets are
dropped on ingress or egress.
Variable Description
NOTE: Because too many packets are going through the same egress port, you might want to use the pause frame for
flow control on the ingress side. To see the pause frame on ingress, enable the flow control “tx” on the ingress interface
and disable egress-drop-mode on the egress interface.
l trust dot1p values on ingress traffic and the dot1p map to use
l trust ip-dscp values on ingress traffic and the ip-dscp map to use. (NOTE: Trust the dot1p values or the ip-dscp
values but not both.)
l an egress policy for the interface
l a default CoS value (for packets with no CoS value)
If neither of the trust policies is configured on a port, the ingress traffic is mapped to queue 0 on the egress port.
If no egress policy is configured on a port, the FortiSwitch unit applies the default scheduling mode (that is, round-
robin).
NOTE: The set default-cos command is not available on the following FortiSwitch models: 224D-FPOE, 248D,
424D, 424D-POE, 424D-FPOE, 448D, 448D-POE, 448D-FPOE, 224E, 224E-POE, 248E-POE, and 248E-FPOE.
When you add a port to a trunk, the port inherits the QoS configuration of the trunk interface. A port member
reverts to the default QoS configuration when it is removed from the trunk interface.
NOTE: The set default-cos command is not available on the following FortiSwitch models: 224D-FPOE, 248D,
424D, 424D-POE, 424D-FPOE, 448D, 448D-POE, 448D-FPOE, 224E, 224E-POE, 248E-POE, and 248E-FPOE.
end
config action
set remark-cos <0-7>
set remark-dscp <0-63>
end
For example:
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
set status active
end
To check the statistics for all QoS queues, use the following command:
diagnose switch physical-ports qos-stats list
To check the statistics for QoS queues for specific ports, use the following command:
diagnose switch physical-ports qos-stats list <list_of_ports>
For example, for the 1xxxD, 3xxxD, and 5xxD FortiSwitch models:
diagnose switch physical-ports qos-stats list 1,3,4-6
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
----------------------------------------------------------------------------------
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
----------------------------------------------------------------------------------
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
----------------------------------------------------------------------------------
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
----------------------------------------------------------------------------------
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
----------------------------------------------------------------------------------
For example, for the 4xxD, 4xxD-POE, 4xxD-FPOE, 2xxD, 2xxD-POE, and 2xxD-FPOE FortiSwitch models:
diagnose switch physical-ports qos-stats list 1,6,48
The diagnose switch physical-ports qos-stats clear command is supported only for the 1xxxD,
3xxxD, and 5xxD FortiSwitch models. The diagnose switch physical-ports qos-stats clear
command is not available for the 4xxD, 4xxD-POE, 4xxD-FPOE, 2xxD, 2xxD-POE, or 2xxD-FPOE FortiSwitch
models.
To clear the statistics for the QoS queues for all ports:
diagnose switch physical-ports qos-stats clear
To clear the statistics for the QoS queues for specified ports:
diagnose switch physical-ports qos-stats clear <list_of_ports>
To reset the QoS counters to zero (applies to all applications except SNMP) for the specified ports:
diagnose switch physical-ports qos-stats set-qos-counter-zero [<port_list>]
To restore the QoS counters to the hardware values for the specified ports:
diagnose switch physical-ports qos-stats set-qos-counter-revert [<port_list>]
For example:
diagnose switch physical-ports qos-stats clear 1,3,4-6
diagnose switch physical-ports qos-stats set-qos-counter-zero 2,4,7-9
diagnose switch physical-ports qos-stats set-qos-counter-revert 1,3-5,7
sFlow
sFlow is a method of monitoring the traffic on your network to identify areas on the network that may impact
performance and throughput. With sFlow you can export truncated packets and interface counters. The
FortiSwitch unit implements sFlow version 5 and supports trunks and VLANs.
About sFlow
sFlow uses packet sampling to monitor network traffic. The sFlow agent captures packet information at defined
intervals and sends them to an sFlow collector for analysis, providing real-time data analysis. To minimize the
impact on network throughput, the information sent is only a sampling of the data.
The sFlow collector is a central server running software that analyzes and reports on network traffic. The sampled
packets and counter information, referred to as flow samples and counter samples, respectively, are sent as
sFlow datagrams to a collector. Upon receiving the datagrams, the sFlow collector provides real-time analysis and
graphing to indicate the source of potential traffic issues. sFlow collector software is available from a number of
third-party software vendors.
Configuring sFlow
1. Go to Switch > Interface > Physical or Switch > Interface > Physical.
2. Select one or more ports or a trunk to update and then select Edit.
3. In the sFlow area, select Polling Interval.
4. In the Interval (Seconds) field, enter the number of seconds to use for the polling interval.
5. Select OK to save the changes.
For example:
config switch interface
edit "port20"
set packet-sampler enabled
set packet-sample-rate 4
set sflow-counter-interval 3
set snmp-index 58
next
end
NOTE: Ensure that you can use the exec command ping collector_ip_address to ping the collector from the
FortiSwitch unit. Then, use the built-in sniffer to trace sFlow packets (diag sniff packet <vlan_interface_
name> "udp port 6343").
Feature licensing
About licenses
Each feature license is tied to the serial number of the FortiSwitch unit. Therefore, a feature license is valid on one
system.
Configuring licenses
Adding a license
NOTE: Adding license keys causes the system to log you out.
Removing a license
Layer-3 interfaces
Fortinet data center switches support loopback interfaces and switched virtual interfaces (SVIs), both of which are
described in this chapter.
Loopback interfaces
A loopback interface is a special virtual interface created in software that is not associated with any hardware
interface.
Dynamic routing protocols typically use a loopback interface as a reliable IP interface for routing updates. You can
assign the loopback IP address to the router rather than the IP address of a specific hardware interface. Services
(such as Telnet) can access the router using the loopback IP address, which remains available independent of
hardware interfaces status.
A loopback interface does not have an internal VLAN ID or a MAC addresses and always uses a /32 network
mask.
A switched virtual interface (or SVI) is a logical interface that is associated with a VLAN and supports routing and
switching protocols.
You can assign an IP address to the SVI to enable routing between VLANs. For example, SVIs can route between
two different VLANs connected to a switch (no need to connect through a layer-3 router).
In this configuration, Server-1 is connected to switch Port1, and Server-2 is connected to switch Port2. Port1 is a
member of VLAN 4000, and Port2 is a member of VLAN 2. Port1 is the gateway for Server-1, and port2 is the
gateway for Server-2.
NOTE: For simplicity, assume that both port1 and port are on same switch.
2. Create L3 system interfaces that correspond to Port 1 (VLAN 4000) and Port 2 (VLAN 2):
config system interface
edit vlan4000
set ip 192.168.11.1/24
set vlanid 4000
set allowaccess ping ssh telnet
next
edit vlan2
set ip 192.168.10.1/24
set vlanid 2
set allowaccess ping ssh telnet
end
In Release 3.3.0 and later, some FortiSwitch models support hardware-based layer-3 forwarding.
For FortiSwitch models that support Equal Cost Multi-Path (ECMP) (see Feature matrix: FortiSwitchOS 6.4.0 on
page 18), forwarding for all ECMP routes is performed in hardware.
For switch models that support hardware-based layer-3 forwarding but do not support ECMP, only one route to
each destination will be hardware-forwarded. If you configure multiple routes to the same destination, you can
configure a priority value for each route. Only the route with highest priority will be forwarded by the hardware. If
no priority values are assigned to the routes, the most recently configured route is forwarded by the hardware.
Router activity
Logging allows you to review all router activity.
NOTE: Router logs are available only on supported platforms if you have the advanced features license.
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
Configuring ECMP
The switch automatically uses ECMP to choose between equal-cost routes.
This configuration value is system-wide. The source IP address is the default value.
When you configure a static route with a gateway, the gateway must be in the same IP subnet as the device. Also,
the destination subnet cannot match any of device IP subnets in the switch.
When you configure a static route without a gateway, the destination subnet must be in the same IP subnet as the
device.
In this configuration, ports 2 and 6 are routed ports. Interfaces I-RED and I-GREEN are routed VLAN interfaces.
The remaining ports in the switch are normal layer-2 ports.
1. Configure native VLANs for ports 2, 6, and 9. Also configure the “internal” interface to allow native VLANs for ports
2, 6, and 9:
edit port9
set native-vlan 30
edit internal
set allowed-vlans 10,20,30
end
3. Configure static routes. This code configures multiple next-hop gateways for the same network:
FortiSwitchOS v3.4.2 and later supports static bidirectional forwarding detection (BFD), a point-to-point protocol to
detect faults in the datapath between the endpoints of an IETF-defined tunnel (such as IP, IP-in-IP, GRE, and
MPLS LSP/PW).
BFD defines demand mode and asynchronous mode operation. The FortiSwitch unit supports asynchronous
mode. In this mode, the systems periodically send BFD control packets to one another, and if a number of those
packets in a row are not received by the other system, the session is declared to be down.
BFD packets are transported using UDP/IP encapsulation and BFD control packets are identified using well-
known UDP destination port 3784 (NOTE: BFD echo packets are identified using 3785).
BFD packets are not visible to the intermediate nodes and are generated and processed by the tunnel end
systems only.
Configuring BFD
Use the following steps to configure BFD:
RPF, also called anti-spoofing, prevents an IP packet from being forwarded if its source IP address does not
belong to a locally attached subnet (local interface) or is not part of the routing between the FortiSwitch unit and
another source (such as a static route, RIP, OSPF, or BGP).
In unicast RPF, the router not only looks up the destination information but it also looks up the source information
to ensure that it exists. If no source is found, that packet is dropped because the router assumes it is an error or an
attack on the network.
l Strict—The packet must be received on the same interface that the router uses to forward the return packet. In this
mode, asymmetric routing paths in the network might cause legitimate traffic to be dropped.
l Loose—The routing table must include the source IP address of the packet. If you disable the src-check-allow-
default option, the packet is dropped if the source IP address is not found in the routing table. If you enable the
src-check-allow-default option, the packet is allowed even if the source IP address is not found in the routing
table, but the default route is found in the routing table.
Configuring uRPF
By default, uRPF is disabled. You must enable it on each interface that you want protected.
config system interface
edit <interface_name>
set src-check {disable | loose | strict}
set src-check-allow-default {enable | disable} // This option is available only
when src-check is set to loose.
end
IP-MAC binding
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/disable IP-MAC binding for the whole switch, and you can override this global setting for each
port.
Notes
When you configure a trunk, the trunk follows the global value by default. You can also explicitly enable or disable
IP-MAC binding for a trunk, as shown in the CLI configuration.
When you add member ports to the trunk, all ports take on the trunk setting. If you later remove a port from the
trunk group, the port is reset to the default value (disabled).
Rules are disabled by default. You need to explicitly enable each rule.
A DHCP server provides an address, from a defined address range, to a client on the network that requests it.
You can configure one or more DHCP servers on any FortiSwitch interface. A DHCP server dynamically assigns
IP addresses to hosts on the network connected to the interface. The host computers must be configured to obtain
their IP addresses using DHCP.
You can configure a FortiSwitch interface as a DHCP relay. The interface forwards DHCP requests from DHCP
clients to an external DHCP server and returns the responses to the DHCP clients. The DHCP server must have
the appropriate routing so that its response packets to the DHCP clients arrive at the unit.
NOTE:
l DHCP snooping and the DHCP server can be enabled at the same time.
l The DHCP server and DHCP relay cannot be enabled at the same time.
This chapter covers the following topics:
NOTE: The 4xx, 5xx, 1xxx, and 3xxx models support configuring DHCP servers. The following table lists the maximum
number of clients for the supported FortiSwitch models:
4xx 15,000
5xx 20,000
For example:
config system dhcp server
edit 1
set default-gateway 50.50.50.2
set domain "FortiswitchTest.com"
set filename "text1.conf"
set interface "svi10"
config ip-range
edit 1
set end-ip 50.50.0.10
set start-ip 50.50.0.5
next
end
set lease-time 360
set netmask 255.255.0.0
set next-server 60.60.60.2
config options
edit 1
set value "dddd"
next
end
set tftp-server "1.2.3.4"
set timezone-option specify
set wifi-ac1 5.5.5.1
set wifi-ac2 5.5.5.2
set wifi-ac3 5.5.5.3
set wins-server1 6.6.6.1
set wins-server2 6.6.6.2
set dns-server1 7.7.7.1
set dns-server2 7.7.7.2
set dns-server3 7.7.7.3
set ntp-server1 8.8.8.1
set ntp-server2 8.8.8.2
set ntp-server3 8.8.8.3
next
end
3. When DHCP server receives the message, it examines the gateway IP address field for a DHCP scope that can be
used by the DHCP server to supply an IP address lease.
4. If DHCP server has multiple DHCP scopes, the address in the gateway IP address field (GIADDR) identifies the
DHCP scope from which to offer an IP address lease.
5. DHCP server sends an IP address lease offer (DHCPOFFER) directly to the relay agent identified in the gateway
IP address (GIADDR) field.
6. The router then relays the address lease offer (DHCPOFFER) to the DHCP client.
NOTE:
OSPF routing
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 can 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). An autonomous system boundary router
(ASBR) is located between an OSPF autonomous system and a non-OSPF network. Routing information is
contained in a link state database. Routing information is communicated between routers using link state
advertisements (LSAs).
The main benefit of OSPF is that it detects link failures in the network quickly and converges network traffic
successfully within seconds without any network loops. Also, OSPF has features to control which routes are
propagated to contain the size of the routing tables.
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.
For additional information about OSPF routing, see the OSPF section of the FortiOS Administration Guide.
Areas
An OSPF implementation consists of one or more areas. An area consists of a group of contiguous networks. If
you configure more than one area, Area Zero is always the backbone area. An ABR links one or more areas to the
OSPF backbone area.
The FortiSwitch unit supports different types of areas—stub areas, Not So Stubby areas (NSSA), and regular
areas. A stub area is an interface without a default route configured. NSSA is a type of stub area that can import
AS external routes and send them to the backbone but cannot receive AS external routes from the backbone or
other areas. All other areas are considered regular areas.
Adjacencies
When an OSPF router boots up, it sends OSPF Hello packets to find neighbors on the same network. Neighbors
exchange information, and the link state databases of both neighbors are synchronized. At this point, these
For two OSPF routers to become neighbors, the following conditions must be met:
l The subnet number and subnet mask for the interface must match in both routers.
l The Hello interval and Dead interval values must match.
l The routers must have the same OSPF area ID.
l If authentication is used, they must pass authentication checks.
In OSPF, routing protocol packets are only passed between adjacent routers.
Route summarization
Using route summarization reduces the number of LSAs being sent between routers. OSPF offers two types of
route summarization:
l Between areas through an ABR. This method summarizes routes in the area configuration.
config area
edit <area_IPv4_address>
config range
edit <id>
set prefix <xxx.xxx.xxx.xxx> <xxx.xxx.xxx.xxx>
next
end
next
end
l Between an OSPF AS and a non-OSPF network through an ASBR. This method summarizes external routes when
you redistribute them.
config summary-address
edit <id>
set prefix <xxx.xxx.xxx.xxx> <xxx.xxx.xxx.xxx>
next
end
Configuring OSPF
1. Create a switched virtual interface. See Configuring a switched virtual interface on page 209.
2. Go to Router > Config > OSPF > Settings.
a. Enter a unique 32-bit number in dotted decimal format for the router identifier. NOTE: Without a router
identifier, OSPF routing will not work.
b. If you are going to advertise default routes within OSPF, configure the default route option and enter the
routing metric (cost) for other routing protocols.
c. If you want to redistribute non-OSPF routes, select Enabled under Connected, Static, RIP, BGP, or ISIS
and then enter the routing metric in the Metric field.
d. Select Update.
3. Got to Router > Config > OSPF > Areas and select Add OSPF Area.
a. Enter the area IP address.
b. Select if the area is a stub area, NSSA, or a regular area.
c. Select Add.
4. Go to Router > Config > OSPF > Networks and select Add Network.
a. Enter the network identifier.
b. Enter the IP address and netmask, separated with a space. Use an IP address that includes the switched
virtual interface.
c. Select the area that you created.
d. Select Add.
5. Go to Router > Config > OSPF > Interfaces and select Configure OSPF Interface.
a. Enter a descriptive name for the OSPF interface name.
b. Select the same type of authentication that you selected for the area.
c. If you want static bidirectional forwarding detection, select Enable or Global.
d. Enter the maximum transmission unit.
e. Enter the cost.
f. Enter the number of seconds between Hello packets being sent.
g. Enter the number of seconds that a Hello packet is not received before the OSPF router decides that a
neighbor has failed.
h. Select Add.
Configuring OSPF using IPv4 on the FortiSwitch unit includes the following major steps:
NOTE: You can also configure OSPF using IPv6 with the config router ospf6 command.
For example:
# config router ospf
(ospf) # set router-id 1.1.1.2
3. Create an area
You must create at least one area. The area number is written in dotted decimal format (for example, configure
area 100 as 0.0.0.100).
config area
edit <area number>
set shortcut (default | disable | enable)
set type {nssa | regular | stub}
end
For example:
(ospf) # config area
(area) # edit 0.0.0.4
(0.0.0.4) # set type nssa
For example:
(ospf) # config network
(network) # edit 1
(1) # set area 0.0.0.4
(1) # set prefix 10.1.1.0 255.255.255.0
For example:
(ospf) # config interface
(ospf-interface) # edit oi1
(oi1) # set interface vlan40-p4
(oi1) # set priority 255
For example:
(ospf) # config redistribute connected
(connected) # set status enable
(connected) # end
Example configuration
The following example shows a very simple OSPF network with one area. FortiSwitch 1 has one OSPF interface
to FortiSwitch 2:
Switch 1
config system interface
edit vlan10-p3
set ip 30.1.1.1 255.255.255.0
set allowaccess ping https http ssh telnet
set vlanid 10
next
edit vlan40-p4
set ip 10.11.101.1 255.255.255.0
set allowaccess ping https http ssh telnet
set vlanid 40
end
config switch interface
edit "port3"
set native-vlan 10
next
edit "port4"
set native-vlan 40
next
end
Switch 2
config system interface
edit vlan20-p8
Switch 1
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 interface
edit vlan40
set cost 100
set priority 100
next
end
end
Switch 2
config router ospf
set router-id 10.11.101.2
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 interface
edit vlan40
set cost 100
set priority 100
next
end
end
RIP routing
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 routing is better than static routing but less scalable than open shortest path first (OSPF)
routing.
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 unit 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.
When you configure RIP routing, you can choose the strategy the access list uses to permit or deny IP addresses:
Terminology
Access list: A list of IP addresses and the action to take for each one. Access lists provide basic route and
network filtering.
Active RIP interface: Each RIP router sends and receives updates by actively communicating with its neighbors.
Keychain: A list of one or more authentication keys including its lifetime, which is how long each key is valid.
Metric: RIP uses hop count as the metric for choosing the best route. A hop count of 1 represents a network that is
connected directly to the FortiSwitch unit. A hop count of 16 represents a network that cannot be reached.
Passive RIP interface: The RIP router listens to updates from other routers but does not send out updates. A
passive RIP interface reduces network traffic.
Prefix list: A more powerful prefix-based filtering mechanism. A prefix is an IP address and netmask.
NOTE: You must create a keychain first before you can use the MD5 authentication mode with RIP version 2.
1. Create a switched virtual interface (SVI). See Configuring a switched virtual interface on page 209.
2. Go to Router > Config > RIP > Settings.
a. Select whether you want to use RIP version 1 or RIP version 2. RIP version 2 is the default.
b. If you want to use BFD, select Bidirectional Forwarding Detection.
4. Go to Router > Config > RIP > Distances and select Add RIP Distance.
a. If you want to change the RIP version used to send and receive routing updates, select from the Send
Version and Receive Version drop-down menus.
b. If you do not want to send RIP updates from this interface, select Passive Interface.
c. If you want to use authentication, select Text or MD5.
d. Select Add.
1. Create a switched virtual interface (SVI). See Configuring a switched virtual interface on page 209.
2. Go to Router > Config > RIP > Settings.
a. Select whether you want to use RIP version 1 or RIP version 2. RIP version 2 is the default.
b. If you want to use BFD, select Bidirectional Forwarding Detection.
c. If you want to use a default route, select Default Information Originate.
d. If you want to change the default timer values, enter the number of seconds in the Update, Timeout, and
Garbage fields.
e. If you want to redistribute non-RIP routes, select Enable under Connected, Static, OSPF, BGP, or ISIS.
l If you select Enable under Connected, enter the routing metric to use.
l If you select Enable under Static, OSPF, BGP, or ISIS, select Override Metric if you do not want
to use the default routing metric and then enter the routing metric to use.
f. Enter the default routing metric to use for static routing, OSPF, BGP, and ISIS.
3. Go to Router > Config > Access Lists and select Add Access List.
d. Enter the IP address and netmask, separated with a space or with a slash. For example, enter
1.2.3.4/5 or 1.2.3.4 248.0.0.0.
e. Select Add.
5. Go to Router > Config > RIP > Networks and select Add Network.
a. If you want to change the RIP version used to send and receive routing updates, select from the Send
Version and Receive Version drop-down menus.
b. If you do not want to send RIP updates from this interface, select Passive Interface.
c. If you want to use authentication, select Text or MD5.
d. Select Add.
Example configuration
The following example shows a very simple RIP network:
edit "vlan85"
set ip 180.1.1.1/24
set allowaccess ping https http ssh snmp telnet
set vlanid 85
next
end
Switch 1: Configure the RIP router; add authentication between FortiSwitch 1 and FortiSwitch 2
edit "vlan35"
set ip 170.38.65.2/24
set allowaccess ping https http ssh snmp telnet
set vlanid 35
next
edit "vlan70"
set ip 128.8.2.1/16
set allowaccess ping https http ssh snmp telnet
set vlanid 70
next
end
Switch 2: Configure the RIP router; add authentication between FortiSwitch 1 and FortiSwitch 2
VRRP
The Virtual Router Redundancy Protocol (VRRP) uses virtual routers to control which physical routers are
assigned to an access network. A VRRP group consists of a master router and one or more backup routers that
share a virtual IP address. If the master router fails, the VRRP automatically assigns one of the backup routers
without affecting network traffic. When the failed router is functioning again, it becomes the master router again.
VRRP provides this redundancy without user intervention or additional configuration to any of the devices on the
network.
To create a VRRP group, you need to create a VRRP virtual MAC address, which is a shared MAC address
adopted by the VRRP master. The VRRP virtual MAC address feature is disabled by default. You must enable the
VRRP virtual MAC address feature on all members of a VRRP group.
The VRRP master router sends VRRP advertisement messages to the backup routers. When the VRRP master
router fails to send advertisement messages, the backup router with the highest priority takes over as the master
router.
Configuring VRRP
NOTE: You can also configure VRRP using IPv6 with the config ipv6 and config vrrrp6 commands under the
config system interface command.
Use the get router info vrrp command to display the VRRP status:
get router info vrrp
BGP routing
NOTE: You must have an advanced features license to use BGP routing.
Border Gateway Protocol (BGP) is an inter Autonomous System (AS) routing protocol. It is the main protocol to
connect ISP networks across the world.
The current version of BGP is version 4 and defined in RFC- 4271. BGP uses TCP for transport protocol.
BGP is a path-vector protocol. It makes routing decision based on path and network policies rather than hop-count
metric (RIP) or cost-factor metrics (OSPF).
You must explicitly configure peers to exchange routing information. There is no discovery in BGP.
Terminology
An autonomous system (AS) is a group of one or more routers run by a network operator or service provider which
has a single and clearly defined routing policy and is under single administration. Usually, the network operator
will run an internal gateway protocol (such as OSPF, IS- etc) within the AS, and use BGP between AS's.
Each AS has a number that acts as a unique international identifier. AS numbers can be purchased from IANA.
External BGP (EBGP) is a variation of BGP which involves packet crossing multiple ASs. Confederation uses
EBGP.
Internal BGP (IBGP) involves routing packets within a single AS. Router reflector uses iBGP. Routes learned
using IBGP have a higher priority than the routes learned using EBGP.
BGP speaker router is a router that advertises routes to its peers using configured policies.
The FortiSwitch unit connects to neighbors as a BGP peer. The FortiSwitch unit is a BGP speaker node and
advertise its routes. The FortiSwitch unit accepts routes with BGP and adds these routes to its local routing tables.
Configuring BGP
Configuring BGP on the FortiSwitch unit includes the following major steps:
NOTE: For IBGP, if the IP address of the BGP neighbor is a loopback address, you must use the set update-
source cmd command to specify which interface address will be used as the source IP address in the outgoing
BGP packet.
config neighbor
edit <IP address>
set remote-as <1-4294967295>
end
For example:
Sample configurations
next
edit vlan40-p4
set ip 172.168.111.6 255.255.255.0
set allowaccess ping https http ssh telnet
set vlanid 40
set interface internal
end
config switch interface
edit "port2"
set native-vlan 20
set stp-state disabled
next
edit "port4"
set native-vlan 40
set stp-state disabled
next
edit "internal"
set allowed-vlans 1,20, 40, 4094
set stp-state disabled
next
end
Internal BGP
In this example, the two neighboring switches are in the same autonomous system.
External BGP
In this example, the two neighboring switches are in separate autonomous systems.
Using the following command, you can check the BGP status on the local switch:
# get router info bgp summary
PIM routing
NOTE: You must have an advanced features license to use PIM routing.
A FortiSwitch unit can operate as a Protocol Independent Multicast (PIM) version-4 router. FortiSwitchOS
supports PIM source-specific multicast (SSM) and version 3 of Internet Group Management Protocol (IGMP).
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.
NOTE:
l Access lists, prefix lists, and route maps are not supported.
l Bidirectional forwarding detection (BFD) is not supported.
l You cannot use PIM and the IGMP querier at the same time on the same switched virtual interface.
l PIM and IGMP snooping work independently.
l IPv6 is not supported.
l IGMP version-3 explicit membership tracking is not supported.
l SSM mapping is not supported.
l The multicast routing information base (MRIB) is not supported.
l The PIM management information base (MIB) is not supported.
This chapter covers the following topics:
Terminology
PIM domain: A PIM domain is a logical area comprising a number of contiguous networks. The domain contains
at least one Boot Strap Router (BSR) and a number of Rendezvous Points (RPs) and Designated Routers (DRs).
Configuring PIM
4. Enable PIM version 4 on all participating routers between the source and receivers. Use the config router
multicast command to set global operating parameters.
5. Configure the PIM routers that have good connections throughout the PIM domain to be candidate boot strap
routers (BSRs).
6. Configure one or more of the PIM routers to be candidate RPs.
7. If required, adjust the default settings of PIM-enabled interface(s).
IS-IS routing
NOTE: You must have an advanced features license to use IS-IS routing.
Intermediate System to Intermediate System Protocol (IS-IS) allows routing of ISO’s OSI protocol stack
Connectionless Network Service (CLNS). IS-IS is an Interior Gateway Protocol (IGP) that is not intended to be
used between Autonomous Systems (AS).
IS-IS is a link state protocol that is well-suited to smaller networks. It is in widespread use and has near universal
support on routing hardware. 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.
Terminology
TLV: IS-IS uses type-length-value (TLV) parameters to carry information in Link-State PDUs (LSPs). The TLV
field consists of one octet of type (T), one octet of length (L), and “L” octets of value (V).
Link-state PDU (LSP): The LSP contains information about each router in an area and its connected interfaces.
Complete sequence number PDU (CSNP): CSNPs contain a list of all LSPs in the current LSDB.
Authentication keychain: A keychain is a list of one or more authentication keys including the send and receive
lifetimes for each key. Keys are used for authenticating routing packets only during the specified lifetimes.
Configuring IS-IS
The FortiSwitch unit provides authentication mechanisms to control user access to the system (based on the user
group associated with the user). The members of user groups are user accounts. Local users and peer users are
defined on the FortiSwitch unit. User accounts can also be defined on remote authentication servers.
This section describes how to configure local users and peer users and how to configure user groups. For
information about configuring the authentication servers, see Remote authentication servers on page 40.
Users
A user account consists of a user name, password, and potentially other information, configured in a local user
database or on an external authentication server.
Users can access resources that require authentication only if they are members of an allowed user group.
Field Description
Field Description
User groups
Security policies allow access to specified user groups only. This restricted access enforces Role Based Access
Control (RBAC) to your organization’s network and its resources. Users must be in a group and that group must
be part of the security policy.
Field Description
Sets the authentication timeout for the user group. The range is
authtimeout <timeout> 1 to 480 minutes. If this field is set to 0, the global authentication
timeout value is used.
group-type <grp_type> Enter the group type. <grp_type> determines the type of users
and is one of the following:
l firewall—FortiSwitch users defined in user local,
user ldap, or user radius
l fsso-service—Directory Service users
member <names> Enter the names of users, peers, LDAP servers, or 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.
802.1x authentication
To control network access, the FortiSwitch unit supports IEEE 802.1x authentication. A supplicant connected to a
port on the switch must be authenticated by a RADIUS/Diameter server to gain access to the network. The
supplicant and the authentication server communicate using the switch using EAP. The FortiSwitch unit supports
EAP-PEAP, EAP-TTLS, EAP-TLS, and EAP-MD5.
To use the RADIUS server for authentication, you must configure the server before configuring the users or user
groups on the FortiSwitch unit.
The FortiSwitch unit implements MAC-based authentication. The switch saves the MAC address of each
supplicantʼs device. The switch provides network access only to devices that have successfully been
authenticated.
The FortiSwitch unit supports up to 20 devices per port for 802.1x MAC-based authentication. System-wide, the
FortiSwitch unit now supports a total of 10 times the number of interfaces for 802.1x MAC-based authentication:
You can enable the MAC Authentication Bypass (MAB) option for devices (such as network printers) that cannot
respond to the 802.1x authentication request. With MAB enabled on the port, the system will use the device
MAC address as the user name and password for authentication.
Optionally, you can configure a guest VLAN for unauthorized users. Alternatively, you can specify a VLAN for
users whose authentication was unsuccessful.
When you are testing your system configuration for 802.1x authentication, you can use the monitor mode to allow
network traffic to flow, even if there are configuration problems or authentication failures.
You can configure the RADIUS server to return a VLAN in the authentication reply message.
1. On the FortiSwitch unit, select port-based authentication or MAC-based authentication and a security group.
2. On the RADIUS server, configure the attributes.
3. Select 802.1X for port-based authentication or select 802.1X-MAC-based for MAC-based authentication.
To select port-based authentication and the security group on the FortiSwitch unit:
config switch interface
edit <interface_name>
config port-security
set port-security-mode 802.1X
end
set security-groups <security-group-name>
end
The FortiSwitch unit will change the native VLAN of the port to that of the VLAN from the server.
To select MAC-based authentication and the security group on the FortiSwitch unit:
config switch interface
edit <interface_name>
config port-security
set port-security-mode 802.1X-mac-based
end
set security-groups <security-group-name>
end
Here, the switch assigns the returned VLAN only to this userʼs MAC address. The native VLAN of the port remains
unchanged.
Use the following configuration command to view the MAC-based VLAN assignments:
diagnose switch vlan assignment mac list [sorted-by-mac | sorted-by-vlan]
Devices such as network printers, cameras, and sensors might not support 802.1x authentication. If you enable
the MAB option on the port, the system will use the device MAC address as the user name and password for
authentication.
MAB retries authentication three times before the device is assigned to a guest VLAN for unauthorized users. By
default, reauthentication is disabled. Use the following commands if you want to change the default behavior:
config switch global
config port-security
set mab-reauth enable
end
You must provision the RADIUS server to authenticate the devices that use MAB, either by adding the
MAC addresses as regular users or by implementing additional logic to resolve the MAC addresses in a network
inventory database.
The following flowchart shows the FortiSwitch 802.1x port-based authentication with MAB enabled:
The following flowchart shows the FortiSwitch 802.1x MAC-based authentication with MAB enabled:
To select which 802.1x certificate and certificate authority that the FortiSwitch unit uses, see SSL configuration on
page 60.
2. Select Reauthorization Period and then enter the number of minutes before the system requires the device to
reauthenticate.
3. Select Reauthorization Attempts and then enter the maximum number of times that the system will try to
reauthorize the session.
4. Select Require Reauthentication to revert all devices to the unauthenticated state if the link goes down or select Do
Not Require Reauthentication if reauthentication is unnecessary if the link goes down.
5. Select Update.
NOTE: Changes to global settings only take effect when new 802.1x/MAB sessions are created.
Variable Description
link-down-auth If a link goes down, this setting determines whether the impacted devices
must reauthenticate. Set the value to no-action if reauthentication is
unnecessary. Set the value to set-unauth to revert all devices to the
unauthenticated state. Each device must reauthenticate. The default is
set-unauth.
Variable Description
max-reauth-attempt If 802.1x authentication fails, this setting caps the number of attempts that
the system will initiate. The range is from 0 to 15 where "0" disables the
reauthentication attempts. The default value is 3.
reauth-period This setting defines how often the device needs to reauthenticate (that is,
if a session remains active beyond this number of minutes, the system
requires the device to reauthenticate). The default value is 60 minutes. Set
the value to 0 to disable reauthentication.
Specify how many seconds are allowed for the 802.1x reauthentication
tx-period
before it times out. The default value is 30 seconds.
3. Select 802.1X for port-based authentication or select 802.1X-MAC-based for MAC-based authentication.
The Port Security section displays additional options.
config port-security
set mab-eapol-request <0-10>
set port-security-mode {none | 802.1X | 802.1X-mac-based}
set framevid-apply {disable | enable}
set auth-fail-vlan {enable | disable}
set auth-fail-vlanid <vlanid>
set eap-passthru {enable | disable}
set guest-auth-delay <integer>
set guest-vlan {enable | disable}
set guest-vlanid <vlanid>
set mac-auth-bypass {enable | disable}
set open-auth {enable | disable}
set radius-timeout-overwrite {enable | disable}
end
set security-groups <security-group-name>
end
mab-eapol- Set how many EAP packets are sent to trigger EAP authentication for 3
request <0-10> “silent supplicants” (such as end devices running Windows 7) that send
non-EAP packets when they wake up from sleep mode.
port-security- Set the security mode for the port. None (no security) is the default. Set the
mode {none | security mode to 802.1X for port-based authentication or 802.1X-mac-
802.1X | based for MAC-based authentication. If you change the security mode none
802.1X-mac- from none, you must set the security group with the set security-
based} groups command.
framevid-apply Enable or disable the capability to apply the EAP/MAB frame VLAN to the enable
{disable | port native VLAN.
enable}
NOTE: For phone and PC configuration only, disable framevid-apply
to preserve the native VLAN when the data traffic is expected to be
untagged.
The system assigns the guest-vlan to unauthorized users. After the system
assigns the auth-fail-vlan to users who attempted to authenticate but failed
to provide valid credentials.
auth-fail-vlan
disable
and guest-vlan
If you enable either guest-vlan or auth-fail-vlan, you must
configure the corresponding VLAN ID (otherwise, the configuration save
attempt will fail when you enter next or end).
guest-auth-
Time in seconds when an authorization fails after the guest is applied. 5
delay
open-auth
{enable | Enable or disable open authentication (monitor mode) on this interface. disable
disable}
radius-timeout- This setting specifies whether to use the RADIUS-provided re- disable
overwrite authentication timeout. If the setting is enabled, the port uses the local
timeout (see Configuring global settings on page 260).
If the setting is disabled, the system uses the value of the RADIUS Access-
Accept message Session-Timeout attribute to determine the duration of
the session. It uses the Termination-Action value to determine the device
action when the session’s timer expires.
security-groups
Enter the security group name if you are using port-based authentication
<security-group- No default
or MAC-based authentication.
name>
Sessions info:
STA=00:24:9b:1b:20:65 Type=802.1X EAP PEAP state=AUTHENTICATED
Sessions info:
0a:0a:0b:0b:0a:0a Type=802.1x,MD5,state=AUTHENTICATED,etime=2,eap_cnt=3 param-
s:reAuth=3600
0a:0a:0b:0b:0a:09 Type=802.1x,MD5,state=AUTHENTICATED,etime=2,eap_cnt=3
params:reAuth=3600
0a:0a:0b:0b:0a:08 Type=802.1x,MD5,state=AUTHENTICATED,etime=2,eap_cnt=3 param-
s:reAuth=3600
0a:0a:0b:0b:0a:07 Type=802.1x,MD5,state=AUTHENTICATED,etime=2,eap_cnt=3
params:reAuth=2896
0a:0a:0b:0b:0a:06 Type=802.1x,MD5,state=AUTHENTICATED,etime=2,eap_cnt=3 param-
s:reAuth=3600
0a:0a:0b:0b:0a:05 Type=802.1x,MD5,state=AUTHENTICATED,etime=2,eap_cnt=3
params:reAuth=3600
0a:0a:0b:0b:0a:04 Type=802.1x,MD5,state=AUTHENTICATED,etime=2,eap_cnt=3 param-
s:reAuth=3600
0a:0a:0b:0b:0a:03 Type=802.1x,MD5,state=AUTHENTICATED,etime=2,eap_cnt=3
params:reAuth=3600
0a:0a:0b:0b:0a:02 Type=802.1x,MD5,state=AUTHENTICATED,etime=2,eap_cnt=3 param-
s:reAuth=3600
0a:0a:0b:0b:0a:01 Type=802.1x,MD5,state=AUTHENTICATED,etime=2,eap_cnt=3
params:reAuth=3600h=120
Use the monitor mode to test your system configuration for 802.1x authentication. You can use monitor mode to
test port-based authentication, MAC-based authentication, EAP pass-through mode, and MAC authentication
bypass. After you enable monitor mode, the network traffic will continue to flow, even if the users fail
authentication.
After open-auth mode is enabled, the port changes to an authorized monitor mode.
To confirm that the port is in monitor mode, use the diagnose switch command. For example:
S448DP3X15000009 # diag sw 8 status
port9 : Mode: port-based (mac-by-pass enable)
Link: Link up
Port State: authorized:open_auth ( )
Dynamic Authorized Vlan : 0
EAP pass-through mode : Enable
Native Vlan : 10
Allowed Vlan list: 10,20,30
Untagged Vlan list:
Guest VLAN :
Auth-Fail Vlan : 200
Sessions info:
00:09:0f:09:09:09 Type=802.1x,,state=AUTHENTICATING,etime=0,eap_cnt=0
params:reAuth=3600"
c. Select 802.1X for port-based authentication or select 802.1X-MAC-based for MAC-based authentication.
e. Select OK.
end
f. Select Add.
2. Create a user group:
a. Go to System > User > Group.
b. Select Add Group.
c. In the Name field, enter Radius_group.
d. Select Add Server.
e. Select Radius_group.
f. Select OK.
Ensure that the following attributes are configured on the RADIUS server:
If you want to use a RADIUS server to authenticate administrators, you must configure the authentication before
you create the administrator accounts. Do the following:
h. Select Add.
2. Create a user:
a. Go to System > User > Definition.
b. Select Add User.
c. In the User Name field, enter RADIUS1.
d. Select Password from the Type field.
e. In the Password field and Confirm Password field, enter
6rF7O4/Zf3p2TutNyeSjPbQc73QrS21wNDmNXd/rg9k6nTR6yMhBRsJGpArhle6UOCb7b8InM3nr
CeuVETr/a02LpILmIltBq5sUMCNqbR6zp2fS3r35Eyd3IIrzmve4Vusi52c1MrCqVhzzy2EfxkBr
x5FhcRQWxStvnVt4+dzLYbHZ.
f. Select Add.
3. Create a user group:
a. Go to System > User > Group.
b. Select Add Group.
c. In the Name field, enter RADIUS_Admins.
d. Select RADIUS1 in the Available Users box and select the right arrow to move it to the Members box.
2. Create a user:
config user radius
edit "RADIUS1"
set secret ENC
6rF7O4/Zf3p2TutNyeSjPbQc73QrS21wNDmNXd/rg9k6nTR6yMhBRsJGpArhle6UOCb7b8InM3n
rCeuVETr/a02LpILmIltBq5sUMCNqbR6zp2fS3r35Eyd3IIrzmve4Vusi52c1MrCqVhzzy2Efxk
Brx5FhcRQWxStvnVt4+dzLYbHZ
set addr-mode ipv4
next
end
NOTE: To obtain a valid Framed-IP-Address attribute value, you need to manually configure DHCP snooping in the
802.1x-authenticated ports of your VLAN network for both port and MAC modes.
You can use your FortiSwitch unit for RADIUS single sign-on (RSSO) in two modes:
l Standalone mode
l FortiLink mode (FortiSwitch unit managed by FortiGate unit)
The FortiSwitch unit uses 802.1x-authenticated ports to send five types of RADIUS accounting messages to the
RADIUS accounting server to support FortiGate RADIUS single sign-on:
l START—The FortiSwitch unit has been successfully authenticated, and the session has started.
l STOP—The FortiSwitch session has ended.
l INTERIM—Periodic messages sent based on the value set using the set acct-interim-interval command.
l ON—The FortiSwitch unit will send this message when the switch is turned on.
l OFF—The FortiSwitch unit will send this message when the switch is shut down.
NOTE: Starting in FortiSwitchOS 6.2.1, RADIUS accounting and CoA now support EAP and MAB 802.1x authentication.
Configuring the RADIUS accounting server and FortiGate RADIUS single sign-on
Use the following commands to set up RADIUS accounting and enable a FortiSwitch unit to receive CoA and
disconnect messages from the RADIUS server:
config user radius
edit <RADIUS_server_name>
set acct-interim-interval <seconds>
set secret <secret_key>
set server <domain_ipv4_ipv6>
set addr-mode {ipv4 | ipv6}
set source-ip <ipv4_addr>
set source-ip6 <ipv6_addr>
config acct-server
edit <entry_ID>
set status {enable | disable}
set server <accounting_server>
set secret <secret_key>
set port <port_number>
next
end
next
end
Variable Description
<RADIUS_server_name> Enter the name of the RADIUS server that will be sending CoA and
disconnect messages to the FortiSwitch unit. By default, the messages
use port 3799.
addr-mode {ipv4 | ipv6} Select whether to connect to the RADIUS server with IPv4 or IPv6. The
default is IPv4.
secret <secret_key> Enter the shared secret key for authentication with the RADIUS server.
server <domain_ipv4_ipv6> Enter the domain name, IPv4 address, or IPv6 address for the RADIUS
server. There is no default.
If the addr-mode was set to ipv4, enter the IPv4 address of the server
source-ip <ipv4_addr>
that will be sending accounting messages. The default is 0.0.0.0.
source-ip6 <ipv6_addr> If the addr-mode was set to ipv6, enter the IPv6 address of the server
that will be sending accounting messages. There is no default.
status {enable | disable} Enable or disable RADIUS accounting. The default is disable.
Variable Description
Enter the domain name, IPv4 address, or IPv6 address of the RADIUS
server <accounting_server> server that will be receiving the accounting messages. There is no
default value.
secret <secret_key> Enter the shared secret key for the RADIUS accounting server.
Enter the port number for the RADIUS accounting server to receive
port <port_number>
accounting messages from the FortiSwitch unit. The default is 1813.
NOTE: For increased security, each subnet interface that will be receiving CoA requests must be configured with the
set allowaccess radius-acct command.
NOTE: Starting in FortiSwitchOS 6.2.1, RADIUS accounting and CoA support EAP and MAB 802.1x authentication.
l CoA messages to change session authorization attributes (such as data filters and the session-timeout setting)
during an active session. To change the session timeout for an authenticated session, the CoA-Request message
needs to use the IEEE session-timeout attribute.
l Disconnect messages (DMs) to flush an existing session. For MAC-based authentication, all other sessions are
unchanged, and the port stays up. For port-based authentication, only one session is deleted.
RADIUS CoA messages use the following Fortinet proprietary attribute:
Fortinet-Host-Port-AVPair 42 string
The FortiSwitch unit sends the following Error-Cause codes in RADIUS CoA-NAK and Disconnect-NAK
messages:
Unsupported Attribute 401 This error is a fatal error, which is sent if a request contains an
attribute that is not supported.
Invalid Attribute Value 407 This error is a fatal error, which is sent if a CoA-Request or
Disconnect-Request message contains an attribute with an
unsupported value.
Variable Description
allowaccess <access_types> Enter the types of management access permitted on this interface. Valid
types are as follows: http https ping snmp ssh telnet
radius-acct. Separate each type with a space. You must include
radius-acct to receive CoA and disconnect messages.
Enter the name of the RADIUS server that will be sending CoA and
<RADIUS_server_name> disconnect messages to the FortiSwitch unit. By default, the messages
use port 3799.
Enable or disable whether the FortiSwitch unit will accept CoA and
radius-coa {enable | disable}
disconnect messages. The default is disable.
radius-port <port_number> Enter the RADIUS port number. By default, the value is 1812.
secret <secret_key> Enter the shared secret key for authentication with the RADIUS server.
server <server_name_ipv4_ Enter the domain name, IPv4 address, or IPv6 address for the RADIUS
ipv6> server. There is no default.
addr-mode {ipv4 | ipv6} Select whether to connect to the RADIUS server with IPv4 or IPv6.
Use cases
Use case 1
In this use case, a Cisco phone uses MAB and uses LLDP-MED to assign the voice VLAN. A PC behind the Cisco
phone uses 802.1x authentication with or without dynamic VLAN assignment.
Use case 2
In this use case, the Cisco phone uses 802.1x authentication and uses LLDP-MED to assign the voice VLAN. A
PC behind the Cisco phone uses 802.1x authentication without dynamic VLAN assignment.
RADIUS dynamic VLAN assignment for the voice VLAN must match the voice VLAN configured in the LLDP-MED
profile for Cisco phone 802.1x authentication.
Use case 3
In this use case, the Cisco phone uses 802.1x authentication and uses LLDP-MED to assign the voice VLAN. The
PC behind the Cisco phone uses 802.1x authentication with dynamic VLAN assignment.
RADIUS dynamic VLAN assignment for the voice VLAN has to match the voice VLAN configured in the LLDP-
MED profile for Cisco phone 802.1x authentication.
The VLAN ID from the RADIUS dynamic VLAN assignment for the PC has to be added in the untagged VLAN list
on the port.
l Using more than one security group (with the set security-groups command) per security profile is not
supported.
l CoA and single sign-on are supported only by the CLI in this release.
l RADIUS CoA is supported in standalone mode and in non-NAT FortiLink mode.
l The FortiSwitch unit supports using FortiAuthenticator, FortiConnect, Microsoft Network Policy Server (NPS), Aruba
ClearPass, and Cisco Identity Services Engine (ISE) as the RADIUS server for CoA and RSSO.
l Each RADIUS CoA server can support only one accounting manager in this release.
l RADIUS accounting/CoA/VLAN-by-name features are supported only with eap-passthru enable.
l Fortinet recommends a unique secret key for each accounting server.
l For CoA to correctly function with FortiAuthenticator or FortiConnect, you must include the User-Name attribute (you
can optionally include the Framed-IP-Address attribute) or the User-Name and Calling-Station-ID attributes in the
CoA request.
l To obtain a valid Framed-IP-Address attribute value, you need to manually configure DHCP snooping in the 802.1x-
authenticated ports of your VLAN network for both port and MAC modes.
l Port-based basic statistics for RADIUS accounting messages are supported in the Accounting Stop request.
l By default, the accounting server is disabled. You must enable the accounting server with the set status
enable command.
l The default port for FortiAuthenticator single sign-on is 1813 for the FortiSwitch unit.
l In MAC-based authentication, the maximum number of client MAC addresses is 20. Each model has its own
maximum limit.
l Static MAC addresses and sticky MAC addresses are mechanisms for manual/local authorization; 802.1x is a
mechanism for protocol-based authorization. Do not mix them.
l Fortinet recommends an 802.1x setup rate of 5 to 10 sessions per second.
l Starting in FortiSwitch 6.2.0, when 802.1x authentication is configured, the EAP pass-through mode (set eap-
passthru) is enabled by default.
l For information about RADIUS attributes supported by FortiSwitchOS, refer to the “Supported attributes for RADIUS
CoA and RSSO” appendix.
l The authentication and accounting server configuration must be in the same address mode within the same
member. The address mode is either IPv4 or IPv6, no matter what the address mode is in the FQDN or raw IP
address. The address mode cannot be mixed.
TACACS
This chapter contains information on using Terminal Access Controller Access-Control System (TACACS+)
authentication with your FortiSwitch unit.
Administrative accounts
Administrative, or admin, accounts allow access to various aspects of the FortiSwitch configuration. The level of
access is determined by the admin profile that is assigned to the admin account.
See Configuring administrator tasks on page 36 for the steps to create an admin profile.
User accounts
User accounts identify a network user and determine what parts of the network the user is allowed to access.
Example configuration
The following is an example configuration of a TACACS+ user account, with the CLI syntax shown to create it:
end
end
end
The FortiSwitch unit provides various features for troubleshooting and support.
Dashboard
The dashboard displays your FortiSwitch management mode and shows the current values for the following:
l CPU
l RAM
l Temperature for FortiSwitch models that have temperature sensors
l PoE (on FortiSwitch PoE models)
l Bandwidth
l Losses
Operation mode
The Operation Mode field shows whether the FortiSwitch unit is managed by a FortiGate unit.
When the FortiSwitch unit is in FortiLink mode, a message is displayed above the dashboard, and the Operation
Mode is “Remote Management.”
When the FortiSwitch unit is in standalone mode, the Operation Mode is “Local Management.”
Select Remote Management or Local Management to go to the Config > Management Mode page, where you can
switch between FortiLink mode and standalone mode.
FortiSwitch Cloud
The FortiSwitchCloud field shows whether the FortiSwitch unit is managed by FortiSwitch Cloud. A FortiSwitch
unit must be in standalone mode to be manged by FortiSwitch Cloud. For more details about using FortiSwitch
Cloud, refer to the FortiSwitch Cloud Administration Guide.
Select Enable and then select Advanced Settings to configure your FortiSwitch unit to be managed by FortiSwitch
Cloud.
1. On the FortiSwitchCloud page, select Enable and then select Advanced Settings.
2. By default, the Name field is set to fortiswitch-dispatch.forticloud.com, the domain name for
FortiSwitch Cloud. No change is needed.
3. By default, the Port field is set to 443, the port number used to connect to FortiSwitch Cloud. No change is needed.
4. In the Interval (Seconds) field, enter the time in seconds allowed for domain name system (DNS) resolution. The
default is 15 seconds. The range of values is 3-300 seconds.
5. Select Update to save your changes.
Bandwidth
The Bandwidth graphs show the inbound and outbound bandwidth for the entire FortiSwitch unit over a day and
over a week. The Average Per Interface bar chart shows the average bandwidth (inbound bandwidth plus
outbound bandwidth) for each interface over a day and over a week; only the interfaces with the highest
bandwidth are displayed.
Losses
The Losses graphs show the inbound errors, outbound errors, inbound drops, and outbound drops for the entire
FortiSwitch unit over a day and over a week.
Virtual wire
Some testing scenarios might require two ports to be wired 'back-to-back'. Instead of using a physical cable, you
can configure a virtual wire between two ports. The virtual wire forwards traffic from one port to the other port with
minimal filtering or modification of the packets.
Notes:
Virtual wire ports set a special Tag Protocol Identifier (TPID) in the VLAN header. The default value is 0xdee5, a
value that real network traffic never uses.
end
l Ports have ingress and egress VLAN filtering disabled. All traffic (including VLAN headers) is passed unchanged to
the peer. All egress traffic is untagged.
l Ports have L2 learning disabled.
l Ports have their egress limited to their peer and do no allow egress from any other ports.
l The system uses TCAM to force forwarding from a port to its peer.
l The TCAM prevents any copy-to-cpu or packet drops.
When you power on the FortiSwitch unit, the BIOS performs basic device initialization. When this activity is
complete, and before the OS starts to boot, you can click any key to bring up the boot menu.
From the menu, click the "I" key to configure TFTP settings. With newer versions of the BIOS, you can specify the
network port (where you have connected your network cable). If you are not prompted to specify the network port,
you must connect your network cable to the default network port:
l If the switch model has a WAN port, the WAN port is the network port.
l If the switch has no WAN port, the highest port number is the network port.
Cable diagnostics
NOTE: There are some limitations for cable diagnostics on the FS-108E, FS-124E, FS-108E-POE, FS-108E-
FPOE, FS-124E-POE, FS-124E-FPOE, FS-148E, and FS-148E-POE models:
l Open
l Short
l Ok
l Open_Short
l Unknown
l Crosstalk
If no cable is connected to the specific port, the state is Open, and the cable length is 0 meters.
Use the following command to run a time domain reflectometry (TDR) diagnostic test on cables connected to a
specific port:
diagnose switch physical-ports cable-diag <physical port name>
NOTE: Running cable diagnostics on a port that has the link up will interrupt the traffic for several seconds.
For example:
# diagnose switch physical-ports cable-diag port1
Use the following command to check the medium dependent interface crossover (MDI-X) interface status for a
specific port:
diagnose switch physical-ports mdix-status <physical port name>
For example:
# diagnose switch physical-ports mdix-status port1
port1: MDIX(Crossover)
During debugging, you might want to see whether a particular type of packet was received on an interface on the
switch.
1. Set up an access control list (ACL) on the switch with the interface that you want to monitor. See Access control
lists on page 153. This ACL is the ingress interface.
To examine the packets that have been sampled in the example, use the following command:
# diagnose sniffer packet sp17 none 6
Packet capture
When troubleshooting networks, it helps to look inside the header of the packets. This helps to determine if the
packets, route, and destination are all what you expect. Packet capture is also called a network tap, packet
sniffing, or logic analyzing.
To capture packets:
The maximum number of packet-capture profiles and the RAM disk size allotted for packet capture are different
for the various platforms:
1xx 8 20
2xx 8 50
4xx 16 75
5xx 16 100
1xxx 16 100
3xxx 16 100
The filter uses flexible logic. For example, if you want packets using UDP port 1812 between hosts named
forti1 and either forti2 or forti3:
'udp and port 1812 and host forti1 and \( forti2 or forti3 \)'
You can specify the number of packets to capture and the maximum packet length to be captured. The maximum
number of packets that can be captured depends on the RAM disk size.
For example:
config system sniffer-profile
edit profile1
set filter none
set max-pkt-count 100
set max-pkt-len 100
set system-interface mgmt
end
For example:
execute system sniffer-profile start profile1
To upload the .pcap file for a specific packet-capture profile to an FTP server:
execute system sniffer-profile upload ftp <profile_name> <packet_capture_file_
name.pcap> <FTP_server_IP_address:<optional_port>>
To upload the .pcap file for a specific packet-capture profile to a TFTP server:
execute system sniffer-profile upload tftp <profile_name> <packet_capture_file_
name.pcap> <TFTP_server_IP_address:<optional_port>>
For example:
execute system sniffer-profile delete-capture profile1
Network monitoring
You can monitor specific unicast MAC addresses in directed mode, monitor all detected MAC addresses on a
FortiSwitch unit in survey mode, or do both. The FortiSwitch unit gives the directed mode a higher priority than
survey mode. The directed mode and survey mode are disabled by default.
Directed mode
In directed mode, you select which unicast MAC addresses that you want examined. The FortiSwitch unit detects
various fields of the packet—such as MAC address, IP address, VLAN, and user name—and stores the data in
either of two databases.
The maximum number of MAC addresses that can be monitored depends on the FortiSwitch model.
To find out how many network monitors are available, use the following command:
diagnose switch network-monitor cfg-stats
To find out which network monitors are being used currently, use the following command:
diagnose switch network-monitor dump-monitors
To specify a single unicast MAC address (formatted like this: xx:xx:xx:xx:xx:xx) to be monitored, use the
following commands:
config switch network-monitor directed
edit <unused network monitor>
set monitor-mac <MAC address>
next
end
For example:
config switch network-monitor directed
edit 1
set monitor-mac 00:25:00:61:64:6d
next
end
Survey mode
In survey mode, the FortiSwitch unit detects MAC addresses to monitor for a specified number of seconds. You
can specify network monitoring for 120 to 3,600 seconds. The default time is 120 seconds. The FortiSwitch unit
detects various fields of the packet—such as MAC address, IP address, VLAN, and user name—and stores the
data in either of two databases.
For example:
config switch network-monitor settings
set status enable
set survey-mode enable
set survey-mode-interval 480
end
To see the type of packets going to and from monitored MAC addresses, use the following command:
diagnose switch network-monitor parser-stats
To see the number of packets going to and from monitored MAC addresses, use the following command:
diagnose switch network-monitor dump-monitors
NOTE: The FortiSwitch unit creates an entry in the layer-3 database using the exact packet contents when they were
parsed. If the MAC address is then assigned to a different VLAN, this change might not be detected immediately. If there
is a discrepancy in the output for the diagnose switch network-monitor dump-l2-db and diagnose
switch network-monitor dump-l3-db commands, use the output with the more recent time stamp.
To see all detected devices from the layer-2 database, use the following command:
diagnose switch network-monitor dump-l2-db
To see all detected devices from the IP address database, use the following command:
diagnose switch network-monitor dump-l3-db
NOTE:
You can sample IP packets on a FortiSwitch unit and then export the data in NetFlow format or Internet Protocol
Flow Information Export (IPFIX) format.
The maximum number of concurrent flows is defined by the FortiSwitch model. When this limit is exceeded, the
oldest flow expires and is exported.
To use flow export, you need to enable packet sampling and then configure the flow export.
format {netflow1 | netflow5 | You can set the format of the exported flow data as netflow9
netflow9 | ipfix} NetFlow version 1, NetFlow version 5, NetFlow version 9,
or IPFIX sampling.
level {ip | mac | port | proto | You can set the flow-tracking level to one of the following: ip
vlan} - ip—The FortiSwitch unit collects the source IP address
and destination IP address from the sample packet.
- mac—The FortiSwitch unit collects the source MAC
address and destination MAC address from the sample
packet.
- port—The FortiSwitch unit collects the source IP
address, destination IP address, source port, destination
port, and protocol from the sample packet.
- proto—The FortiSwitch unit collects the source IP
address, destination IP address, and protocol from the
sample packet.
- vlan—The FortiSwitch unit collects the source IP
address, destination IP address, source port, destination
port, protocol, and VLAN from the sample packet.
timeout-general <integer> Set the general timeout in seconds for the flow session. 3600
The range of values is 60-604800.
Set the ICMP timeout for the flow session. The range of
timeout-icmp <integer> 300
values is 60-604800.
timeout-max <integer> Set the maximum number of seconds before the flow 604800
session times out. The range of values is 60-604800.
Set the TCP timeout for the flow session. The range of
timeout-tcp <integer> 3600
values is 60-604800.
timeout-tcp-fin <integer> Set the TCP FIN flag timeout for the flow session. The 300
range of values is 60-604800.
Set the TCP RST flag timeout for the flow session. The
timeout-tcp-rst <integer> 120
range of values is 60-604800.
timeout-udp <integer> Set the UDP timeout for the flow session. The range of 300
values is 60-604800.
NOTE: Layer-2 flows for netflow 1 and netflow 5 are not supported. For the output of the get system flow-
export-data statistics command, the Incompatible Type field displays how many flows are not exported
because they are not supported.
When you have multiple FortiSwitch units and need to locate a specific switch, use the following command to flash
all port LEDs on and off for a specified number of minutes:
diagnose switch physical-ports led-flash <disable | time>
You can flash the port LEDs for 5, 15, 30, or 60 minutes. After you locate the FortiSwitch unit, you can use
disable to stop the LEDs from flashing.
NOTE: For the 5xx switches, the diagnose switch physical-ports led-flash command flashes only the
SFP port LEDs, instead of all the port LEDs.
Deployment scenario
Summary
A. Configure all devices.
o PC
o Phone
o FortiSwitch
o FortiAuthenticator
o DHCP server
B. Authenticate phone using MAB and using LLDP-MED.
C. Authenticate PC using EAP 802.1x.
1. Configure the PC, phone, FortiSwitch, FortiAuthenticator [RADIUS server], and DHCP
server)
1. On the phone, enable the WAN port and leave the VLAN ID at the default to allow LLDP-Med (Policy) designate for
voice VLAN assignment.
2. On the phone, enable the LAN port and assign the VLAN ID for data matching the RADIUS VLAN assignment.
PC configuration
FortiSwitch configuration
edit "Corp_Grp_10"
set member "FAC_LAB"
next
end
ENCW82jBg06XhKD/4Dugqm8QF2f7D1B4bfFdDSZaLUQPwZXv4F8zMc5sWHRl9suwmbmzNnAnyq
PaarAYcSLuT8kVjFSRO0znx+TXVWTqdSeLCpbMv
+HYFNOHMbYlfES8wTYYD40InCgrYr2johvr2vfa5KG4g8XMwKSIM0LurR//1WqT0fH
set server
next
end
edit "port4"
set allowed-vlans 20-21,31,41
set security-groups "Corp_Grp_10"
set snmp-index 4
configure port-security
set auth-fail-vlan disable
set guest-auth-delay 120
set guest-vlan disable
set mac-auth-bypass enable
set port-security-mode 802.1X-mac-based
set radius-timeout-overwrite disable
set auth-fail-vlanid 40
set guest-vlanid 30
end
RADIUS configuration
MAB Authentication:
DHCP configuration
1. On the DHCP server, configure a pool for phone and a pool for the PC.
!
ip dhcp pool PC
network 10.1.1.0 255.255.255.0
default-router 10.1.1.1
dns-server 10.1.1.1
!
ip dhcp pool PC
network 20.1.1.0 255.255.255.0
default-router 20.1.1.1
dns-server 20.1.1.5
2. Configure exclude lists for pools for both gateway and DNS.
ip dhcp excluded-address 20.1.1.1 20.1.1.1.5
<<<<gateway and dns server
ip dhcp excluded-address 10.1.1.1 10.1.1.1.5
<<<<gateway and dns server
!
ip dhcp pool PC
network 20.1.1.0 255.255.255.0
default-router 20.1.1.1
dns-server 20.1.1.5
3. Configure the switch port VLAN interface as a gateway for the phone.
# show run
Building configuration
Current configuration
!
interface vlan21 <<<<<<
ip address 20.1.1.1
end
4. Configure the switch port VLAN interface as a gateway for the PC.
# show run
Building configuration
Current configuration
!
interface vlan10 <<<<<<
ip address 10.1.1.1
end
# show run
Building configuration
Current configuration
!
interface GigabitEthernet g1/0/1 <<<<<<
switchport access vlan 21
switchport trunk encapsulation dot1q
switchport trunk all
switchport mode trunk
end
# show run
Building configuration
Current configuration
!
2. Connect a link between the FortiSwitch unit and the DHCP server and assign matching
VLAN for the phone for both ports
3. Connect a link between the FortiSwitch unit and the DHCP server and assign a matching
VLAN for the PC for both ports
Sessions info:
68:f7:28:fb:c0:0f Type=802.1x,PEAP,state=AUTHENTICATED
params:reAuth=3600
00:a8:59:d8:f1:f6 Type=MAB,,state=AUTHENTICATED
params: reAuth=3600
b. On the FortiSwitch unit, verify that the lldp neighbor detail accurately reflects the phone and voice VLAN
designation.
Sessions info:
68:f7:28:fb:c0:0f Type=802.1x,PEAP,state=AUTHENTICATED
params:reAuth=3600
00:a8:59:d8:f1:f6 Type=MAB,,state=AUTHENTICATED
params:reAuth=3600
RFC 6933
Description:
Entity v4
Category:
MIB
Web page:
https://tools.ietf.org/html/rfc6933
RFC 3621
Description:
PoE
Category:
MIB
Web page:
https://tools.ietf.org/html/rfc3621
RFC 3433
Description:
Sensors
Category:
MIB
Web page:
https://tools.ietf.org/html/rfc3433
RFC 3168
Description:
ECN
Category:
MIB
Web page:
https://tools.ietf.org/html/rfc3168
RFC 3289
Description:
DIFFSERV-DSCP-TC
DIFFSERV-MIB
QOS-DIFFSERV-EXTENSIONS-MIB
QOS-DIFFSERV-PRIVATE-MIB
Category:
MIB
Web page:
http://tools.ietf.org/html/rfc3289
RFC 2934
Description:
PIM-MIB
DVMRP-STD-MIB
IANA-RTPROTO-MIB
MULTICAST-MIB
Category:
MIB
Web page:
http://tools.ietf.org/html/rfc2934
RFC 2932
Description:
IPMROUTE-MIB
Fortinet Enterprise MIB
ROUTING-MIB
MGMD-MIB
Category:
MIB
Web page:
http://tools.ietf.org/html/rfc2932
RFC 2865
Description:
Category:
RADIUS
Web page:
https://tools.ietf.org/html/rfc2865
RFC 2819
Description:
Category:
SNMP
Web page:
http://tools.ietf.org/html/rfc2819
RFC 2787
Description:
Category:
MIB
Web page:
http://tools.ietf.org/html/rfc2787
RFC 2674
Description:
Definitions of Managed Objects for Bridges with Traffic Classes, Multicast Filtering and Virtual LAN
Extensions
Category:
MIB
Web page:
http://tools.ietf.org/html/rfc2674
RFC 2620
Description:
Radius-Acc-Client-MIB
Category:
MIB
Web page:
http://tools.ietf.org/html/rfc2620
RFC 2618
Description:
Radius-Auth-Client-MIB
Category:
MIB
Web page:
http://tools.ietf.org/html/rfc2618
RFC 2576
Description:
Category:
SNMP
Web page:
http://tools.ietf.org/html/rfc2576
RFC 2573
Description:
SNMP Applications
Category:
SNMP
Web page:
http://tools.ietf.org/html/rfc2573
RFC 2572
Description:
Category:
SNMP
Web page:
http://tools.ietf.org/html/rfc2572
RFC 2571
Description:
SNMP Frameworks
Category:
SNMP
Web page:
http://tools.ietf.org/html/rfc2571
RFC 2362
Description:
Category:
Web page:
http://tools.ietf.org/html/rfc2362
RFC 2328
Description:
OSPF version 2
Category:
OSPF
Web page:
http://tools.ietf.org/html/rfc2328
RFC 2233
Description:
Interface MIB
Category:
SNMP
Web page:
http://tools.ietf.org/html/rfc2233
RFC 2030
Description:
SNTP
Category:
SNTP
Web page:
https://tools.ietf.org/html/rfc2030
RFC 1850
Description:
OSPF-TRAP-MIB
Category:
MIB
Web page:
http://tools.ietf.org/html/rfc1850
RFC 1724
Description:
RIPv2-MIB
Category:
MIB
Web page:
http://tools.ietf.org/html/rfc1724
RFC 1643
Description:
Ether-like MIB
Category:
SNMP
Web page:
http://tools.ietf.org/html/rfc1643
RFC 1583
Description:
OSPF version 2
Category:
OSPF
Web page:
http://tools.ietf.org/html/rfc1583
RFC 1573
Description:
SNMP MIB II
Category:
MIB
Web page:
https://tools.ietf.org/html/rfc1573
RFC 1493
Description:
Bridge
Category:
SNMP
Web page:
http://tools.ietf.org/html/rfc1493
RFC 1354
Description:
Category:
MIB
Web page:
https://tools.ietf.org/html/rfc1354
RFC 1213
Description:
Category:
SNMP
Web page:
http://tools.ietf.org/html/rfc1213
RFC 1157
Description:
SNMPv1/v2c
Category:
SNMP
Web page:
https://tools.ietf.org/html/rfc1157
RFC 854
Description:
Telnet Server
Category:
Telnet
Web page:
https://tools.ietf.org/html/rfc854
Attributes sent from the FortiSwitch unit to the RADIUS server during 802.1x authentication
(Access-Request)
AVP
Attribute Type Description
Type
Calling-Station-
31 text MAC address of supplicant
ID
AVP
Attribute Type Description
Type
Attributes sent from the RADIUS server to the FortiSwitch unit during 802.1x authentication
(Access-Accept)
AVP
Attribute Type Description
Type
Session-Timeout 27 integer How many seconds before the session times out
AVP
Attribute Description
Type
Acct-Session-Id 44 802.1x or MAB session ID generated by the switch. For example: 0000004b
Acct-Multi- For example, e81cba8e8146 in MAC mode. This attribute cannot be used in
50
Session-Id port mode. The minimum value is 1; the maximum value is 1.
NAS-Identifier 32 For example, S148EP591900009 for the host name of the switch.
Framed-IP- This value is the host IP address if is found in the switch; otherwise, the switch
8
Address does not send this attribute. For example: 100.1.0.3
NAS-Port-Id 87 This value is a text string that identifies the port of the NAS connected to the
host. For example: port48
NAS-Port 5 This value indicates the physical port number of the NAS. For example: 48
Event- Time when the event occurred. For example: May 31, 2019
55
Timestamp 12:25:03.00000000 Pacific Daylight Time
AVP
Attribute Description
Type
AVP
Attribute Description
Type
Acct-Link-Count 51 2 for two sessions on the port. This attribute is only valid for MAC mode.
NAS-Identifier 32 For example, S148EP591900009 for the host name of the switch.
Framed-IP-Address 8 This value is the host IP address if is found in the switch; otherwise, the
switch does not send this attribute. For example: 100.1.0.3
This value is a text string that identifies the port of the NAS connected to
NAS-Port-Id 87
the host. For example: port48
NAS-Port 5 This value indicates the physical port number of the NAS. For example:
48
Event-Timestamp 55 Time when the event occurred. For example: May 31, 2019
12:25:03.00000000 Pacific Daylight Time
AVP
Attribute Description
Type
AVP
Attribute Description
Type
NAS-Identifier 32 For example, S148EP591900009 for the host name of the switch.
Framed-IP-Address 8 This value is the host IP address if is found in the switch; otherwise, the
switch does not send this attribute. For example: 100.1.0.3
This value is a text string that identifies the port of the NAS connected to
NAS-Port-Id 87
the host. For example: port48
NAS-Port 5 This value indicates the physical port number of the NAS. For example: 48
Acct-Input-Octets 42 3200
Acct-Output-Octets 43 16050448
Acct-Input-Packets 47 20
Acct-Output-Packets 48 93606
Time when the event occurred. For example: May 31, 2019
Event-Timestamp 55
12:25:03.00000000 Pacific Daylight Time
AVP
Attribute Description
Type
AVP
Attribute Description
Type
Time when the event occurred. For example: May 31, 2019
Event-Timestamp 55
12:25:03.00000000 Pacific Daylight Time
AVP
Attribute Description
Type
Event-Timestamp 55 Time when the event occurred. For example: May 31, 2019
12:25:03.00000000 Pacific Daylight Time
AVP
Attribute Description
Type
AVP
Attribute Description
Type
Vendor-Specific 26 Fortinet-Group-Name
Time when the event occurred. For example: May 31, 2019
Event-Timestamp 55
12:25:03.00000000 Pacific Daylight Time
AVP
Attribute Description
Type
Vendor-Specific 26 Fortinet-Group-Name
Time when the event occurred. For example: May 31, 2019
Event-Timestamp 55
12:25:03.00000000 Pacific Daylight Time
AVP
Attribute Description
Type
AVP
Attribute Description
Type
Vendor-Specific 26 Fortinet-Group-Name
Time when the event occurred. For example: May 31, 2019
Event-Timestamp 55
12:25:03.00000000 Pacific Daylight Time
AVP
Attribute Description
Type
Time when the event occurred. For example: May 31, 2019
Event-Timestamp 55
12:25:03.00000000 Pacific Daylight Time
AVP
Attribute Description
Type
Time when the event occurred. For example: May 31, 2019
Event-Timestamp 55
12:25:03.00000000 Pacific Daylight Time
Unsupported Attribute 401 This error is a fatal error, which is sent if a request
contains an attribute that is not supported.
Invalid Attribute Value 407 This error is a fatal error, which is sent if a CoA-Request or
Disconnect-Request message contains an attribute with
an unsupported value.
Error
Error Message Description
Code