Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

space_server: dhcpd: Add classless static route for 10.42.0.0/16 #63

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions roles/space_server/templates/dhcpd.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@ subnet 10.42.1.0 netmask 255.255.255.0 {
next-server 10.42.1.1;
filename "pxelinux.0";

# Set static route to 10.42.0.0/16
# Because RFC3442 tells clients to ignore default route if
# classless-static-route is set, we also set default route here
# See man dhcp-options(5)
option classless-static-routes 0.0.0.0/0 10.42.1.1, 10.42.0.0/16 10.42.1.1;

if exists host-name and option host-name ~= "^[0-9A-Za-z-]*$" {
ddns-hostname = option host-name;
ddns-domainname "dhcp";
Expand All @@ -100,6 +106,12 @@ subnet 10.42.2.0 netmask 255.255.255.0 {
next-server 10.42.2.1;
filename "pxelinux.0";

# Set static route to 10.42.0.0/16
# Because RFC3442 tells clients to ignore default route if
# classless-static-route is set, we also set default route here
# See man dhcp-options(5)
option classless-static-routes 0.0.0.0/0 10.42.2.1, 10.42.0.0/16 10.42.2.1;

if exists host-name and option host-name ~= "^[0-9A-Za-z-]*$" {
ddns-hostname = option host-name;
ddns-domainname "dhcp";
Expand All @@ -121,6 +133,12 @@ subnet 10.42.3.0 netmask 255.255.255.0 {
option domain-name-servers 185.38.175.0;
option ntp-servers 185.38.175.0;

# Set static route to 10.42.0.0/16
# Because RFC3442 tells clients to ignore default route if
# classless-static-route is set, we also set default route here
# See man dhcp-options(5)
option classless-static-routes 0.0.0.0/0 10.42.3.1, 10.42.0.0/16 10.42.3.1;

if exists host-name and option host-name ~= "^[0-9A-Za-z-]*$" {
ddns-hostname = option host-name;
ddns-domainname "dhcp";
Expand Down