FortiSwitch
FortiSwitch: secure, simple and scalable Ethernet solutions
GusZ
Staff
Staff
Article Id 421445
Description This article describes an issue that occurs when adding a new default route when a FortiSwitch is operating in FortiLink mode.
Scope FortiSwitch.
Solution

If a FortiSwitch is in FortiLink mode, a newly added default route will not be selected to forward traffic. This is the expected behaviour, considering the FortiLink design.

In FortiLink mode, the switch-controller FortiGate is always the default gateway. Otherwise, the communication with the FortiGate would be severed, and the FortiSwitch would no longer be manageable.

Therefore, additionally configured default static routes are added to the routing table but are not inserted in the FIB (Forwarding Information Base).

 

If a FortiSwitch unit operating in FortiLink mode has the 'internal' interface configured as the FortiLink interface, the following route will be added to the routing table and FIB:


get router info routing-table all

...
S>* 0.0.0.0/0 [5/0] via <GATEWAY_IP>, internal, weight 1, <TIME>
...


After adding the following default static route via the 'mgmt' interface


config router static
    edit 1
        set device "mgmt"
        set dst 0.0.0.0 0.0.0.0
        set gateway <GATEWAY_IP2>
    next
end


The routing table shows:


get router info routing-table all

...
S 0.0.0.0/0 [10/0] via <GATEWAY_IP2>, mgmt, weight 1, <TIME>
S>* 0.0.0.0/0 [5/0] via <GATEWAY_IP>, internal, weight 1, <TIME2>
...


Both default static routes are valid, but the FortiLink interface 'internal' is the FIB route (marked with a '*') and, therefore, used to route traffic.

The reason is the lower distance (5) when comparing with the 'mgmt' interface route (10). Adding a static route with a distance equal to 4 or lower would make it the FIB route; however, it would break the communication between the FortiSwitch and the FortiGates.

 

As a best practice, precise prefixes should be used when creating static routes in FortiSwitch units operating in FortiLink mode.


Related documents:

Optional FortiLink configuration
get router info routing-table

Technical Tip: Routing behavior depending on distance and priority for static routes, and Policy Bas...

Contributors