4.2.2. Configuring Capsule Server with an External DHCP Server
You can configure Capsule Server with an external DHCP server.
Prerequisite
- Ensure that you have configured an external DHCP server and that you have shared the DHCP configuration and lease files with Capsule Server. For more information, see 「Configuring an External DHCP Server to Use with Capsule Server」.
Procedure
Install the
nfs-utils
utility:yum install nfs-utils
# yum install nfs-utils
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create the DHCP directories for NFS:
mkdir -p /mnt/nfs/etc/dhcp /mnt/nfs/var/lib/dhcpd
# mkdir -p /mnt/nfs/etc/dhcp /mnt/nfs/var/lib/dhcpd
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Change the file owner:
chown -R foreman-proxy /mnt/nfs
# chown -R foreman-proxy /mnt/nfs
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Verify communication with the NFS server and the Remote Procedure Call (RPC) communication paths:
showmount -e DHCP_Server_FQDN rpcinfo -p DHCP_Server_FQDN
# showmount -e DHCP_Server_FQDN # rpcinfo -p DHCP_Server_FQDN
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Add the following lines to the
/etc/fstab
file:DHCP_Server_FQDN:/exports/etc/dhcp /mnt/nfs/etc/dhcp nfs ro,vers=3,auto,nosharecache,context="system_u:object_r:dhcp_etc_t:s0" 0 0 DHCP_Server_FQDN:/exports/var/lib/dhcpd /mnt/nfs/var/lib/dhcpd nfs ro,vers=3,auto,nosharecache,context="system_u:object_r:dhcpd_state_t:s0" 0 0
DHCP_Server_FQDN:/exports/etc/dhcp /mnt/nfs/etc/dhcp nfs ro,vers=3,auto,nosharecache,context="system_u:object_r:dhcp_etc_t:s0" 0 0 DHCP_Server_FQDN:/exports/var/lib/dhcpd /mnt/nfs/var/lib/dhcpd nfs ro,vers=3,auto,nosharecache,context="system_u:object_r:dhcpd_state_t:s0" 0 0
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Mount the file systems on
/etc/fstab
:mount -a
# mount -a
Copy to Clipboard Copied! Toggle word wrap Toggle overflow To verify that the
foreman-proxy
user can access the files that are shared over the network, display the DHCP configuration and lease files:su foreman-proxy -s /bin/bash
# su foreman-proxy -s /bin/bash bash-4.2$ cat /mnt/nfs/etc/dhcp/dhcpd.conf bash-4.2$ cat /mnt/nfs/var/lib/dhcpd/dhcpd.leases bash-4.2$ exit
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Enter the
satellite-installer
command to make the following persistent changes to the/etc/foreman-proxy/settings.d/dhcp.yml
file:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Restart the
foreman-proxy
service:systemctl restart foreman-proxy
# systemctl restart foreman-proxy
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Log in to the Satellite Server web UI.
- Navigate to Infrastructure > Capsules, locate the Capsule Server, and from the list in the Actions column, select Refresh.
- Associate the DHCP service with the appropriate subnets and domain.