1

My setup: Red Hat 6.7 isd dhcp server 2x networks connected (A and B) One DHCP pool configured on Network A

When I had this server set up on a single network ("A") it worked fine, now that I added a second network ("B") the DHCP server is sending out the IP address of the "B" network for "next-server" to PXE Clients. Cannot figure out why.

The DHCP addresses go out correctly, so when a client on Network A requests a lease the DHCP sever correctly send a lease from the pool on Network A.

I added the next-server directive with the correct Network B address all over the place and it still does nothing. I tried: As the first line in the global dhcpd.conf config Inside the subnet declaration Inside the pool declaration underneath the subnet Inside the pxeclient class

Edit: Network A is 192.168.0.0/24 Network B is 192.168.1.0/24

When PXE clients come up on Network A they get the DHCP lease from the pool but the next-server is sent as 192.168.1.1 instead of 192.168.0.1

Config file /etc/dhcp/dhcpd.conf

#
# DHCP Server Configuration file.
#   see /usr/share/doc/dhcp*/dhcpd.conf.sample
#   see 'man 5 dhcpd.conf'
#
#
# DHCP Server Configuration file.
#   see /usr/share/doc/dhcp*/dhcpd.conf.sample
#   see 'man 5 dhcpd.conf'
#
# dhcpd.conf

next-server 192.168.0.1;
option tftp-server-name = "192.168.0.1";
server-name = "192.168.0.1";

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; # RFC4578

default-lease-time 86400; #1 day
max-lease-time 604800; #7 days
option domain-name "satellite";
option domain-name-servers 192.168.0.1;

allow booting;
allow bootp;

log-facility local7;

ddns-update-style interim;
ignore client-updates;
authoritative;

omapi-port 7911;
#Optional key:
key omapi_key {
        algorithm HMAC-MD5;
        secret "[...]";
}
omapi-key omapi_key;

  option pxegrub code 150 = text ;

#################################
# local
#################################
subnet 192.168.0.0 netmask 255.255.255.0 {
  pool
  {
next-server 192.168.0.1;
option tftp-server-name = "192.168.0.1";
server-name = "192.168.0.1";
    range 192.168.0.10 192.168.0.253;

  }
    allow booting;
    allow bootp;

next-server 192.168.0.1;
option tftp-server-name = "192.168.0.1";
server-name = "192.168.0.1";

  option routers 192.168.0.254;
  option domain-name    "satellite";
  option domain-name-servers  192.168.0.1;
  option subnet-mask 255.255.255.0;
  option fqdn.no-client-update    on;  # set the "O" and "S" flag bits
  option fqdn.rcode2            255;

  # PXE Handoff.
        class "pxeclients" {
                  match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";
                 #option pxegrub code 150 = text;
next-server 192.168.0.1;
option tftp-server-name = "192.168.0.1";
server-name = "192.168.0.1";


                  if option arch = 00:06 {
                          filename "bootia32.efi";
                  } else if option arch = 00:07 {
                          filename "bootx64.efi";
                  } else {
                          filename "pxelinux.0";
                  }
          }


}



include "/etc/dhcp/dhcpd.hosts";
1
  • You should post the config (or pastebin links) rather than explaining it in sentences. Apr 15, 2016 at 0:24

1 Answer 1

0

I found out what was happening, I'm using Foreman(Red Hat Satellite's upstream) to provision these hosts and it looks like it wrote a static lease into /var/lib/dhcpd/dhcpd.leases with a supersede server.next-server = AA:BB:CC:DD; Where the IP is represented as 4 HEX octets.

1
  • To add to this, it looks like you can overwrite what IP/name gets used as next-server in /etc/foreman-proxy/settings.d/tftp.yml. My problem was DNS returning the wrong IP for the hostname, which I can overwrite using the above setting.
    – shearn89
    May 10, 2016 at 8:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .