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

📄 c-drp2.html

📁 vxworks相关论文
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><link rel="STYLESHEET" type="text/css" href="wrs.css"><title>    Dynamic Routing Protocols     </title></head><body bgcolor="FFFFFF"><p class="navbar" align="right"><a href="index.html"><img border="0" alt="[Contents]" src="icons/contents.gif"></a><a href="c-drp.html"><img border="0" alt="[Index]" src="icons/index.gif"></a><a href="c-drp.html"><img border="0" alt="[Top]" src="icons/top.gif"></a><a href="c-drp1.html"><img border="0" alt="[Prev]" src="icons/prev.gif"></a><a href="c-drp3.html"><img border="0" alt="[Next]" src="icons/next.gif"></a></p><font face="Helvetica, sans-serif" class="sans"><h3 class="H2"><i><a name="88445">6.2  &nbsp;&nbsp;RIP, Routing Information Protocol</a></i></h3></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="88447"> </a>RIP maintains routing information within small internetworks. You can use RIP only in networks where the largest number of hops is 15. While this might seem like a large number, there are already many existing corporate networks that exceed this limit.<sup><a href="#foot"><b class="FootnoteMarker">1</b></a></sup> </p><dd><p class="Body"><a name="88452"> </a>RIP is based on work done in the Internet community, and its algorithmic base goes back to the ARPANET circa 1969.  It is based on the distance-vector algorithm, also called Bellman-Ford, which is described in "Dynamic Programming," from Princeton University by R. E. Bellman.  This paper was published in 1957.</p><dd><p class="Body"><a name="88454"> </a>The RIP server provided with VxWorks is based on the BSD 4.4 <b class="symbol_lc">routed</b> program.  There are several relevant RFCs; the two most important are RFC 1058, in which RIP version 1 was first documented, and RFC 1388, in which the version 2 extensions are documented.</p><dd><p class="Body"><a name="88455"> </a>The VxWorks RIP server supports three modes of operation: </p></dl><dl class="margin"><p class="listspace"><ul class="Bullet" type="disc"><li><a name="88456"> </a>Version 1 RIP</li></ul></p><dl class="margin"><dd><div class="Indent"><a name="88458"> </a>This mode of operation follows RFC 1058. It uses subnet broadcasting to communicate with other routers and sends out only a gateway and metric for each subnet.</div><br></dl><p class="listspace"><ul class="Bullet" type="disc"><li><a name="88459"> </a>Version 2 RIP with Broadcasting</li></ul></p><dl class="margin"><dd><div class="Indent"><a name="88460"> </a>This mode is the same as Version 2 RIP with multicasting (see below), except that it uses broadcasting instead of multicasting. This mode is backwards compatible with RIP Version 1 and is the mode recommended in RFC 1388. </div><br></dl><p class="listspace"><ul class="Bullet" type="disc"><li><a name="88461"> </a>Version 2 RIP with Multicasting</li></ul></p><dl class="margin"><dd><div class="Indent"><a name="88463"> </a>In this mode, the server not only knows about routers but can describe routes based on their subnet mask and can designate a gateway that is not the router that sends the updates. Thus, the machine that hosts the RIP server does not necessarily have to be the gateway. Because this mode uses multicasting to communicate, only interested nodes in the network see routing information and updates. </div><br></dl></dl></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H3"><i><a name="88464">6.2.1  &nbsp;&nbsp;VxWorks Includes Supplemental Debugging Routines for RIP</a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="88466"> </a>Provided with the RIP server are several routines that make debugging easier. The most often used is <b class="routine"><i class="routine">ripLogLevelBump</i></b><b>(&nbsp;)</b>, which enables tracing of packets and routing changes. Keep in mind that bumping the log level several times prints a lot of data to the console. Another routine is <b class="routine"><i class="routine">ripRouteShow</i></b><b>(&nbsp;)</b>, which prints the router's internal tables to the console.  The printed message provides the following information:</p></dl><dl class="margin"><ul class="BulletSingle" type="disc"><li><a name="88470"> </a>the route being advertised</li></ul><ul class="BulletSingle" type="disc"><li><a name="88471"> </a>the router that routes the packets</li></ul><ul class="BulletSingle" type="disc"><li><a name="88472"> </a>a subnet mask</li></ul><ul class="BulletSingle" type="disc"><li><a name="88476"> </a>the timeout on the route (in seconds)<sup><a href="#foot"><b class="FootnoteMarker">2</b></a></sup></li></ul><ul class="BulletSingle" type="disc"><li><a name="88518"> </a>the flags value (see <a href="c-drp2.html#88483">Table&nbsp;6-1</a>)<p class="table"><h4 class="EntityTitle"><a name="88483"><font face="Helvetica, sans-serif" size="-1" class="sans">Table 6-1:&nbsp;&nbsp;Flag Constants for <b class="routine"><i class="routine">ripRouteShow</i></b><b>(&nbsp;)</b> </font></a></h4><table border="0" cellpadding="0" cellspacing="0"><tr><td colspan="20"><hr class="tablerule"></td></tr><tr valign="middle"><th rowspan="1" colspan="1"><div class="CellHeading"><b><a name="88487"> </a><font face="Helvetica, sans-serif" size="-1" class="sans">Constant</font></b></div></th><td width="10">&nbsp;</td><th rowspan="1" colspan="1"><div class="CellHeading"><b><a name="88489"> </a><font face="Helvetica, sans-serif" size="-1" class="sans">Meaning</font></b></div></th><td width="10">&nbsp;</td></tr><tr><td colspan="20"><hr class="tablerule2"></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="88491"> </a><b class="symbol_UC">RTS_CHANGED </b></div></td><td width="10">&nbsp;</td><td colspan=1 rowspan=1><div class="CellBody"><a name="88493"> </a>Route has changed recently (within the last 30 seconds). </div></td><td width="10">&nbsp;</td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="88495"> </a><b class="symbol_UC">RTS_EXTERNAL </b></div></td><td width="10">&nbsp;</td><td colspan=1 rowspan=1><div class="CellBody"><a name="88497"> </a>Route should propagate to other routers. </div></td><td width="10">&nbsp;</td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="88499"> </a><b class="symbol_UC">RTS_INTERNAL </b></div></td><td width="10">&nbsp;</td><td colspan=1 rowspan=1><div class="CellBody"><a name="88501"> </a>Route is internal, do not propagate. </div></td><td width="10">&nbsp;</td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="88503"> </a><b class="symbol_UC">RTS_PASSIVE </b></div></td><td width="10">&nbsp;</td><td colspan=1 rowspan=1><div class="CellBody"><a name="88505"> </a>Route is on a passive interface (loopback).</div></td><td width="10">&nbsp;</td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="88507"> </a><b class="symbol_UC">RTS_INTERFACE </b></div></td><td width="10">&nbsp;</td><td colspan=1 rowspan=1><div class="CellBody"><a name="88509"> </a>Route is on a directly connected interface.</div></td><td width="10">&nbsp;</td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="88511"> </a><b class="symbol_UC">RTS_REMOTE </b></div></td><td width="10">&nbsp;</td><td colspan=1 rowspan=1><div class="CellBody"><a name="88513"> </a>Route is on a point to point link.</div></td><td width="10">&nbsp;</td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="88515"> </a><b class="symbol_UC">RTS_SUBNET </b></div></td><td width="10">&nbsp;</td><td colspan=1 rowspan=1><div class="CellBody"><a name="88517"> </a>Route is to a subnet (not a host).</div></td><td width="10">&nbsp;</td></tr><tr><td colspan="20"><hr class="tablerule"></td></tr><tr valign="middle"><td colspan="20"></td></tr></table></p></li></ul></dl><dl class="margin"><dd><p class="Body"><a name="88519"> </a>Routing information is pushed down into VxWorks's routing table periodically, but there can be periods when the two are out of sync.  This periodic updating (as opposed to continuous updating) avoids route thrashing, where transient routes are pushed into the system but then need to be removed immediately. </p></dl></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H3"><i><a name="88520">6.2.2  &nbsp;&nbsp;Configuring RIP </a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="88523"> </a>To include the RIP server, reconfigure the VxWorks image.  The relevant configuration macro is <b class="symbol_UC">INCLUDE_RIP</b>. The RIP server starts up when <b class="file">usrNetwork.c</b> calls <b class="routine"><i class="routine">ripLibInit</i></b><b>(&nbsp;)</b>.  This routine takes four parameters. You set the value of these parameters by editing the configuration and adjusting the following configuration items: </p></dl><dl class="margin"><dd><div class="Item"><a name="88526"> </a>    RIP Supplier Flag </div><dl class="margin"><dl class="margin"><dd><div class="Indent2"><a name="88527"> </a>Set to 1 tells the RIP server to send out routing information and updates no matter how many physical interfaces are attached to it. Setting this constant to 0 turns off this feature. (Configuration macro: <b class="symbol_UC">RIP_SUPPLIER</b>)</div><br></dl></dl><dd><div class="Item"><a name="88529"> </a>    RIP Gateway Flag </div><dl class="margin"><dl class="margin"><dd><div class="Indent2"><a name="88530"> </a>Set to 1 tells the server that it is a router to the greater Internet.  If this is not the case, set this constant to 0 (the default).  (Configuration macro: <b class="symbol_UC">RIP_GATEWAY</b>)</div><br></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/warning.gif"></td><td><hr><div class="CalloutCell"><a name="93039"><b class="symbol_UC"><font face="Helvetica, sans-serif" size="-1" class="sans">WARNING:  </font></b></a>Do not set <b class="symbol_UC">RIP_GATEWAY</b> to 1 unless this really is the general gateway.  Setting this to 1 makes the RIP server send a default route (0.0.0.0) out with every routing update. This tells all the other listening servers that this server is the default route for its subnet. This causes all packets to go to this router if they do not have a route that matches an existing entry in their routing table.</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><div class="Item"><a name="88542"> </a>    RIP Multicast Flag </div><dl class="margin"><dl class="margin"><dd><div class="Indent2"><a name="88543"> </a>Set to 1 tells the server to use the RIP multicast address (224.0.0.9) instead of using broadcasts.  This mode lowers the load on the network generated by the routing updates. Unfortunately, not all RIP server implementations (for example, BSD and SunOS routed) can handle multicasting. (Configuration macro: <b class="symbol_UC">RIP_MULTICAST</b>)</div><br></dl></dl><dd><div class="Item"><a name="88545"> </a>    RIP Version Number </div><dl class="margin"><dl class="margin"><dd><div class="Indent2"><a name="88546"> </a>Set to 1 tells the server to run just as a version 1 RIP router (as described in RFC 1058). Such a server ignores all version 2 packets as well as malformed version 1 packets. Set this constant to 2 to tell the server that it should send out version 2 packets and that it should listen for and process both version 1 and version 2 packets. If you set this constant to 2 and set the RIP Multicast Flag to 1, you put the server in full version 2 mode.  (Configuration macro: <b class="symbol_UC">RIP_VERSION</b>)</div><br></dl></dl><dd><div class="Item"><a name="88548"> </a>BSD 4.3 Compatible Sockets <b class="symbol_UC">  </b></div><dl class="margin"><dl class="margin"><dd><div class="Indent2"><a name="94392"> </a>Undefine this constant if you want to use RIP with VxWorks. By default, this constant is already defined.   (Configuration macro: <b class="symbol_UC">BSD43_COMPATIBLE</b>).  It is also automatically defined if VxWorks is configured to use sockets.  The relevant configuration macro is <b class="symbol_UC">INCLUDE_BSD_SOCKET</b>.</div><br></dl></dl></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/caution.gif"></td><td><hr><div class="CalloutCell"><a name="93505"><b class="symbol_UC"><font face="Helvetica, sans-serif" size="-1" class="sans">CAUTION:  </font></b></a>The RIP server does not support separate routing domains. Only routing domain 0, the default, is supported.</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="88558"> </a>In addition to setting the defines shown above, there are two alternate methods you can use to configure RIP: </p></dl><dl class="margin"><p class="listspace"><ul class="Bullet" type="disc"><li><a name="88560"> </a>Use the <b class="routine"><i class="routine">m2Rip </i></b>routines to configure RIP. These routines are documented in the reference entries. The parameters to these routines are also described in RFC-1389. </li></ul></p><p class="listspace"><ul class="Bullet" type="disc"><li><a name="88562"> </a>Use an SNMP agent to configure RIP. </li></ul></p></dl></dl><a name="foot"><hr></a><p class="FootnoteNumberMarker">1:&nbsp;<span class="Footnote"><a name="88451"> </a>A packet takes a <i class="term">hop</i> every time it crosses a subnet. If a packet leaves machine Q and must pass through two subnet routers before it reaches its destination on machine N, the number of hops is two. </span><p class="FootnoteNumberMarker">2:&nbsp;<span class="Footnote"><a name="88475"> </a>The timeout is the length of time for which the route remains current. If a route is not updated after 3 minutes, it is flushed from the routing table. </span><p class="navbar" align="right"><a href="index.html"><img border="0" alt="[Contents]" src="icons/contents.gif"></a><a href="c-drp.html"><img border="0" alt="[Index]" src="icons/index.gif"></a><a href="c-drp.html"><img border="0" alt="[Top]" src="icons/top.gif"></a><a href="c-drp1.html"><img border="0" alt="[Prev]" src="icons/prev.gif"></a><a href="c-drp3.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 + -