Support Forum
The Forums are a place to find answers on a range of Fortinet products from peers and product experts.
New Contributor III

Can I define the default gateway metric with Fortigate DHCP server?

I do have a network that provides the IP address via linux/dnsmasq. (VLAN1, not tagged). This is the main network. 

I do have another network that provides IP address via interface DHCP server of a Fortigate. (VLAN 10 tagged). This is a test network.

The Windows computer accesses both networks with the same interface, whereas the network is in a tagged VLAN thus using a virtual network interface.

I end up with the following default routes.



     Netzwerkziel    Netzwerkmaske          Gateway    Schnittstelle Metrik



For some reason, Windows thinks that the route via is more attractive that the one via But I need the default route to to be used. I can "fix" that by assigning manually a higher Metric to the virtuel interface, but I'd rather like to have this done via the fortigate DHCP.

Is there a way to make sure that the default route coming from Fortigate DHCP has a higher Metric?



PS. I can "cheat" the system by assigning a higher "interface" Metric to the virtuel interface itself (i.e. Set-NetIPInterface -InterfaceIndex 8 -InterfaceMetric 30). I just wonder if something with a similar result works via DHCP from a Fortigate..

Contributor III

I am not sure u can manipulate the metric from DHCP.

New Contributor II

I would just adjust the static route to have a higher metric.

New Contributor III

That's what I do. But the changed metric is lost after each reboot. :(



The static route should not be deleted after a reboot.
Is only this entry deleted or all changes?