PXE-E23: Client recieved tftp error from server
-
@kylian Well we can debug this for sure or you can just install dnsmasq on your FOG server: https://forums.fogproject.org/topic/12796/installing-dnsmasq-on-your-fog-server
What is at issue is some dhcp servers (mainly on routers/switches/embedded devices don’t follow the rules 100%. What is happening is the names in dhcp need to be terminated with an ascii null character. Without this null character some pxe booting computers get confused on the file name length. That is why you have extra character in the file name. The pxe client keeps searching for characters until it find a null character.
If you want to grab a pcap of the pxe booting process to confirm, or just use dnsmasq and let it provide just the pxe boot information for your network. If you have clients on different networks you will need to update your dhcp-helper/relay service on your subnet router so that dnsmasq can hear pxe boot requests from the remote subnets too.
-
@george1421 ah oke. I will go for the dnsmasq then as it wouldnt effect my home network as it is a dedicated pxe vlan i made. I just disable the dhcp server in the router then.
-
@kylian Yes you should do this so it doesn’t bit you later on. In the case of DNSMASQ it will override what dhcp is saying, but you still should remove it because you might forget it was on and get unexpected results some time in the future. With dnsmasq on your fog server means no fog no pxe boot. Nothing needs to change in your network.
-
@george1421 hello am am back home and gave this a try
https://forums.fogproject.org/topic/12796/installing-dnsmasq-on-your-fog-server
but for some reason it just timesout and does not seem to give a IP address
sudo systemctl status dnsmasq
says it is all runing the output of this is as followed● dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server Loaded: loaded (/lib/systemd/system/dnsmasq.service; enabled; vendor preset: enabled) Active: active (running) since Mon 2020-10-12 20:39:52 UTC; 6s ago Process: 52409 ExecStartPre=/usr/sbin/dnsmasq --test (code=exited, status=0/SUCCESS) Process: 52413 ExecStart=/etc/init.d/dnsmasq systemd-exec (code=exited, status=0/SUCCESS) Process: 52433 ExecStartPost=/etc/init.d/dnsmasq systemd-start-resolvconf (code=exited, status=0/SUCCESS) Main PID: 52432 (dnsmasq) Tasks: 1 (limit: 6837) Memory: 1.9M CGroup: /system.slice/dnsmasq.service └─52432 /usr/sbin/dnsmasq -x /run/dnsmasq/dnsmasq.pid -u dnsmasq -7 /etc/dnsmasq.d,.dpkg-dist,.dpkg-old,.dpkg-ne> Oct 12 20:39:52 optiplex-pxe systemd[1]: Starting dnsmasq - A lightweight DHCP and caching DNS server... Oct 12 20:39:52 optiplex-pxe dnsmasq[52409]: dnsmasq: syntax check OK. Oct 12 20:39:52 optiplex-pxe dnsmasq[52432]: started, version 2.80 DNS disabled Oct 12 20:39:52 optiplex-pxe dnsmasq[52432]: compile time options: IPv6 GNU-getopt DBus i18n IDN DHCP DHCPv6 no-Lua TFTP conn> Oct 12 20:39:52 optiplex-pxe dnsmasq-dhcp[52432]: DHCP, proxy on subnet 172.16.120.200 Oct 12 20:39:52 optiplex-pxe systemd[1]: Started dnsmasq - A lightweight DHCP and caching DNS server. lines 1-18/18 (END)
Edit. i found out how to fix it.
in your tutorial it saysdhcp-range=<fog_server_IP>,proxy
in my case i changed this to
dhcp-range=172.16.120.10,172.16.120.199
-
@kylian DNSMASQ in this configuration will not give out an ip address. That is the job of your dhcp server. In this configuration dnsmaq will only supply pxe boot information. Set your dhcp-range value back to the configuration from the tutorial.
-
@george1421 oh oke will change it then
-
@kylian If you know how to use wireshark on a second computer (one not part of the PXE boot process I can tell you what to look for.
-
@george1421 i know a litle about wireshark (instaling it now) so i do keep dhcp enabled in my router but remove the
DHCP Network Boot
and the IP with the filename or only the filename ipxe.efi and keep the ip set in there?Edit: seems to have worked by enabling the dhcp in the router again and disabling network boot in the router.
How does the laptop know where the fog server is without pointing to it in the router (this worked flawles bdw)seems to all been fixed
-
@kylian keep dhcp enabled on your router because that IS your dhcp server. You can remove network boot or not because dnsmasq will override it. BUT for your future sanity I would remove it from the dhcp server.
Main dhcp server -> IP Address, netmask, default gateway
dnsmasq -> boot server, boot file namethat is how and who gives its parts.
When you install wireshark you will want to setup a capture filter of port 67 or port 68 Then that will only show you the dhcp booting packets.
Start the capture and pxe boot a computer. You should see the client send out a dhcp DISCOVER packet and then you will see two OFFER packets. One from your dhcp server and the second one from dnsmasq. I won’t go too much deeper into it but if you see both OFFERS then it will (should) pxe boot. And since you are using dnsmaq it will dynamically adjust the boot file name depending on if the target computer is bios or uefi.
-
@george1421 thank you for all the help yet again
seems to be all working as my router for the dhcp server and the fog server as the pxe server.
PS. i have to say it is a really nice project/community to flow in like this with people willing to help thnx appreciated.