Changes

Jump to: navigation, search

OPS245 Lab 8

35 bytes added, 23:32, 8 May 2022
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.
::<span style="font-family:courier;">&nbsp; &nbsp;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;">&nbsp; &nbsp;interface "eth0";</span>
|}
 
=== Part 2: Configuring DHCP server to Continually Lease Same IP Address===
# 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;">&#x2713;</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;">&#x2713;</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;">&#x2713;</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 &amp; Final Exam =

Navigation menu