Using Fog server as DHCP Ubuntu server 20.04
-
Hello -
We use fog in our classroom to image our systems for our school. The server we use uses our Windows DHCP server and runs great without any issues. We are creating a stand along Fog server for a new HS and it will be on its own LAN. The fog server must provide full DHCP services. We have it set up and we can access the server interface via web browser, and our clients are getting IP addresses.
The problem we are having is setting the scope settings for pxe and uefi. Not I or my students have experience setting up boot options via command line in Linux. Any help anyone can offer will be greatly appreciated.
Our setup is as follows…
Standalone -
Dell Precision T3500
Ubuntu Server 20.04 LTE - CLI only
10.21.25.0/24
10.21.25.1 - Fog server IP
No gatewayI am including the dhcpd.conf file contents below…
#DHCP Server Configuration file/n#see /user/share/doc/dhcp*/dhcpd.conf.sample #This file was created by FOG #Definiton of PXE-specific options #Code 1: Multicast IP Address of bootfile #Code 2: UDP Port that client should monitor for MTFTP Responses #Code 3: UDP Port that MTFTP servers are using to listen for MTFTP Responses #Code 4: Number of seconds a client must listen for activity before trying #to start a new MTFTP transfer #Code 5: Number of seconds a client must listen before trying to restart #a MTFTP transfer option space PXE; option PXE.mtftp-ip code 1 = ip address; option PXE.mtftp-cport code 2 = unsigned integer 16; option PXE.mtftp-cport code 3 = unsigned integer 16; option PXE.mtftp-cport code 4 = unsigned integer 8; option PXE.mtftp-cport code 5 = unsigned integer 8; option arch code 93 = unsigned integer 16; use-host-decl-names on; ddns-update-style interim; ignore client-updates; #Specify subnet of ether device you do NOT want service. #For systems with two or more ethernet devices. #subnet 136.165.0.0 netmask 255.255.0.0 {} subnet 10.21.25.0 netmask 255.255.255.0{ option subnet-mask 255.255.255.0; range dynamic-bootp 10.21.25.10 10.21.25.254; default-lease-time 21600; max-lease-time 43200; #option routers 0.0.0.0 option domain-name-servers 127.0.0.53; next-server 10.21.25.1; } class "legacy" { match if substring(option vendor-class-identifier, 0 ,20) = "PXEClient:Arch00000"; filename "undionly.kkpxe"; } class "UEFI-32-2" { match if substring(option vendor-class identifier, 0, 20,) = "PXEClient:Arch00002"; filename "i386-efi/snponly.efi"; } class "UEFI-32-1" { match if substring(option vendor-class identifier, 0, 20) = "PXEClient:Arch00006"; filename "i386-efi/snponly.efi"; } class "UEFI-64-1" { match if substring(option vendor-class identifier, 0, 20) = "PXEClient:Arch00007"; filename "snponly.efi"; } class "UEFI-64-2" { match if substring(option vendor-class identifier, 0, 20) = "PXEClient:Arch00008"; filename "snponly.efi"; } class "UEFI-64-3" { match if substring(option vendor-class identifier, 0, 20) = "PXEClient:Arch00009"; filename "snponly.efi"; } class "SURFACE-PRO-4" { match if substring(option vendor-class identifier, 0, 32) = "PXEClient:Arch00007:UNDI:003016"; filename "snponly.efi"; } class "Apple-Intel-Netboot" { ```
-
@brad-chamberlain said in Using Fog server as DHCP Ubuntu server 20.04:
The problem we are having is setting the scope settings for pxe and uefi.
Can you explain what you mean by that?
The dhcpd.conf posted is missing some parts for PXE booting MAC devices - looks like this part was cut off. But beside that it seems fine as far as I can see. So I am wondering what exactly the issue is.
-
Thanks for getting back to us. What is happening is that when we attempt to do a network boot we it hangs on the first step of the network boot process and it does not get an IP address.
We know that DHCP is working because we do get an address in Windows from the fog server.
The config that we have we got from the fog wiki, see the link below…
https://wiki.fogproject.org/wiki/index.php?title=BIOS_and_UEFI_Co-Existence
I am assuming the problem we are having are with the scope settings, specifically the lines in the config file right after the next server line…
I am guessing that we are not reaching the undionly.kkpxe or the snponly.efi files, as we tried to network boot in both uefi and legacy mode with no success.
If someone is using their fog server for full DHCP services if they could please send us the dhcpd.conf file, or point us in the direction of some complete instructions, hopefully that will be enough to get us to get this to work.
Let me know if you need additional information.
Thanks!
-
@brad-chamberlain If you edit the dhcp config file make sure you restart the isc-dhcp service.
The next step is to see what the dhcp server is telling the client. The easiest way is to use tcpdump to capture the dhcp process.
https://forums.fogproject.org/topic/9673/when-dhcp-pxe-booting-process-goes-bad-and-you-have-no-clueYou can use tcpdump on the fog server or install wireshark on the fog server if you have the Xwindows ui installed. For wireshark use the capture filter of
port 67 or port 68 or port 69 or port 4011
Start tcpdump/wireshark and then pxe boot the target computer to the error. Then stop the capture.Review the pcap with wireshark. You should see the DORA process (Discover, Offer, Request, Ack/Nak). The target computer will send out a DISCOVER packet, look at packet at dhcp option
93
this will be the target computer saying what type it is uefi or bios. Then look at the OFFER packet from the dhcp server. In there the header should be set with {next-server} and {boot-file} matching dhcp options 66 (fog server IP) and option 67 boot file name. The answer should be in the dhcp process. If you can’t spot it upload the pcap to a file sharing site and either DM me the link or post it in the thread and I’ll take a look at it.The dhcp settings you copied from the coexistence page should be accurate.