Changing IP's on a portable FOG Server



  • Hello,

    I’m trying to Create a Portable FOG server on a laptop that I plan to send around to different areas of the business to deploy a new image to each of them.

    Each Site uses a different scope of internal IP. I saw that when I was setting up the server, it asked me which IP it would be using. So if I were to allow the servers IP to be determined by DHCP, are there settings on the server itself that would need to be changed in order for the server to work.

    I’m aware that the DHCP Options would need to be pointed at whatever the servers assigned IP is, but i doubt its going to be as simple as just changing those settings.

    Thanks!



  • @Sebastian-Roth Yes, its working perfectly now, Thanks!


  • Developer

    @Critchleyb So is it working properly now?



  • @george1421 Scratch that, i forgot to take out the < > symbols, derp…



  • @george1421 Hey, Thanks for that.

    I’m unfortunately getting an error when I try and start the dnsmasq service with an error on line 38:

    dnsmasq: bad dhcp-range at Line 38 of /etc/dnsmasq.d/ltsp.conf
    

  • Moderator

    @Critchleyb said in Changing IP's on a portable FOG Server:

    Is DNSmasq capable of pointing network booting at the server without editing any dhcp options on the router where it will be running?

    Yes ^^

    The quick steps are:
    Install dnsmasq from your linux distro’s repo.

    Use this config file. Save in it in /etc/dnsmasq.d as ltsp.conf

    # Don't function as a DNS server:
    port=0
    
    # Log lots of extra information about DHCP transactions.
    log-dhcp
    
    # Set the root directory for files available via FTP.
    tftp-root=/tftpboot
    
    # The boot filename, Server name, Server Ip Address
    dhcp-boot=undionly.kpxe,,<fog_server_IP>
    
    # 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
    
    # inspect the vendor class string and match the text to set the tag
    dhcp-vendorclass=BIOS,PXEClient:Arch:00000
    dhcp-vendorclass=UEFI32,PXEClient:Arch:00006
    dhcp-vendorclass=UEFI,PXEClient:Arch:00007
    dhcp-vendorclass=UEFI64,PXEClient:Arch:00009
    
    # Set the boot file name based on the matching tag from the vendor class (above)
    dhcp-boot=net:UEFI32,i386-efi/ipxe.efi,,<fog_server_IP>
    dhcp-boot=net:UEFI,ipxe.efi,,<fog_server_IP>
    dhcp-boot=net:UEFI64,ipxe.efi,,<fog_server_IP>
    
    # PXE menu.  The first part is the text displayed to the user.  The second is the timeout, in seconds.
    pxe-prompt="Booting FOG Client", 1
    
    # 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 to FOG", undionly.kpxe
    pxe-service=X86-64_EFI, "Boot to FOG UEFI", ipxe.efi
    pxe-service=BC_EFI, "Boot to FOG UEFI PXE-BC", ipxe.efi
    
    dhcp-range=<fog_server_ip>,proxy
    

    Use the config file exactly. Replace <fog_server_ip> completely with the current IP address of your fog server.

    Run these commands from your fog server linux console

    sudo systemctl enable dnsmasq
    sudo systemctl start dnsmasq
    

    Depending on your linux distro dnsmasq may be called dnsmasqd.



  • @george1421 Hey, Is there anywhere I can find some documentation on how to implement DNSmasq? I’ve not heard of it before and the aim is to not have to change any of the sites current services, like dhcp etc. Is DNSmasq capable of pointing network booting at the server without editing any dhcp options on the router where it will be running?



  • @george1421 The makeFogMobile script does update dnsmasq, but the updateIP script does not.


  • Moderator

    You will probably want to install dnsmasq on your mobile fog server. That way when you bring up your fog server, the network booting will also be instructed to use your fog server for the boot files. When you power off your fog server then nothing will be left behind to point to your fog server for network booting.

    Wayne’s excellent script also manages the IP address changes in the dnsmasq configuration files too.


  • Developer

    @Critchleyb said in Changing IP's on a portable FOG Server:

    I see it mentions DHCP, however I’m not using fog to run DHCP, will there be any issues there?

    Nope, won’t be an issue as long as you have your “external” DHCP setup correctly.



  • @Sebastian-Roth Thanks! I’ll give it a try. I see it mentions DHCP, however I’m not using fog to run DHCP, will there be any issues there?

    I’ve also found the documentation on changing fogs IP here: https://wiki.fogproject.org/wiki/index.php/Change_FOG_Server_IP_Address

    Hopefully between them I should be good to go!


  • Developer

    @Critchleyb Yeah it’s not as simple as pushing a new IP to your FOG server via DHCP. But thanks to Wayne we have a script available that does the Job for you. See if that is enough for your scenario: https://github.com/FOGProject/fog-community-scripts/tree/master/updateIP


Log in to reply
 

374
Online

6.0k
Users

13.3k
Topics

125.1k
Posts