1,576
edits
Changes
Changes Lab Check URL script to GitHub.
# To check that you have <b>dhcp</b> installed, enter the command:
#::<b><code><span style="color:#3366CC;font-size:1.2em;">rpm -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;">sudo yum install -y 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>
# Which file appears to be a sample (example) '''configuration file for dhcpd.conf'''?
# Copy While you could copy the '''dhcpd.conf.example''' file to the '''/etc/dhcp/dhcpd.conf''' directory making sure , it is named: recommended that you start a new '''/etc/dhcp/dhcpd.conf'''from scratch.
# Logout and restart your '''centos1''' VM.
# Observe the messages that get logged from the tail -f command as your centos1 VM starts. You should see output similar to the following:<br><br>
::<span style="font-family:courier;">Jun 27 Mar 2202:09:49 centos3 dhcpd: DHCPDISCOVER from 52:54:00:7c:85:13 via eth0</span>::<span style="font-family:courier;">Jun 27 Mar 2202:09:50 centos3 dhcpd: DHCPOFFER on 192.168.245.51 to 52:54:00:7c:85:13 (centos1) via eth0</span>::<span style="font-family:courier;">Jun 27 Mar 2202:09:50 centos3 dhcpd: DHCPREQUEST for 192.168.245.51 (192.168.245.13) from 52:54:00:7c:85:13 (centos1) via eth0</span>::<span style="font-family:courier;">Jun 27 Mar 2202:09:50 centos3 dhcpd: DHCPACK on 192.168.245.51 to 52:54:00:7c:85:13 (centos1) via eth0<br><br></span>
<ol>
<li value="6">On your '''centos1''' VM, open a terminal, andconfirm the IP address assignment using <b><code><span style="color:#3366CC;font-size:1.2em;">ip address show</span></code></b></li>
::<span style="font-family:courier;"> hardware ethernet 52:54:00:ba:75:a8;</span>
::<span style="font-family:courier;">}</span>
<ol><li value="3">On the client '''centos1''' check the contents of the <b>/var/lib/dhclient</b> directory. The files in this directory is where the dhclient stores its record of leases.<br><br> '''NOTE:''' If there are no files, then in a shell as '''root''' in your '''centos1''' VM issue the command: <b><code><span style="color:#3366CC;font-size:1.2em;">sudo dhclient eth0</span></code></b><br>Then check to see if there is file containing lease information in that directory. You should get the similar contents:<br></li></ol>
::<span style="font-family:courier;"> lease {</span>
::<span style="font-family:courier;"> interface "eth0";</span>
|}
=== Part 2: Configuring DHCP server to Continually Lease Same IP Address===
= LAB 8 SIGN-OFF (SHOW INSTRUCTOR) =
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.}}
# Make certain ALL of your '''centos1''' and '''centos3''' VMs are running.
# Switch to your '''c7host''' VM and change to your user's ''su -''' into root.# Change to the '''/root/bin''' directory.# Issue the Linux command: <b><code><span style="color:#3366CC;font-size:1.2em;">wget https://ict.senecacollegeraw.ca/~petergithubusercontent.callaghancom/ops245OPS245/labs/main/lab8-check.bash</span></code></b>
# Give the '''lab8-check.bash''' file execute permissions (for the file owner).
# Run the shell script and if any warnings, make fixes and re-run shell script until you receive "congratulations" message.<br><br>
#Arrange proof of the following on the screen:<br><blockquote><span style="color:green;font-size:1.5em;">✓</span> '''centos1''' VM:<blockquote><ul><li>'''ip address show''' shows IP address '''192.168.245.42'''</li><li>DHCP client lease file</li></ul></blockquote><span style="color:green;font-size:1.5em;">✓</span> '''centos3''' VM:<blockquote><ul><li>DHCP server log file showing a lease occuring</li><li>DHCP server configuration file showing subnet and host declaration</li><li>DHCP server lease file</li></ul></blockquote><span style="color:green;font-size:1.5em;">✓</span> '''Lab8''' log-book filled out.
# Upload a screenshot of the proof from the previous step along with your logbook, and the file generated by '''lab8-check.bash'''.
= Practice For Quizzes, Tests, Midterm & Final Exam =