First, we need to configure MGMT01 so that we have a GUI controller for our network | Log in to MGMT01 which is running Windows Server 2019,
and open the server manager | Change the hostname, set an IP, and fix the time zone for your server in server manager | Join the domain in server manager | In add roles & features, add the following roles under Role Administration Tools: AD DS & AD LDS Tools, DHCP Server Tools, DNS Server Tools, File Services Tools| Now, add your domain controllers and other necessary servers to the server manager pool | From here, you can manage all of your servers from mgmt01
Ansible/MGMT02
On MGMT02, update your Ubuntu machine with sudo apt-get update after configuring your network with netplan to use your DHCP server | Using the command sudo apt install , install the following packages: python3, python3-pip, tree| Install paramiko with pip3 install paramiko| Continue using sudo apt install to install software-properies-common| Use the command sudo apt-add-repository --yes --update ppa:ansible/ansible and then install ansible with sudo apt install ansible| Make a directory called Ansible and a sub-folder of your choosing. Add the following files into your sub-folder with touch: ansible.cfg, hosts, and playbookname.yml | Next, edit your hosts file and add your hosts with the convention [groupname] and on the next line put the host IP. | Now, we can configure our playbook to do whatever tasks we want our ansible to do. In this case, I configured a playbook to add a configuration for DHCP to the dhcpd.conf file | Once the playbook is complete, we run ansible-playbook --limit groupname playbookname and the playbook runs |
Util
I am going to add Util, which is a CentOS7 Server, to our domain hasan.local using RealmD | First, establish an internet connection to the DHCP server or assign a static IP | Once you have internet, run the following command to install realmd and other packages needed: yum install sssd realmd oddjob oddjob-mkhomedir adcli samba-common samba-common-tools krb5-workstation openldap-clients policycoreutils-python -y| Next, run the command realm join --user=domainadmin jack.local and enter the password of the domain admin | Verify in your AD server that the computer has joined the domain, and your are finished
Redundant DHCP
I will be working on a CentOS7 VM, as root user | Install DHCP with yum install dhcp| Copy the example config file from /usr/share/doc/dhcp*/dhcpd.conf.example to
/etc/dhcp/dhcpd.conf| Configure the DHCP config file by filling out the following parameters: subnet, netmask, range, option subnet-mask, option routers, option domain-name-servers| Save the config file, then add the DHCP service to the firewall using firewall-cmd --permanent --add-service=dhcp & firewall-cmd --reload| Enable DHCP using systemctl enable dhcp| Start the dhcpd service using systemctl start dhcpd| Once these steps are complete, follow the exact same process on your second DHCP server | Once two servers are set up with DHCP, you are complete with redundant DHCP