Feature request: MAAS should support relay-only DHCP
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
In Progress
|
Medium
|
Unassigned |
Bug Description
A use case for MAAS that was encountered at a customer site was to only provide DHCP via the relay mechanism. Currently, MAAS does not support relaying DHCP via an interface that is not also providing DHCP to the local subnet.
An example dhcpd.conf file is below that will only hand out leases to a relayed network. It was adapted from a dhcpd.conf generated by MAAS 2.3.5.
The subnet is on vlan-5003 relayed via the subnet/interface in vlan-5001. This was tested on vanilla isc-dhcp-server and confirmed to work as expected.
# WARNING: Do not edit /var/lib/
# overwrite any changes made there. Instead, you can modify dhcpd.conf by
# using DHCP snippets over the API or through the web interface.
option arch code 93 = unsigned integer 16; # RFC4578
option path-prefix code 210 = text; #RFC5071
#
# Shorter lease time for PXE booting
#
class "PXE" {
match if substring (option vendor-
default-
max-lease-time 30;
}
#
# Define lease time globally (can be overriden globally or per subnet
# with a DHCP snippet)
#
default-lease-time 600;
max-lease-time 600;
#
# Global DHCP snippets
#
# No global DHCP snippets defined
#
# Bootloaders
#
if option arch = 00:00 {
# pxe
filename "pxelinux.0";
} elsif option arch = 00:0C {
# open-firmware_
filename "bootppc64.bin";
} elsif option arch = 00:0E {
# powernv
filename "pxelinux.0";
option path-prefix "ppc64el/";
} elsif option arch = 00:07 {
# uefi_amd64
filename "bootx64.efi";
} elsif option arch = 00:0B {
# uefi_arm64
filename "grubaa64.efi";
} else {
# pxe
filename "pxelinux.0";
}
#
# Failover Peers
#
#
# Networks
#
# vlan-5003 relayed via vlan-5001
shared-network vlan-5001 {
subnet 10.100.1.0 netmask 255.255.255.0 {
# Silences "no leases available" messages from local DHCP requests
ignore unknown-clients;
}
}
shared-network vlan-5003 {
subnet 10.100.2.0 netmask 255.255.255.0 {
option subnet-mask 255.255.255.0;
option broadcast-address 10.100.2.255;
option domain-name-servers 10.100.1.2;
option domain-name "maas";
option domain-search "maas";
option routers 10.100.2.1;
option ntp-servers 10.100.1.2;
#
# Subnet DHCP snippets
#
# No DHCP snippets defined for subnet
pool {
range 10.100.2.10 10.100.2.15;
}
}
}
Changed in maas: | |
status: | New → Confirmed |
tags: | added: internal track |
Changed in maas: | |
status: | Incomplete → Triaged |
importance: | Undecided → Medium |
Changed in maas: | |
status: | Invalid → In Progress |
Hi Kellen,
Could you please clarify a few things:
1. Can you please expand on the use case? What is the problem that you are trying to solve? From the bug report, it is not clear to me what problem you have encountered and that you are trying to solve.
2. Can you please provide a maas generated DHCP config vs the expected generated config if there were to be an option to solve your problem?
3. Did you try DHCP snippets to see if you would be able to configure this yourself without providing an specific option ? The reason I ask is because the DHCP snippet feature was created to be flexible and provide configuration that is not otherwise supported. I would imagine that if MAAS is not providing DHCP on a given network, you could still use a global snippet (or maybe even a subnet snippet) to configure the DHCP as desired.
Thanks!