I would like to push static routes for internal networks to all DHCP clients using dnsmasq.
You can see 2 such static routes examples for 172.20.0.0/16 and 10.0.0.0/8 below, where
<router-ip-in-subnet> would need to be replaced by the IP of the default router in the subnet where the DHCP clients reside.
If there are n sbnets, then for n subnets needs to be given the correct gateway ip. This is somewhat cumbersome.
For other DHCP options dnsmasq will replace 0.0.0.0 with the IP of the DHCP server, which is often what you want, e.g. because the same machine is also hosting the DNS server (see dnsmasq) and is also the correct gateway for the default route.
Is there a similar trick for the static routes option to specify the gateway automatically without actually having to manually pick the right IP address?