Why is my switch not getting an address from the specified pool

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
2
down vote

favorite












I'm working to configure a Juniper Networks switch through Zero Touch Provisioning. On CentOS 7, the journal/log/(systemd whatever-it-is) contains this:



Nov 28 10:08:46 server dhcpd[8800]: Checking if packet is permitted.
Nov 28 10:08:46 server dhcpd[8800]: Permit list: unknown clients
Nov 28 10:08:46 server dhcpd[8800]: OK
Nov 28 10:08:46 server dhcpd[8800]: Checking if packet is permitted.
Nov 28 10:08:46 server dhcpd[8800]: Permit list: unknown clients
Nov 28 10:08:46 server dhcpd[8800]: OK
Nov 28 10:08:46 server dhcpd[8800]: matched a Juniper Networks QFX-5100
Nov 28 10:08:46 server dhcpd[8800]: DHCPDISCOVER from 08:b2:58:ab:dc:00 via eth2
Nov 28 10:08:47 server dhcpd[8800]: DHCPOFFER on 192.168.0.100 to 08:b2:58:ab:dc:00 (TR0217010017) via eth2
Nov 28 10:08:47 server dhcpd[8800]: Checking if packet is permitted.
Nov 28 10:08:47 server dhcpd[8800]: Permit list: unknown clients
Nov 28 10:08:47 server dhcpd[8800]: OK
Nov 28 10:08:47 server dhcpd[8800]: Checking if packet is permitted.
Nov 28 10:08:47 server dhcpd[8800]: Permit list: unknown clients
Nov 28 10:08:47 server dhcpd[8800]: OK
Nov 28 10:08:47 server dhcpd[8800]: matched a Juniper Networks QFX-5100
Nov 28 10:08:47 server dhcpd[8800]: DHCPREQUEST for 192.168.0.100 (192.168.0.250) from 08:b2:58:ab:dc:00 (TR0217010017) via eth2
Nov 28 10:08:47 server dhcpd[8800]: DHCPACK on 192.168.0.100 to 08:b2:58:ab:dc:00 (TR0217010017) via eth2


The server is provisioned from the "unknown" pool. Here are the relevant portions of the config:



# Global options
max-lease-time 1800;
default-lease-time 1800;
dynamic-bootp-lease-length 120;
ddns-update-style none;

# TFTP Server IP and file
next-server 192.168.0.250; # Assumed to be the DHCP server
filename "pxelinux.0";


# Define the pxe grub filename option
option zone-pxegrub-filename code 150 = text;
option zone-pxegrub-filename "/opt/tftp_files/boot/pxelinux.0";

# Options for Juniper switch to download FW and configuration from this server
# as described here: https://www.juniper.net/documentation/en_US/junos/topics/task/configuration/software-image-and-configuration-automatic-provisioning-confguring.html
option space NEW_OP;
option NEW_OP.config-file-name code 1 = text;
option NEW_OP.image-file-name code 0 = text;
option NEW_OP.image-file-type code 2 = text;
option NEW_OP.transfer-mode code 3 = text;
option NEW_OP.alt-image-file-name code 4 = text;
option NEW_OP-encapsulation code 43 = encapsulate NEW_OP;
option option-150 code 150 = ip-address;

# bringing in the vendor specific options
vendor-option-space NEW_OP;
option NEW_OP.image-file-name "/juniper/fw/jinstall-host-qfx-5-17.2R1.13-signed.tgz";
option NEW_OP.config-file-name "/juniper/cfg/qfx-5100.cfg";
option NEW_OP.alt-image-file-name "/juniper/fw/jinstall-host-qfx-5-17.2R1.13-signed.tgz";
option NEW_OP.image-file-type "filename";
option NEW_OP.transfer-mode "tftp";

option option-150 192.168.0.250;


class "workers"
match if substring(hardware, 1, 3) = 00:20:0c or substring(hardware, 1, 3) = 00:18:7D;
log(info, "matched a worker bee");


class "monitor"
match if substring(hardware, 1, 3) = 00:d0:24;
log(info, "matched to a monitor");


class "JuniperSwitch"
match if option vendor-class-identifier ~~ "^juniper-qfx5100.+$";
log(info, "matched a Juniper Networks QFX-5100");


subnet 192.168.0.0 netmask 255.255.255.0
#authoritative;
option routers 192.168.0.250;
pool
allow members of "workers";
range 192.168.0.1 192.168.0.99;
log(info, concat("Issuing DHCP address to worker bootp requestor: ", binary-to-ascii(16, 8, ":", substring(hardware, 1, 6))));

pool
allow members of "monitor";
range 192.168.0.245;
log(info, concat("Issuing DHCP address to monitor bootp requestor: ", binary-to-ascii(16, 8, ":", substring(hardware, 1, 6))));

pool
allow members of "JuniperSwitch";
allow dynamic bootp clients;
range 192.168.0.201;

pool
allow unknown-clients;
range 192.168.0.100 192.168.0.150;




Please, help me to understand why this isn't giving an address where I expect.







share|improve this question


























    up vote
    2
    down vote

    favorite












    I'm working to configure a Juniper Networks switch through Zero Touch Provisioning. On CentOS 7, the journal/log/(systemd whatever-it-is) contains this:



    Nov 28 10:08:46 server dhcpd[8800]: Checking if packet is permitted.
    Nov 28 10:08:46 server dhcpd[8800]: Permit list: unknown clients
    Nov 28 10:08:46 server dhcpd[8800]: OK
    Nov 28 10:08:46 server dhcpd[8800]: Checking if packet is permitted.
    Nov 28 10:08:46 server dhcpd[8800]: Permit list: unknown clients
    Nov 28 10:08:46 server dhcpd[8800]: OK
    Nov 28 10:08:46 server dhcpd[8800]: matched a Juniper Networks QFX-5100
    Nov 28 10:08:46 server dhcpd[8800]: DHCPDISCOVER from 08:b2:58:ab:dc:00 via eth2
    Nov 28 10:08:47 server dhcpd[8800]: DHCPOFFER on 192.168.0.100 to 08:b2:58:ab:dc:00 (TR0217010017) via eth2
    Nov 28 10:08:47 server dhcpd[8800]: Checking if packet is permitted.
    Nov 28 10:08:47 server dhcpd[8800]: Permit list: unknown clients
    Nov 28 10:08:47 server dhcpd[8800]: OK
    Nov 28 10:08:47 server dhcpd[8800]: Checking if packet is permitted.
    Nov 28 10:08:47 server dhcpd[8800]: Permit list: unknown clients
    Nov 28 10:08:47 server dhcpd[8800]: OK
    Nov 28 10:08:47 server dhcpd[8800]: matched a Juniper Networks QFX-5100
    Nov 28 10:08:47 server dhcpd[8800]: DHCPREQUEST for 192.168.0.100 (192.168.0.250) from 08:b2:58:ab:dc:00 (TR0217010017) via eth2
    Nov 28 10:08:47 server dhcpd[8800]: DHCPACK on 192.168.0.100 to 08:b2:58:ab:dc:00 (TR0217010017) via eth2


    The server is provisioned from the "unknown" pool. Here are the relevant portions of the config:



    # Global options
    max-lease-time 1800;
    default-lease-time 1800;
    dynamic-bootp-lease-length 120;
    ddns-update-style none;

    # TFTP Server IP and file
    next-server 192.168.0.250; # Assumed to be the DHCP server
    filename "pxelinux.0";


    # Define the pxe grub filename option
    option zone-pxegrub-filename code 150 = text;
    option zone-pxegrub-filename "/opt/tftp_files/boot/pxelinux.0";

    # Options for Juniper switch to download FW and configuration from this server
    # as described here: https://www.juniper.net/documentation/en_US/junos/topics/task/configuration/software-image-and-configuration-automatic-provisioning-confguring.html
    option space NEW_OP;
    option NEW_OP.config-file-name code 1 = text;
    option NEW_OP.image-file-name code 0 = text;
    option NEW_OP.image-file-type code 2 = text;
    option NEW_OP.transfer-mode code 3 = text;
    option NEW_OP.alt-image-file-name code 4 = text;
    option NEW_OP-encapsulation code 43 = encapsulate NEW_OP;
    option option-150 code 150 = ip-address;

    # bringing in the vendor specific options
    vendor-option-space NEW_OP;
    option NEW_OP.image-file-name "/juniper/fw/jinstall-host-qfx-5-17.2R1.13-signed.tgz";
    option NEW_OP.config-file-name "/juniper/cfg/qfx-5100.cfg";
    option NEW_OP.alt-image-file-name "/juniper/fw/jinstall-host-qfx-5-17.2R1.13-signed.tgz";
    option NEW_OP.image-file-type "filename";
    option NEW_OP.transfer-mode "tftp";

    option option-150 192.168.0.250;


    class "workers"
    match if substring(hardware, 1, 3) = 00:20:0c or substring(hardware, 1, 3) = 00:18:7D;
    log(info, "matched a worker bee");


    class "monitor"
    match if substring(hardware, 1, 3) = 00:d0:24;
    log(info, "matched to a monitor");


    class "JuniperSwitch"
    match if option vendor-class-identifier ~~ "^juniper-qfx5100.+$";
    log(info, "matched a Juniper Networks QFX-5100");


    subnet 192.168.0.0 netmask 255.255.255.0
    #authoritative;
    option routers 192.168.0.250;
    pool
    allow members of "workers";
    range 192.168.0.1 192.168.0.99;
    log(info, concat("Issuing DHCP address to worker bootp requestor: ", binary-to-ascii(16, 8, ":", substring(hardware, 1, 6))));

    pool
    allow members of "monitor";
    range 192.168.0.245;
    log(info, concat("Issuing DHCP address to monitor bootp requestor: ", binary-to-ascii(16, 8, ":", substring(hardware, 1, 6))));

    pool
    allow members of "JuniperSwitch";
    allow dynamic bootp clients;
    range 192.168.0.201;

    pool
    allow unknown-clients;
    range 192.168.0.100 192.168.0.150;




    Please, help me to understand why this isn't giving an address where I expect.







    share|improve this question
























      up vote
      2
      down vote

      favorite









      up vote
      2
      down vote

      favorite











      I'm working to configure a Juniper Networks switch through Zero Touch Provisioning. On CentOS 7, the journal/log/(systemd whatever-it-is) contains this:



      Nov 28 10:08:46 server dhcpd[8800]: Checking if packet is permitted.
      Nov 28 10:08:46 server dhcpd[8800]: Permit list: unknown clients
      Nov 28 10:08:46 server dhcpd[8800]: OK
      Nov 28 10:08:46 server dhcpd[8800]: Checking if packet is permitted.
      Nov 28 10:08:46 server dhcpd[8800]: Permit list: unknown clients
      Nov 28 10:08:46 server dhcpd[8800]: OK
      Nov 28 10:08:46 server dhcpd[8800]: matched a Juniper Networks QFX-5100
      Nov 28 10:08:46 server dhcpd[8800]: DHCPDISCOVER from 08:b2:58:ab:dc:00 via eth2
      Nov 28 10:08:47 server dhcpd[8800]: DHCPOFFER on 192.168.0.100 to 08:b2:58:ab:dc:00 (TR0217010017) via eth2
      Nov 28 10:08:47 server dhcpd[8800]: Checking if packet is permitted.
      Nov 28 10:08:47 server dhcpd[8800]: Permit list: unknown clients
      Nov 28 10:08:47 server dhcpd[8800]: OK
      Nov 28 10:08:47 server dhcpd[8800]: Checking if packet is permitted.
      Nov 28 10:08:47 server dhcpd[8800]: Permit list: unknown clients
      Nov 28 10:08:47 server dhcpd[8800]: OK
      Nov 28 10:08:47 server dhcpd[8800]: matched a Juniper Networks QFX-5100
      Nov 28 10:08:47 server dhcpd[8800]: DHCPREQUEST for 192.168.0.100 (192.168.0.250) from 08:b2:58:ab:dc:00 (TR0217010017) via eth2
      Nov 28 10:08:47 server dhcpd[8800]: DHCPACK on 192.168.0.100 to 08:b2:58:ab:dc:00 (TR0217010017) via eth2


      The server is provisioned from the "unknown" pool. Here are the relevant portions of the config:



      # Global options
      max-lease-time 1800;
      default-lease-time 1800;
      dynamic-bootp-lease-length 120;
      ddns-update-style none;

      # TFTP Server IP and file
      next-server 192.168.0.250; # Assumed to be the DHCP server
      filename "pxelinux.0";


      # Define the pxe grub filename option
      option zone-pxegrub-filename code 150 = text;
      option zone-pxegrub-filename "/opt/tftp_files/boot/pxelinux.0";

      # Options for Juniper switch to download FW and configuration from this server
      # as described here: https://www.juniper.net/documentation/en_US/junos/topics/task/configuration/software-image-and-configuration-automatic-provisioning-confguring.html
      option space NEW_OP;
      option NEW_OP.config-file-name code 1 = text;
      option NEW_OP.image-file-name code 0 = text;
      option NEW_OP.image-file-type code 2 = text;
      option NEW_OP.transfer-mode code 3 = text;
      option NEW_OP.alt-image-file-name code 4 = text;
      option NEW_OP-encapsulation code 43 = encapsulate NEW_OP;
      option option-150 code 150 = ip-address;

      # bringing in the vendor specific options
      vendor-option-space NEW_OP;
      option NEW_OP.image-file-name "/juniper/fw/jinstall-host-qfx-5-17.2R1.13-signed.tgz";
      option NEW_OP.config-file-name "/juniper/cfg/qfx-5100.cfg";
      option NEW_OP.alt-image-file-name "/juniper/fw/jinstall-host-qfx-5-17.2R1.13-signed.tgz";
      option NEW_OP.image-file-type "filename";
      option NEW_OP.transfer-mode "tftp";

      option option-150 192.168.0.250;


      class "workers"
      match if substring(hardware, 1, 3) = 00:20:0c or substring(hardware, 1, 3) = 00:18:7D;
      log(info, "matched a worker bee");


      class "monitor"
      match if substring(hardware, 1, 3) = 00:d0:24;
      log(info, "matched to a monitor");


      class "JuniperSwitch"
      match if option vendor-class-identifier ~~ "^juniper-qfx5100.+$";
      log(info, "matched a Juniper Networks QFX-5100");


      subnet 192.168.0.0 netmask 255.255.255.0
      #authoritative;
      option routers 192.168.0.250;
      pool
      allow members of "workers";
      range 192.168.0.1 192.168.0.99;
      log(info, concat("Issuing DHCP address to worker bootp requestor: ", binary-to-ascii(16, 8, ":", substring(hardware, 1, 6))));

      pool
      allow members of "monitor";
      range 192.168.0.245;
      log(info, concat("Issuing DHCP address to monitor bootp requestor: ", binary-to-ascii(16, 8, ":", substring(hardware, 1, 6))));

      pool
      allow members of "JuniperSwitch";
      allow dynamic bootp clients;
      range 192.168.0.201;

      pool
      allow unknown-clients;
      range 192.168.0.100 192.168.0.150;




      Please, help me to understand why this isn't giving an address where I expect.







      share|improve this question














      I'm working to configure a Juniper Networks switch through Zero Touch Provisioning. On CentOS 7, the journal/log/(systemd whatever-it-is) contains this:



      Nov 28 10:08:46 server dhcpd[8800]: Checking if packet is permitted.
      Nov 28 10:08:46 server dhcpd[8800]: Permit list: unknown clients
      Nov 28 10:08:46 server dhcpd[8800]: OK
      Nov 28 10:08:46 server dhcpd[8800]: Checking if packet is permitted.
      Nov 28 10:08:46 server dhcpd[8800]: Permit list: unknown clients
      Nov 28 10:08:46 server dhcpd[8800]: OK
      Nov 28 10:08:46 server dhcpd[8800]: matched a Juniper Networks QFX-5100
      Nov 28 10:08:46 server dhcpd[8800]: DHCPDISCOVER from 08:b2:58:ab:dc:00 via eth2
      Nov 28 10:08:47 server dhcpd[8800]: DHCPOFFER on 192.168.0.100 to 08:b2:58:ab:dc:00 (TR0217010017) via eth2
      Nov 28 10:08:47 server dhcpd[8800]: Checking if packet is permitted.
      Nov 28 10:08:47 server dhcpd[8800]: Permit list: unknown clients
      Nov 28 10:08:47 server dhcpd[8800]: OK
      Nov 28 10:08:47 server dhcpd[8800]: Checking if packet is permitted.
      Nov 28 10:08:47 server dhcpd[8800]: Permit list: unknown clients
      Nov 28 10:08:47 server dhcpd[8800]: OK
      Nov 28 10:08:47 server dhcpd[8800]: matched a Juniper Networks QFX-5100
      Nov 28 10:08:47 server dhcpd[8800]: DHCPREQUEST for 192.168.0.100 (192.168.0.250) from 08:b2:58:ab:dc:00 (TR0217010017) via eth2
      Nov 28 10:08:47 server dhcpd[8800]: DHCPACK on 192.168.0.100 to 08:b2:58:ab:dc:00 (TR0217010017) via eth2


      The server is provisioned from the "unknown" pool. Here are the relevant portions of the config:



      # Global options
      max-lease-time 1800;
      default-lease-time 1800;
      dynamic-bootp-lease-length 120;
      ddns-update-style none;

      # TFTP Server IP and file
      next-server 192.168.0.250; # Assumed to be the DHCP server
      filename "pxelinux.0";


      # Define the pxe grub filename option
      option zone-pxegrub-filename code 150 = text;
      option zone-pxegrub-filename "/opt/tftp_files/boot/pxelinux.0";

      # Options for Juniper switch to download FW and configuration from this server
      # as described here: https://www.juniper.net/documentation/en_US/junos/topics/task/configuration/software-image-and-configuration-automatic-provisioning-confguring.html
      option space NEW_OP;
      option NEW_OP.config-file-name code 1 = text;
      option NEW_OP.image-file-name code 0 = text;
      option NEW_OP.image-file-type code 2 = text;
      option NEW_OP.transfer-mode code 3 = text;
      option NEW_OP.alt-image-file-name code 4 = text;
      option NEW_OP-encapsulation code 43 = encapsulate NEW_OP;
      option option-150 code 150 = ip-address;

      # bringing in the vendor specific options
      vendor-option-space NEW_OP;
      option NEW_OP.image-file-name "/juniper/fw/jinstall-host-qfx-5-17.2R1.13-signed.tgz";
      option NEW_OP.config-file-name "/juniper/cfg/qfx-5100.cfg";
      option NEW_OP.alt-image-file-name "/juniper/fw/jinstall-host-qfx-5-17.2R1.13-signed.tgz";
      option NEW_OP.image-file-type "filename";
      option NEW_OP.transfer-mode "tftp";

      option option-150 192.168.0.250;


      class "workers"
      match if substring(hardware, 1, 3) = 00:20:0c or substring(hardware, 1, 3) = 00:18:7D;
      log(info, "matched a worker bee");


      class "monitor"
      match if substring(hardware, 1, 3) = 00:d0:24;
      log(info, "matched to a monitor");


      class "JuniperSwitch"
      match if option vendor-class-identifier ~~ "^juniper-qfx5100.+$";
      log(info, "matched a Juniper Networks QFX-5100");


      subnet 192.168.0.0 netmask 255.255.255.0
      #authoritative;
      option routers 192.168.0.250;
      pool
      allow members of "workers";
      range 192.168.0.1 192.168.0.99;
      log(info, concat("Issuing DHCP address to worker bootp requestor: ", binary-to-ascii(16, 8, ":", substring(hardware, 1, 6))));

      pool
      allow members of "monitor";
      range 192.168.0.245;
      log(info, concat("Issuing DHCP address to monitor bootp requestor: ", binary-to-ascii(16, 8, ":", substring(hardware, 1, 6))));

      pool
      allow members of "JuniperSwitch";
      allow dynamic bootp clients;
      range 192.168.0.201;

      pool
      allow unknown-clients;
      range 192.168.0.100 192.168.0.150;




      Please, help me to understand why this isn't giving an address where I expect.









      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 28 '17 at 22:12









      Rui F Ribeiro

      35.7k1271114




      35.7k1271114










      asked Nov 28 '17 at 21:40









      Andrew Falanga

      249310




      249310




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          2
          down vote



          accepted










          Supposing it is the only switch asking for an IP address via DHCP, I suspect this is an old/known ISC DHCP bug/"feature":



          dynamic leases already given take precedence from some other new configurations, especially when they are in the same network.



          So to speak, the switch got an address from the general/"unknown" pool before you configured the specific case, and the DHCP daemon gives priority to that.



          Either you delete the DHCP leases file var/lib/dhcp/dhcpd.leases , or stop the DHCP service and edit out all the occurrences of any IP address leases given to the MAC of the switch in question from the leases file. That way, it will get the intended new address.






          share|improve this answer


















          • 1




            Thank you. This was indeed the problem. I stopped the service and deleted the leases file. After restarting the server, I zeroed the switch and rebooted. It was vended the expected address. This makes sense but I couldn't rule out my config. Before this project, it had been many years since I'd configured dhcpd, and I'd never done anything this complicated.
            – Andrew Falanga
            Nov 28 '17 at 22:29










          • @AndrewFalanga This is a though one for people caught unaware...I had to forbid people having a floating dynamic IP address to conveniently configure new printers before they were "officially" provisioned. It can literally drive you up the wall for days
            – Rui F Ribeiro
            Nov 28 '17 at 22:46










          • thanks for the heads up. The application I have may not require this, but I'll keep it in mind.
            – Andrew Falanga
            Nov 28 '17 at 23:01










          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f407599%2fwhy-is-my-switch-not-getting-an-address-from-the-specified-pool%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          2
          down vote



          accepted










          Supposing it is the only switch asking for an IP address via DHCP, I suspect this is an old/known ISC DHCP bug/"feature":



          dynamic leases already given take precedence from some other new configurations, especially when they are in the same network.



          So to speak, the switch got an address from the general/"unknown" pool before you configured the specific case, and the DHCP daemon gives priority to that.



          Either you delete the DHCP leases file var/lib/dhcp/dhcpd.leases , or stop the DHCP service and edit out all the occurrences of any IP address leases given to the MAC of the switch in question from the leases file. That way, it will get the intended new address.






          share|improve this answer


















          • 1




            Thank you. This was indeed the problem. I stopped the service and deleted the leases file. After restarting the server, I zeroed the switch and rebooted. It was vended the expected address. This makes sense but I couldn't rule out my config. Before this project, it had been many years since I'd configured dhcpd, and I'd never done anything this complicated.
            – Andrew Falanga
            Nov 28 '17 at 22:29










          • @AndrewFalanga This is a though one for people caught unaware...I had to forbid people having a floating dynamic IP address to conveniently configure new printers before they were "officially" provisioned. It can literally drive you up the wall for days
            – Rui F Ribeiro
            Nov 28 '17 at 22:46










          • thanks for the heads up. The application I have may not require this, but I'll keep it in mind.
            – Andrew Falanga
            Nov 28 '17 at 23:01














          up vote
          2
          down vote



          accepted










          Supposing it is the only switch asking for an IP address via DHCP, I suspect this is an old/known ISC DHCP bug/"feature":



          dynamic leases already given take precedence from some other new configurations, especially when they are in the same network.



          So to speak, the switch got an address from the general/"unknown" pool before you configured the specific case, and the DHCP daemon gives priority to that.



          Either you delete the DHCP leases file var/lib/dhcp/dhcpd.leases , or stop the DHCP service and edit out all the occurrences of any IP address leases given to the MAC of the switch in question from the leases file. That way, it will get the intended new address.






          share|improve this answer


















          • 1




            Thank you. This was indeed the problem. I stopped the service and deleted the leases file. After restarting the server, I zeroed the switch and rebooted. It was vended the expected address. This makes sense but I couldn't rule out my config. Before this project, it had been many years since I'd configured dhcpd, and I'd never done anything this complicated.
            – Andrew Falanga
            Nov 28 '17 at 22:29










          • @AndrewFalanga This is a though one for people caught unaware...I had to forbid people having a floating dynamic IP address to conveniently configure new printers before they were "officially" provisioned. It can literally drive you up the wall for days
            – Rui F Ribeiro
            Nov 28 '17 at 22:46










          • thanks for the heads up. The application I have may not require this, but I'll keep it in mind.
            – Andrew Falanga
            Nov 28 '17 at 23:01












          up vote
          2
          down vote



          accepted







          up vote
          2
          down vote



          accepted






          Supposing it is the only switch asking for an IP address via DHCP, I suspect this is an old/known ISC DHCP bug/"feature":



          dynamic leases already given take precedence from some other new configurations, especially when they are in the same network.



          So to speak, the switch got an address from the general/"unknown" pool before you configured the specific case, and the DHCP daemon gives priority to that.



          Either you delete the DHCP leases file var/lib/dhcp/dhcpd.leases , or stop the DHCP service and edit out all the occurrences of any IP address leases given to the MAC of the switch in question from the leases file. That way, it will get the intended new address.






          share|improve this answer














          Supposing it is the only switch asking for an IP address via DHCP, I suspect this is an old/known ISC DHCP bug/"feature":



          dynamic leases already given take precedence from some other new configurations, especially when they are in the same network.



          So to speak, the switch got an address from the general/"unknown" pool before you configured the specific case, and the DHCP daemon gives priority to that.



          Either you delete the DHCP leases file var/lib/dhcp/dhcpd.leases , or stop the DHCP service and edit out all the occurrences of any IP address leases given to the MAC of the switch in question from the leases file. That way, it will get the intended new address.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Feb 3 at 0:32

























          answered Nov 28 '17 at 21:58









          Rui F Ribeiro

          35.7k1271114




          35.7k1271114







          • 1




            Thank you. This was indeed the problem. I stopped the service and deleted the leases file. After restarting the server, I zeroed the switch and rebooted. It was vended the expected address. This makes sense but I couldn't rule out my config. Before this project, it had been many years since I'd configured dhcpd, and I'd never done anything this complicated.
            – Andrew Falanga
            Nov 28 '17 at 22:29










          • @AndrewFalanga This is a though one for people caught unaware...I had to forbid people having a floating dynamic IP address to conveniently configure new printers before they were "officially" provisioned. It can literally drive you up the wall for days
            – Rui F Ribeiro
            Nov 28 '17 at 22:46










          • thanks for the heads up. The application I have may not require this, but I'll keep it in mind.
            – Andrew Falanga
            Nov 28 '17 at 23:01












          • 1




            Thank you. This was indeed the problem. I stopped the service and deleted the leases file. After restarting the server, I zeroed the switch and rebooted. It was vended the expected address. This makes sense but I couldn't rule out my config. Before this project, it had been many years since I'd configured dhcpd, and I'd never done anything this complicated.
            – Andrew Falanga
            Nov 28 '17 at 22:29










          • @AndrewFalanga This is a though one for people caught unaware...I had to forbid people having a floating dynamic IP address to conveniently configure new printers before they were "officially" provisioned. It can literally drive you up the wall for days
            – Rui F Ribeiro
            Nov 28 '17 at 22:46










          • thanks for the heads up. The application I have may not require this, but I'll keep it in mind.
            – Andrew Falanga
            Nov 28 '17 at 23:01







          1




          1




          Thank you. This was indeed the problem. I stopped the service and deleted the leases file. After restarting the server, I zeroed the switch and rebooted. It was vended the expected address. This makes sense but I couldn't rule out my config. Before this project, it had been many years since I'd configured dhcpd, and I'd never done anything this complicated.
          – Andrew Falanga
          Nov 28 '17 at 22:29




          Thank you. This was indeed the problem. I stopped the service and deleted the leases file. After restarting the server, I zeroed the switch and rebooted. It was vended the expected address. This makes sense but I couldn't rule out my config. Before this project, it had been many years since I'd configured dhcpd, and I'd never done anything this complicated.
          – Andrew Falanga
          Nov 28 '17 at 22:29












          @AndrewFalanga This is a though one for people caught unaware...I had to forbid people having a floating dynamic IP address to conveniently configure new printers before they were "officially" provisioned. It can literally drive you up the wall for days
          – Rui F Ribeiro
          Nov 28 '17 at 22:46




          @AndrewFalanga This is a though one for people caught unaware...I had to forbid people having a floating dynamic IP address to conveniently configure new printers before they were "officially" provisioned. It can literally drive you up the wall for days
          – Rui F Ribeiro
          Nov 28 '17 at 22:46












          thanks for the heads up. The application I have may not require this, but I'll keep it in mind.
          – Andrew Falanga
          Nov 28 '17 at 23:01




          thanks for the heads up. The application I have may not require this, but I'll keep it in mind.
          – Andrew Falanga
          Nov 28 '17 at 23:01

















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f407599%2fwhy-is-my-switch-not-getting-an-address-from-the-specified-pool%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Bahrain

          Postfix configuration issue with fips on centos 7; mailgun relay