Changes

Jump to: navigation, search

Lab 8 Warnings / Debrief

2,068 bytes added, 10:56, 8 August 2015
no edit summary
== Setting Up the -up / Running a DHCP Sever (dhcpd) ==
[[Image:dhcp-config.png|thumb|right|500px|The '''dhcpd.config''' file allows the Linux system administrator to customize the DCHP server. Generally in this file are '''global settings''' (options that apply throughout entire network) and '''subnet declarations''' (options that apply only to that subnet). Whenever changes are made to this file, the '''DCHP service needs to be restarted''' to allow new settings to take effect.<br><br>'''NOTE: Any errors in this file (such as typos or missing semi-colons) can cause the DHCP server not to restart!''' ]]
<u>'''Obtaining dhcp Package'''</u>
In order to setup a '''dhcpddhcp''' server, you may be required to install the package on your server. The program called dhcpd is a daemon which runs the dchp server in the background waiting to accept requests from potential clients (eg. mobile computers, etc). In our case, we will install and configure ''dhcpd'' on our '''centos3''' VM.
<u>Useful commands</u>
Here is a link to a good explanation of how dhcpd.conf works: [ '''[https://www.centos.org/docs/5/html/Deployment_Guide-en-US/s1-dhcp-configuring-server.html Configuring a DHCP Server]''' ]
 
 
<u>'''Running the DHCP Server'''</u>
 
 
After configuring the DHCP server, you need to either start the service (first time) or restart the service in order for your configuration changes to take effect.
 
<u>Useful commands</u>
 
:*<b><code><span style="color:#3366CC;font-size:1.2em;">service dhcpd start</span></code></b> (start dhcpd service for the first time)
:*<b><code><span style="color:#3366CC;font-size:1.2em;">service dhcpd restart</span></code></b> (restart dhcpd service for changes to take effect)
:*<b><code><span style="color:#3366CC;font-size:1.2em;">chkconfig dhcpd on</span></code></b> (enable dhcpd service on server boot-up)
:*<b><code><span style="color:#3366CC;font-size:1.2em;">tail -f /var/log/messages</span></code></b> (utility to confirm dhcp connections as they appear in real-time)
 
 
Note: If there are any errors in the dhcpd.conf file, then that service will not start correctly.
 
<u>Common Errors in dhcpd.conf file</u>
 
:*Syntax Errors
:*Failure to end statements with semi-colon character (;)
:*Forgetting to include braces ( { } ) in subnet declarations
 
 
<u>'''Common Files When Auditing DHCP Connections'''</u>
 
There are files that are created as a result of a DHCP connection. These files are useful to verify that a connection via DCHP was created, and provides details regarding this connection (eg. confirming dhcpd.conf modifications).
 
On the DCHP <u>Server</u>:
 
*'''tail -f /var/log/messages''' DHCP server log file showing a lease occurring (eg. '''dora''')
*'''/var/lib/dhcpd/dhcpd.leases''' DHCP server lease file
 
On the <u>Client Server</u> that connected via DCHP:
 
*'''/var/lib/dhclient''' directory where the <u>dhclient</u> stores its record of leases
<u>Common Errors in dhcpd.conf file:</u>
:*Syntax Errors
 
:*Failure to end statements with semi-colon character (;)
 
:*Forgetting to include braces ( { } ) in subnet declarations
== Preparing for Lab Sign-Off ==
13,420
edits

Navigation menu