With multiple subnets, PXE DHCP clients would receive the router of the first
subnet in the configuration file regardless of which subnet they actually
received a lease from.
This happens because match sections such as "class" (used here to give PXE
clients a smaller lease time) and "host" (not currently used, but is the
example given in the below e-mail) are not actually scoped within the subnet{}
declaration as you would expect. They are actually defined in the global scope
for all subnets, but also inherit options from the subnet{} declaration they
were defined in such as "option routers".
We fix this by moving the conditional declarations out into the global scope,
instead of repeating them for each subnet. This way they do not inherit any
options from the subnet scope.
Full patch and explanation here: /code.launchpad .net/~lathiat/ maas/1. 9-lp1521618- dhcp-incorrect- router
https:/
With multiple subnets, PXE DHCP clients would receive the router of the first
subnet in the configuration file regardless of which subnet they actually
received a lease from.
This happens because match sections such as "class" (used here to give PXE
clients a smaller lease time) and "host" (not currently used, but is the
example given in the below e-mail) are not actually scoped within the subnet{}
declaration as you would expect. They are actually defined in the global scope
for all subnets, but also inherit options from the subnet{} declaration they
were defined in such as "option routers".
This strange behavior is explained in the following email: /lists. isc.org/ pipermail/ dhcp-users/ 2011-September/ 014001. html
https:/
We fix this by moving the conditional declarations out into the global scope,
instead of repeating them for each subnet. This way they do not inherit any
options from the subnet scope.