Add static route to one specific address to dhcpd.conf
2
votes
3
answers
12432
views
I want to add a static route to
10.13.0.1/32
via 192.168.178.10
to my dhcpd.conf
of my dhcpd server. Unfortunately this seems to be insanely complicated.
I tried the following:
option static-routes 10.13.0.1 192.168.178.10;
However this will add a route to 10.0.0.0/8
via 192.168.178.10
which is undesired.
I also tried:
option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;
option ms-classless-static-routes 32, 10, 13, 0, 1, 192, 168, 178, 10;
Which results in the dhcpd to no longer start:
Feb 13 20:49:30 csh-gw dhcpd: For info, please visit https://www.isc.org/software/dhcp/
Feb 13 20:49:30 csh-gw dhcpd: /var/lib/dhcp//etc/dhcpd.conf line 63: unknown option dhcp.ms-classless-static-routes
Feb 13 20:49:30 csh-gw dhcpd: option ms-classless-static-routes 32,
Feb 13 20:49:30 csh-gw dhcpd: ^
Feb 13 20:49:30 csh-gw dhcpd: Starting ISC DHCPv4 Server
Feb 13 20:49:30 csh-gw dhcpd: please see /var/log/rc.dhcpd.log for details ..failed
Googling for this issue did only yield results of adding routes to entire networks including a default gateway, which I do not want.
Asked by Richard Neumann
(1609 rep)
Feb 13, 2019, 07:55 PM
Last activity: Feb 7, 2023, 08:23 AM
Last activity: Feb 7, 2023, 08:23 AM