Issues With DHCP and PXE Booting on an Isolated Network



  • Server
    • FOG Version: Running Version 1.4.4
      SVN Revision: 6077
    • OS: ubuntu 16.04 LTS

    Description

    I am having issues PXE booting into Fog.

    I have a very simple network configured right now. It is disconnected from the outside internet.

    I have my FOG-SERVER box connected to a GS108 (Netgear 8port unmanaged switch) via ETH (port #1).

    The computer I am attempting to PXE boot into fog with is also connected to a port (#2) in that switch.

    When I attempt to PXE boot, I recieve error PXE-E51: No DHCP or proxyDHCP offers were received

    Additional Information

    My FOG-SERVER box has it’s IPv4 address set to 192.168.1.1
    Broadcast Address: 192.168.1.255
    Subnet Mask 255.255.255.0

    I am able to connect to my fog server via the webpage as well by typing 192.168.1.1/fog/management. I have confirmed this by using another computer on the switch to connect to the fog server via the webpage.

    In my initial setup for my fog server, however; I was using a wireless network card to download the updates/get the pre-requisites.

    Initial Setup From Script

    • Here are the settings FOG will use:
    • Base Linux: Debian
    • Detected Linux Distribution: Ubuntu
    • Server IP Address: 192.168.0.170
    • Server Subnet Mask: 255.255.255.0
    • Interface: wlp3s0
    • Installation Type: Normal Server
    • Internationalization: 0
    • Image Storage Location: /images
    • Using FOG DHCP: Yes
    • DHCP router Address:

    Conclusion

    I believe that I have configured everything correctly, but I am unable to get anything back from my DHCP. I am not using a router in this setup so I believe that field should be blank. I was following this guide for LAN setup (https://wiki.fogproject.org/wiki/index.php?title=FOG_on_an_Isolated_Network)

    Thank you for any help you all may provide.



  • @george1421 You are an absolute legend George. It works now and I was able to PXE boot from my client PC and upload it to the Hosts screen. I can view it on the network and everything is working correctly.

    Thank you so much!


  • Moderator

    @george1421 I would also confirm that the dhcp server config file is correct after the installer is done. As for the installer all of the settings from the .fogsettings file will be loaded in as defaults so it shouldn’t ask you for them again.


  • Moderator

    @cdutko yes your second modified settings are correct.

    Updating the .fogsettings file and then reinstalling fog by running the installfog.sh command should take care of it.



  • @george1421 Ok so I think I see what to do, but correct me if I’m wrong.

    ip addr show
    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever
    2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether 00:0b:ab:af:09:e7 brd ff:ff:ff:ff:ff:ff inet 192.168.1.1/24 brd 192.168.1.255 scope global enp1s0 valid_lft forever preferred_lft forever inet6 fe80::908d:13ce:d900:bf02/64 scope link valid_lft forever preferred_lft forever
    3: enp2s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000 link/ether 00:0b:ab:af:09:e8 brd ff:ff:ff:ff:ff:ff
    4: wlp3s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000 link/ether bc:30:7e:bc:0b:b6 brd ff:ff:ff:ff:ff:ff
    

    192.168.1.1 is applied to enp1s0 so that is what my interface=’__’ should be.

    My original .fogsettings file gives me this:

    ## Start of FOG Settings
    ## Created by the FOG Installer
    ## Find more information about this file in the FOG Project wiki:
    ## https://wiki.fogproject.org/wiki/index.php?title=.fogsettings
    ## Version: 1.4.4
    ## Install time: Wed 12 Jul 2017 10:53:49 AM EDT
    ipaddress='192.168.0.170'
    copybackold='0'
    interface='wlp3s0'
    submask='255.255.255.0'
    routeraddress=''
    plainrouter=''
    dnsaddress=''
    username='fog'
    password='7bSbm0EL2zZGqFaAfb0tW3axI5+/h7cNDi03YpMW4pk='
    osid='2'
    osname='Debian'
    dodhcp='y'
    bldhcp='1'
    dhcpd='isc-dhcp-server'
    blexports='1'
    installtype='N'
    snmysqluser='root'
    snmysqlpass=''
    snmysqlhost='localhost'
    installlang='0'
    storageLocation='/images'
    fogupdateloaded=1
    docroot='/var/www/html/'
    webroot='/fog/'
    caCreated='yes'
    startrange='192.168.0.10'
    endrange='192.168.0.254'
    bootfilename='undionly.kpxe'
    packages='apache2 bc build-essential cpp curl g++ gawk gcc gzip htmldoc isc-dhc$
    noTftpBuild=''
    notpxedefaultfile=''
    sslpath='/opt/fog/snapins/ssl/'
    backupPath='/home/'
    php_ver='7.1'
    php_verAdds='-7.1'
    sslprivkey='/opt/fog/snapins/ssl//.srvprivate.key'
    ## End of FOG Settings
    

    However if I wish to correct my problems with the adapter and my DHCP range my .fogsettings file should read:

    ## Start of FOG Settings
    ## Created by the FOG Installer
    ## Find more information about this file in the FOG Project wiki:
    ## https://wiki.fogproject.org/wiki/index.php?title=.fogsettings
    ## Version: 1.4.4
    ## Install time: Wed 12 Jul 2017 10:53:49 AM EDT
    ipaddress='192.168.1.1'
    copybackold='0'
    interface='enp1s0'
     ...
    startrange='192.168.1.10'
    endrange='192.168.1.254'
     ...
    ## End of FOG Settings
    

    Is this correct?

    Also, I would like to thank you in advance for assisting me with all of this.


  • Moderator

    @cdutko

    For the interface question you need to find out what your ethernet adapter is called, it may be called eth0 or it may be called something different. ip addr show may give you a better idea what your network adapter is called, just look for your known IP address.

    As for the router issue, you can either change the IP address of the fog server or of the scope in your dhcp server. Changing the scope might be easier.

    I had a long post here, but decided to be cautious first. Please post the output of ip addr show first.



  • @george1421 Ok.

    So what would my “interface” be considered in this case? ETH0?

    & How would I fix that subnet issue. I don’t plan on using a router for this setup.


  • Moderator

    @cdutko ok I see the issue.

    But to first answer your question about the network adapter.

    Edit the hidden file /opt/fog/.fogsettings Update the settings in there and then rerun the installfog.sh script in the bin directory to reinstall fog. No worries it won’t loose anything.

    Now to the issue.

    Your fog server st at 192.168.1.1/24 and your clients are being issued dhcp addresses at 192.168.0.10-254/24. They are on different subnets. Different subnets can only communicate using a router in between.



  • @george1421 wlp3s0 I believe is a wireless adapter. I originally was connected to the internet via WLAN and that is how the server was originally configured. Is there a way for me to switch that to a wired network adapter?

    Here is the contents of that file.

    # DHCP Server Configuration file\n#see /usr/share/doc/dhcp*/dhcpd.conf.sample
    # This file was created by FOG
    #Definition of PXE-specific options
    # Code 1: Multicast IP Address of bootfile
    # Code 2: UDP Port that client should monitor for MTFTP Responses
    # Code 3: UDP Port that MTFTP servers are using to listen for MTFTP requests
    # Code 4: Number of seconds a client must listen for activity before trying
    # to start a new MTFTP transfer
    # Code 5: Number of seconds a client must listen before trying to restart
    # a MTFTP transfer
    option space PXE;
    option PXE.mtftp-ip code 1 = ip-address;
    option PXE.mtftp-cport code 2 = unsigned integer 16;
    option PXE.mtftp-sport code 3 = unsigned integer 16;
    option PXE.mtftp-tmout code 4 = unsigned integer 8;
    option PXE.mtftp-delay code 5 = unsigned integer 8;
    option arch code 93 = unsigned integer 16;
    use-host-decl-names on;
    ddns-update-style interim;
    option space PXE;
    option PXE.mtftp-ip code 1 = ip-address;
    option PXE.mtftp-cport code 2 = unsigned integer 16;
    option PXE.mtftp-sport code 3 = unsigned integer 16;
    option PXE.mtftp-tmout code 4 = unsigned integer 8;
    option PXE.mtftp-delay code 5 = unsigned integer 8;
    option arch code 93 = unsigned integer 16;
    use-host-decl-names on;
    ddns-update-style interim;
    ignore client-updates;
    # Specify subnet of ether device you do NOT want service.
    # For systems with two or more ethernet devices.
    # subnet 136.165.0.0 netmask 255.255.0.0 {}
    subnet 192.168.0.0 netmask 255.255.255.0{ option subnet-mask 255.255.255.0; range dynamic-bootp 192.168.0.10 192.168.0.254; default-lease-time 21600; max-lease-time 43200; #option routers 0.0.0.0
    next-server 192.168.0.170; class "Legacy" { match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:$ filename "undionly.kkpxe"; } class "UEFI-32-2" { match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:$ filename "i386-efi/ipxe.efi"; }
    class "UEFI-32-1" { match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:$ filename "i386-efi/ipxe.efi"; } class "UEFI-64-1" { match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:$ filename "ipxe.efi"; } class "UEFI-64-2" { match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:$ filename "ipxe.efi"; } class "UEFI-64-3" { match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:$ filename "ipxe.efi"; } class "SURFACE-PRO-4" { match if substring(option vendor-class-identifier, 0, 32) = "PXEClient:$ filename "ipxe7156.efi"; }
    class "Apple-Intel-Netboot" { match if substring(option vendor-class-identifier, 0, 14) = "AAPLBSDPC/$ option dhcp-parameter-request-list 1,3,17,43,60; if (option dhcp-message-type = 8) { option vendor-class-identifier "AAPLBSDPC"; if (substring(option vendor-encapsulated-options, 0, 3) = 01:01:01)$ # BSDP List option vendor-encapsulated-options 01:01:01:04:02:80:00:07:04:8$ filename "ipxe.efi"; }}
    

  • Moderator

    @cdutko said in Issues With DHCP and PXE Booting on an Isolated Network:

    wlp3s0

    Just looking at your details again, isn’t wlp3s0 a wireless network adapter?


  • Moderator

    @cdutko ok both look good.

    The netstat command responded with

    udp 0 0 0.0.0.0:67 0.0.0.0:*
    

    Which tells us that “something” is bound to port 67 and listening (most likely a dhcp server).

    And the ps command shows us that the dhcp service is running in memory.

    dhcpd 2167 0.0 0.3 35488 13180 ? Ss 14:06 0:00 dhcpd -user dhcpd -group dhcpd -f -4 -pf /run/dhcp-server/dhcpd.pid -cf /etc/dhcp/dhcpd.conf
    

    So we know that the dhcp server is running and “should” be handing out IP addresses if it is configured correctly.

    We can also see from the process command ps that the dhcp server is being configured with a file called /etc/dhcp/dhcpd.conf. We should probably look at the content of that file to see if its properly setup. Please post the contents of that file here.



  • @george1421 Alright, so I ran both of those commands. I’m not really sure how to interpret them though.

    netstat -an|grep 67 results:

    netstat -an|grep 67
    udp 0 0 0.0.0.0:67 0.0.0.0:*
    unix 3 [ ] STREAM CONNECTED 25673 @/tmp/.X11-unix/X0
    unix 3 [ ] STREAM CONNECTED 26753 @/tmp/dbus-PzeIwiOksF
    unix 3 [ ] STREAM CONNECTED 24267 /run/systemd/journal/stdout
    unix 3 [ ] STREAM CONNECTED 26752
    unix 3 [ ] STREAM CONNECTED 22867
    unix 3 [ ] STREAM CONNECTED 26785
    unix 2 [ ] DGRAM 26067
    unix 3 [ ] STREAM CONNECTED 26755
    unix 3 [ ] STREAM CONNECTED 26756 @/tmp/dbus-PzeIwiOksF
    unix 3 [ ] STREAM CONNECTED 26710
    unix 3 [ ] STREAM CONNECTED 26735 @/tmp/dbus-PzeIwiOksF
    unix 3 [ ] STREAM CONNECTED 26744
    unix 3 [ ] STREAM CONNECTED 29967
    unix 3 [ ] STREAM CONNECTED 26745 @/tmp/dbus-PzeIwiOksF
    unix 3 [ ] STREAM CONNECTED 26751 @/tmp/dbus-PzeIwiOksF
    unix 3 [ ] STREAM CONNECTED 26718
    unix 3 [ ] STREAM CONNECTED 24967 @/tmp/dbus-PzeIwiOksF
    unix 3 [ ] STREAM CONNECTED 26717
    unix 3 [ ] STREAM CONNECTED 26567 /run/systemd/journal/stdout
    unix 3 [ ] STREAM CONNECTED 23867
    unix 3 [ ] STREAM CONNECTED 26714
    

    ps aux|grep dhcp results:

    ps aux|grep dhcp
    dhcpd 2167 0.0 0.3 35488 13180 ? Ss 14:06 0:00 dhcpd -user dhcpd -group dhcpd -f -4 -pf /run/dhcp-server/dhcpd.pid -cf /etc/dhcp/dhcpd.conf
    fogserv+ 2932 0.0 0.0 14236 1016 pts/2 S+ 14:10 0:00 grep --color=auto dhcp
    


  • This post is deleted!

  • Moderator

    @cdutko OK lets see if your have your dhcp server up and running. If you issue this command from the fog server linux console, then paste the results here: netstat -an|grep 67 That should show us if anything is bound to the dhcp port 67.

    You might also run this command ps aux|grep dhcp and see if the process is returned.



488
Online

39005
Users

10720
Topics

101776
Posts

Looks like your connection to FOG Project was lost, please wait while we try to reconnect.