Cannot get DHCP to work to see if PXE will work on FOG v1.54/Ubuntu Server 18.04 LTS
-
@Sebastian-Roth -I chose No for DHCP & DNS during the FOG install. Just doing the default install of FOG on both Ubuntu Server 18.04 & 16.04 w/o changing anything will not work at all.
-
@Sebastian-Roth Also, one more question, since I told FOG no to DHCP, do I see your sample doesn’t have “authoritative;” not added to it, do I leave that part out, or uncommented?
-
@Sebastian-Roth I tried copying your code to the bottom of the /etc/dhcp/dhcpd.conf file, and commented out all but what you had and left “authoritative;” enabled/uncommented and also changed the “next-server” to the FOG Server 192.168.2.1. DHCP no longer work, it’s failed at handing out IP addresses, and PXE doesn’t work. Any ideas?
-
@dbrilliant Please post the full config you have at the moment. Otherwise we can’t tell you what’s wrong.
-
# dhcpd.conf # # Sample configuration file for ISC dhcpd # # Attention: If /etc/ltsp/dhcpd.conf exists, that will be used as # configuration file instead of this file. # # option definitions common to all supported networks... #option domain-name "example.org"; #option domain-name-servers ns1.example.org, ns2.example.org; #default-lease-time 600; #max-lease-time 7200; # The ddns-updates-style parameter controls whether or not the server will # attempt to do a DNS update when a lease is confirmed. We default to the # behavior of the version 2 packages ('none', since DHCP v2 didn't # have support for DDNS.) #ddns-update-style none; # If this DHCP server is the official DHCP server for the local # network, the authoritative directive should be uncommented. authoritative; # Use this to send dhcp log messages to a different log file (you also # have to hack syslog.conf to complete the redirection). #log-facility local7; # No service will be given on this subnet, but declaring it helps the # DHCP server to understand the network topology. #subnet 10.152.187.0 netmask 255.255.255.0 { #} # This is a very basic subnet declaration. #subnet 192.168.2.0 netmask 255.255.255.0 { # range 192.168.2.5 192.168.2.15; # option routers 192.168.2.1; #} # This declaration allows BOOTP clients to get dynamic addresses, # which we don't really recommend. #subnet 10.254.239.32 netmask 255.255.255.224 { # range dynamic-bootp 10.254.239.40 10.254.239.60; # option broadcast-address 10.254.239.31; # option routers rtr-239-32-1.example.org; #} # A slightly different configuration for an internal subnet. #subnet 192.168.2.1 netmask 255.255.255.0 { # range 192.168.2.5 192.168.2.15; # option domain-name-servers ns1.internal.example.org; # option domain-name "internal.example.org"; # option subnet-mask 255.255.255.0; # option broadcast-address 192.168.2.255; # default-lease-time 600; # max-lease-time 7200; GNU nano 2.9.3 dhcpd.conf Modified # option routers 192.168.2.1; #} # This declaration allows BOOTP clients to get dynamic addresses, # which we don't really recommend. #subnet 10.254.239.32 netmask 255.255.255.224 { # range dynamic-bootp 10.254.239.40 10.254.239.60; # option broadcast-address 10.254.239.31; # option routers rtr-239-32-1.example.org; #} # A slightly different configuration for an internal subnet. #subnet 192.168.2.1 netmask 255.255.255.0 { # range 192.168.2.5 192.168.2.15; # option domain-name-servers ns1.internal.example.org; # option domain-name "internal.example.org"; # option subnet-mask 255.255.255.0; # option broadcast-address 192.168.2.255; # default-lease-time 600; # max-lease-time 7200; #} # Hosts which require special configuration options can be listed in # host statements. If no address is specified, the address will be # allocated dynamically (if possible), but the host-specific information # will still come from the host declaration. #host fogserver { # hardware ethernet 78:2b:cb:55:ee:0c; # filename "vmunix.passacaglia"; # server-name "toccata.example.com"; #} # Fixed IP addresses can also be specified for hosts. These addresses # should not also be listed as being available for dynamic assignment. # Hosts for which fixed IP addresses have been specified can boot using # BOOTP or DHCP. Hosts for which no fixed address is specified can only # be booted with DHCP, unless there is an address range on the subnet # to which a BOOTP client is connected which has the dynamic-bootp flag # to which a BOOTP client is connected which has the dynamic-bootp flag # set. host fogserver { hardware ethernet 78:2b:cb:55:ee:0c; fixed-address 192.168.2.1; } # You can declare a class of clients and then do address allocation # based on that. The example below shows a case where all clients # in a certain class get addresses on the 10.17.224/24 subnet, and all # other clients get addresses on the 10.0.29/24 subnet. #class "foo" { # match if substring (option vendor-class-identifier, 0, 4) = "SUNW"; #} #shared-network 224-29 { # subnet 10.17.224.0 netmask 255.255.255.0 { # option routers rtr-224.example.org; # } # subnet 10.0.29.0 netmask 255.255.255.0 { option routers rtr-29.example.org; # } # pool { # allow members of "foo"; # range 10.17.224.10 10.17.224.250; # } # pool { # deny members of "foo"; # range 10.0.29.10 10.0.29.230; # } #} # DHCP Server Configuration file\n#see /usr/share/doc/dhcp*/dhcpd.conf.sample # This file was created by FOG #Definition 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 requests # 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-sport code 3 = unsigned integer 16; option PXE.mtftp-tmout code 4 = unsigned integer 8; option PXE.mtftp-delay 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 192.168.2.0 netmask 255.255.255.0{ option subnet-mask 255.255.255.0; range dynamic-bootp 192.168.2.10 192.168.2.254; default-lease-time 21600; max-lease-time 43200; option routers 192.168.2.1; option domain-name-servers 192.168.1.1; next-server 192.168.2.1; class "Legacy" { match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00000"; filename "undionly.kkpxe"; } class "UEFI-32-2" { match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00002"; filename "i386-efi/ipxe.efi"; } class "UEFI-32-1" { match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00006"; filename "i386-efi/ipxe.efi"; } class "UEFI-64-1" { match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00007"; filename "ipxe.efi"; } class "UEFI-64-2" { match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00008"; filename "ipxe.efi"; } class "UEFI-64-3" { match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00009"; filename "ipxe.efi"; } class "SURFACE-PRO-4" { match if substring(option vendor-class-identifier, 0, 32) = "PXEClient:Arch:00007:UNDI:003$ filename "ipxe.efi"; } class "Apple-Intel-Netboot" { match if substring(option vendor-class-identifier, 0, 14) = "AAPLBSDPC/i386"; option dhcp-parameter-request-list 1,3,17,43,60; if (option dhcp-message-type = 8) { option vendor-class-identifier "AAPLBSDPC"; if (substring(option vendor-encapsulated-options, 0, 3) = 01:01:01) { # BSDP List option vendor-encapsulated-options 01:01:01:04:02:80:00:07:04:81:00:05:2a:09:0D:81$ filename "ipxe.efi"; } } } }
-
this reply is missing a lot of"#" symbols, where I commented lines out.
-
@dbrilliant First off, you can use the buttons above the input text box to format configs as code blocks (symbol
</>
). This way the#
are and other texts are shown as is.I have not tested the config myself but there are three things that jump at me.
- In the first third of the config there is a line not commented but that might be just a copy & paste thing from the nano editor you use. Possibly this is not in your text file but please check to make sure:
... # default-lease-time 600; # max-lease-time 7200; GNU nano 2.9.3 dhcpd.conf Modified # option routers 192.168.2.1; #} ...
- Second you have an uncommented block for your FOG server host. This is ok in general although I myself prefer to configure servers with a static address in the server’s network config. This way you don’t have to use the fixed address section here. Quick note: I am not exactly sure if you can have a
host
declaration outside of any class or group defintion. From reading the man page quickly I think it is possible but I am not exactly sure and have not tested it yet.
host fogserver { hardware ethernet 78:2b:cb:55:ee:0c; fixed-address 192.168.2.1; }
- Third there seems to be another uncommented piece about half way down the config file. Although
option routers ...
should be possible to use in a global scope I am not exactly sure. Possibly this is causing the error:
# } # subnet 10.0.29.0 netmask 255.255.255.0 { option routers rtr-29.example.org; # } # pool {
If you still can’t start dhcp server run
systemctl status isc-dhcp-server
andjournalctl -l -u isc-dhcp-server
to figure out what is wrong in the config file. -
It still won’t start, and the “journal” command doesn’t tell me exactly what the problem lies, but states that it errors with 0 and gives no leases. DHCP status gives configuration error,
topic 1- was from the copy & paste and are no part of the dump.
topic 2: I commented the host fogserver and fixed-address out just in case as well as the bracket on the line below.
topic3: subnet 10.0.29.0… all these are commented out, as I just quintuple checked.Since none of these are working, I’m leaning a complete format of Ubuntu 18.04 LTS with all universal repositories, NO DHCP download, and statically assign 192.168.2.1/24 as my eno1 (ethernet) adapter IP, and install updates ubuntu-desktop, and any basic updates, then install FOG. In FOG yes for DHCP on eno1 w/ no DNS, and let it do the rest and see if I can get lucky. The first runs w/ FOG on 16.04 & 18.04 failed miserably. Hopefully, I won’t need to edit files.
-
@dbrilliant For Ubuntu 18.04 you ought to use FOG working branch as I have fixed a couple of things there - either use git or if you don’t know how to handle that you can find a ZIP for download.
It still won’t start, and the “journal” command doesn’t tell me exactly what the problem lies, but states that it errors with 0 and gives no leases.
You might need to scroll down in that view (arrow/page down) to see the very latest messages. Do a
systemctl restart isc-dhcp-server
before so you have the latest error messages in the output.DHCP status gives configuration error,
Please post the full output or a picture of it here and we might be able to help.
-
I rebuilt 18.04 from scratch, and got way farther. updated both 32 bit & 64 bit kernels in FOG. The fog install I allowed it to dictate DHCP, and I can register hosts. I have a Dell 790 Windows 7 64 bit image I’m testing now. Seems to be hung up on the image upload for the 790, where it says “Saving original disk/parts” for about 5-7 minutes, and finally progressed. I will test Windows 10 afterwards.
Thanks for your help.
-
@dbrilliant -It’s all good. Working fantastic!