What is different between foreman-proxy-dhcp-range and create subnet from GUI

Hi all,

I am not very clear about the difference between those two configuration. If I run foreman-installer with follow parameters and it completed, I still have to create a Subnet setting under Infrastructure menu. But I specify another DHCP range this time.

foreman-installer \
--foreman-proxy-dhcp=true \
--foreman-proxy-dhcp-managed true \
--foreman-proxy-dhcp-interface=ens3 \
--foreman-proxy-dhcp-range="10.188.139.180 10.188.139.200" \

Are those settings correct? Or should I refill out same info during create subnet from GUI? Or it is unnecessary specify during foreman-install step?

I am not 100% sure on this, but afaik, the installer options will actually configure DHCPD for the subnet provided while the Subnet in Foreman is what Foreman considers for the subnet. This is a thing because Foreman can have subnets that are not managed via DHCP. Though I believe, if you require several subnets managed by DHCP, you will have to configure those by hand in dhcpd.conf anyways, so the installer options are of limited use.

What @areyus is correct. The range in DHCPD is the “free” range and hosts will be assigned IPs from this if not known. This is also used by discovery. Hosts in the subnet config are where Foreman will allocate IPs for newly created hosts.

It’s possible to not use --foreman-proxy-dhcp-range and still assign IPs.

@ekohl Thank you for your reply. Based on your explanation, since my Foreman instance is for lab stage now, it acts DHCP server simultaneously, Do you mean that I don’t need to specify following parameters during foreman-installer command and then, just configure what DHCP range I need from GUI enought?

If you provision the system using Foreman, Foreman will create a DHCP reservation and then it indeed should work without a range.

I’ll admit this part is confusing. DHCP integration really is non-trivial.