|
|
|
@ -184,6 +184,38 @@ field and save those options.
|
|
|
|
|
|
|
|
|
|
![screenshot of the DHCP server options](07_dhcp-server.png)
|
|
|
|
|
|
|
|
|
|
{{< alert >}}
|
|
|
|
|
**WARNING:** Not all clients will add both the default gateway and the classless
|
|
|
|
|
static routes as per [RFC 3442](https://www.rfc-editor.org/rfc/rfc3442.html#page-5)
|
|
|
|
|
clients must ignore the router option.
|
|
|
|
|
{{< /alert >}}
|
|
|
|
|
|
|
|
|
|
You will be fine if you use NetworkManager. Connections managed by NetworkManager
|
|
|
|
|
usually add the gateway and the classless static routes.
|
|
|
|
|
|
|
|
|
|
This is totally different on a Raspberry Pi. These do not use NetworkManager
|
|
|
|
|
(well, maybe they do when they run a desktop environment but not on console).
|
|
|
|
|
The best way (for me) was to ignore the static routes for my Raspberry Pis and
|
|
|
|
|
add the static routes manually.
|
|
|
|
|
|
|
|
|
|
In `/etc/dhcpcd.conf`, uncomment `classless_static_routes`:
|
|
|
|
|
|
|
|
|
|
~~~aconf {linenos=inline,linenostart=26,hl_lines=3}
|
|
|
|
|
# A list of options to request from the DHCP server.
|
|
|
|
|
#option domain_name_servers, domain_name, domain_search, host_name
|
|
|
|
|
#option classless_static_routes
|
|
|
|
|
# Respect the network MTU. This is applied to DHCP routes.
|
|
|
|
|
option interface_mtu
|
|
|
|
|
~~~
|
|
|
|
|
|
|
|
|
|
and let **dhcpcd** add the static routes automatically. Create the file
|
|
|
|
|
`/etc/dhcpcd.exit-hook` and add the routes manually with this script:
|
|
|
|
|
|
|
|
|
|
~~~bash
|
|
|
|
|
/sbin/route add -net 44.0.0.0/9 gw 192.168.10.1
|
|
|
|
|
/sbin/route add -net 44.128.0.0/10 gw 192.168.10.1
|
|
|
|
|
~~~
|
|
|
|
|
|
|
|
|
|
## More resources
|
|
|
|
|
|
|
|
|
|
* https://support.aa.net.uk/L2TP_Client:_pfSense
|
|
|
|
|