PXEBoot fetches wrong Next Server IP

Problem:
Hello Team,
When trying to PXE boot a server with the default configuration, the dhcp lease gets next-server set to wrong IP. We had couple of foreman server with smart-proxies previously which are now archived. But somehow when I pxeboot a VM, it fetches the IP from one of the two old foreman machines, one of which is deleted even.

I have correctly defined the tftp_servername: IP address and in the dhcp config also, the next server is correctly defined.
Tried using both servername and the IP and the result is the same.

Expected outcome:
Next Server IP should be correctly taken as which is provided in the settings.

Foreman and Proxy versions:
3.5.1
Reason to use this version is compatibility with our openstack infrastructure.

Other relevant data:

 tftp: true
  tftp_listen_on: https
  tftp_managed: true
  tftp_manage_wget: true
  tftp_root: "/var/lib/tftpboot"
  tftp_dirs:
  tftp_servername: IP address
  tftp_replace_grub2_cfg: false
  dhcp: true
  dhcp_listen_on: https
  dhcp_managed: true
  dhcp_provider: isc
  dhcp_subnets: []
  dhcp_ping_free_ip: true
  dhcp_option_domain:
  dhcp_search_domains:
  dhcp_interface: ens192
  dhcp_additional_interfaces: []
  dhcp_gateway:
  dhcp_range:
  dhcp_pxeserver:
  dhcp_pxefilename: pxelinux.0
  dhcp_ipxefilename:
  dhcp_ipxe_bootstrap: false
  dhcp_network:
  dhcp_netmask:
  dhcp_nameservers: default
  dhcp_server: 127.0.0.1
  dhcp_config: "/etc/dhcp/dhcpd.conf"
  dhcp_leases: "/var/lib/dhcpd/dhcpd.leases"
  dhcp_key_name:
  dhcp_key_secret:
  dhcp_omapi_port: 7911
  dhcp_peer_address:
  dhcp_node_type: standalone
  dhcp_failover_address: IP address
  dhcp_failover_port: 519
  dhcp_max_response_delay: 30
  dhcp_max_unacked_updates: 10
  dhcp_mclt: 300
  dhcp_load_split: 255
  dhcp_load_balance: 3
  dhcp_manage_acls: true
foreman::plugin::dhcp_browser: false
foreman_proxy::plugin::dhcp::infoblox: false
foreman_proxy::plugin::dhcp::remote_isc: false```

Can you please help?

Thanks,

Best Regards,

Hi.

Go to your DHCP server, double-check if your TFTP server (= next-server) is correct configured and restart your DHCP service:

# grep next-server /etc/dhcp/dhcpd.conf
next-server 192.168.145.10;
# systemctl restart dhcpd

If you still get another next-server IPv4 I would first check if there isn’t any other DHCP server in the same network.

Hi Jan,

Thanks for your response.

Yes the next-server is correctly configured.
I will check your point for anyother DHCP server in the same network.

But what is strange is the PXE boot tried an IP of a server that is off for 4 years.

Also the supersede server.next-server hex is correct

Best Regards,