⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 setting_up_a_dhcp_server.html

📁 ADI 公司blackfin系列的用户使用文挡。
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html><head>  <title></title>  <link rel="stylesheet" media="screen" type="text/css" href="./style.css" />  <link rel="stylesheet" media="screen" type="text/css" href="./design.css" />  <link rel="stylesheet" media="print" type="text/css" href="./print.css" />  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head><body><a href=start.html>start</a></br><div class="toc"><div class="tocheader toctoggle" id="toc__header">Table of Contents</div><div id="toc__inside"><ul class="toc"><li class="clear"><ul class="toc"><li class="level2"><div class="li"><span class="li"><a href="#setting_up_a_dhcp_server" class="toc">Setting up a DHCP Server</a></span></div><ul class="toc"><li class="level3"><div class="li"><span class="li"><a href="#suse_linux_instructions" class="toc">SuSE Linux Instructions</a></span></div></li><li class="level3"><div class="li"><span class="li"><a href="#windows_instructions" class="toc">Windows Instructions</a></span></div></li><li class="level3"><div class="li"><span class="li"><a href="#using_u-boot_with_dhcp" class="toc">Using U-Boot With DHCP</a></span></div></li></ul></li></ul></li></ul></div></div><h2><a name="setting_up_a_dhcp_server" id="setting_up_a_dhcp_server">Setting up a DHCP Server</a></h2><div class="level2"><p>As an alternative to manually configuring the target system&rsquo;s IP address and entering the filename of a memory image to retrieve, U鈥態oot may receive a valid IP address and a memory image from a DHCP server.  A TFTP server must also be running on the machine when this method of loading a memory image is used.  See <a href="setting_up_a_tftp_server.html" class="wikilink1" title="setting_up_a_tftp_server.html">Setting up a TFTP Server</a> above.</p><p> <strong>Before following through with these instructions disconnect the computer from any network that already has an active DHCP server.</strong>&rsquo; </p></div><!-- SECTION [1-727] --><h3><a name="suse_linux_instructions" id="suse_linux_instructions">SuSE Linux Instructions</a></h3><div class="level3"><p>This section will describe how to setup a DHCP server under SuSE Linux and how to use this server to load uClinux via U鈥態oot.  For other distributions of Linux this procedure may differ.  You may have to install a DHCP server program if one is not already installed on your system.</p><p>First determine your computer&rsquo;s IP address by typing the following command:</p><pre class="code">bash# ifconfig  eth0 (as root)bash$ /sbin/ifconfig eth0 (as user)</pre><p> (assuming eth0 is the device being used for network connections)</p><p>Your computer&rsquo;s IP address will be displayed in the field <em><strong>inet addr</strong></em>.  If this field is not present you need to assign an IP address to your computer by using the command:</p><pre class="code">bash# ifconfig eth0 &lt;IP address&gt;</pre><p> (this assumes eth0 is the device you will be using for network connections)</p><p>Next the file <code>/etc/dhcpd.conf</code> must be edited.  The following is an example dhcpd.conf file:</p><pre class="code">authoritative; filename &quot;linux&quot;; default-lease-time 600;  max-lease-time 7200; allow bootp; ddns-update-style none; subnet 192.168.1.0 netmask 255.255.255.0 {   range 192.168.1.10 192.168.1.20; }</pre><p><em>Filename</em> specifies the name of the memory image file that U-Boot should attempt to retrieve via TFTP.  The lease times define how often a client must receive a new IP address, they are expressed in seconds.  In the above example the <em>subnet</em> must be the same as the server&rsquo;s IP address except for the last number which must be 0.  The IP address range defined in <em>range</em> must be valid for the given <em>netmask</em> (i.e. the IP addresses must be within the local network).  In the above example IP addresses from 192.168.1.1 to 192.168.1.254 are valid, excluding the IP address of the machine the DHCP server is running on.  More information on networking and DHCP can be found in the <a href="http://www.tldp.org/HOWTO/Networking-Overview-HOWTO.html" class="urlextern" title="http://www.tldp.org/HOWTO/Networking-Overview-HOWTO.html"  rel="nofollow">Networking-Overview-HOWTO</a>.</p><p>After this, the file <code>/etc/sysconfig/dhcpd</code> must be edited.  The line <strong>DHCPD_INTERFACE=&rdquo;&ldquo;</strong> must be changed to <strong>DHCPD_INTERFACE=&rdquo;eth0&rdquo;</strong> assuming <em>eth0</em> is the device you will be using for your network connection.</p><p>Next the DHCP server must be started by typing the following command:</p><pre class="code">bash# rcdhcpd restart</pre><p>Alternately the DHCP server may be enabled through the XWindows interface.  These instructions are for SuSE Linux 9.0.  For other distributions of Linux this procedure may vary.</p><p>Open the <strong>Control Center</strong><em> </em>which is located under the start menu.  The <strong>Control Center</strong> window should now be displayed:</p><p><a href="media/dhcp1.png" class="media" target="_blank" title="dhcp1.png"><img src="media/dhcp1.png" class="media" alt="" /></a></p><p>Click on <strong>YaST2 modules</strong>.</p><p>The YaST2 modules sub-menu should now be displayed in the sidebar:</p><p><a href="media/dhcp2.png" class="media" target="_blank" title="dhcp2.png"><img src="media/dhcp2.png" class="media" alt="" /></a></p><p>Click on <strong>Network Services</strong>.</p><p>The Network Services sub-menu should now be displayed in the sidebar:</p><p><a href="media/dhcp3.png" class="media" target="_blank" title="dhcp3.png"><img src="media/dhcp3.png" class="media" alt="" /></a></p><p>Click on <strong>DHCP Server</strong> then click the <strong>Administrator Mode</strong> button (you will need the root password).</p><p>After entering the root password the DHCP server configuration module should now be displayed:</p><p><a href="media/dhcp4.png" class="media" target="_blank" title="dhcp4.png"><img src="media/dhcp4.png" class="media" alt="" /></a></p><p>Double click on <strong>Subnets</strong>.</p><p>The Subnet Configuration window should be displayed.</p><p>Click <strong>Add</strong>.</p><p>The Subnet configuration window should now be displayed:</p><p><a href="media/dhcp5.png" class="media" target="_blank" title="dhcp5.png"><img src="media/dhcp5.png" class="media" alt="" /></a></p><p>Select the parameter to edit and click the <strong>Edit</strong> button.</p><p>Enter a valid subnet, netmask, and range.</p><p>If the <strong>option routers</strong> field is not required for your particular network setup then select it and click the <strong>Delete</strong> button (leaving it blank may produce an error when attempting to start the DHCP server).</p><p>Click the <strong>Add</strong> button.</p><p>When the <strong>Selected Option</strong> dialog appears type <strong>filename</strong> and click <strong>OK</strong>.</p><p>When the <strong>Current Option</strong> dialog for filename is displayed type <strong>&ldquo;linux&rdquo;</strong> (quotes included) and click OK (assuming <code>linux</code> is the name of the uClinux memory image file in the TFTP boot directory).</p><p>Click <strong>OK</strong>.</p><p>Click <strong>OK</strong> again.</p><p>Back at the DCHP Server Configuration window:</p><p><a href="media/dhcp6.png" class="media" target="_blank" title="dhcp6.png"><img src="media/dhcp6.png" class="media" alt="" /></a></p><p>Double click on <strong>Enable DHCP Server at Boot Time</strong>.</p><p>A dialog box should now be displayed:</p><p><a href="media/dhcp7.png" class="media" target="_blank" title="dhcp7.png"><img src="media/dhcp7.png" class="media" alt="" /></a></p><p>Select the <strong>Enable DHCP Server at Boot Time</strong> check box and click <strong>OK</strong>.</p><p>Click <strong>Finish</strong>.</p><p>The DHCP server should now be running.  Before reconnecting your computer to a network with an active DHCP server ensure that you stop the DHCP server by entering the following command as root:

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -