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

📄 node54.html

📁 相关搜索: ns2仿真结果分析 all-awk ns2 ns2 无限网络中awk文件 ... [2.tcl.rar] - 在ns2平台上实现对AODV协议的模拟
💻 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>5.5.1 Routing Module</TITLE><META NAME="description" CONTENT="5.5.1 Routing Module"><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="node55.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node55.html"><LINK REL="previous" HREF="node53.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node53.html"><LINK REL="up" HREF="node53.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node53.html"><LINK REL="next" HREF="node55.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node55.html"></HEAD><BODY ><!--Navigation Panel--><A NAME="tex2html2143"  HREF="node55.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node55.html"><IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="file:/usr/share/latex2html/icons/next.png"></A> <A NAME="tex2html2137"  HREF="node53.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node53.html"><IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="file:/usr/share/latex2html/icons/up.png"></A> <A NAME="tex2html2131"  HREF="node53.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node53.html"><IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="file:/usr/share/latex2html/icons/prev.png"></A> <A NAME="tex2html2139"  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="tex2html2141"  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="tex2html2144"  HREF="node55.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node55.html">5.5.2 Node Interface</A><B> Up:</B> <A NAME="tex2html2138"  HREF="node53.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node53.html">5.5 Routing Module and</A><B> Previous:</B> <A NAME="tex2html2132"  HREF="node53.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node53.html">5.5 Routing Module and</A> &nbsp <B>  <A NAME="tex2html2140"  HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html">Contents</A></B>  &nbsp <B>  <A NAME="tex2html2142"  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="SECTION03251000000000000000">5.5.1 Routing Module</A></H2><P>In general, every routing implementation in  consists of threefunction blocks: <UL><LI><EM>Routing agent</EM> exchanges routing packet with neighbors, </LI><LI><EM>Route logic</EM> uses the information gathered by routing  agents (or the global topology database in the case of static  routing) to perform the actual route computation, </LI><LI><EM>Classifiers</EM> sit inside a Node. They use the computed  routing table to perform packet forwarding.</LI></UL>Notice that when implementing a new routing protocol, one does notnecessarily implement all of these three blocks.For instance, when one implements a link state routing protocol, onesimply implement a routing agent that exchanges information in thelink state manner, and a route logic that does Dijkstra on theresulting topology database. It can then use the same classifiers as other unicast routingprotocols.<P><DIV ALIGN="CENTER"><A NAME="fig:node:rtmodule"></A><A NAME="1901"></A><TABLE><CAPTION ALIGN="BOTTOM"><STRONG>Figure 5.3:</STRONG>Interaction among node, routing module, and routing. The      dashed line shows the details of one routing module.</CAPTION><TR><TD><DIV ALIGN="CENTER">rtmodule    </DIV></TD></TR></TABLE></DIV><P>When a new routing protocol implementation includes more than onefunction blocks, especially when it contains its own classifier, it isdesirable to have another object, which we call a <EM>routing module</EM>, that manages all these function blocks and to interface with node to organize its classifiers.Figure&nbsp;<A HREF="node54.html#fig:node:rtmodule" tppabs="http://www.isi.edu/nsnam/ns/doc/node54.html#fig:node:rtmodule">5.3</A> shows functional relation among theseobjects.Notice that routing modules may have direct relationship with routecomputation blocks, i.e., route logic and/or routing agents.However, route computation MAY not install their routes directlythrough a routing module, because there may exists other modules thatare interested in learning about the new routes.This is not a requirement, however, because it is possible that someroute computation is specific to one particular routing module, forinstance, label installation in the MPLS module. <P>A routing module contains three major functionalities:<OL><LI>A routing module initializes its connection to a node through  []register, and tears the connection down via  []unregister.  Usually, in []register a routing module (1) tells the node  whether it  interests in knowing route updates and transport agent attachments,  and (2) creates its classifiers and install them in the node  (details described in the next subsection).  In []unregister a routing module does the exact opposite: it  deletes its classifiers and removes its hooks on routing update in  the node.</LI><LI>If a routing module is interested in knowing routing updates, the  node will inform the module via <BR>  [dst, target]RtModule::add-route and  [dst, nullagent]RtModule::delete-route.</LI><LI>If a routing module is interested in learning about transport agent  attachment and detachment in a node, the node will inform the module  via <BR>  [agent, port]RtModule::attach and  [agent, nullagent]RtModule::detach.</LI></OL><P>There are two steps to write your own routing module:<OL><LI>You need to declare the C++ part of your routing  module (see rtmodule.{cc,h}). For many modules this only  means to declare a virtual method <TT>name()</TT> which returns a  string descriptor of the module. However, you are free to implement  as much functionality as you like in C++; if necessary you may  later move functionality from OTcl into C++ for better performance. </LI><LI>You need to look at the above interfaces implemented in the base  routing module (see tcl/lib/ns-rtmodule.tcl) and decide which  one you'll inherit, which one you'll override, and put them in OTcl  interfaces of your own module. </LI></OL>There are several derived routing module examples intcl/lib/ns-rtmodule.tcl, which may serve as templates for yourmodules.<P>Currently, there are six routing modules implemented in :<BR><P></P><DIV ALIGN="CENTER"><A NAME="1928"></A><TABLE><CAPTION><STRONG>Table 5.2:</STRONG>Available routing modules</CAPTION><TR><TD>  <DIV ALIGN="CENTER"><TABLE CELLPADDING=3 BORDER="1" ALIGN="CENTER"><TR><TD ALIGN="CENTER">Module Name</TD><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=360>Functionality</TD></TR><TR><TD ALIGN="CENTER">RtModule/Base</TD><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=360>Interface to unicast routing protocols. Provide        basic functionality to add/delete route and attach/detach        agents.</TD></TR><TR><TD ALIGN="CENTER">RtModule/Mcast</TD><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=360>Interface to multicast routing protocols. Its        only purpose is establishes multicast classifiers. All other        multicast functionalities are implemented as instprocs of        Node. This should be converted in the future.</TD></TR><TR><TD ALIGN="CENTER">RtModule/Hier</TD><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=360>Hierarchical routing. It's a wrapper for        managing hierarchical classifiers and route installation. Can        be combined with other routing protocols, e.g., ad hoc        routing.</TD></TR><TR><TD ALIGN="CENTER">RtModule/Manual</TD><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=360>Manual routing.</TD></TR><TR><TD ALIGN="CENTER">RtModule/VC</TD><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=360>Uses virtual classifier instead of vanilla        classifier.</TD></TR><TR><TD ALIGN="CENTER">RtModule/MPLS</TD><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=360>Implements MPLS functionality. This is the only        existing module that is completely self-contained and does not        pollute the Node namespace.</TD></TR></TABLE>        <A NAME="tab:node:rtmodule"></A>  </DIV></TD></TR></TABLE></DIV><P></P><BR><P><HR><!--Navigation Panel--><A NAME="tex2html2143"  HREF="node55.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node55.html"><IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="file:/usr/share/latex2html/icons/next.png"></A> <A NAME="tex2html2137"  HREF="node53.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node53.html"><IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="file:/usr/share/latex2html/icons/up.png"></A> <A NAME="tex2html2131"  HREF="node53.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node53.html"><IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="file:/usr/share/latex2html/icons/prev.png"></A> <A NAME="tex2html2139"  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="tex2html2141"  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="tex2html2144"  HREF="node55.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node55.html">5.5.2 Node Interface</A><B> Up:</B> <A NAME="tex2html2138"  HREF="node53.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node53.html">5.5 Routing Module and</A><B> Previous:</B> <A NAME="tex2html2132"  HREF="node53.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node53.html">5.5 Routing Module and</A> &nbsp <B>  <A NAME="tex2html2140"  HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html">Contents</A></B>  &nbsp <B>  <A NAME="tex2html2142"  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 + -