Configure FOG Server's DHCP service?
-
I’m fairly new to linux and networking so the question is not really for an issue but more like trying to understand how DHCP works in general. I installed DHCP service in the Fog Server since I want to test it out on a private network (to prevent having two DHCPs in the main network). I guess my question is how I could configure the DHCP in the FOG because I could not find anything related to it in the web client. I assume I’d have to configure it to set the PXE boot, but I’m not sure how and the next steps to take? I couldn’t find any documentation for this either which is why I’m here.
Let me know if you need more details. Thanks!
-
-
@introloud When you install FOG it does prompt you if you want to install the dhcp server. You can also do it after the fact. Just install the isc-dhcp server from your linux server’s distro repo. Then refer to this configuration file. Fog would use this template to create the configuration file. Make sure you update the ip addresses specific to your network. https://wiki.fogproject.org/wiki/index.php/BIOS_and_UEFI_Co-Existence#Example_1
Also be aware that you can run dnsmasq to supply the pxe boot only information and still keep your main dhcp server untouched. So if you wanted to connect your fog server to your business network that is also possible.
-
@george1421 You’re right, when it prompted me if I want to use DHCP service in Fog, I selected Yes. As per your suggestion, I can now edit the /etc/dhcp/dhcpd.conf file to create the configuration files right? I thought the configuration would be done on the Fog server’s web client itself but thanks for clarifying - although still unsure how that’s happening. My approach is to try and deploy the images to a couple of computers using an unmanaged switch through my fog server that has a private ip address (with no internet).
My next step was to move it to the business network after successfully testing it on a segregated network. If I’m understanding correctly, dnsmasq would only supply pxe boot information, leaving the ip assignments to the main dhcp? I’ve only heard that having two dhcp servers on a network would be conflicting. But I guess since dnsmasq would only be used for that specific task, it should be alright?
-
@introloud said in Configure FOG Server's DHCP service?:
I can now edit the /etc/dhcp/dhcpd.conf file to create the configuration files right?
If you picked enable the dhcp server during the fog install it “should” automatically create that file with the proper settings. Make sure when you install fog you start the installer with the linux console, go to the web ui when instructed, then return to the linux console to finish the last part of the setup (which is the spot where the configuration files are created and the /tftpboot directory is populated. If you don’t do that last part your system will not be installed correctly. You can just restart the fog installer and install it again to fix the missing bits.
If I’m understanding correctly, dnsmasq would only supply pxe boot information, leaving the ip assignments to the main dhcp
Yes that is correct, If you use the proper dnsmasq configuration it will put dnsmasq in proxydhcp mode where only the pxe boot information will be supplied to the target computer. https://forums.fogproject.org/topic/12796/installing-dnsmasq-on-your-fog-server If you type slow it takes about 10 minutes to install dnsmasq on your fog server.
-
@george1421 Thank you, I was able to get the server working on the isolated network. I’m gonna try both unicast and multicast to a couple of machines first but I doubt that it’d be any different since it’s on a simple network right now.
Would you able to suggest what approach is good to deploy the images on multiple computers over the business network? They will be in the same VLAN but probably may have different subnet masks (I dont know if that matters).
Also how can I accomplish deploying the imaging task to multiple machines, and have them reboot to get into network boot for the scheduled task? I was wondering if there’s an automated way to do this without having to manually reboot every machine.
-
@introloud said in Configure FOG Server's DHCP service?:
I’m gonna try both unicast and multicast to a couple of machines first but I doubt that it’d be any different since it’s on a simple network right now.
This is simple and complex to explain. But a unicast image is sending an image form the fog server to a single target computer. Lets say for example that take 50MB/s of network bandwidth. If you start up a second unicast deployment to a second target computer that will take another 50MB/s of network bandwidth. Now lets add a third simultaneous unicast deployment, Now you are sitting at 150MB/s of network bandwidth usage and 1GbE only has 125MB of available bandwidth, so you will get collisions and throughput slowdowns.
Now lets say you setup a multicast session with those 3 same computers. The image is now being sent out as a multicast. You can have as many receivers as you want, because only one image is being sent out you only consume 50MB/s of network bandwidth. If a receiver is late to the stream, they simply miss the stream and will not be imaged during that streaming session. Using a multicast streaming method you can image 30 computers in about the time it take to image 2 computers using unicasting.
They will be in the same VLAN but probably may have different subnet masks
Strictly speaking you would normally have only one subnet mask per VLAN unless you are doing supernetting for some reason.
imaging task to multiple machines, and have them reboot to get into network boot
Typically you would configure the computers to boot through PXE then boot to the hard drive. That way if FOG had any actions for the computer it could do it while the fog menu is displayed. If there were no jobs then it would just boot the hard drive. You would have the FOG client installed on the target computer so when the schedule task starts the target computer would be instructed to reboot via the fog client program.