Changes

Jump to: navigation, search

OPS245 Lab 8

33 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'''su -s ''' into root.# Change to the '''/root/bin''' directory.# Issue the Linux command: <b><code><span style="color:#3366CC;font-size:1.2em;">wget https://ictraw.senecacollegegithubusercontent.cacom/~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>

Navigation menu