GIF89a; %PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
Server IP : 134.29.175.74 / Your IP : 216.73.216.160 Web Server : nginx/1.10.2 System : Windows NT CST-WEBSERVER 10.0 build 19045 (Windows 10) i586 User : Administrator ( 0) PHP Version : 7.1.0 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/nginx/html/MichaelMalz/CST2608/_Archive/ |
Upload File : |
<? // Lab02.php $TRACK = "<b>".basename(__FILE__).'</b> <span class="pv_fl">('.__FILE__.")</span>\n<ol>\n"; ini_set('include_path',ini_get('include_path').PATH_SEPARATOR.$_SERVER['DOCUMENT_ROOT']."/"); // Add the DOCUMENT_ROOT to the include_path. $thisFile=__FILE__; $thisLine=__LINE__; include('application.phpinc'); $thisFile=__FILE__; $thisLine=__LINE__; include('Course/courseInfo.phpinc'); $thisFile=__FILE__; $thisLine=__LINE__; include('classInfo.phpinc'); $assignmentNumber = 2; $assignmentType = "Lab"; $assignmentTitle = "DHCP server setup"; $evaluationType = "Lab"; $evaluationTitle = $assignmentTitle; if (strlen($assignmentNumber) == 1) { $assignmentName = $assignmentType."0".$assignmentNumber; $evaluationName = $evaluationType."0".$assignmentNumber; } else { $assignmentName = $assignmentType.$assignmentNumber; $evaluationName = $evaluationType.$assignmentNumber; } if ($evaluationTitle != '') $evaluationTitle = ' - '.$evaluationTitle; $title = $assignmentType." ".$assignmentNumber.": ".$assignmentTitle; $headTitle = '_CST_ - '.$courseNumber.' '.$courseTitle.' - '.$title; $pageTitle = $courseNumber.' '.$courseTitle.'<br>'.$title; $pageMenu = 'Course/courseMenu.phpinc'; $smallTitle = true; $js='openCenteredWindow'; $thisFile = __FILE__; $thisLine=__LINE__; include('common/pageHeader.phpinc'); $f_uId = formValue('uId'); if ( $f_uId ) { $userId = $f_uId; $userFullName = str_replace(" ","",username($userId)); } else { $userFullName = str_replace(" ","",$_SESSION['userFullName']); $userId = $_SESSION['userId']; } $sectionTitle = $courseNumber.' '.$courseTitle.' - '.$title.' - '.username($userId); $thisFile = __FILE__; $thisLine=__LINE__; include('common/sectionHeader.phpinc'); ?> <p> <fieldset><legend>Description</legend> Setup a DHCP server. </fieldset> <fieldset><legend>Lab Instruction</legend> <ol start="1"> <li> Configure VMware and Ubuntu so the DHCP server can work. We need to configure both VMware and Ubuntu for this to work. <ol type="a"> <li>Configure VMware so the Ubuntu server uses <u><b>N</u>AT</b> or <b>Custom: <u>S</u>pecific virtual network</b>. This way your Ubuntu server should use VMware as a router and work with whatever network your computer is connected to. Here is an example using VMnet8: <br /> <img src="Labs/Lab02/VMware_Ethernet.png" alt="VMware Ethernet setting" /> </li> <li>Ensure that the VMware DHCP server is running. If it is not, start it. <br /><img src="Labs/Lab02/VMware_DHCP.png" alt="VMware DHCP running" /> </li> <li>Configure the Ubuntu server Network Settings Wired connection to use DHCP. <br /><img src="Labs/Lab02/Ubuntu_DHCP.png" alt="Ubuntu Wired connection" /> </li> <li>See what the IP address, Subnet mask, and Gateway address are set to. You can use the <kbd>ifconfig</kbd> and <kbd>netstat -rn</kbd> commands to get this information. You can then use these settings to setup a static IP address. Example output: <br /><img src="Labs/Lab02/Ubuntu_ifconfig.png" alt="Ubuntu ifconfig" /><img src="Labs/Lab02/Ubuntu_netstat.png" alt="Ubuntu netstat" /> <br />The setting above are: IP address: <b>192.168.102.128</b>, Subnet mask: <b>255.255.255.0</b>, and Gateway address: <b>192.168.102.1</b> </li> <li>Use these values to setup a Static IP address for the Ubuntu server Network Settings Wired connection. A static IP address must be setup or your Ubuntu server will not have an IP address once we turn off the VMware DHCP server. An example is below: (with the IP address set to 192.168.102.2) <br /> <img src="Labs/Lab02/Ubuntu_static.png" alt="Ubuntu static" /> </li> <li> Test to insure your setting are correct and work. In a terminal window try pinging the CST server by IP address:<br><kbd>ping 134.29.175.74</kbd>.<br> If you do not get a "bytes from" response then <b class="error">STOP</b> here. There is something wrong with the Static IP address you setup.<br> If the above worked, then try pinging the CST server by name:<br><kbd>ping cst.ridgewater.edu</kbd>.<br> If you do not get a "bytes from" response then <b class="error">STOP</b> here. There is something wrong with the Static IP address you setup or with the VMware DNS configuration.<br> <b>You must get the two pings above working before you continue.</b> </li> <li>Stop the the VMware DHCP server. This will ensure that your Ubuntu DHCP server is the one handing our IP addresses. <br /><img src="Labs/Lab02/VMware_DHCP_stop.png" alt="VMware DHCP stopped" /> </li> </ol> </li> <li>Setup DHCP server. <ol type="a"> <li>Install the DHCP server. <br /><kbd>sudo apt-get install dhcp3-server</kbd> </li> <li>Configure the DHCP interface. <br /><kbd>sudo cp /etc/default/dhcp3-server /etc/default/dhcp3-server_backup</kbd> <br /><span class="kbd">sudo gedit /etc/default/dhcp3-server</span> <br />Edit the <span class="code bold">INTERFACES=""</span> line to read <span class="code bold">INTERFACES="eth0"</span>. NOTE: The eth# may be different for your installation. Use <kbd>ifconfig</kbd> to find the name of your interface. </li> <li>Configure the DHCP server. <br /><span class="kbd">sudo cp /etc/dhcp3/dhcpd.conf /etc/dhcp3/dhcpd.conf_backup</span> <br /><span class="kbd">sudo gedit /etc/dhcp3/dhcpd.conf</span> <br />Enter your DHCP configuration. <pre class="code"> subnet 192.168.102.0 netmask 255.255.255.0 { range 192.168.102.100 192.168.102.125; option domain-name-servers 192.168.102.1; option domain-name "ubuntu.loc"; option routers 192.168.102.1; option broadcast-address 192.168.102.255; default-lease-time 600; max-lease-time 7200; }</pre> Note that my network was 192.168.102.0 and my gateway was 192.168.102.1. I also set the range to be from 192.168.102.100 to 192.168.102.125. I did this because the VMware DHCP server was using 192.168.102.128 to 192.168.102.254. By setting a different range it will be easier to see that I am getting an IP address from the Ubuntu DHCP server. </li> </ol> </li> <li>Start the DHCP server. <br /><kbd>sudo /etc/init.d/dhcp3-server start</kbd> </li> <li>Setup another VMware machine that uses the same network your Ubuntu server is on and to use DHCP. <ol type="a"> <li>Restart or renew the interface on the other VMware machine to obtain an IP address from your Ubuntu DHCP server. <br />From a Windows XP VMware machine use the commands: <br /><kbd>ipconfig /release</kbd> <br /><kbd>ipconfig /renew</kbd> <br />NOTE: I have had problems with a Windows OS switching DHCP servers once it has seen another one. If your Windows VMware machine was started when the VMware DHCP server was running you may have to restart for Windows to use your Ubuntu DHCP server. <br />From an Ubuntu VMware machine use the command: <br /><kbd>sudo dhclient</kbd> <br />Take a screenshot and save it as <b style="white-space:nowrap;"><?=$courseNumber?>-<?=$evaluationName?>a-<?=$userFullName?>.png</b>. <br />Here is a screenshot from a Windows XP VMware machine: <br /><img src="Labs/Lab02/XP_ipconfig_renew.png" alt="XP ipconfig renew" /> <br />Here is a screenshot from an Ubuntu VMware machine: <br /><img src="Labs/Lab02/Ubuntu-dhclient.png" alt="Ubuntu sudo dhclient" /> </li> <li>Display the IP address information, take a screenshot and save it as <b style="white-space:nowrap;"><?=$courseNumber?>-<?=$evaluationName?>b-<?=$userFullName?>.png</b>. <br />From a Windows XP VMware machine use the command: <br /><kbd>ipconfig /all</kbd> <br />Here is a screenshot from a Windows XP VMware machine: <br /><img src="Labs/Lab02/XP_ipconfig_all.png" alt="XP ipconfig all" /> <br />From an Ubuntu VMware machine use the command: <br /><kbd>cat /var/lib/dhcp3/dhclient.leases</kbd> or <kbd>cat /var/lib/dhcp/dhclient.leases</kbd> <br />Here is a screenshot from an Ubuntu VMware machine: <br /><img src="Labs/Lab02/Ubuntu-dhclient-leases.png" alt="Ubuntu ifconfig" /> <br>Note that this was from a different config using the 192.168.108.0 network, the server was at 192.168.108.3, and a DHCP range from 192.168.108.15 to 192.168.108.100. </li> </ol> </li> <li> <a href="mailto:jim.martinson@ridgewater.edu?subject=<?=$courseNumber?> <?=$evaluationName?> Submission">Send an email</a> to jim.martinson@ridgewater.edu with a subject of <b style="white-space:nowrap"><?=$courseNumber?> <?=$evaluationName?> Submission</b> and attach the following files: <ol type="a"> <li><?=$courseNumber?>-<?=$evaluationName?>a-<?=$userFullName?>.png.</li> <li><?=$courseNumber?>-<?=$evaluationName?>b-<?=$userFullName?>.png.</li> <li>/etc/default/dhcp3-server.</li> <li>/etc/dhcp3/dhcpd.conf.</li> <li>/etc/network/interfaces.</li> </ol> </li> </ol> </fieldset> <fieldset class="pio"><legend>Grading Criteria</legend> Demonstrated assignment effectively: 10 points. <br /> There are some things I expect. If they are incorrect you will lose the following: <br /> Incorrect attachment file name: -1 pt. <br /> Work submitted incorrectly: -1pt. <br /> Incorrect subject in email: -1pt. <br /> Second and subsequent submission of work for grading: -1pt. <br /> Work submitted late: -1pt. </fieldset> <fieldset class="pio"><legend>Objectives</legend> <ol class="obj pio" start="4"> <!-- 2 4 --> <li>Describe TCP/IP networking.</li> <li>Install and configure Dynamic Host Configuration Protocol (DHCP).</li> <li>Use DHCP.</li> </ol> </fieldset> <fieldset><legend>Notes</legend> Here is a <a href="Labs/<?=$evaluationName?>/<?=$evaluationName?>.zip"><?=$evaluationName?>.zip</a> file with examples of what must be turned in as well as gedit and sudo scripts to help with the assignment.<br /> </fieldset> <? $thisFile=__FILE__; $thisLine=__LINE__; include('ReferencesResources.phpinc'); $thisFile = __FILE__; $thisLine=__LINE__; include('common/sectionFooter.phpinc'); $thisFile = __FILE__; $thisLine=__LINE__; include('common/pageFooter.phpinc'); ?>