Issues With DHCP and PXE Booting on an Isolated Network
-
@cdutko ok both look good.
The netstat command responded with
udp 0 0 0.0.0.0:67 0.0.0.0:*
Which tells us that “something” is bound to port 67 and listening (most likely a dhcp server).
And the ps command shows us that the dhcp service is running in memory.
dhcpd 2167 0.0 0.3 35488 13180 ? Ss 14:06 0:00 dhcpd -user dhcpd -group dhcpd -f -4 -pf /run/dhcp-server/dhcpd.pid -cf /etc/dhcp/dhcpd.conf
So we know that the dhcp server is running and “should” be handing out IP addresses if it is configured correctly.
We can also see from the process command
ps
that the dhcp server is being configured with a file called/etc/dhcp/dhcpd.conf
. We should probably look at the content of that file to see if its properly setup. Please post the contents of that file here. -
@cdutko said in Issues With DHCP and PXE Booting on an Isolated Network:
wlp3s0
Just looking at your details again, isn’t wlp3s0 a wireless network adapter?
-
@george1421 wlp3s0 I believe is a wireless adapter. I originally was connected to the internet via WLAN and that is how the server was originally configured. Is there a way for me to switch that to a wired network adapter?
Here is the contents of that file.
# 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; 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.0.0 netmask 255.255.255.0{ option subnet-mask 255.255.255.0; range dynamic-bootp 192.168.0.10 192.168.0.254; default-lease-time 21600; max-lease-time 43200; #option routers 0.0.0.0 next-server 192.168.0.170; class "Legacy" { match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:$ filename "undionly.kkpxe"; } class "UEFI-32-2" { match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:$ filename "i386-efi/ipxe.efi"; } class "UEFI-32-1" { match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:$ filename "i386-efi/ipxe.efi"; } class "UEFI-64-1" { match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:$ filename "ipxe.efi"; } class "UEFI-64-2" { match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:$ filename "ipxe.efi"; } class "UEFI-64-3" { match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:$ filename "ipxe.efi"; } class "SURFACE-PRO-4" { match if substring(option vendor-class-identifier, 0, 32) = "PXEClient:$ filename "ipxe7156.efi"; } class "Apple-Intel-Netboot" { match if substring(option vendor-class-identifier, 0, 14) = "AAPLBSDPC/$ 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:8$ filename "ipxe.efi"; }}
-
@cdutko ok I see the issue.
But to first answer your question about the network adapter.
Edit the hidden file
/opt/fog/.fogsettings
Update the settings in there and then rerun the installfog.sh script in the bin directory to reinstall fog. No worries it won’t loose anything.Now to the issue.
Your fog server st at 192.168.1.1/24 and your clients are being issued dhcp addresses at 192.168.0.10-254/24. They are on different subnets. Different subnets can only communicate using a router in between.
-
@george1421 Ok.
So what would my “interface” be considered in this case? ETH0?
& How would I fix that subnet issue. I don’t plan on using a router for this setup.
-
For the interface question you need to find out what your ethernet adapter is called, it may be called eth0 or it may be called something different.
ip addr show
may give you a better idea what your network adapter is called, just look for your known IP address.As for the router issue, you can either change the IP address of the fog server or of the scope in your dhcp server. Changing the scope might be easier.
I had a long post here, but decided to be cautious first. Please post the output of
ip addr show
first. -
@george1421 Ok so I think I see what to do, but correct me if I’m wrong.
ip addr show 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether 00:0b:ab:af:09:e7 brd ff:ff:ff:ff:ff:ff inet 192.168.1.1/24 brd 192.168.1.255 scope global enp1s0 valid_lft forever preferred_lft forever inet6 fe80::908d:13ce:d900:bf02/64 scope link valid_lft forever preferred_lft forever 3: enp2s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000 link/ether 00:0b:ab:af:09:e8 brd ff:ff:ff:ff:ff:ff 4: wlp3s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000 link/ether bc:30:7e:bc:0b:b6 brd ff:ff:ff:ff:ff:ff
192.168.1.1 is applied to enp1s0 so that is what my interface=‘__’ should be.
My original .fogsettings file gives me this:
## Start of FOG Settings ## Created by the FOG Installer ## Find more information about this file in the FOG Project wiki: ## https://wiki.fogproject.org/wiki/index.php?title=.fogsettings ## Version: 1.4.4 ## Install time: Wed 12 Jul 2017 10:53:49 AM EDT ipaddress='192.168.0.170' copybackold='0' interface='wlp3s0' submask='255.255.255.0' routeraddress='' plainrouter='' dnsaddress='' username='fog' password='7bSbm0EL2zZGqFaAfb0tW3axI5+/h7cNDi03YpMW4pk=' osid='2' osname='Debian' dodhcp='y' bldhcp='1' dhcpd='isc-dhcp-server' blexports='1' installtype='N' snmysqluser='root' snmysqlpass='' snmysqlhost='localhost' installlang='0' storageLocation='/images' fogupdateloaded=1 docroot='/var/www/html/' webroot='/fog/' caCreated='yes' startrange='192.168.0.10' endrange='192.168.0.254' bootfilename='undionly.kpxe' packages='apache2 bc build-essential cpp curl g++ gawk gcc gzip htmldoc isc-dhc$ noTftpBuild='' notpxedefaultfile='' sslpath='/opt/fog/snapins/ssl/' backupPath='/home/' php_ver='7.1' php_verAdds='-7.1' sslprivkey='/opt/fog/snapins/ssl//.srvprivate.key' ## End of FOG Settings
However if I wish to correct my problems with the adapter and my DHCP range my .fogsettings file should read:
## Start of FOG Settings ## Created by the FOG Installer ## Find more information about this file in the FOG Project wiki: ## https://wiki.fogproject.org/wiki/index.php?title=.fogsettings ## Version: 1.4.4 ## Install time: Wed 12 Jul 2017 10:53:49 AM EDT ipaddress='192.168.1.1' copybackold='0' interface='enp1s0' ... startrange='192.168.1.10' endrange='192.168.1.254' ... ## End of FOG Settings
Is this correct?
Also, I would like to thank you in advance for assisting me with all of this.
-
@cdutko yes your second modified settings are correct.
Updating the .fogsettings file and then reinstalling fog by running the installfog.sh command should take care of it.
-
@george1421 I would also confirm that the dhcp server config file is correct after the installer is done. As for the installer all of the settings from the .fogsettings file will be loaded in as defaults so it shouldn’t ask you for them again.
-
@george1421 You are an absolute legend George. It works now and I was able to PXE boot from my client PC and upload it to the Hosts screen. I can view it on the network and everything is working correctly.
Thank you so much!