Have you tried a proxy dhcp using dnsmasq like they’re talking about?
I do realize that you are using a redhat not a debian, so unless you switch to a debian flavor of linux like ubuntu server or what have you, the commands would be slightly different, but I’m pretty sure that there should be equivalents for this all in redhat if you don’t want to switch distros again, and I wouldn’t blame you at all.
I only know how to set it up on debian based linux with apt-get, but I imagine the yum RHEL package is probably the same name.
From what I recall to set it up…
sudo apt-get update
sudo apt-get install dnsmasq
sudo nano /etc/dnsmasq.d/ltsp.conf
In the ltsp.conf file put this…
port=0
log-dhcp
tftp-root=/tftpboot
dhcp-boot=undionly.kpxe,fog-server,10.1.8.1
dhcp-no-override
pxe-service=X86PC, "Boot from network", undionly
dhcp-range=10.1.8.1,proxy
You may need to make symlinks for dnsmasq to see the undionly file, and I’ve had some luck putting copies of the bootfile in the ipxe folder too, that very well may do nothing, but I think it fixed something once so I just kinda still do it to be safe since it doesn’t hurt anything.
sudo cp /tftpboot/undionly.kpxe /tftpboot/undionly.0
sudo cp /tftpboot/undionly.kpxe /var/www/fog/service/ipxe/undionly.kpxe
sudo cp /tftpboot/undionly.kpxe /var/www/fog/service/ipxe/undionly.0
Then restart the dnsmasq service (also do this whenever you make changes to this file)
sudo service dnsmasq restart
You can play with the dhcp-range value a bunch to try to get it to work. This is the method I used when I didn’t have access to the DHCP server.
You can try setting the range to just your FOG server’s ip. You can set it to the router gateway, you can set it to the dhcp server too. And you can try interchanging I’ve had some
In the event that enabling dnsmasq kills your resolvconf dns configuration (which it often does…) the easiest solution is to add your dns servers in /etc/resolvconf/resolv.conf.d/base
You would also want to edit /etc/resolvconf/interface-order to have your main network interface at the top. It defaults to local host first and makes it so 127.0.0.1 becomes your dns server and breaks the internet. At least it’s done that every time I’ve installed it on ubunutu.
so like this…
sudo nano /etc/resolvconf/resolv.conf.d/base
Then lets say you use google’s dns servers and google.com was your domain for a simple syntax example, you would do this…
nameserver 8.8.8.8
nameserver 8.8.4.4
search google.com
Then restart the resolvconf service
sudo service resolvconf restart
If that doesn’t take care of it and it is a problem, check out this forum post for more info
https://forums.fogproject.org/topic/2799/dnsmasq-kills-dns-lookup-on-fog-server/6
A basic rundown of my understanding of dnsmasq is this
- Computer tries to boot to pxe and starts looking for the dhcp server
- Your fog server pretends to be a dhcp server and beats the real dhcp server to it (If your fog server is on a slower switch than your dhcp server i.e a 100 Mbps port and the infrastructure is on a 10 Gbps port, then this might not work, I had that problem once)
- The Dnsmasq service gives the computer the bootfile and uses the real dhcp server to get an ip address
- You boot into pxe and do a happy dance
More information on dnsmasq and fog here https://wiki.fogproject.org/wiki/index.php/Using_FOG_with_an_unmodifiable_DHCP_server/Using_FOG_with_no_DHCP_server
and here https://wiki.fogproject.org/wiki/index.php/ProxyDHCP/dnsmasq-_DRAFT
Another option, albeit an extremely advanced and difficult option, is to set up fog as a tertiary dhcp server. You would have to look into configuring a linux dhcp server, not something I have personally done at that in depth of a level. Because you would have to figure out how to make it act as a separate vlan or something like that, or maybe just have a separate network for imaging rather than having it on your whole organization. Something like a switch and a workbench in your office. But those are just a couple fall back ideas.
Also a side note, @george1421 and @Wayne-Workman Wayne is right here. I’ve actually gotten dnsmasq to work on multiple subnets and buildings. Granted it was a complicated university environment, and I had to do some tricksy stuff. But don’t underestimate the power of dnsmasq.