The lab setup involves two identical virtual machines in VirtualBox. You also need to configure the networks on both so they get IP addresses on the local physical network. This allows other physical hosts as well as the VirtualBox host to communicate with the virtual machines. Both virtual machines can also communicate with each other. Test this behavior before moving on.
- [Narrator] In order to configure and test Linux networking using VirtualBox we need more than one virtual machine. We will need two VMs. We want both VMs to access the other's network interfaces. We may also want to have the VirtualBox host or other computers on the physical network to have network connectivity with a VM guest. In order to do this we'll need to configure the VM network interfaces. In order to clone our VM we need to make sure it's shut down. If your VM is running shut it down now using VirtualBox Manager. Once it's shut down, we can continue.
To configure the network interface settings click on the VM and then click on settings and then click on network. We'll want to change attached to NAT to attached to Bridged Adapter. In the name section make sure you select the physical network adapter of your host machine that has access to the internet. In my case the host is running on Linux and I'm using the wireless network adapter, so I'm going to choose wlp3s0, which is the name my Linux host installation has chosen for it. If you're using Mac OS or Windows as your host choose the appropriate network interface that your host is using.
Once that's done click on okay. We also need to discard the saved state so our VMs boot up fresh for the first time. If you don't do this then all of your VMs will boot up and assume the same IP address because that is a live setting in RAM which is included in the saved state. Make sure your VM is selected and then click on discard, and then click on discard again. Once we have our VM network adapter configured we want to clone the VM. In the VirtualBox Manager window go to the machine menu and select clone.
A dialogue box asking for the name should appear. Let's name this RH host one, and click on reinitialize the MAC address of all network cards. This is so all network cards have a unique MAC address so even though the rest of the VM is identical the MAC addresses won't be. Now click on next. Now we have to choose the type of clone we want. A full clone makes a completely independent VM that could be moved without the original, but takes up an equal amount of disk space as the original.
If you foresee moving one VM without the other you may want to choose full clone here. However, for our purposes making a linked clone is perfectly fine and uses less disk space. I'm going to choose linked clone and then click on clone. And now make sure the original VM is selected and let's make a second clone. Go to machine, click on clone, and this one we're going to call RH host two and then click on reinitialize the MAC address of all network cards. Click next, select linked clone, and lastly click on clone.
Now we should have two virtual machines named RH host one and RH host two. Let's configure their networks. Click on RH host one and click on start. After your VM boots up log in when prompted. On the desktop click on the top right hand menu, click on wired, and then click on wired settings.
Click the on off slider to turn on the network. When it retrieves an IP address note that the address should be on the same network as your host computer. If it's an address that starts with 10 dot the network configuration settings and VirtualBox might not be correct unless your physical network also starts with 10 dot. Remember this IP address as we'll need it later to ensure connectivity. Mine is 192.168.0.19. Then click the settings grid in the bottom right hand corner.
Click on identity and click connect automatically then click on apply and close the dialogue. Before we start our second VM let's create a new snapshot by pressing the host key plus T. My host key is right control, so I can press right control T and we're going to call this snapshot network config and hit enter. Once this is done press your host key again to release your mouse pointer. Go back to your VirtualBox Manager, click on RH host two, and click on start.
When the VM is booted, log in. On the desktop go to the top right hand menu, click on wired, wired settings, and then click on the slider button to turn the network on. Then we'll click on the settings gear and we'll click on identity and click on connect automatically. Click apply, and close the dialogue. Now we have two running virtual machines with their network interfaces on the same network.
While we're still using RH host two, let's open a terminal by going to applications, favorites, terminal. I'm going to make mine full screen and bump my font size. Now to ensure connectivity with RH host one by typing in ping space followed by the IP address of RH host one. In my case I'd type ping space 192.168.0.19.
After it sends a couple ping packets press control C to cancel it. If it successfully pings RH host one by IP address you can continue with this course. If not, go over the steps in this video until you get it to work. Do not proceed on until these steps work, otherwise, the course cannot be completed.
- Network Time Services (NTP)
- How NTP works for authentication
- Configuring the chrony server and chrony client
- Setting up an LDAP server and LDAP client
- Creating a Kerberos database
- Configuring Kerberos client authentication