Chainloading ipxe infinite loop.



  • Hello all, need some help on my pfsense box.

    I have enabled network booting in dhcp to hand out the ipxe bootfile. Problem is, ipxe is doing another dhcp request which then load ipxe again and again and so on.

    @ipxe.org:

    When the chainloaded iPXE starts up, it will issue a fresh DHCP request and boot whatever the DHCP server hands out. The DHCP server is currently set up to hand out the iPXE image, which means that you will be stuck in an infinite loop: PXE will load iPXE which will load iPXE which will load iPXE which will load iPXE…

    You can break this infinite loop by configuring the DHCP server to hand out iPXE only for the first DHCP request; the second DHCP request will return the “real” boot filename.

    How can I configure pfsense to break the infinite loop?

    I don't have any bsd experience, just linux, so go easy on me.

    ~MP

    edit:

    I think I got it..

    
    option space ipxe;
      option ipxe-encap-opts code 175 = encapsulate ipxe;
      option ipxe.priority code 1 = signed integer 8;
      option ipxe.keep-san code 8 = unsigned integer 8;
      option ipxe.skip-san-boot code 9 = unsigned integer 8;
      option ipxe.no-pxedhcp code 176 = unsigned integer 8;
      option ipxe.bus-id code 177 = string;
      option ipxe.bios-drive code 189 = unsigned integer 8;
      option ipxe.username code 190 = string;
      option ipxe.password code 191 = string;
      option ipxe.reverse-username code 192 = string;
      option ipxe.reverse-password code 193 = string;
      option ipxe.version code 235 = string;
      option iscsi-initiator-iqn code 203 = string;
      # Feature indicators
      option ipxe.pxeext code 16 = unsigned integer 8;
      option ipxe.iscsi code 17 = unsigned integer 8;
      option ipxe.aoe code 18 = unsigned integer 8;
      option ipxe.http code 19 = unsigned integer 8;
      option ipxe.https code 20 = unsigned integer 8;
      option ipxe.tftp code 21 = unsigned integer 8;
      option ipxe.ftp code 22 = unsigned integer 8;
      option ipxe.dns code 23 = unsigned integer 8;
      option ipxe.bzimage code 24 = unsigned integer 8;
      option ipxe.multiboot code 25 = unsigned integer 8;
      option ipxe.slam code 26 = unsigned integer 8;
      option ipxe.srp code 27 = unsigned integer 8;
      option ipxe.nbi code 32 = unsigned integer 8;
      option ipxe.pxe code 33 = unsigned integer 8;
      option ipxe.elf code 34 = unsigned integer 8;
      option ipxe.comboot code 35 = unsigned integer 8;
      option ipxe.efi code 36 = unsigned integer 8;
      option ipxe.fcoe code 37 = unsigned integer 8;
    
    option domain-name "local";
    default-lease-time 7200;
    max-lease-time 86400;
    authoritative;
    log-facility local7;
    ddns-update-style none;
    one-lease-per-client true;
    deny duplicates;
    subnet 192.168.0.0 netmask 255.255.255.0 {
            pool {
                    range 192.168.0.20 192.168.0.90;
            }
            option routers 192.168.0.1;
            option domain-name-servers 192.168.0.1;
            next-server 192.168.0.128;
            if exists user-class and option user-class = "iPXE" {
          filename "http://boot.ipxe.org/demo/boot.php";
      } else {
          filename "undionly.kpxe";
      }
            #filename "undionly.kpxe";
    }
    host s_lan_0 {
            hardware ethernet 00:02:a5:22:16:6d;
            fixed-address 192.168.0.122;
    }
    host s_lan_1 {
            hardware ethernet 00:18:e7:18:68:07;
            fixed-address 192.168.0.123;
    }
    host s_lan_2 {
            hardware ethernet e0:cb:4e:42:2b:2b;
            fixed-address 192.168.0.124;
    }
    host s_lan_3 {
            hardware ethernet 00:16:36:1d:97:ff;
            fixed-address 192.168.0.126;
    }
    host s_lan_4 {
            hardware ethernet 00:16:36:45:d8:7c;
            fixed-address 192.168.0.127;
    }
    host s_lan_5 {
            hardware ethernet 08:00:27:1a:c0:5e;
            fixed-address 192.168.0.128;
    }
    subnet 172.16.0.0 netmask 255.255.255.0 {
            pool {
                    option domain-name-servers 65.32.5.111,65.32.5.112;
                    range 172.16.0.10 172.16.0.90;
            }
            option routers 172.16.0.1;
            option domain-name-servers 65.32.5.111,65.32.5.112;
    }
    host s_opt1_0 {
            hardware ethernet 00:1e:58:46:5b:07;
            fixed-address 172.16.0.125;
    }
    
    

    does this look correct?

    EDIT2: THE HELL!?!?! I edit /var/dhcpd/etc/dhcpd.conf, then when I restarted dhcpd the conf file reverted.
    I'm confused.



  • Many system config files are redrawn by the webGUI based on information contained in the config.xml.  This is why your dhcpd.conf file is being overwritten.



  • So how do I modify or add a custom dhcp config?


Locked