📄 x-vxsim5.html
字号:
<dd><pre class="Code2"><b><a name="85096">Error - An Integrated Simulator is already running. Only one may be running at a time. To run multiple simulators, use the optional Full Simulator. Hit Any Key to Exit</a></b></pre></dl><dd><p class="Body"><a name="85097"> </a>When you run VxSim, <b class="file">usrConfig.c</b> creates host entries for <b class="file">vxsim0</b> through <b class="file">vxsim15</b> and adds a default route to the host. </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/warning.gif"></td><td><hr><div class="CalloutCell"><a name="85102"><b class="symbol_UC"><font face="Helvetica, sans-serif" size="-1" class="sans">WARNING: </font></b></a>The VxSim ULIP driver will not attach to a network interface if it is already in use, that is, <b class="file">ul0</b> can be used by only one VxSim process. Use the <b class="command">-p</b> flag to run VxSim with a different processor number; see <a href="x-vxsim2.html#84421"><i class="title">Starting VxSim</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="85110">PPP (Solaris 2)</a></i></h5></font><dl class="margin"><dd><p class="Body"><a name="85111"> </a>When you run VxSim with PPP and specify processor number <i class="textVariable">n</i><i class="emphasis"> </i>(with the command <b class="command">vxWorks -p </b><i class="textVariable">n</i>), VxSim creates a network connection to the IP address 127.0.1.<i class="textVariable">n</i> by communicating through a pipe. Normally, VxWorks uses PPP over a serial device to connect to the host (see <i class="title">VxWorks Networking Guide</i>). The only difference with PPP is that a pipe replaces the physical serial link. </p></dl><dd><font face="Helvetica, sans-serif" size="-1" class="sans"><h5 class="HU"><i><a name="85112">SLIP (HP-UX)</a></i></h5></font><dl class="margin"><dd><p class="Body"><a name="85113"> </a>When you run VxSim with SLIP and specify processor number <i class="textVariable">n</i><i class="emphasis"> </i>(with the command <b class="command">vxWorks -p </b><i class="textVariable">n</i>), VxSim creates a network connection to the IP address specified when you started the <b class="command">ppl</b> process (192.168.1.<i class="term">n</i>) by attaching to a <b class="keyword">pty</b> device (see <a href="x-vxsim5.html#86329"><i class="title">Loading SLIP on a HP-UX Host</i></a>). Normally, VxWorks uses SLIP over a serial device to connect to the host (see <i class="title">VxWorks Networking Guide</i>). The only difference with VxSim is that a <b class="keyword">pty</b> device replaces the physical serial link. </p></dl></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H4"><i><a name="85118">Setting Up Remote Access</a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="85119"> </a>You can add host-specific routing entries to the local host to allow remote hosts to connect to a local VxSim "target." IP addresses are set up only for the host where the network simulation software is installed (see <a href="x-vxsim5.html#85118"><i class="title">Setting Up Remote Access</i></a>). The network interface does not have to be installed remotely; the remote host uses the local host as the gateway to the VxSim target.</p><dd><p class="Body"><a name="85126"> </a>In the example shown in <a href="x-vxsim5.html#85008">Figure H-2</a>, <b class="file">host1</b> can communicate with <b class="file">vxsim0</b> or <b class="file">vxsim1</b> if the following steps are taken:</p><dd><p class="Body"><a name="85127"> </a>On UNIX, the following commands are issued on <b class="file">host1</b> (as <b>root</b>):</p><dl class="margin"><dd><pre class="Code2"><b><a name="85128"></b><tt class="output">% </tt><b>route add host 127.0.1.0 90.0.0.1 1 </b><tt class="output">% </tt><b>route add host 127.0.1.1 90.0.0.1 1</a></b></pre></dl><dd><p class="Body"><a name="85129"> </a>On Windows, the following are added to <b class="file">C:\</b><b class="symbol_UC">WINNT</b><b class="file">\</b><b class="symbol_UC">SYSTEM32</b><b class="file">\drivers\etc\hosts</b>:</p><dl class="margin"><dd><pre class="Code2"><b><a name="85130">90.0.1.0 vxsim0 90.0.1.1 vxsim1</a></b></pre></dl><dd><p class="Body"><a name="85131"> </a>ULIP is used in this example, but the concept is identical under PPP or SLIP. Contrast <a href="x-vxsim5.html#85147">Figure H-3</a> below with <a href="x-vxsim5.html#85008">Figure H-2</a>, p. <a href="x-vxsim5.html#85008">555</a>, to see the way addresses are set up, paying particular attention to the addressing algorithm described in <a href="x-vxsim5.html#85057">Table H-4</a>. <div class="frame"><h4 class="EntityTitle"><a name="85147"><font face="Helvetica, sans-serif" size="-1" class="sans">Figure H-3: Example of VxSim IP Addressing (ULIP on Solaris)</font></a></h4><dl class="margin"><div class="Anchor"><a name="85198"> </a><img class="figure" border="0" src="images/x-vxsima2.gif"></div></dl></div></p><dd><p class="Body"><a name="85199"> </a>Verify the success of the above commands by pinging <b class="file">vxsim0</b> from <b class="file">host1</b>:</p><dl class="margin"><dd><pre class="Code2"><b><a name="85200"></b><tt class="output">% </tt><b>ping 127.0.1.0</a></b></pre></dl><dd><p class="Body"><a name="85201"> </a>To allow a VxSim process on one host to communicate with a VxSim process on a different host, you must make sure that the two VxSim processes have different IP addresses. You must also make additional host-specific routes using unique addresses for each process. </p><dd><p class="Body"><a name="85202"> </a>For example, to ping <b class="file">vxsim2</b> from <b class="file">host0</b> above, you must add an additional route from <b class="file">host0</b> as follows:</p><dl class="margin"><dd><pre class="Code2"><b><a name="85212"></b><tt class="output">% </tt><b>route add host 192.168.1.3 90.0.0.2 1</a></b></pre></dl></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="85207"><b class="symbol_UC"><font face="Helvetica, sans-serif" size="-1" class="sans">NOTE: </font></b></a>The Solaris simulator automatically assigns addresses starting with 127. You assign addresses for the HP-UX and Windows simulators when you install SLIP or ULIP. Windows can not use addresses starting with 127.</div></td></tr><tr valign="top"><td></td><td><hr></td></tr><tr valign="middle"><td colspan="20"></td></tr></table></p callout></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H4"><i><a name="85215">Setting up the Shared Memory Network (UNIX only)</a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="85216"> </a>Many VxWorks users connect multiple CPU boards through a backplane (for example, VMEbus), which allows the boards to communicate through shared memory. VxWorks provides a standard network driver to access this shared memory so that all the higher level network protocols are available over the backplane. In a typical configuration, one of the CPU boards (CPU 0) communicates with the host using Ethernet. The rest of the CPU boards communicate with each other and the host using the shared memory network, using CPU 0 as a gateway to the outside world. For more information on this configuration in a normal VxWorks environment, see <i class="title">VxWorks Networking Guide</i>.</p><dd><p class="Body"><a name="85217"> </a>This configuration can be emulated for VxSim. Multiple VxSim processes use a host shared-memory region as the basis for the shared memory network (see <a href="x-vxsim5.html#85224">Figure H-4</a>). <div class="frame"><h4 class="EntityTitle"><a name="85224"><font face="Helvetica, sans-serif" size="-1" class="sans">Figure H-4: VxSim Shared Memory Network</font></a></h4><dl class="margin"><div class="Anchor"><a name="85261"> </a><img class="figure" border="0" src="images/x-vxsima3.gif"></div></dl></div></p><dd><p class="Body"><a name="85262"> </a>To set this up, use a subnet mask of 0xffffff00 to create a 127.0.2.0 subnet (from the 127.0.0.0 network) for the shared memory network. The following steps are required.</p></dl><dl class="margin"><p><ol class="List"><li value="1."><a name="85263"> </a>Use the <b class="routine"><i class="routine">bootChange</i></b><b>( )</b> command from the Tornado shell to change the following boot parameter on CPU 0. You must specify the subnet mask, as follows:</li></ol></p><dl class="margin"><dd><pre class="Code2"><b><a name="85264"></b><tt class="output">inet on backplane (b): </tt><b>127.0.2.50:ffffff00</a></b></pre></dl><p><ol class="List"><li value="2."><a name="85265"> </a>Restart VxSim by typing <kbd>^X</kbd>. When VxSim boots, it sets up the shared-memory network and prints the address of the shared memory region it has created (in the VxSim console window, with the other boot messages).</li></ol></p><p><ol class="List"><li value="3."><a name="85266"> </a>Start CPU 1 (<b class="command">vxWorks -p 1</b>), attach the Tornado target server to it, and then use <b class="routine"><i class="routine">bootChange</i></b><b>( )</b> to set the following boot parameters on CPU 1. For the boot device parameter, use the address printed in step 2. Leave the "inet on ethernet" parameter blank by typing a period (<kbd>.</kbd>).</li></ol></p><dl class="margin"><dl class="margin"><dd><pre class="Code3"><b><a name="85267"></b><tt class="output">boot device :</tt><b> sm=<i class="textVariable">sharedMemoryRegion </i></b><tt class="output">inet on ethernet (e) : </tt><b>. </b><tt class="output">inet on backplane (b) :</tt><b> 127.0.2.51:ffffff00 </b><tt class="output">gateway inet (g) :</tt><b> 127.0.2.50</a></b></pre></dl></dl><p><ol class="List"><li value="4."><a name="85268"> </a>Quit CPU 1 and restart it. When it comes up again, it should attach to the shared memory network. To verify that everything is working correctly, ping CPU 1 (from a shell attached to CPU 0) with the following command: </li></ol></p><dl class="margin"><dl class="margin"><dd><pre class="Code3"><b><a name="85278"></b><tt class="output">-> </tt><b>ping "127.0.2.51"</a></b></pre></dl></dl></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="85273"><b class="symbol_UC"><font face="Helvetica, sans-serif" size="-1" class="sans">NOTE: </font></b></a>Any time you need to attach a VxSim process within the subnet to the target server, you need to specify it by its new IP address rather than by hostname. All VxSim processors other than 0 are no longer directly accessible to the external network; the processors use <b>vxsim0</b> as the gateway. The hostnames normally associated with VxSim IP addresses cannot be used, since the routing table entries point to their usual IP addresses. For example, <b>vxsim1</b> is normally associated with IP address 127.0.1.1; with the shared memory network active, CPU 1 must be addressed through the subnet as 127.0.2.51.</div></td></tr><tr valign="top"><td></td><td><hr></td></tr><tr valign="middle"><td colspan="20"></td></tr></table></p callout><dl class="margin"><p><ol class="List"><li value="5."><a name="85280"> </a>Until you configure your UNIX routing table or Windows <b class="file">hosts</b> file with information on how to reach the new subnet, you will be unable to use network communication between CPU 1 and the host over the shared memory network. To configure the route from UNIX, use the following commands:</li></ol></p><dl class="margin"><dl class="margin"><dd><pre class="Code3"><b><a name="85281"></b><tt class="output">% </tt><b>su root </b><tt class="output">password: # </tt><b>route add net 127.0.2.0 127.0.1.0 1 </b><tt class="output"># </tt><b>exit </b><tt class="output">%</tt><b></a></b></pre></dl></dl><p><ol class="List"><li value="6."><a name="85282"> </a>Verify that you can now communicate from the host to CPU 1 over the shared memory network by using <b class="command">ping</b> from the host to CPU 1. </li></ol></p><dl class="margin"><dl class="margin"><dd><pre class="Code3"><b><a name="85283"></b><tt class="output">% </tt><b>ping 127.0.2.51</a></b></pre></dl></dl><dl class="margin"><dd><div class="Indent"><a name="85284"> </a>Note that if you attempt to access CPU 1 through its normally associated IP address, it appears to be unavailable:</div><br><dl class="margin"><dd><pre class="Code3"><b><a name="85285"></b><tt class="output">% </tt><b>ping 127.0.1.1 </b><tt class="output">ping: no answer</tt><b></a></b></pre></dl></dl></dl><dl class="margin"><dd><p class="Body"><a name="85287"> </a>For more information on the shared memory network and network configuration, see <i class="title">VxWorks Networking Guide</i>.</p></dl><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="86052"><b class="symbol_UC"><font face="Helvetica, sans-serif" size="-1" class="sans">NOTE: </font></b></a>The optional product VxMP can be used with VxSim. This product provides shared semaphores and other shared memory objects to multiple VxWorks targets over the backplane. VxMP is sold separately. It is not available for the PC simulator. </div></td></tr><tr valign="top"><td></td><td><hr></td></tr><tr valign="middle"><td colspan="20"></td></tr></table></p callout><dl class="margin"><dd><p class="Body"><a name="86058"> </a></p></dl></dl><a name="foot"><hr></a><p class="FootnoteNumberMarker">1: <span class="Footnote"><a name="84797"> </a>For more information on run levels, see the Solaris man page for <b class="command">init</b>(1M).</span><p class="navbar" align="right"><a href="index.html"><img border="0" alt="[Contents]" src="icons/contents.gif"></a><a href="GuideIX.html"><img border="0" alt="[Index]" src="icons/index.gif"></a><a href="x-vxsim.html"><img border="0" alt="[Top]" src="icons/top.gif"></a><a href="x-vxsim4.html"><img border="0" alt="[Prev]" src="icons/prev.gif"></a><a href="x-coding.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 + -