This article describes optimal use of the 'dhcp-classless-route-addition' setting when using a FortiGate as a DHCP client.
Scope
FortiOS.
Solution
The dhcp-classless-route-addition setting on FortiGate determines whether the device should accept and apply classless static routes sent by a DHCP server. This feature is particularly useful in environments where multiple subnets are involved, and the DHCP server is responsible for delivering more than just a default gateway to clients.
The feature will control whether FortiGate will install classless static routes provided by a DHCP server. The DHCP server can send this routing information through DHCP option 121.
CLI:
config system interface
edit "wan"
set dhcp-classless-route-addition enable
next
end
The default settings is enabled for the dhcp-classless-route-addition option. This setting controls whether FortiGate, when operating as a DHCP client, will install these classless static routes into its routing table.
When dhcp-classless-route-addition is disabled, FortiGate will ignore any classless static routes (option 121) provided by the DHCP server and will only use the default gateway (option 3).