• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Remove and stop FOG to act as a DHCP server

    Scheduled Pinned Locked Moved Solved
    FOG Problems
    4
    24
    5.7k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      msi Testers
      last edited by msi

      Hi,
      Initially, when we started to use fog, we didn’t have any existing DHCP server. Therefore, we made FOG it self to act as a DHCP server. Now, we decided to have our own Cisco base DHCP server. How can I stop FOG to act as a DHCP server? What additional step we should take to continue use our FOG? Do we have to put any configuration to Cisco router, switch, firewall, and LAN Controller? We’re using CentOS and 1.4.2 FOG version.

      1 Reply Last reply Reply Quote 0
      • S
        Sebastian Roth Moderator
        last edited by

        @msi As we don’t know your CentOS version it’s a bit of a guess. Older versions use systemv init and with centos there is/was a tool called chkconfig to manage (start, stop, disable, enable) services - see here. With recent versions like CentOS 7 you’d use systemd tools:

        sudo systemctl stop dhcpd
        sudo systemctl disable dhcpd
        

        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

        1 Reply Last reply Reply Quote 1
        • Wayne WorkmanW
          Wayne Workman
          last edited by

          You’ll also want to turn off DHCP in the fog config file, otherwise it’ll just turn back on the next time you update. Here: /opt/fog/.fogsettings look for dodhcp and set it to ='N'

          Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
          Daily Clean Installation Results:
          https://fogtesting.fogproject.us/
          FOG Reporting:
          https://fog-external-reporting-results.fogproject.us/

          M 1 Reply Last reply Reply Quote 1
          • M
            msi Testers @Wayne Workman
            last edited by

            @wayne-workman @Sebastian-Roth Is there any configuration we need do in our DHCP server. We use Cisco DHCP server according to our network engineer.

            george1421G 1 Reply Last reply Reply Quote 0
            • george1421G
              george1421 Moderator @msi
              last edited by

              @msi Once you have the fog dhcp server disabled and the service stopped, then you can use your cisco dhcp server, no problem. You will need to configure it to send dhcp option 66 {next-server} which is the IP address of your fog server. And then configure dhcp option 67 {boot-file} to either undionly.kpxe for bios (legacy) systems or ipxe.efi for uefi based systems. If you have a mixed environment (uefi and bios) systems then you will need to configure the cisco dhcp server to send the correct {boot-file} based on the pxe booting client. This is done by the dhcp server watching the Arch type that is sent in the dhcp discover packet.

              If your dhcp server isn’t capable of dynamically sending the right pxe boot-file, then you still have some luck, you can install dnsmasq on the fog server and have it supply only the {next-server} and {boot-file} dhcp options for the pxe booting clients. The main dhcp server is still responsible for IP address assignments and the fog server is responsible for sending the pxe information.

              Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

              1 Reply Last reply Reply Quote 0
              • M
                msi Testers
                last edited by msi

                Hi,
                Thank you for all of your contribution. I made the changes, but it didn’t work. Below is our DHCP configuration on Cisco Switch Version 12.2 (55)SE5

                ip dhcp pool fog
                network 192.168.1.0 255.255.255.0
                bootfile ipxe.efi
                next-server 192.168.1.230
                default-router 192.168.1.1
                dns-server 192.168.1.15 192.168.1.16
                domain-name xcel-domain.local
                option 66 ip 192.168.1.230
                option 67 ascii ipxe.efi
                lease infinite

                Also, is it possible to have both legacy and uefi boot. If yes, how?

                george1421G 2 Replies Last reply Reply Quote 0
                • george1421G
                  george1421 Moderator @msi
                  last edited by

                  @msi Well we have two directions to move in here.

                  1. Debug what is wrong with your cisco setup.
                  2. Because you asked can we support both, change plans a bit to support both.

                  Option 2 would give you the most flexibility.

                  Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

                  M 1 Reply Last reply Reply Quote 0
                  • george1421G
                    george1421 Moderator @msi
                    last edited by george1421

                    @msi So lets work with option 2. We can go back to option 1 if we run into a road block with option 2.

                    For option 2:

                    1. Remove the next server and boot file entries from your cisco router. Also remove dhcp options 66 and 67 from your dhcp server. We ar e going to use dnsmasq to provide these dynamic boot file names.
                    2. Follow my posts here to download and compile dnsmasq version 2.76 (actually 2.77 has been released and if you want to attempt that the instructions should be the same).
                    3. Install dnsmasq on your fog server using the ltsp.conf file listed in that post. Don’t forget to update the fog server IP every place in that file (there are quite a few).
                    4. Start the dnsmasq service and pxe boot a target computer on the same vlan as your fog server. If your pxe client computers are going to be pxe booting on a different subnet than your fog server you will need to add your fog server listed last in your dhcp-helper / dhcp-relay service on your vlan router.

                    Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

                    M 1 Reply Last reply Reply Quote 0
                    • M
                      msi Testers @george1421
                      last edited by msi

                      @george1421 whats option 2 is for? did you mean ipxe.efi? We are trying to find the problem with Cisco configuration. So far no luck. By the way, we have install new fog with latest 1.4.4, and deiced to decommission the existing one by backing up.

                      1 Reply Last reply Reply Quote 0
                      • M
                        msi Testers @george1421
                        last edited by

                        @george1421 I am sorry that I am asking a lot. Can you tell me more about how to configure dnsmasq? I heard about before and failed to configure it in right way when I tried to use cobbler.

                        george1421G 1 Reply Last reply Reply Quote 0
                        • S
                          Sebastian Roth Moderator
                          last edited by

                          @msi This is what George is referring to: https://forums.fogproject.org/topic/8725/compiling-dnsmasq-2-76-if-you-need-uefi-support

                          He provided instructions on how to compile and configure dnsmasq… As a starter you could skip the compile step and install dnsmasq from your official package repository sudo yum install dnsmasq. When you get this up and running you can still go ahead, save the config, purge/uninstall dnsmasq and compile the latest version as suggested because it has fixed UEFI/BIOS support.

                          Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                          Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                          1 Reply Last reply Reply Quote 2
                          • george1421G
                            george1421 Moderator @msi
                            last edited by

                            @msi said in Remove and stop FOG to act as a DHCP server:

                            @george1421 I am sorry that I am asking a lot. Can you tell me more about how to configure dnsmasq? I heard about before and failed to configure it in right way when I tried to use cobbler.

                            Wow, I apologize. I copied the link and never pasted in my post. Sebastian has the link in his post. That link contains the instructions on compiling dnsmasq 2.76 (minimum version required for dynamic bios/uefi support). It also contains a sample config file that does work.

                            Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

                            1 Reply Last reply Reply Quote 0
                            • S
                              Sebastian Roth Moderator
                              last edited by

                              @msi Any news on this?

                              Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                              Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                              M 2 Replies Last reply Reply Quote 0
                              • M
                                msi Testers @Sebastian Roth
                                last edited by

                                @sebastian-roth I haven’t had chance to work on it. I will update you once I install dnsmasq. Thank you for checking on me.

                                1 Reply Last reply Reply Quote 0
                                • M
                                  msi Testers @Sebastian Roth
                                  last edited by msi

                                  @sebastian-roth Hi Getting below error:
                                  [root@localhost dnsmasq-2.76]# nano Makefile
                                  [root@localhost dnsmasq-2.76]# sudo make install
                                  /bin/sh: cc: command not found
                                  /bin/sh: cc: command not found
                                  Package dbus-1 was not found in the pkg-config search path.
                                  Perhaps you should add the directory containing dbus-1.pc' to the PKG_CONFIG_PATH environment variable No package 'dbus-1' found Package libidn was not found in the pkg-config search path. Perhaps you should add the directory containing libidn.pc’
                                  to the PKG_CONFIG_PATH environment variable
                                  No package ‘libidn’ found
                                  Package libnetfilter_conntrack was not found in the pkg-config search path.
                                  Perhaps you should add the directory containing libnetfilter_conntrack.pc' to the PKG_CONFIG_PATH environment variable No package 'libnetfilter_conntrack' found Package nettle was not found in the pkg-config search path. Perhaps you should add the directory containing nettle.pc’
                                  to the PKG_CONFIG_PATH environment variable
                                  No package ‘nettle’ found
                                  Package hogweed was not found in the pkg-config search path.
                                  Perhaps you should add the directory containing hogweed.pc' to the PKG_CONFIG_PATH environment variable No package 'hogweed' found Package dbus-1 was not found in the pkg-config search path. Perhaps you should add the directory containing dbus-1.pc’
                                  to the PKG_CONFIG_PATH environment variable
                                  No package ‘dbus-1’ found
                                  Package libidn was not found in the pkg-config search path.
                                  Perhaps you should add the directory containing libidn.pc' to the PKG_CONFIG_PATH environment variable No package 'libidn' found Package libnetfilter_conntrack was not found in the pkg-config search path. Perhaps you should add the directory containing libnetfilter_conntrack.pc’
                                  to the PKG_CONFIG_PATH environment variable
                                  No package ‘libnetfilter_conntrack’ found
                                  Package nettle was not found in the pkg-config search path.
                                  Perhaps you should add the directory containing nettle.pc' to the PKG_CONFIG_PATH environment variable No package 'nettle' found Package hogweed was not found in the pkg-config search path. Perhaps you should add the directory containing hogweed.pc’
                                  to the PKG_CONFIG_PATH environment variable
                                  No package ‘hogweed’ found
                                  /bin/sh: cc: command not found
                                  /bin/sh: cc: command not found
                                  make[1]: Entering directory /root/Downloads/dnsmasq-2.76/src' cc -Wall -W -O2 -DVERSION='"2.76"' -c cache.c make[1]: cc: Command not found make[1]: *** [cache.o] Error 127 make[1]: Leaving directory /root/Downloads/dnsmasq-2.76/src’
                                  make: *** [all] Error 2
                                  [root@localhost dnsmasq-2.76]# ls
                                  Android.mk bld CHANGELOG CHANGELOG.archive contrib COPYING COPYING-v3 dbus dnsmasq.conf.example doc.html FAQ logo Makefile man po setup.html src trust-anchors.conf VERSION
                                  [root@localhost dnsmasq-2.76]#

                                  M 1 Reply Last reply Reply Quote 0
                                  • M
                                    msi Testers @msi
                                    last edited by

                                    @Sebastian-Roth @george1421
                                    By the way I am using dnsmasq version 2.66 since my centos won’t let me upgrade to 2.76. I noticed that it is missing libdbus-1-dev libnetfilter-conntrack-dev idn libidn11-dev nettle-dev libval-dev dnssec-tools. So i ran yum install -y wget libdbus-1-dev libnetfilter-conntrack-dev idn libidn11-dev nettle-dev libval-dev dnssec-tools. I got below error:

                                    No package libdbus-1-dev available.
                                    No package libnetfilter-conntrack-dev available.
                                    No package idn available.
                                    No package libidn11-dev available.
                                    No package nettle-dev available.
                                    No package libval-dev available.
                                    No package dnssec-tools available.
                                    Nothing to do

                                    george1421G 1 Reply Last reply Reply Quote 0
                                    • george1421G
                                      george1421 Moderator @msi
                                      last edited by

                                      @msi what version of linux are you using? You may need to install the developer tools to compile the code .

                                      Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

                                      M 1 Reply Last reply Reply Quote 0
                                      • M
                                        msi Testers @george1421
                                        last edited by

                                        @george1421 CentOS 7.3

                                        george1421G 1 Reply Last reply Reply Quote 0
                                        • george1421G
                                          george1421 Moderator @msi
                                          last edited by

                                          @msi OK the instructions are for ubuntu, but for centos make sure the development tools are installed.
                                          yum -y groupinstall "Development Tools"

                                          Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

                                          M 1 Reply Last reply Reply Quote 0
                                          • M
                                            msi Testers @george1421
                                            last edited by

                                            @george1421 development tools successfully installed. but still giving same error.

                                            george1421G 1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 1 / 2
                                            • First post
                                              Last post

                                            167

                                            Online

                                            12.0k

                                            Users

                                            17.3k

                                            Topics

                                            155.2k

                                            Posts
                                            Copyright © 2012-2024 FOG Project