FortiSwitch - Cookbook
FortiSwitch - Cookbook
FortiSwitch - Cookbook
FORTINET BLOG
https://blog.fortinet.com
NSE INSTITUTE
https://training.fortinet.com
FORTIGUARD CENTER
https://www.fortiguard.com
FEEDBACK
Email: techdoc@fortinet.com
FortiSwitch Cookbook 3
Fortinet, Inc.
Capturing packets from a sniffer VLAN in a FortiLink setup
This cookbook article documents how to capture packets on a VLAN that is being used as the network sniffer
(also known as the packet analyzer) and then send the packets to a remote destination.
To capture packets (mirror traffic) on the FortiSwitch fabric, you need to decide what traffic you want to examine.
The traffic can be specific switch ports, MAC addresses , or IP addresses. Then you can decide where to send
the packet capture (mirrored traffic) to. The destination can be the FortiGate unit, where you can use the local
FortiGate packet capture facility, or the destination can be somewhere else in the network (such as across the
network through the FortiGate unit or a device directly connected to the FortiSwitch fabric).
FortiSwitch Cookbook 4
Fortinet, Inc.
Capturing packets from a sniffer VLAN in a FortiLink setup
end
end
In this example, the IP address is a remote end station (such as a desktop PC connected to a network, which is
accessed through the FortiGate unit). The traffic is delivered to the FortiGate unit and then routed to the PC
where you can use a packet analyzer to examine it. Specific targeted MAC addresses or IP addresses are only
sampled when the traffic enters the FortiSwitch fabric (the network perimeter), so you only see one copy of the
frame in the sampling.
One common use case is to enable sniffing on a FortiSwitch port for quick debugging.
FortiGate-100E # config switch-controller traffic-sniffer
set erspan-ip 10.254.253.254 // the traffic is sent only to the FortiGate unit
config target-port
edit "S424DP3X17000354"
set in-ports "port1" // mirror all traffic to/from the switch port to
FortiGate
set out-ports "port1"
next
end
end
FortiSwitch Cookbook 5
Fortinet, Inc.
Setting up port-based 802.1x authentication in a FortiLink setup
This cookbook article documents how to set up port-based 802.1x authentication. The following tasks are
covered:
l Configuring the FortiGate and FortiSwitch units on page 6
l Configuring the RADIUS server on page 13
l Configuring Windows 10 on page 25
802.1x is an IEEE Standard for port-based Network Access Control (PNAC).
The following are the main parts of 802.1x authentication:
l A supplicant—the user or client that wants to be authenticated
l An authentication server—the actual server doing the authentication, typically a RADIUS server. It decides
whether to accept the end userʼs request for full network access.
l An authenticator—a network device that provides a data link between the client and the network and can
allow or block network traffic between the two, such as an Ethernet switch or wireless access point
802.1x uses the Extensible Authentication Protocol (EAP) to facilitate communication from the supplicant to the
authenticator and from the authenticator to the authentication server.
This section shows how to configure port-based 802.1x authentication with managed FortiSwitch ports when
using FortiLink and how to troubleshoot the configuration.
FortiSwitch Cookbook 6
Fortinet, Inc.
Setting up port-based 802.1x authentication in a FortiLink setup
l In the Primary Server area, enter the IP address of your RADIUS server again.
l In the Secret field, enter the secret password that you configured in the RADIUS client settings.
FortiSwitch Cookbook 7
Fortinet, Inc.
Setting up port-based 802.1x authentication in a FortiLink setup
FortiSwitch Cookbook 8
Fortinet, Inc.
Setting up port-based 802.1x authentication in a FortiLink setup
If you want to reduce the time delay in recovering from auth-fail-vlan when an 802.1X failure
happens, reduce the max-reauth-attempt and guest-auth-delay settings.
10. Apply the port security policy to the FortiSwitch port in the FortiOS CLI:
FortiSwitch Cookbook 9
Fortinet, Inc.
Setting up port-based 802.1x authentication in a FortiLink setup
end
next
end
11. Configure the firewall policy for the FortiSwitch connection to the RADIUS server, as shown in the following
figure:
FortiSwitch Cookbook 10
Fortinet, Inc.
Setting up port-based 802.1x authentication in a FortiLink setup
12. Configure the firewall policy for the VLAN interface to the Internet, as shown in the following figure:
1. In the FortiOS CLI, verify that the connection from the FortiGate unit to the FortiSwitch unit is up:
2. In the FortiSwitchOS CLI, you can check if the authentication. The following output shows a successful
authentication:
FortiSwitch Cookbook 11
Fortinet, Inc.
Setting up port-based 802.1x authentication in a FortiLink setup
VlanId Ports
______ ___________________________________________________
32 port2 port10
After a wrong password being entered, port2 is removed from VLAN 32 (LALanSecure) and is replaced by
VLAN 34(LAGuest).
After a successful authentication, port2 is moved to VLAN 32 (LALanSecure) and removed from VLAN 34
(LAGuest).
NOTE: When you replace an existing RADIUS server with a new one, the configuration is not updated in the
FortiSwitch unit. Use the following procedure to update the RADIUS server configuration in the FortiSwitch unit:
1. Use the FortiGate unit to access the FortiSwitch using SSH.
2. Remove the configuration associated with the existing RADIUS server. Use the following commands to find
the existing RADIUS server configuration:
FortiSwitch Cookbook 12
Fortinet, Inc.
Setting up port-based 802.1x authentication in a FortiLink setup
4. Verify that the FortiGate unit and the FortiSwitch unit are synchronized:
This section shows how to configure the RADIUS server to accept port-based 802.1x authentication. This
example shows how to install and configure RADIUS in Windows Server 2016.
1. Log in to the Windows Server 2016 that you plan to use as your RADIUS server.
2. Launch the Server Manager and select Manage from the top right.
3. Select Add Roles and Features to launch the wizard.
4. From the wizard page, select Network Policy and Access Services, as shown in the following figure:
FortiSwitch Cookbook 13
Fortinet, Inc.
Setting up port-based 802.1x authentication in a FortiLink setup
5. Select Next and then select Finish to start the installation. No reboot is required.
6. After the installation is complete, select Tools from the Server Manager and then select Network Policy
Server.
7. Right-click on RADIUS Clients and select New to display the new RADIUS client dialog box. Use the
following procedure to configure the RADIUS clients:
a. Select the Enable the RADIUS client checkbox.
b. Enter a name for your RADIUS server, such as FGTAuth.
c. Enter the IP address of the FortiGate unit that is used to access the RADIUS server. Typically, this is
the interface in the FortiGate unit with the same network as the RADIUS server. Otherwise, this will be
the IP address you have configured as the source-ip in the user RADIUS settings in FortiOS.
d. In the Shared Secret area, keep Manual selected and enter a password in the Shared secret field.
NOTE: This password must match the FortiGate RADIUS server settings.
e. Select OK.
FortiSwitch Cookbook 14
Fortinet, Inc.
Setting up port-based 802.1x authentication in a FortiLink setup
8. Under the Policies section of the NPS Snap-in, right-click Connection Request Policies and select New.
l In the Overview tab, enter a name for the policy, such as FGTAUth.
FortiSwitch Cookbook 15
Fortinet, Inc.
Setting up port-based 802.1x authentication in a FortiLink setup
FortiSwitch Cookbook 16
Fortinet, Inc.
Setting up port-based 802.1x authentication in a FortiLink setup
FortiSwitch Cookbook 17
Fortinet, Inc.
Setting up port-based 802.1x authentication in a FortiLink setup
13. In the Constraints tab, verify that the following check boxes are selected, select Apply, and then select OK
to complete the policy.
FortiSwitch Cookbook 18
Fortinet, Inc.
Setting up port-based 802.1x authentication in a FortiLink setup
14. To verify the server certificate used by Microsoft Protocol EAP (PEAP), select Edit, and then select the
certificate for the server to prove its identity to the client.
15. Download the certificate that you selected and save it in the Trusted Root Certificate Authorities directory of
the local PC.
FortiSwitch Cookbook 19
Fortinet, Inc.
Setting up port-based 802.1x authentication in a FortiLink setup
16. Under Certification Authority (Local), make certain that the settings match those in the following figure.
Otherwise, you will receive an authentication failure with the following reason: “The client could not be
authenticated because the Extensible Authentication Protocol (EAP) Type cannot be processed by the
server.”
FortiSwitch Cookbook 20
Fortinet, Inc.
Setting up port-based 802.1x authentication in a FortiLink setup
Troubleshooting
The best way to troubleshoot 802.1x connections is by looking at the Event Viewer of the Windows Server.
Under Server Roles, check the output of the Network Policy and Access Services.
The following figure shows the successful output of an 802.1x connection from the PC:
FortiSwitch Cookbook 21
Fortinet, Inc.
Setting up port-based 802.1x authentication in a FortiLink setup
Issue 1: The certificate chain was issued by an authority that is not trusted.
FortiSwitch Cookbook 22
Fortinet, Inc.
Setting up port-based 802.1x authentication in a FortiLink setup
To fix this issue, import the CA certificate into the local machine and add it to the Trusted Root Certification
Authorities.
FortiSwitch Cookbook 23
Fortinet, Inc.
Setting up port-based 802.1x authentication in a FortiLink setup
To fix this issue, under Advanced settings, you can specify whether you want user authentication, computer
authentication, or both.
FortiSwitch Cookbook 24
Fortinet, Inc.
Setting up port-based 802.1x authentication in a FortiLink setup
Configuring Windows 10
This section shows how to configure Windows 10 for 802.1x user authentication.
1. Select Start, right-click Computer, select Manage, and then select Services and Applications.
2. In the details pane, double-click Services and then do one of the following:
l To configure the startup type, right-click Wired AutoConfig, and then select Properties. In Startup type,
3. Install the RADIUS serverʼs certificate to the PC, as shown in the following figure:
FortiSwitch Cookbook 25
Fortinet, Inc.
Setting up port-based 802.1x authentication in a FortiLink setup
4. In the properties of the network connection, navigate to the Authentication tab, and make sure the Enable
IEEE 802.1X authentication check box is selected.
5. Select Settings.
FortiSwitch Cookbook 26
Fortinet, Inc.
Setting up port-based 802.1x authentication in a FortiLink setup
6. To select the Certificate Authority (CA) that the RADIUS serverʼs certificate uses, import the CA certificate
into the local machine and save it in the Trusted Root Certification Authorities directory. If you purchased
an SSL certificate from a major CA (such Verisign or GoDaddy), Windows should have the CA loaded and
listed already.
FortiSwitch Cookbook 27
Fortinet, Inc.
Setting up port-based 802.1x authentication in a FortiLink setup
7. Under Advanced settings, you can specify whether you want user authentication.
FortiSwitch Cookbook 28
Fortinet, Inc.
Setting up port-based 802.1x authentication in a FortiLink setup
8. Make sure the Wired AutoConfig service is set up for automatic startup, as shown in the following figure.
The Wired AutoConfig service allows Windows to interact with 802.1x.
9. To verify that the PC successfully connects, check the network connections. Look for the Ethernet port and
make sure that there is no “Authentication failed” message.
10. When the authentication succeeds, you should get an IP address from the right VLAN, as shown in the
following figure:
FortiSwitch Cookbook 29
Fortinet, Inc.
Setting up port-based 802.1x authentication in a FortiLink setup
11. When the authentication fails, you should get the IP address from the auth-fail-vlan VLAN, as shown in the
following figure:
FortiSwitch Cookbook 30
Fortinet, Inc.
Enterprise FortiSwitch secure access
This cookbook article documents a highly resilient 2-tier FortiSwitch architecture (faster convergence) that take
advantage of the full performance (bandwidth utilization) offered by MCLAG (multichassis LAG).
The FortiGates, for the exercise, are under FortiOS 6.0.1 and FortiSwitch at 6.0 or 3.6.6 (depending on platform
compatibility). FortiSwitch must be at least at 3.6.4 in order to deploy MCLAG with access ring.
Also ensure that the FortiSwitch models used for MCLAG supports the feature: FortiSwitch Datasheet
In the end, the topology above will be deployed.
Logging
FortiSwitch Cookbook 31
Fortinet, Inc.
Enterprise FortiSwitch secure access
FortiLink configuration
FortiSwitch Cookbook 32
Fortinet, Inc.
Enterprise FortiSwitch secure access
FortiSwitch Cookbook 33
Fortinet, Inc.
Enterprise FortiSwitch secure access
10. At this point, the switch will reboot and will be converted from standalone to managed mode.
FortiSwitch Cookbook 34
Fortinet, Inc.
Enterprise FortiSwitch secure access
FortiSwitch Cookbook 35
Fortinet, Inc.
Enterprise FortiSwitch secure access
MCLAG configuration
FortiSwitch Cookbook 36
Fortinet, Inc.
Enterprise FortiSwitch secure access
6. Disable the split interface from FortiLink and enable automatic authorization.
7. Close the loop from the Disti-2 to the second port of the FortiLink LAG of the FortiGate Master.
FortiSwitch Cookbook 37
Fortinet, Inc.
Enterprise FortiSwitch secure access
9. You can validate the consistency at the MCLAG level using the following command:
FortiSwitch Cookbook 38
Fortinet, Inc.
Enterprise FortiSwitch secure access
IDF configuration
1. Interconnect the Disti-1, cascading the switches that make up the stack of the IDF, as follows:
FortiSwitch Cookbook 39
Fortinet, Inc.
Enterprise FortiSwitch secure access
FortiSwitch Cookbook 40
Fortinet, Inc.
Enterprise FortiSwitch secure access
HA configuration
3. Connect the balance of the links in order to coherently replicate the wiring of the FortiGate Master and
FortiGate Slave, as follows:
FortiSwitch Cookbook 41
Fortinet, Inc.
Enterprise FortiSwitch secure access
5. Finalize by doubling the ICL links between the two distribution switches.
FortiSwitch Cookbook 42
Fortinet, Inc.
Enterprise FortiSwitch secure access
FortiSwitch Cookbook 43
Fortinet, Inc.
Enterprise FortiSwitch secure access
Validation
1. To ensure the robustness of the topology, create a test VLAN that will be assigned, for example, to one of
the IDF switches.
FortiSwitch Cookbook 44
Fortinet, Inc.
Enterprise FortiSwitch secure access
3. You should be able to reboot the FortiGate-Master, remove some links (Disti1 port to IDF-1 in this case),
generate HA balancing using the loss of the monitored link (WAN), and see at most only the loss of some
packets:
With the Security Fabric, in addition to extend your control and protection, you get unparalleled end-to-end
visibility:
FortiSwitch Cookbook 45
Fortinet, Inc.
Enterprise FortiSwitch secure access
Bonus—FortiSwitch access
FortiSwitch Cookbook 46
Fortinet, Inc.
Enterprise FortiSwitch secure access
FortiSwitch Cookbook 47
Fortinet, Inc.
Interconnecting three sites with MCLAG
This cookbook article describes how to add a third site that interconnects a third MCLAG peer group with the
existing redundancy between two sites. The links between sites 1 and 3 and sites 2 and 3 are independent;
therefore, loops are avoided by using the Spanning Tree Protocol (STP).
The following tasks are covered:
1. Adding the third site on page 49
2. Checking the topology on page 52
3. Relevant configuration on page 53
This cookbook article assumes that sites 1 and 2 are already deployed. See the “HA-mode FortiGate units in
remote sites” section in the FortiSwitch Managed by FortiOS 6.4 guide.
You can refer to the following topics for more information:
l HA-mode FortiGate units in remote sites
l FortiSwitch Managed by FortiOS 6.4
l MCLAG topologies
FortiSwitch Cookbook 48
Fortinet, Inc.
Interconnecting three sites with MCLAG
6. Connect Site3_FSW2 to Site2_FSW1 to form the connection between sites 2 and 3. Wait until the topology
converges. See the following figure. The link between sites 1 and 3 is blocked by the Spanning Tree
FortiSwitch Cookbook 49
Fortinet, Inc.
Interconnecting three sites with MCLAG
FortiSwitch Cookbook 50
Fortinet, Inc.
Interconnecting three sites with MCLAG
FortiSwitch Cookbook 51
Fortinet, Inc.
Interconnecting three sites with MCLAG
You can use the FortiOS CLI to display the final topology as well.
FortiSwitch Cookbook 52
Fortinet, Inc.
Interconnecting three sites with MCLAG
Relevant configuration
FGT500E-1 (port25) # n
FortiSwitch Cookbook 53
Fortinet, Inc.
Interconnecting three sites with MCLAG
end
FGT500E-1 (S426EFTF19000243) # n
FGT500E-1 (port25) # n
FortiSwitch Cookbook 54
Fortinet, Inc.
Interconnecting three sites with MCLAG
FortiSwitch Cookbook 55
Fortinet, Inc.
Carrying customer VLANs over a provider network
This cookbook article describes how to use VLAN stacking (QinQ) to carry customer VLANs over a service
provider network. The following tasks are covered:
1. Configure the provider switches on page 57
2. Accept specific VLANs at the provider ingress on page 58
3. Assign different service tags at the provider ingress on page 59
4. Retag service VLANs on page 59
5. VLAN retagging/translation of regular 802.1Q traffic on page 61
There are two customers, Customer Red and Customer Green, each with two FortiSwitch units. They are
connected to the three FortiSwitch units belonging to the service provider.
l Customer Red is using VLANs 10-15, VLAN 30, and untagged VLAN 60 to connect to port1 of the provider
switches PSW1 and PSW3. The provider is using port3 to connect to Customer Red through VLANs 10-15,
VLAN 30, and untagged VLAN 60.
l Customer Green is using VLANs 20, 40, and 50 to connect to port2 of the provider. The provider is using
port3 to connect to Customer Green through VLANs 20, 40, and 50.
Provider switches
The service provider is using VLANs 100 and 200 to connect the three provider switches.
FortiSwitch Cookbook 56
Fortinet, Inc.
Carrying customer VLANs over a provider network
For the customer port, the provider switches PSW1 and PSW3 have QinQ enabled with all tags accepted at
ingress. The switches has the “native-vlan” as the service VLAN for the customer port, and allowed-vlans are
not used. The inner tag needs to be set or removed for untagged traffic on the customer port.
For the provider port, the provider switches PSW1 and PSW3 have QinQ disabled with regular allowed-vlans for
each service VLAN. If the default VLAN TPID profile of 0x8100 is not being used, you need to specify the VLAN
TPID profile with the set vlan-tpid command.
The provider switch PSW2 has QinQ disabled with regular allowed-vlans for each service VLAN. If the default
VLAN TPID profile of 0x8100 is not being used, you need to specify the VLAN TPID profile with the set vlan-
tpid command. For QinQ, use a VLAN TPID profile of 0x88a8.
Customer switches
The customer switches use simple 802.1Q VLANs. They are unaware of QinQ.
You need to configure the provider switches PSW1, PSW2, and PSW3.
To configure the customer ports port1 and port2 of PSW1 and PSW3:
You can use VLAN mapping to accept only specific customer VLANs. See Accept specific VLANs at the
provider ingress on page 58.
FortiSwitch Cookbook 57
Fortinet, Inc.
Carrying customer VLANs over a provider network
Non-edge provider switches can use VLAN mapping to retag services VLANs. See Retag service VLANs on
page 59.
Optionally, you can accept specific VLANs at the provider ingress on PSW1 and PSW3. To do this, use VLAN
mapping inside QinQ. You need to enable vlan-mapping-miss-drop and specify each customer and the
corresponding service tags. For example:
config vlan-mapping
edit 1
set match-c-vlan 10
set new-s-vlan 100
next
end
FortiSwitch Cookbook 58
Fortinet, Inc.
Carrying customer VLANs over a provider network
config vlan-mapping
edit 1
set match-c-vlan 10
set new-s-vlan 100
next
end
next
end
Optionally, you can assign different service tags at the provider ingress on PSW1 and PSW3. To do this, use
VLAN mapping inside QinQ. You need to specify each customer and the corresponding service tags. Service
tags must be listed as allowed-vlans. Different service tags might be needed for QoS purposes.
config switch interface
edit "port1"
set native-vlan 100
config qnq
set status enable
config vlan-mapping
edit 1
set match-c-vlan 10
set new-s-vlan 100
next
edit 2
set match-c-vlan 20
set new-s-vlan 120
next
end
end
next
end
The following figure shows the topology for the non-edge provider PSW2 receiving QinQ traffic from the
provider edge switch PSW1 on port1 with customer VLAN 350 and service-tag 1000. The traffic is then sent out
on port2 with service-tag 3000, preserving the customer VLAN. The reverse is done for traffic coming on port2
and leaving port1. In this example, the service VLAN retagging operation is done on the ingress port.
FortiSwitch Cookbook 59
Fortinet, Inc.
Carrying customer VLANs over a provider network
FortiSwitch Cookbook 60
Fortinet, Inc.
Carrying customer VLANs over a provider network
You can also apply service VLAN retagging on egress. In this case, the match is done on the service tag. If you
choose action replace, the new service VLAN must be specified. If you choose action delete, the
service tag is removed, and the frame is forwarded with only the customer VLAN.
You can use ACLs (to match the VLAN and set the action of the outer-vlan-tag) to retag or translate VLANs with
regular 802.1Q traffic.
config switch acl ingress
edit 1
config action
set outer-vlan-tag 2333
end
config classifier
set vlan-id 350
end
set ingress-interface "mclag-761_419"
next
end
On some FortiSwitch models, you can also apply an ACL on the prelookup and egress stages. The
configuration is similar to the configuration in this section and is done under the config switch acl
prelookup or config switch acl egress commands, respectively.
FortiSwitch Cookbook 61
Fortinet, Inc.
MCLAG peer group managed with FortiLink over layer 3
This cookbook article describes how to configure a multichassis link aggregation group (MCLAG) peer group
that is managed with FortiLink over layer 3. The following tasks are covered:
1. Set up the FortiGate device on page 63
2. Configure the WAN router on page 65
3. Configure the site1_mclag1 switch on page 67
4. Authorize the site1_mclag1 switch on page 68
5. Configure the site1_mclag2 switch on page 70
6. Configure the FortiGate device on page 72
7. Configure the access switches on page 77
8. Finish the FortiSwitch configuration from the FortiGate device on page 78
9. Check the configuration on page 82
Assumptions
FortiSwitch Cookbook 62
Fortinet, Inc.
MCLAG peer group managed with FortiLink over layer 3
l The WAN router has an 802.3ad link aggregation group (LAG) connected to the FortiSwitch MCLAG peer
group, and the WAN router is VLAN-capable. (An untagged VLAN is needed for FortiSwitch control, and
tagged VLANs are needed for user data traffic.)
Configuration summary
1. Configure the routing so that the FortiGate device can reach the FortiSwitch units. For example, the
following figure shows a static route to the network destination 10.33.33/24 used by the FortiSwitch units.
The gateway IP address is 10.40.88.253, which is the address of the interface of the WAN router
connected to the FortiGate unit.
FortiSwitch Cookbook 63
Fortinet, Inc.
MCLAG peer group managed with FortiLink over layer 3
2. Configure a dedicated FortiLink interface to control the FortiSwitch units connected to the FortiGate device
from remote locations. Use the CLI to configure the dedicated FortiLink interface, and then the interface will
be listed in the FortiLink interface list in the GUI. Set the interface type to aggregate, specify the IP
address, enable FortiLink, and set the source IP address of the switch controller to use a fixed IP address
from the FortiLink interface itself.
3. Configure a firewall policy to allow the connections from the FortiSwitch units. The service is CAPWAP
(UDP port 5246). Configure the policy in the GUI first, specifying that the destination interface is the same
as the source interface.
Then edit the policy in the CLI and change the destination interface to the FortiLink interface.
FortiSwitch Cookbook 64
Fortinet, Inc.
MCLAG peer group managed with FortiLink over layer 3
Configure an untagged interface or VLAN on the LAG connected to the FortiSwitch units. Assign the IP address
and DHCP service, including NTP and option 138 (the switch controller IP address).
FortiSwitch Cookbook 65
Fortinet, Inc.
MCLAG peer group managed with FortiLink over layer 3
For the purpose of this procedure, the WAN router is a FortiSwitch unit in standalone mode. The DHCP server is
using vendor class identifier (VCI) matching to restrict the IP assignment to FortiSwitch units only.
config router static
edit 2
set device "to_fgt"
set dst 172.17.1.0 255.255.255.0
set gateway 10.40.88.254
next
end
FortiSwitch Cookbook 66
Fortinet, Inc.
MCLAG peer group managed with FortiLink over layer 3
Follow these steps on the site1_mclag1 FortiSwitch unit in the MCLAG peer group:
3. Enable FortiLink over layer 3 on the switch interface connected to the WAN router and enable LACP on the
newly formed __FoRtILnk0L3__ trunk, which is automatically created by the system.
FortiSwitch Cookbook 67
Fortinet, Inc.
MCLAG peer group managed with FortiLink over layer 3
end
On the FortiGate device, authorize and name the site1_mclag1 FortiSwitch unit.
FortiSwitch Cookbook 68
Fortinet, Inc.
MCLAG peer group managed with FortiLink over layer 3
FortiSwitch Cookbook 69
Fortinet, Inc.
MCLAG peer group managed with FortiLink over layer 3
Follow these steps on the site1_mclag2 FortiSwitch unit in the MCLAG peer group:
FortiSwitch Cookbook 70
Fortinet, Inc.
MCLAG peer group managed with FortiLink over layer 3
3. FortiLink over layer 3 is not enabled on the switch interface connected to the WAN router. NOTE: The
FortiGate device can already be reached using the inter-switch link (ISL) formed with the site1_mclag1
FortiSwitch unit.
FortiSwitch Cookbook 71
Fortinet, Inc.
MCLAG peer group managed with FortiLink over layer 3
FortiSwitch Cookbook 72
Fortinet, Inc.
MCLAG peer group managed with FortiLink over layer 3
2. To enable the MCLAG peer group from the FortiGate device, use the switch-recommendations
command, specifying the FortiLink interface and the serial numbers of the MCLAG peers. (Alternatively, on
the FortiGate device, set the LLDP profile to default-auto-mclag-icl in the ports used for the
MCLAG ICL on both peers.)
FortiSwitch Cookbook 73
Fortinet, Inc.
MCLAG peer group managed with FortiLink over layer 3
FortiSwitch Cookbook 74
Fortinet, Inc.
MCLAG peer group managed with FortiLink over layer 3
3. Connect to the CLI of the site1_mclag2 FortiSwitch unit and enable FortiLink over layer 3 on the switch
interface connected to the WAN router. Enable LACP on the newly formed trunk. NOTE: The automatically
created trunk has the same name as in the site1_mclag1 FortiSwitch unit, so it will form the MCLAG trunk
(the trunk name must be the same in both FortiSwitch units to form the MCLAG trunk).
config switch interface
edit port8
set fortilink-l3-mode enable
end
FortiSwitch Cookbook 75
Fortinet, Inc.
MCLAG peer group managed with FortiLink over layer 3
edit "__FoRtILnk0L3__"
set mode lacp-active
end
4. Connect to the CLI of the site1_mclag1 FortiSwitch unit and enable MCLAG on the trunk connected to the
WAN router.
FortiSwitch Cookbook 76
Fortinet, Inc.
MCLAG peer group managed with FortiLink over layer 3
2. Set the switch-controller discovery type to DHCP. The ISL is automatically formed with the MCLAG peer
group (you do not need to enable FortiLink over layer 3).
FortiSwitch Cookbook 77
Fortinet, Inc.
MCLAG peer group managed with FortiLink over layer 3
FortiSwitch Cookbook 78
Fortinet, Inc.
MCLAG peer group managed with FortiLink over layer 3
FortiSwitch Cookbook 79
Fortinet, Inc.
MCLAG peer group managed with FortiLink over layer 3
2. Create FortiSwitch VLANs and assign them to FortiSwitch ports. You do not need to specify the IP address
because the FortiGate device will not receive any of the data traffic (it will be switched locally or routed by
the WAN router). Therefore, the DHCP service must be provided by the WAN router or other system
located at the site.
FortiSwitch Cookbook 80
Fortinet, Inc.
MCLAG peer group managed with FortiLink over layer 3
FortiSwitch Cookbook 81
Fortinet, Inc.
MCLAG peer group managed with FortiLink over layer 3
FortiSwitch Cookbook 82
Fortinet, Inc.
MCLAG peer group managed with FortiLink over layer 3
FortiSwitch Cookbook 83
Fortinet, Inc.
MCLAG peer group managed with FortiLink over layer 3
FortiSwitch Cookbook 84
Fortinet, Inc.
MCLAG peer group managed with FortiLink over layer 3
edit "port8"
set vlan "default.22"
set allowed-vlans "quarantine.22"
set untagged-vlans "quarantine.22"
set export-to "root"
set mac-addr 02:09:0f:d3:1d:02
next
end
next
edit "S108DVSPUKEFGG54"
set name "site1_mclag2"
set fsw-wan1-peer "fol3_wan"
set fsw-wan1-admin enable
set poe-detection-type 3
set version 1
set max-allowed-trunk-members 8
set pre-provisioned 1
set dynamic-capability 0x0000000000000000000000751c51f9f7
config ports
edit "port1"
set vlan "default.22"
set allowed-vlans "quarantine.22"
set untagged-vlans "quarantine.22"
set export-to "root"
set mac-addr 02:09:0f:d3:00:11
next
edit "port2"
set vlan "default.22"
set allowed-vlans "quarantine.22"
set untagged-vlans "quarantine.22"
set export-to "root"
set mac-addr 02:09:0f:d3:00:12
next
edit "port3"
set vlan "default.22"
set allowed-vlans "quarantine.22"
set untagged-vlans "quarantine.22"
set export-to "root"
set mac-addr 02:09:0f:d3:00:13
next
edit "port4"
set vlan "default.22"
set allowed-vlans "quarantine.22"
set untagged-vlans "quarantine.22"
set export-to "root"
set mac-addr 02:09:0f:d3:00:14
next
edit "port5"
set vlan "default.22"
set allowed-vlans "quarantine.22"
set untagged-vlans "quarantine.22"
set export-to "root"
set mac-addr 02:09:0f:d3:0b:02
next
edit "port6"
set vlan "default.22"
set allowed-vlans "quarantine.22"
FortiSwitch Cookbook 85
Fortinet, Inc.
MCLAG peer group managed with FortiLink over layer 3
FortiSwitch Cookbook 86
Fortinet, Inc.
MCLAG peer group managed with FortiLink over layer 3
FortiSwitch Cookbook 87
Fortinet, Inc.
MCLAG peer group managed with FortiLink over layer 3
FortiSwitch Cookbook 88
Fortinet, Inc.
MCLAG peer group managed with FortiLink over layer 3
FortiSwitch Cookbook 89
Fortinet, Inc.
MCLAG peer group managed with FortiLink over layer 3
end
FortiSwitch Cookbook 90
Fortinet, Inc.
MCLAG peer group managed with FortiLink over layer 3
FortiSwitch Cookbook 91
Fortinet, Inc.
MCLAG peer group managed with FortiLink over layer 3
FortiSwitch Cookbook 92
Fortinet, Inc.
MCLAG peer group managed with FortiLink over layer 3
next
end
FortiSwitch Cookbook 93
Fortinet, Inc.
MCLAG peer group managed with FortiLink over layer 3
FortiSwitch Cookbook 94
Fortinet, Inc.
MCLAG peer group managed with FortiLink over layer 3
FortiSwitch Cookbook 95
Fortinet, Inc.
Copyright© 2022 Fortinet, Inc. All rights reserved. Fortinet®, FortiGate®, FortiCare® and FortiGuard®, and certain other marks are registered trademarks of Fortinet, Inc., in the
U.S. and other jurisdictions, and other Fortinet names herein may also be registered and/or common law trademarks of Fortinet. All other product or company names may be
trademarks of their respective owners. Performance and other metrics contained herein were attained in internal lab tests under ideal conditions, and actual performance and
other results may vary. Network variables, different network environments and other conditions may affect performance results. Nothing herein represents any binding
commitment by Fortinet, and Fortinet disclaims all warranties, whether express or implied, except to the extent Fortinet enters a binding written contract, signed by Fortinet’s
General Counsel, with a purchaser that expressly warrants that the identified product will perform according to certain expressly-identified performance metrics and, in such
event, only the specific performance metrics expressly identified in such binding written contract shall be binding on Fortinet. For absolute clarity, any such warranty will be
limited to performance in the same ideal conditions as in Fortinet’s internal lab tests. In no event does Fortinet make any commitment related to future deliverables, features or
development, and circumstances may change such that any forward-looking statements herein are not accurate. Fortinet disclaims in full any covenants, representations, and
guarantees pursuant hereto, whether express or implied. Fortinet reserves the right to change, modify, transfer, or otherwise revise this publication without notice, and the most
current version of the publication shall be applicable.