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.
sselvam
Staff
Staff
Article Id 189436

Description

 

This article describes information about the dynamic gateway for DHCP/PPPoE-type interfaces.

Solution

 

To route both to be active with a static route on the routing-table, enable the below option from the CLI:

 

Routing table defaultgw enabled :

 

Routing table for VRF=0
S* 0.0.0.0/0 [10/0] via 10.1.1.254, wan1, [1/0]
[10/0] via 10.2.2.254, ppp2, [10/0]

 


First, set the interface to not get the Dynamic Gateway:

 

config system interface
    edit wan1 (or other port)
        set role wan
        set defaultgw disable
end

 

Routing table defaultgw disabled -- Static route of pppoe interface removed

Routing table for VRF=0
S *> 0.0.0.0/0 [10/0] via 10.1.1.254, wan1, [1/0]
C *> 10.109.16.0/20 is directly connected, wan1


config router static
    edit 1
        set dynamic-gateway enable
end

 

Routing table after adding static route entry:

 

Routing table for VRF=0
S* 0.0.0.0/0 [10/0] via 10.1.1.254, wan1, [1/0]
[10/0] via 10.2.2.254, ppp2, [1/0]

 

Once enabled, dynamic-gateway hides the gateway variable for a dynamic interface, such as a DHCP or PPPoE interface.
When the interface connects or disconnects, the corresponding routing entries are updated to reflect the change.