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

📄 c-booting3.html

📁 Vxworks网络编程指南
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<dd><p class="Body"><a name="85514"> </a>If the boot program includes a DHCP or BOOTP client, and you have set the 0x40 bit in the <b class="symbol_lc">flags</b> boot parameter, the boot program uses the DHCP or BOOTP client to retrieve values for <b>(&nbsp;)</b>(from which the boot program derives <b class="symbol_lc">bad</b>), <b class="symbol_lc">had</b>, <b class="symbol_lc">gad</b>, and <b class="symbol_lc">bootFile</b>.</p></dl></dl><dl class="margin"><dd><p class="table" callout><table border="0" cellpadding="0" cellspacing="0"><tr valign="top"><td valign="top" width="40"><br><img border="0" alt="*" src="icons/note.gif"></td><td><hr><div class="CalloutCell"><a name="85593"><b class="symbol_UC"><font face="Helvetica, sans-serif" size="-1" class="sans">NOTE:  </font></b></a>This section provides a general discussion of the issues that arise when using a DHCP or BOOTP server to provide boot parameters. For more on configuring the DHCP or BOOTP servers, see <a href="c-network.html#"><i class="title">Configuring VxWorks to Include the DHCP Components</i></a>, or <a href="c-network.html#"><i class="title">BOOTP Configuration</i></a>.</div></td></tr><tr valign="top"><td></td><td><hr></td></tr><tr valign="middle"><td colspan="20"></td></tr></table></p callout></dl><dl class="margin"><dd><font face="Helvetica, sans-serif" size="-1" class="sans"><h5 class="HU"><i><a name="84720">IP Lease Length </a></i></h5></font><dl class="margin"><dd><p class="Body"><a name="84722"> </a>When booting with DHCP, the value of the minimum lease length is critical. Because the network address assigned by DHCP is only valid for a finite period of time, the DHCP client must spawn a monitor task to renew the lease as necessary. However, this cannot occur until after the VxWorks boot file has been downloaded. </p><dd><p class="Body"><a name="84723"> </a>Thus, the minimum lease setting must be large enough to allow this download to complete. Otherwise, the server which supplied the IP address may reassign it after the lease expires, and the VxWorks image will inadvertently use an invalid IP address. The default value is acceptable for an Ethernet link, but might need to be increased for slower connections, such as serial links.</p></dl><dd><font face="Helvetica, sans-serif" size="-1" class="sans"><h5 class="HU"><i><a name="84724">Booting a VxWorks Target with DHCP from a Windows NT Server</a></i></h5></font><dl class="margin"><dd><p class="Body"><a name="84726"> </a>The Windows NT implementation of the DHCP server is geared towards providing configuration parameters for other Windows NT workstations. As a result, it does not provide all the information necessary to boot a VxWorks target successfully.</p><dd><p class="Body"><a name="84727"> </a>In particular, the Windows NT implementation of the DHCP server does not provide a boot file name. Thus, to use DHCP to boot a VxWorks target from a Windows NT Server, you must enter the boot file name manually at the boot prompt. In addition, the Windows NT implementation of DHCP server does not provide for the case in which the DHCP server that provides the configuration parameters is resident on one machine while the boot file is resident on another. Thus, you have to enter the host IP address manually. </p><dd><p class="Body"><a name="84728"> </a>Normally, the Tornado target server retrieves the run-time VxWorks image from the target. Unfortunately, because the NT DHCP server does not provide the target with the name of this file, the target cannot provide the file name to the target server. To get around this lack in the NT implementation of DHPC, you must supply Tornado with the name of the VxWorks run-time image. To do this, go the Create Target Server window (accessible from the Tornado Launcher window by selecting Target: Create), then use the Core field to specify a VxWorks image file. This file need not be the actual image used by the target. It can be a locally accessible copy of that image. </p></dl><dd><font face="Helvetica, sans-serif" size="-1" class="sans"><h5 class="HU"><i><a name="84729">Getting the Target Ethernet Address</a></i></h5></font><dl class="margin"><dd><p class="Body"><a name="84731"> </a>When you configure the BOOTP server, you need the target's hardware address to use as a key into the BOOTP database. You get this address from the target device. If the device is running VxWorks, you can use the <b class="routine"><i class="routine">ifShow</i></b><b>(</b>&nbsp;<b>)</b> command. In the following example, the target's Ethernet address is 00:00:4b:0b:b3:a8.<sup><a href="#foot"><b class="FootnoteMarker">3</b></a></sup> </p><dl class="margin"><dd><pre class="Code2"><b><a name="84736"></b><tt class="output">-&gt;</tt><b> ifShow "ln0" </b><tt class="output">value = 0 = 0x0</tt><b></a></b></pre></dl><dd><p class="Body"><a name="84738"> </a>The output is sent to the standard output device, and looks like the following:</p><dl class="margin"><dd><pre class="Code2"><b><a name="84739"></b><tt class="output">ln (unit number 0): Flags: (0x63) UP BROADCAST ARP RUNNING  Internet address: 150.12.1.240 Broadcast address: 150.12.1.255 Netmask 0xffff0000 Subnetmask 0xffffff00 Ethernet address is 00:00:4b:0b:b3:a8 Metric is 0 Maximum Transfer Unit size is 1500 5 packets received; 6 packets sent 0 input errors; 0 output errors 6 collisions</tt><b> </a></b></pre></dl><dd><p class="Body"><a name="84750"> </a>If the device has not yet booted, you can use the <b class="command">n</b> command to retrieve the information from the boot ROMs. For example:</p><dl class="margin"><dd><pre class="Code2"><b><a name="84751"></b><tt class="output">[VxWorks Boot]:</tt><b> n ln </b><tt class="output">Attaching network interface enp0... done Address for device "ln" == 02:cf:1f:e0:20:24</tt><b></a></b></pre></dl></dl></dl><a name="foot"><hr></a><p class="FootnoteNumberMarker">1:&nbsp;<span class="Footnote"><a name="84663"> </a>If you booted using RSH, you had to have provided the boot program with a value for <b class="symbol_lc">usr</b>. If you booted using FTP, you had to have provided values for <b class="symbol_lc">usr</b> and <b class="symbol_lc">passwd</b>. </span><p class="FootnoteNumberMarker">2:&nbsp;<span class="Footnote"><a name="84686"> </a>The presence or lack of a <b class="symbol_lc">passwd</b> affects only the "<i class="textVariable">hostName</i>:" device. Other instances of <b class="symbol_lc">netDrv </b>are individually configurable. </span><p class="FootnoteNumberMarker">3:&nbsp;<span class="Footnote"><a name="84735"> </a>The <b class="routine"><i class="routine">ifShow</i></b><b>(&nbsp;)</b> function is not built in to the Tornado shell but must be activated by turning on network debugging.  The relevant configuration macro is <b class="symbol_UC">INCLUDE_TCP_SHOW</b>. </span><p class="navbar" align="right"><a href="index.html"><img border="0" alt="[Contents]" src="icons/contents.gif"></a><a href="c-booting.html"><img border="0" alt="[Index]" src="icons/index.gif"></a><a href="c-booting.html"><img border="0" alt="[Top]" src="icons/top.gif"></a><a href="c-booting2.html"><img border="0" alt="[Prev]" src="icons/prev.gif"></a><a href="c-booting4.html"><img border="0" alt="[Next]" src="icons/next.gif"></a></p></body></html><!---by WRS Documentation (), Wind River Systems, Inc.    conversion tool:  Quadralay WebWorks Publisher 4.0.11    template:         CSS Template, Jan 1998 - Jefro --->

⌨️ 快捷键说明

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