Hardware router dhcp enabled
-
Hi folks. Has anybody could ever make Fog work on a lan, where a hardware router dhcp is already running and searving IP and DNS to the client computers (and don´t want to disable it).
I know we need dnsmasq to achieve that. Well, I follow this instruccions: https://wiki.fogproject.org/wiki/index.php/Using_FOG_with_an_unmodifiable_DHCP_server/_Using_FOG_with_no_DHCP_server
But couldn´t make it work yet.
During the PXE clients boot process, they get IP correctly (from the hardware router), they properly inform that there is a PXE file server (the Fog machine indeed), but then they stop booting informing that they couldn´t find the PXE file or something.
Any tip or intructions line by line to achieve this?
Thanks a lot. -
Is this your set up?
–Pre-existing DHCP server (windows, linux, novel, etc.)
–all one LAN (no vlans)
–all using the same subnetmaskIf so, YES! You do not need dnsmasq. dnsmasq is used if you are unable to edit your DHCP server options 66 & 67 due to “security” or “location”. “ProxyDHCP is a solution for those of you who are working with an unmodifiable DHCP server or wish to avoid the hassle of editing the already existing DHCP server, or even as a portable imaging solution.”
SO if you already have a DCHP server running all you need to do is follow the instructions:
https://wiki.fogproject.org/wiki/index.php/DHCP_Settings -
@Wolfbane8653 @pabloinza and in your particular case, the link at the bottom of the DHCP settings article (that Wolfbane posted) is probably what you need.
Here is that link: https://wiki.fogproject.org/wiki/index.php/Other_DHCP_Configurations
Additionally, if you could tell us what “hardware router” you’re using, we could help you even more.
-
Hi my friends. My dhcp is that with comes embedded inside the TP-LINK WR 941 ND Router. So, I’d Iike to keep it using as dhcp sever, the clients leasing ip from it, and the clients being able to load the pxe file from the fog machine. And yes, all pc are in the same lan and same segment.
-
@pabloinza Then ProxyDHCP (dnsmasq) is the answer.
Please post your configuration file for dnsmasq.
Also, ensure your firewall is off, and make sure SELinux is off (if applicable).
-
Tomorrow I’ll post my dnsmasq file. Now, when you say “firewall off”, you mean my Tplink router’s firewall? Isn’t any specific port to open and forward in the Tplink router, in order to make this work, and avoid turning off all the firewall completely?
-
@pabloinza said:
Tomorrow I’ll post my dnsmasq file. Now, when you say “firewall off”, you mean my Tplink router’s firewall? Isn’t any specific port to open and forward in the Tplink router, in order to make this work, and avoid turning off all the firewall completely?
The Firewall on your FOG server.
-
@Wayne-Workman. Okay, but how come? The escenario works great if I disconnect the tplink router, connect all pc to a standard switch, and set the fog server pc as dhcp server; and there I don’t turn off anything, I don’t need to touch the fog server, default installation. So, why the need to touch its firewall?
-
@Wayne-Workman Here is my ltsp.conf file:
- Sample configuration for dnsmasq to function as a proxyDHCP server, - enabling LTSP clients to boot when an external, unmodifiable DHCP - server is present. - The main dnsmasq configuration is in /etc/dnsmasq.conf; - the contents of this script are added to the main configuration. - You may modify the file to suit your needs. - Don't function as a DNS server: port=0 - Log lots of extra information about DHCP transactions. log-dhcp - Dnsmasq can also function as a TFTP server. You may uninstall - tftpd-hpa if you like, and uncomment the next line: - enable-tftp - Set the root directory for files available via FTP. tftp-root=/tftpboot - The boot filename. dhcp-boot=pxelinux.0 - rootpath option, for NFS dhcp-option=17,/images - kill multicast dhcp-option=vendor:PXEClient,6,2b - 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 - PXE menu. The first part is the text displayed to the user. The second is the timeout, in seconds. pxe-prompt="Press F8 for boot menu", 3 - 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 from network", pxelinux - A boot service type of 0 is special, and will abort the - net boot procedure and continue booting from local media. pxe-service=X86PC, "Boot from local hard disk", 0 - If an integer boot service type, rather than a basename is given, then the - PXE client will search for a suitable boot service for that type on the - network. This search may be done by multicast or broadcast, or direct to a - server if its IP address is provided. - pxe-service=x86PC, "Install windows from RIS server", 1 - This range(s) is for the public interface, where dnsmasq functions - as a proxy DHCP server providing boot information but no IP leases. - Any ip in the subnet will do, so you may just put your server NIC ip here. - Since dnsmasq is not providing true DHCP services, you do not want it - handing out IP addresses. Just put your servers IP address for the interface - that is connected to the network on which the FOG clients exist. - If this setting is incorrect, the dnsmasq may not start, rendering - your proxyDHCP ineffective. dhcp-range=10.10.10.101,proxy - This range(s) is for the private network on 2-NIC servers, - where dnsmasq functions as a normal DHCP server, providing IP leases. - dhcp-range=192.168.0.20,192.168.0.250,8h - For static client IPs, and only for the private subnets, - you may put entries like this: - dhcp-host=00:20:e0:3b:13:af,10.160.31.111,client111,infinite
Mod edited to use code box
-
@Wayne-Workman Here is the screen capture of a pxe clien during boot process. This is the farther point I could reach
And if I change pxelinux.0 by undionly.kpxe, then it says “tftp file timeout, pxe file not found”
-
@pabloinza I always recommend turning off the firewall for troubleshooting - it’s one less thing in the mix.
Also, you’re problem is that you have dnsmasq configured to use pxelinux.0 when you should be using undionly.kpxe or undionly.kkpxe
-
@Wayne-Workman Yes Wayne, I suppose that. In fact, I read that in this forum. But with my pour knowledge about Linux and all of this, I can´t achieve this. Would you please type for me the EXACT lines I need to put in my ltsp.conf file, and in any other place what ever I need to type or add or delete?
-
@Wayne-Workman I´ve tried changing the line:
- dhcp-boot=pxelinux.0
to - dhcp-boot=undionly.kpxe
and then the clients say “tftp file not found”
- dhcp-boot=pxelinux.0
-
@pabloinza said:
@Wayne-Workman I´ve tried changing the line:
- dhcp-boot=pxelinux.0
to - dhcp-boot=undionly.kpxe
and then the clients say “tftp file not found”
You should tell it to use undionly.0
This is due to some bug somewhere… we aren’t sure if it’s a dnsmasq issue or a tftp issue or a FOG issue.After setting dnsmasq to undionly.0, you would then copy (or symbolically link) the undionly.kpxe file to undionly.0
These files are located here:
/tftpboot/undionly.kpxeAt home, I just make a copy. But if you can figure out how to make a symbolic link work, then the installer will preserve this each time you upgrade.
You can copy like this:
cp /tftpboot/undionly.kpxe /tftpboot/undionly.0You might find it educational to read through this thread: https://forums.fogproject.org/topic/5425/proxydhcp-issue
This person has a different issue than you, but a whole lot of stuff about dnsmasq is covered in there. - dhcp-boot=pxelinux.0
-
@Wayne-Workman Wayne!!..Ah ah!!..Savior of the Universe! Finally the solution! It finally works! I think the error is an issue of dnsmasq, since when I tried all of this stuff configuring Fog server machine as dhcp server, all worked fine, and in the dhcpd.conf file, the proper line said “undionly.kpxe”. So, I think dnsmasq is who´s mistaking the name of the file.
Well, what ever, it works!
Thanks a lot my friend! I really appreciate your help.
I don´t know how to tag this post as “SOLVED”. Would you please tell me?