FortiGate
FortiGate Next Generation Firewall utilizes purpose-built security processors and threat intelligence security services from FortiGuard labs to deliver top-rated protection and high performance, including encrypted traffic.
yderek
Staff
Staff
Article Id 403323
Description This article describes that when upgrading to v7.4.8, DHCP obtains the static route priority that takes precedence over custom-defined.
Scope FortiGate v7.4.8.
Solution

In earlier versions, if a DHCP interface obtains a static route and a manually configured static route with the same AD, the user can define a different priority for route selection. Details for Static Route Priority: Technical Tip: Routing behavior depending on distance and priority for static routes, and Policy Bas...

 

In v7.2.11, ports 3 and 1 are both outgoing interfaces for Internet traffic. Port 3 obtains the IP address from the ISP site via DHCP.

 

To manually select port1 as the primary link, define a priority in the static route with a value of 16 will take effect in the routing table:

 

7.2 route.jpg

 

DCHP-Client # get router info routing-table all
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP
O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
V - BGP VPNv4
* - candidate default

Routing table for VRF=0
S* 0.0.0.0/0 [5/0] via 10.56.243.254, port1, [11/0]
[5/0] via 10.68.1.68, port3, [16/0]
C 10.56.0.0/22 is directly connected, port2
C 10.56.240.0/22 is directly connected, port1
C 10.68.0.0/20 is directly connected, port3

DCHP-Client # show sys interface port3


config system interface
    edit "port3"
        set vdom "root"
        set mode dhcp
        set allowaccess ping https ssh http telnet fgfm
        set type physical
        set snmp-index 3
    next

 

In v7.4.8, the custom priority is not working as expected without any configuration change under Interface and static route.

 

See output below:

 

7.4.jpg

 

DCHP-Client # get router info routing-table all
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP
O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
V - BGP VPNv4
* - candidate default

Routing table for VRF=0
S* 0.0.0.0/0 [5/0] via 10.68.1.68, port3, [1/0]
[5/0] via 10.56.243.254, port1, [11/0]
C 10.56.0.0/22 is directly connected, port2
C 10.56.240.0/22 is directly connected, port1
C 10.68.0.0/20 is directly connected, port3

 

The static route was chosen for port3 without honouring custom-defined priority, which currently shows a priority of 1 for port3; however, in the custom-defined setting under 'static route', priority has been configured as 16, which has not been changed in the configuration perspective.

 

This issue is currently still under investigation with the developer team. This article will be updated once the investigation is done. Here is a workaround for now.

 

Workaround:

Define the priority under the DHCP interface level. See screenshot below. After priority has been defined (default 1) under the DHCP interface, the routing selection will honour the priority settings.

 

image.png

 

Note: 

This issue is caused by the side effect of New Feature Request 0896227; this change was only introduced in v7.4 and later. It will use origin as a tie breaker when the distance is the same. DHCP routes have a higher origin value in this design; it will take precedence over the static route.

Recommendation will be to use either DHCP routes or manually specify the static route under routing configuration, and avoid using duplicate methods to get the static route.