📄 node203.html
字号:
<html><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><!--Converted with jLaTeX2HTML 2002 (1.62) JA patch-1.4patched version by: Kenshi Muto, Debian Project.LaTeX2HTML 2002 (1.62),original version by: Nikos Drakos, CBLU, University of Leeds* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan* with significant contributions from: Jens Lippmann, Marek Rouchal, Martin Wilck and others --><HTML><HEAD><TITLE>17.2.4 Routing </TITLE><META NAME="description" CONTENT="17.2.4 Routing "><META NAME="keywords" CONTENT="everything"><META NAME="resource-type" CONTENT="document"><META NAME="distribution" CONTENT="global"><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"><META NAME="Generator" CONTENT="jLaTeX2HTML v2002 JA patch-1.4"><META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"><LINK REL="STYLESHEET" HREF="everything.css" tppabs="http://www.isi.edu/nsnam/ns/doc/everything.css"><LINK REL="next" HREF="node204.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node204.html"><LINK REL="previous" HREF="node202.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node202.html"><LINK REL="up" HREF="node199.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node199.html"><LINK REL="next" HREF="node204.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node204.html"></HEAD><BODY ><!--Navigation Panel--><A NAME="tex2html4404" HREF="node204.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node204.html"><IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="file:/usr/share/latex2html/icons/next.png"></A> <A NAME="tex2html4398" HREF="node199.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node199.html"><IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="file:/usr/share/latex2html/icons/up.png"></A> <A NAME="tex2html4392" HREF="node202.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node202.html"><IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="file:/usr/share/latex2html/icons/prev.png"></A> <A NAME="tex2html4400" HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html"><IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="file:/usr/share/latex2html/icons/contents.png"></A> <A NAME="tex2html4402" HREF="node590.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node590.html"><IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="file:/usr/share/latex2html/icons/index.png"></A> <BR><B> Next:</B> <A NAME="tex2html4405" HREF="node204.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node204.html">17.2.5 Trace support</A><B> Up:</B> <A NAME="tex2html4399" HREF="node199.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node199.html">17.2 Using the satellite</A><B> Previous:</B> <A NAME="tex2html4393" HREF="node202.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node202.html">17.2.3 Handoffs</A>   <B> <A NAME="tex2html4401" HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html">Contents</A></B>   <B> <A NAME="tex2html4403" HREF="node590.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node590.html">Index</A></B> <BR><BR><!--End of Navigation Panel--><H2><A NAME="SECTION031424000000000000000"></A><A NAME="sec:satellite_usage_routing"></A><BR>17.2.4 Routing </H2><P>The current status of routing is that it is incomplete. Ideally, one shouldbe able to run all existing routing protocols over satellite links. However,many of the existing routing protocols implemented in OTcl require thatthe conventional links be used. Contributions in this area are welcome,but unfortunately it is not a trivial change.<P>With that being said, the current routing implementation is similar toSession routing described in Chapter <A HREF="node286.html#chap:unicast" tppabs="http://www.isi.edu/nsnam/ns/doc/node286.html#chap:unicast">26</A>, except that itis implemented entirely in C++. Upon each topology change, a centralizedrouting genie determines the global network topology, computes new routesfor all nodes, and uses the routes to builda forwarding table on each node. Currently,the slot table is kept by a routing agent on each node, and packets not destined for agents on the node are sent by default to this routing agent. For each destination for which the node has a route, the forwardingtable contains a pointer to the head of the corresponding outgoing link.As noted in Chapter <A HREF="node286.html#chap:unicast" tppabs="http://www.isi.edu/nsnam/ns/doc/node286.html#chap:unicast">26</A>, the user is cautioned that this type of centralized routing can lead to minor causality violations.<P>The routing genie is a <TT>class SatRouteObject</TT> and is created andinvoked with the following OTcl commands:<PRE>set satrouteobject_ [new SatRouteObject]$satrouteobject_ compute_routes</PRE>where the call to <TT>compute_routes</TT> is performed after all of thelinks and nodes in the simulator have been instantiated.Like the <TT>Scheduler</TT>, there is one instance of a SatRouteObject in thesimulation, and it is accessed by means of an instance variable in C++.For example, the call to recompute routes after a topology change is:<PRE>SatRouteObject::instance().recompute();</PRE><P>Despite the current use of centralized routing, the design of havinga routing agent on each node was mainly done with distributed routing in mind. Routing packets can be sent to port 255 of each node. The keyto distributed routing working correctly is for the routing agent tobe able to determine from which link a packet arrived. This is accomplished by theinclusion of a <TT>class NetworkInterface</TT> object in each link, whichuniquely labels the link on which the packet arrived. A helper function<TT>NsObject* intf_to_target(int label)</TT> can be used to return the head of thelink corresponding to a given label. The use of routing agents parallelsthat of the mobility extensions, and the interested reader can turn tothose examples to see how to implement distributed routing protocols inthis framework.<P>The shortest-path route computations use the current propagation delay ofa link as the cost metric. It is possible to compute routes using onlythe hop count and not the propagation delays; in order to do so, setthe following default variable to "false":<PRE>SatRouteObject set metric_delay_ "true"</PRE><P>Finally, for very large topologies (such as the Teledesic example), the centralized routing code will produce a very slow runtime because it executesan all-pairs shortest path algorithm upon each topology change even ifthere is no data currently being sent. To speed up simulations in whichthere is not much data transfer but there are lots of satellites andISLs, one can disable <EM>handoff-driven</EM> and enable <EM>data-driven</EM> route computations. With data-driven computations, routes are computedonly when there is a packet to send, and furthermore, a single-sourceshortest-path algorithm (only for the node with a packet to send) is executed instead of an all-pairs shortest path algorithm. The followingOTcl variable can configure this option (which is set to "false" bydefault):<PRE>SatRouteObject set data_driven_computation_ "false"</PRE><P><HR><!--Navigation Panel--><A NAME="tex2html4404" HREF="node204.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node204.html"><IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="file:/usr/share/latex2html/icons/next.png"></A> <A NAME="tex2html4398" HREF="node199.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node199.html"><IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="file:/usr/share/latex2html/icons/up.png"></A> <A NAME="tex2html4392" HREF="node202.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node202.html"><IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="file:/usr/share/latex2html/icons/prev.png"></A> <A NAME="tex2html4400" HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html"><IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="file:/usr/share/latex2html/icons/contents.png"></A> <A NAME="tex2html4402" HREF="node590.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node590.html"><IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="file:/usr/share/latex2html/icons/index.png"></A> <BR><B> Next:</B> <A NAME="tex2html4405" HREF="node204.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node204.html">17.2.5 Trace support</A><B> Up:</B> <A NAME="tex2html4399" HREF="node199.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node199.html">17.2 Using the satellite</A><B> Previous:</B> <A NAME="tex2html4393" HREF="node202.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node202.html">17.2.3 Handoffs</A>   <B> <A NAME="tex2html4401" HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html">Contents</A></B>   <B> <A NAME="tex2html4403" HREF="node590.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node590.html">Index</A></B> <!--End of Navigation Panel--><ADDRESS>2003-09-23</ADDRESS></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -