Closed danboid closed 4 years ago
Hi @danboid,
It seems to me that the FOG install script currently only properly supports people who are using an external DHCP server.
The FOG installer will installer and setup ISC DHCP server for you if you say yes to that question. So we do not "prefer" or support people with an external DHCP at all.
I personally found the process confusing and I still haven't worked out the exact combination of DHCP and DNS options to choose during installation to get FOG to work seamlessly without an external DHCP server
This I find kind of strange. Many people do install FOG using the ISC DHCP server. The question about DNS and router are only meant as router/DNS settings within the DHCP handed out to the clients receiving their IP via DHCP. Installing on Ubuntu the default for DNS is usually something like 127.0.0.1 (or .2) because Ubuntu uses dnsmasq server as internal DNS resolver service instead of querying network DNS servers directly. But beside that there shouldn't be much confusion I'd think.
The FOG installer will installer and setup ISC DHCP server for you if you say yes to that question. So we do not "prefer" or support people with an external DHCP at all.
I tried this and could not get it to work.
I personally found the process confusing and I still haven't worked out the exact combination of DHCP and DNS options to choose during installation to get FOG to work seamlessly without an external DHCP server
This I find kind of strange. Many people do install FOG using the ISC DHCP server. The question about DNS and router are only meant as router/DNS settings within the DHCP handed out to the clients receiving their IP via DHCP. Installing on Ubuntu the default for DNS is usually something like 127.0.0.1 (or .2) because Ubuntu uses dnsmasq server as internal DNS resolver service instead of querying network DNS servers directly. But beside that there shouldn't be much confusion I'd think.
I will highlight the questions in the installer that I don't understand:
Would you like to setup a router address for the DHCP server? [Y/n] n
What is the correct answer here if I want to use a local (on the FOG server) DHCP server?
Would you like DHCP to handle DNS? [Y/n]
Do I? I presume so. I want my FOG server to do it all please!
What DNS address should DHCP allow? [127.0.0.53]
I just went with the default here. Should that work?
Would you like to use the FOG server for DHCP service? [y/N] y
Yes I think so, but don't I actually need to install dnsmasq too to get proxy DHCP working? It has been the only way I have got FOG to work. The dnsmasq config I'm using is this:
# Don't function as a DNS server:
port=0
# Log lots of extra information about DHCP transactions.
log-dhcp
enable-tftp
# Set the root directory for files available via FTP.
tftp-root=/tftpboot
# The boot filename, Server name, Server Ip Address
dhcp-boot=undionly.kpxe,,192.168.0.27
# Disable re-use of the DHCP servername and filename fields as extra
# option space. That's to avoid confusing some old or broken DHCP clients.
dhcp-no-override
# inspect the vendor class string and match the text to set the tag
dhcp-vendorclass=BIOS,PXEClient:Arch:00000
dhcp-vendorclass=UEFI32,PXEClient:Arch:00006
dhcp-vendorclass=UEFI,PXEClient:Arch:00007
dhcp-vendorclass=UEFI64,PXEClient:Arch:00009
# Set the boot file name based on the matching tag from the vendor class (above)
dhcp-boot=net:UEFI32,i386-efi/ipxe.efi,,<fog_server_IP>
dhcp-boot=net:UEFI,ipxe.efi,,<fog_server_IP>
dhcp-boot=net:UEFI64,ipxe.efi,,<fog_server_IP>
# PXE menu. The first part is the text displayed to the user. The second is the timeout, in seconds.
pxe-prompt="Booting FOG Client", 1
# The known types are x86PC, PC98, IA64_EFI, Alpha, Arc_x86,
# Intel_Lean_Client, IA32_EFI, BC_EFI, Xscale_EFI and X86-64_EFI
# This option is first and will be the default if there is no input from the user.
pxe-service=X86PC, "Boot to FOG", undionly.kpxe
pxe-service=X86-64_EFI, "Boot to FOG UEFI", ipxe.efi
pxe-service=BC_EFI, "Boot to FOG UEFI PXE-BC", ipxe.efi
dhcp-range=192.168.0.27,proxy
The FOG installer will installer and setup ISC DHCP server for you if you say yes to that question. So we do not "prefer" or support people with an external DHCP at all.
I tried this and could not get it to work.
There is nothing you should have to make to get it work after the installer has finished. It should setup ISC DHCP for you and it should work "out of the box". What is the IP address of your FOG server? Possibly there is an overlap with the DHCP range that is causing an issue.
I will highlight the questions in the installer that I don't understand:
Would you like to setup a router address for the DHCP server? [Y/n] n
As I said before the router information is only used as information for the ISC DHCP server configuration. So when machines boot up and get an IP from the DHCP, would they receive a router IP address as well?! If you say no here the machines will still get an IP and probably PXE boot as well but they won't be able to connect to the internet (or a different subnet per se) because the did not receive a router address.
Would you like DHCP to handle DNS? [Y/n]
Similar to the question about we need to know if DNS server information should be added to the DHCP server configuration to be handed out to the machines requesting an IP. If no, then DNS resolution is not going to happen for the clients because they don't receive DNS server information.
What DNS address should DHCP allow? [127.0.0.53]
I just went with the default here. Should that work?
As mentioned before Ubuntu uses dnsmasq as localhost DNS resolver service for the local system. The FOG installer is not smart enough to query the proper external DNS server IP in this case but pulls the local dnsmasq address. That local DNS server IP is of no use for the DHCP server settings! Unfortunately you need to manually type in your DNS server IP here if you want the clients to get the correct information to be able to resolve hostnames.
Would you like to use the FOG server for DHCP service? [y/N] y
Yes I think so, but don't I actually need to install dnsmasq too to get proxy DHCP working?
No there is no need to install dnsmasq as proxy DHCP because ISC DHCP is able to send the PXE boot information just fine.
I admit the questions are somehow upside down. I can understand this is causing some confusion and we have discussed changing the order of the questions but never got to change that.
Would you like to setup a router address for the DHCP server? [Y/n] n
As I said before the router information is only used as information for the ISC DHCP server configuration. So when machines boot up and get an IP from the DHCP, would they receive a router IP address as well?! If you say no here the machines will still get an IP and probably PXE boot as well but they won't be able to connect to the internet (or a different subnet per se) because the did not receive a router address.
Ah OK. Would it not be clearer to say gateway rather than router address? In my case, I don't need any internet access to use FOG.
Would you like DHCP to handle DNS? [Y/n]
Similar to the question about we need to know if DNS server information should be added to the DHCP server configuration to be handed out to the machines requesting an IP. If no, then DNS resolution is not going to happen for the clients because they don't receive DNS server information.
I'm guessing FOG operates, or at least can operate, entirely off MAC addresses eg when using the quick registration option. Provided the fog client has been set up with an IP address for the FOG server, is there any need to DNS in a basic FOG setup? I presume not which is why is this an option.
I would imagine saying yes here could cause issues for fog if the user inputs an incorrect value the for the other DNS option.
What DNS address should DHCP allow? [127.0.0.53]
I just went with the default here. Should that work?
As mentioned before Ubuntu uses dnsmasq as localhost DNS resolver service for the local system. The FOG installer is not smart enough to query the proper external DNS server IP in this case but pulls the local dnsmasq address. That local DNS server IP is of no use for the DHCP server settings! Unfortunately you need to manually type in your DNS server IP here if you want the clients to get the correct information to be able to resolve hostnames.
You've lost me. I'm running Ubuntu, I want install FOG and I don't have an external DHCP nor gateway/internet/router.
What does this question mean? Does it mean what DNS server should the FOG DHCP allow? I don't understand that as a question.
How do I work out the correct address to enter here? Is the user expected to open another terminal and run netstat? I thought this script was installing a DNS and DHCP server for me so why does it not know this?
Would you like to use the FOG server for DHCP service? [y/N] y
Yes I think so, but don't I actually need to install dnsmasq too to get proxy DHCP working?
No there is no need to install dnsmasq as proxy DHCP because ISC DHCP is able to send the PXE boot information just fine.
I admit the questions are somehow upside down. I can understand this is causing some confusion and we have discussed changing the order of the questions but never got to change that.
I'm not a network engineer but I just find these DNS and DHCP questions vague and confusing. I'm certain they can be made much clearer and some removed entirely, I'd hope.
I agree the questions should be asked a bit better and in a different order. I do have some feature requests out there for 1.6 that address many of the issues in this thread. Understand having a feature request doesn't mean the developers will honor it only that is something that should be considered as they go through the road map for 1.6 and beyond.
https://forums.fogproject.org/topic/14790/feature-request-for-fog-1-6-x-fog-installer-instll-dnsmasq https://forums.fogproject.org/topic/14789/feature-request-for-fog-1-6-x-fog-installer-revise-question-order
If you have improvements or contextual changes you would like see implemented, please feel free to create a feature request on the FOG Forums be as specific as possible. Its helpful having differing points of view on issues in the FOG environment.
@Sebastian-Roth says I should be able to get FOG to work with no external DHCP server and without using dnsmasq but this is not what it says on the FOG user guide wiki page:
https://wiki.fogproject.org/wiki/index.php?title=FOGUserGuide
That page says:
FOG dnsmasq (ProxyDHCP)
...
Not required unless you have an unmodifiable DHCP server
Then it links to this page:
That page says:
Make sure you do a normal server installation, don't setup a DHCP router address or a DNS server address, also don't use FOG as a DHCP server.
I tried that but it didn't work for me.
I would like to know the correct answers to all of the installers DNS/DHCP questions so that I have a working standalone Ubuntu FOG server without installing dnsmasq, if it is possible. Have you tested your claim recently @Sebastian-Roth? Maybe it used to work in an older FOG release but now its broken, or at least it doesn't work under Ubuntu 20.04.
@danboid We have a lot of people using FOG but much less working on the project. Unfortunately the documentation has never had enough attention and might be unclear at this point. As I said before, you don't have you use dnsmasq for ProxyDHCP if you don't have an external DHCP server. The FOG installer should install ISC-DHCP for you - and I know it does!
I would like to know the correct answers to all of the installers DNS/DHCP questions so that I have a working standalone Ubuntu FOG server without installing dnsmasq, if it is possible. Have you tested your claim recently @Sebastian-Roth? Maybe it used to work in an older FOG release but now its broken, or at least it doesn't work under Ubuntu 20.04.
I do dozens of installs for testing every month and I am fairly sure it works on Ubuntu 20.04 as well. May I ask you to upload log files so we can take a look if things went sideways? Take a look at the folder you ran the install script from (e.g. /root/fogproject/bin
) to find a sub folder called error_logs
. In that you have two log files. Upload both here and I am sure we'll see is ISC-DHCP was installed or not.
About the questions:
Would you like to setup a router address for the DHCP server? [Y/n]
You want to say yes here in most cases. As I said before this means that FOG will setup the ISC-DHCP server to hand out router/gateway information to the clients.
What is the IP address to be used for the router on the DHCP server?
Put in the router/gateway address of your local network. In most cases the installer is able to guess the correct address here so you only need to hit ENTER to confirm.
Would you like DHCP to handle DNS? [Y/n]
Similar to the router question it wants to know if the ISC-DHCP server should also hand out DNS nameserver to the clients. Say yes here as well.
What DNS address should DHCP allow?
Put in the DNS server address you want the clients to receive from the DHCP server.
Would you like to use the FOG server for DHCP service? [y/N]
Final last question if you really want the installer to setup the ISC DHCP service for you. Say yes here as well.
I'm going to close this as I think I've got FOG installed and working in a Ubuntu Server 20.04 qemu VM running under Ubuntu 20.04. I have written a complete and up-to-date guide that explains almost everything about the install process including how to create bridge interfaces and set static IPs using netplan.io. I'll be add this guide to the wiki in the next few days once I've tested and tweaked it a bit more. I did not have to install dnsmasq on my FOG server (or its host) to get my test machine to PXE boot into FOG.
20.04 on 20.04 has a new enough kernel that it should allow for some slick virtiofs 'passthrough' for /images, which I'll be trying shortly
It seems to me that the FOG install script currently only properly supports people who are using an external DHCP server. There are some loose provisions for those wanting to use FOG in the absence of an existing, modifiable DHCP server but I personally found the process confusing and I still haven't worked out the exact combination of DHCP and DNS options to choose during installation to get FOG to work seamlessly without an external DHCP server, although after much trial and error I do have it working.
The installer currently asks if you want to use the FOG server for DHCP but this option does not install and configure dnsmasq, which is what is actually required to PXE boot if you don't have an external DHCP server.
I would like to see this situation remedied by making one of the first questions asked by the installer "Do you want to use an external DHCP server?". If the users says no then dnsmasq will be installed and configured and the appropriate DHCP and DNS settings and packages applied, no related questions asked. LTSP does a good job of getting PXE booting working with dnsmasq without confusing the user with several questions about DHCP, DNS and TFTP etc so this is surely doable.