Project

General

Profile

Bug #3421

dhcpv6 server Netboot/next-server causes dhcpv6 not to start, and reports an error message.

Added by Andrew Stuart about 7 years ago. Updated almost 7 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
DHCP (IPv6)
Target version:
Start date:
01/29/2014
Due date:
% Done:

100%

Estimated time:
Affected Version:
2.1
Affected Architecture:

Description

Attempting to get uEFI boots working across ipv6.
I'm attempting to do this with a private ipv6 range (no native connectivity available, not wanting to use broker).

I am using fde1:a880:1e86:2cf8/64 as randomly assigned by some page in the internet
(I see in the draft 2.1 book, you recommend fc00::/7)
(I should also mention, I'm still a ipv6 n00b, however have established HE.net tunnels for others).

On lan interface in dhcpv6 server, I check the box to enable network booting., enter the ip address of my host.
"fde1:a880:1e86:2cf8::12" for reference. pfsense is "fde1:a880:1e86:2cf8::1". and specify my filename "efi/bootmgfw.efi"
for this instance.

and Save.

Dhcp does not respond to requests/RA assigns temporary addresses. Looking at System logs get the following:
"php: /services_dhcpv6.php: The command '/usr/local/sbin/dhcpd 6 -user dhcpd -group _dhcp -chroot /var/dhcpd -cf /etc/dhcpdv6.conf -pf /var/run/dhcpdv6.pid em0' returned exit code '1', the output was 'Internet Systems Consortium DHCP Server 4.2.5-P1 Copyright 2004-2013 Internet Systems Consortium. All rights reserved. For info, please visit https://www.isc.org/software/dhcp/ /etc/dhcpdv6.conf line 20: semicolon expected. next-server fde1: ^ /etc/dhcpdv6.conf line 20: expecting a parameter or declaration next-server fde1:a880:1e86:2cf8::12; ^ Configuration file errors encountered - exiting If you did not get this software from ftp.isc.org, please get the latest from ftp.isc.org and install that before requesting help. If you did get this software from ftp.isc.org and have not yet read the README, please read it before requesting help. If you intend to request help from the dhcp-server@isc"

Okay, I know I may need to wrap the address in [] brackets. Click save, pfsense spits out the following header:
"The following input errors were detected:

A valid IPv6 address must be specified for the network boot server."

googling around, I'm not confident next-server is even a valid option for ipv6? it looks like the replacement is:
option boot-file-url "tftp://[fde1:a880:1e86:2cf8::12]/efi/bootmgfw.efi"

for 2.1.1 at the very least, I believe network booting should be removed, since it appears broken (I didn't try manually editing the dhcpv6.conf to add [] brackets around the ip to see if that would be supported), although I'd appreciate if it could be confirmed that option boot-file-url is the correct way to go, and have it implemented. It seems like it would be a minor patch.

P.S. Assuming it's not too late / nor planned. Could a small blurb be added to the 2.1 book regarding setting up ipv6 "private" (fc00::) networks? I followed the suggestions for the HE.net tunnel referencing setting up the Lan Interface / DHCPv6/RA, but even a paragraph stating that is what I should have done, would make me more confident about how I have things setup.

If you're interested in my use case:
I love network booting. It's my thing. I allow pfsense to manage my dhcp, and as such I can't set the client architecture to specify different boot files for different architectures. I've been setting static hosts for each machine I wanted to boot uEFI, but that is error prone. I figured I could (ab)use ipv6 and set the boot file there for uEFI since we aren't using ipv6 for anything else at this time.

Associated revisions

Revision bd942860 (diff)
Added by Renato Botelho about 7 years ago

Use correct parameter (bootfile-url) to configure netboot on DHCPdv6, it fixes #3421

Revision 838e1f63 (diff)
Added by Renato Botelho about 7 years ago

Use correct parameter (bootfile-url) to configure netboot on DHCPdv6, it fixes #3421

History

#1 Updated by Andrew Stuart about 7 years ago

I've been fiddling around with this more. Having used ps auxw I found dhcpv6 running as:
"/usr/local/sbin/dhcpd -6 -user dhcpd -group _dhcp -chroot /var/dhcpd -cf /etc/dhcpdv6.conf -pf /var/run/dhcpdv6.pid em0"

Killing the process, hand modifying dhcpv6.conf and adding [] to the ip for next-server caused the same error message to appear (with the obvious addition of the []'s in the output).

Adding option dhcp6.bootfile-url alone didn't seem to work (although I am not 100% positive).

Adding:
option dhcp6.bootfile-url code 59 = string; under option domain-search-list code 119 = text;
and
option dhcp6.bootfile-url "tftp://[fde1:a880:1e86:2cf8::12]/efi/memtest5.efi";
to subnet6 fde1:a880:1e86:2cf8::/64 { block

Manually starting dhcpv6 with the command acquired above (restarting from services rewrote the file)
and no errors in output and clients are able to download and correctly execute memtest5.efi

#2 Updated by Andrew Stuart about 7 years ago

working dhcpv6.conf:

option domain-name "test.lan";
option ldap-server code 95 = text;
option domain-search-list code 119 = text;
option dhcp6.bootfile-url code 59 = string;

default-lease-time 7200;
max-lease-time 86400;
log-facility local7;
ddns-update-style none;
one-lease-per-client true;
deny duplicates;
ping-check true;
authoritative;
subnet6 fde1:a880:1e86:2cf8::/64 {
        range6 fde1:a880:1e86:2cf8::100 fde1:a880:1e86:2cf8::254;
        option domain-name "test.lan";
        option domain-search "test.lan";
        option dhcp6.name-servers fde1:a880:1e86:2cf8::1;

        option dhcp6.bootfile-url "tftp://[fde1:a880:1e86:2cf8::12]/efi/memtest5.efi";
}

#3 Updated by Chris Buechler about 7 years ago

FYI if you use

 <pre>   </pre>

tags around config snippets, log entries, etc. it doesn't try to apply formatting and they come out much more legibly.

Yeah someone just s/dhcp/dhcpv6/ on that bit, which is not directly applicable on v6.

Looks like everything under "network booting" should be replaced with a single text box for Bootfile URL, with input validation as a URI, for dhcp6.bootfile-url

#4 Updated by Andrew Stuart about 7 years ago

Agreed, I think the following was also required to make it work, as seen in the above dhcpv6.conf

option dhcp6.bootfile-url code 59 = string;

Also thanks, I was looking for a code block of some sorts, I didn't even think to try pre.

#5 Updated by Renato Botelho about 7 years ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100

#7 Updated by Chris Buechler about 7 years ago

  • Status changed from Feedback to Resolved

works

#8 Updated by Andrew Stuart about 7 years ago

I concur. Sorry for the delay, the router in question I needed this on is a production router. I had to build up a a different machine to test this on. For some reason my test rig's dhcpdv6 keeps core dumping.

While testing this just now, I noticed that the same problem exists with Static Mappings on dhcpv6.
There is a field "Netboot filename" that when filled in causes dhcpv6 to die with a similar error message as above.

#9 Updated by Andrew Stuart almost 7 years ago

disregard my comment about Static Mappings. I have yet to verify they work, or if filename is supported in dhcpv6. I opened a feature request [[https://redmine.pfsense.org/issues/3507]] for the actual issue experienced.

Also available in: Atom PDF