Problem:
I have a Foreman server running in my vCenter with 2 network interfaces:
Nic1 - 10.158.18.168/24 - Routable network
Nic2 - 10.20.20.50/24 - L2 PortGroup
Devices connected to the new subnet can get an ip boot but showing DHCP IP - 10.158.18.168. Where do i change this to 10.20.20.50???
Modified the /etc/dhcp/dhcpd.conf and restarted dhcpd service
Here is the dhcpd.conf:
# dhcpd.conf
omapi-port 7911;
default-lease-time 43200;
max-lease-time 86400;
not authoritative;
ddns-update-style none;
option domain-name "ashlab.ops";
option domain-name-servers 10.159.18.168;
#option domain-name-servers 10.20.20.50; # Tried to update this but didn't
option ntp-servers none;
allow booting;
allow bootp;
option fqdn.no-client-update on; # set the "O" and "S" flag bits
option fqdn.rcode2 255;
option pxegrub code 150 = text ;
# Bootfile Handoff
#next-server 10.159.18.168;
next-server 10.20.20.50;
option architecture code 93 = unsigned integer 16 ;
if option architecture = 00:06 {
filename "grub2/shim.efi";
} elsif option architecture = 00:07 {
filename "grub2/shim.efi";
} elsif option architecture = 00:09 {
filename "grub2/shim.efi";
} else {
filename "pxelinux.0";
}
log-facility local7;
include "/etc/dhcp/dhcpd.hosts";
# ashlab.ops
subnet 10.159.18.0 netmask 255.255.255.0 {
option subnet-mask 255.255.255.0;
option routers 10.159.18.1;
option domain-name-servers 10.159.19.20;
next-server 10.159.18.168;
}
subnet 10.20.20.0 netmask 255.255.255.0 {
pool
{
range 10.20.20.100 10.20.20.150;
}
option domain-name-servers 10.20.20.50;
option subnet-mask 255.255.255.0;
#option routers 10.20.20.1;
next-server 10.20.20.50;
}
Another Questions: Is it possible to define the next-server ip address inside the subnet body??? so it changes depending which network is connected to?? This is because the second subnet cannot hit the foreman server using the primary IP.
Expected outcome:
Should be pointing to new DHCP Server IP
Foreman and Proxy versions:
Foreman 1.22.0
Foreman and Proxy plugin versions:
Other relevant data:
[e.g. logs from Foreman and/or the Proxy, modified templates, commands issued, etc]
(for logs, surround with three back-ticks to get proper formatting, e.g.)
logs