Changes

Jump to: navigation, search

OPS235 Lab 8 - CentOS6

43 bytes removed, 11:18, 27 November 2019
no edit summary
{{Admon/caution|Draft LabTHIS IS AN OLD VERSION OF THE LAB|'''This lab has NOT been released for regular distributionis an archived version. When the lab is ready to be released, Do not use this caution banner will disappearin your OPS235 course.'''}}
= Setting Up, Using & Maintaining a DHCP Server =
{{Admon/important | Backup your VMs before proceeding | If you did not do it at the end of Lab 7, stop all of your VMs and backup your VM disk images.}}
{{Admon/note |ISC DHCP packages Overview | The version of DHCP server that comes with CentOS is maintained and distributed by the Internet Software Consortium (http://www.isc.org). The source package that you can download from ISC includes not only the DHCP server, but also a DHCP client and a DHCP relay agent. CentOS, Fedora separates it into two RPM packages: the DHCP client package and the DHCP server package. The DHCP client package is installed by default by the workstation installation.}}
=== Investigation 1: How do you install the DHCP Server? ===
=== Investigation 6: Where does the dhcp server store a record of leased addresses?===
{{Admon/note | Use your fedora2 centos2 and fedora3 centos3 VMs | Complete the following steps on your fedora2 centos2 and fedora3 VM'scentos3 VMs.}}
# If your fedora3 centos3 DHCP server successfully issued the proper IP address configuration values to fedora2centos2, check the file called <code>/var/lib/dhcpd/dhcpd.leases</code>
# You should see contents similar to:
<pre>
</pre>
{{Admon/note | Purpose of <code>dhcpd.leases</code> File | dhcpd records address leases in this file. If the service is restarted it reads in the file to know which addresses are currently leased and for how long.}}
<ol><li value="3">On the client fedora2 centos2 check the contents of the <code>/var/lib/dhclient</code> directory. The files in this directory is where the dhclient stores its record of leases.</li>
</ol>
=== Investigation 7: How can I lease the same address every time? ===
{{Admon/note | Use your fedora2 centos2 and fedora3 centos3 VMs | Complete the following steps on your fedora2 centos2 and fedora3 VM'scentos3 VMs.}}
{{Admon/note | Reserving IP Addresses with DHCP | Even though DHCP gives out IP address dynamically, it also has the ability to reserve an IP address for a certain computer. In this sense it's almost as if the client computer has a static IP even though it uses DHCP to get it. This is useful if you want to be able to put entries in your /etc/hosts file and not have to worry about the entry becoming invalid over time. In Linux we refer to this as supplying a fixed address to a host. Microsoft calls it a reservation.}}
# Make certain that you are located in your fedora3 centos3 virtual machine.# Create a host declaration for fedora2centos2. Make sure you record the correct <code>hardware ethernet</code> setting that corresponds to the MAC address of the interface in fedora2centos2.
# Give it the fixed-address 192.168.235.12
{{Admon/tip | Avoiding IP Address Conflicts | When supplying fixed-address it is important that the address assigned is exclusive of any ranges that have been declared. Otherwise it may be possible for 2 different hosts to receive the same address.}}
<ol><li value="3">Start your service and test the address assignment by releasing your current address on fedora2 centos2 and then requesting a new address. Use the following commands on fedora2centos2:</li>
</ol>
::: <code>ifdown eth1</code>

Navigation menu