Changes

Jump to: navigation, search

OPS235 Lab 8

302 bytes added, 11:46, 4 August 2020
m
Part 2: Configuring DHCP server to Continually Lease Same IP Address
# Launch your c7host machine and your centos3 VM.
# Switch to your '''centos3''' VM.<br><br>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 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.<br><br>
# To check that you have <b>dhclientdhcp</b> installed, enter the command:#::<b><code><span style="color:#3366CC;font-size:1.2em;">rpm -qla qa dhcp</span></code></b>
# If there are no files displayed, then issue the following command to install the dhcp server package: <b><code><span style="color:#3366CC;font-size:1.2em;">yum install dhcp</span></code></b>
# Again, enter the command to list all the files installed from the DHCP server package by issuing the command: <b><code><span style="color:#3366CC;font-size:1.2em;">rpm -qla dhcp</span></code></b>
# Click on the following link to access the online manual page for the following DHCP items to gain an understanding: <ul><li>[http://linux.die.net/man/8/dhcpd dhcpd]</li><li>[https://www.freebsd.org/cgi/man.cgi?query=dhcpd.conf&sektion=5&apropos=0&manpath=FreeBSD+9.0-RELEASE+and+Ports dhcpd.conf]</li><li>[http://linux.die.net/man/5/dhcp-options dhcpd-options]</li><li>[http://linux.die.net/man/5/dhcpd.leases dhcpd.leases]</li></ul>
# Study the sample '''dhcpd.conf''' file to see examples of how these options are used.
# Edit Review the contents of '''/etc/dhcp/dhcpd.conf''' file (see the picture) and examine the top section of the file.# Below the comment labeledBe advised: "'''"option ''' definitions common to all supported networks"'''. Change the existing global options with the <u>newer values</u> shown below, if the '''dhcpd.conf''' file is empty, add them manually:<br><br>'''option domain-name''' '''"ops235.org";'''<br>'''option domain-name-servers''' '''192.168.235.1;'''<br>'''default-lease-time''' '''1200;'''<br>'''max-lease-time''' '''3600;'''<br><br>'''Note:''' Any values for time are stated in seconds.<br><br>
# View your editing sessions for typos (check for missing semicolons), then save and exit your editing session.<br><br>
# Remain in your '''centos1''' and '''cento3''' VMs for this section.
# Make certain that you are located in your '''centos3''' virtual machine.
# Edit the dchpd.conf file and make the following changes:<ul><li> Create a <u>'''host'''</u> declaration with the name: '''centos1'''<br>(tip: search for the key-word '''"host"''' in the text editor to see an example, if it is empty, do a little research on the Internet).</li><li>Set the '''hardware ethernet''' option for the MAC address of the eth0 on your '''centos1''' VM.</li><li>Set the '''fixed-address''' option to the ip address: '''192.168.235.42'''</li></ul><br>'''Note:''' 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.<br><br>
<ol><li value="4">Restart the dhcpd service and test the address assignment by releasing your current address on '''centos1''' and then requesting a new address. Use the following commands on '''centos1''':</li>
</ol>
= LAB 8 SIGN-OFF (SHOW INSTRUCTOR) =
===Exclusively for Summer 2020 term, submissions are accepted only online!===
Follow the submission instructions for lab 8 on Blackboard.
{{Admon/important|Time for a new backup!|If you have successfully completed this lab, make a new backup of your virtual machines as well as your host machine.}}
[[Category:CentOS 7]]
[[Category:SSD2]]
[[Category:Digital Classroom]]
572
edits

Navigation menu