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

📄 node356.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>29.2 Usage of Hierarchical routing</TITLE><META NAME="description" CONTENT="29.2 Usage of Hierarchical 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="node357.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node357.html"><LINK REL="previous" HREF="node355.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node355.html"><LINK REL="up" HREF="node354.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node354.html"><LINK REL="next" HREF="node357.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node357.html"></HEAD><BODY ><!--Navigation Panel--><A NAME="tex2html6787"  HREF="node357.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node357.html"><IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="file:/usr/share/latex2html/icons/next.png"></A> <A NAME="tex2html6781"  HREF="node354.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node354.html"><IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="file:/usr/share/latex2html/icons/up.png"></A> <A NAME="tex2html6775"  HREF="node355.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node355.html"><IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="file:/usr/share/latex2html/icons/prev.png"></A> <A NAME="tex2html6783"  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="tex2html6785"  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="tex2html6788"  HREF="node357.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node357.html">29.3 Creating large Hierarchical</A><B> Up:</B> <A NAME="tex2html6782"  HREF="node354.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node354.html">29. Hierarchical Routing</A><B> Previous:</B> <A NAME="tex2html6776"  HREF="node355.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node355.html">29.1 Overview of Hierarchical</A> &nbsp <B>  <A NAME="tex2html6784"  HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html">Contents</A></B>  &nbsp <B>  <A NAME="tex2html6786"  HREF="node590.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node590.html">Index</A></B> <BR><BR><!--End of Navigation Panel--><H1><A NAME="SECTION05420000000000000000"></A><A NAME="sec:usage-hier-rtg"></A><BR>29.2 Usage of Hierarchical routing</H1> <P>Hierarchical routing requires some additional features and mechanismsfor the simualtion. For example, a new node object called <EM>HierNode</EM>is been defined for hier rtg. Therefore the user must specifyhierarchical routing requirements before creating topology. This is doneas shown below: <P>First, the address format (<A NAME="chap:address"></A> ) or the address spaceused for node and port address, needs to be set in the hierarchicalmode. It may be done in one of the two ways:<P><PRE>  set ns [new Simulator]  \$ns set-address-format hierarchical</PRE> <P>This sets the node address space to a 3 level hierarchy assigning 8 bitsin each level.<P>or,<PRE>  \$ns set-address-format hierarchical \&lt;n hierarchy levels\&gt; \&lt;\# bits in  level 1\&gt; ...\&lt;\# bits in nth level\&gt;</PRE> <P>which creates a node address space for n levels of hierarchy assigningbits as specified for every level.<P>This other than creating a hierarchical address space also sets a flagcalled <EM>EnableHierRt_</EM> and sets the Simulator class variablenode_factory_ to HierNode.  Therefore when nodes are created by calling Simulator method ``node'' asin :<P>$ns node 0.0.1,a HierNode is created with an address of 0.0.1;<P>Class AddrParams is used to store the topology hierarchy like numberof levels of hierarchy, number of areas in each level like number ofdomains, number of clusters and number of nodes in each cluster.<P>The API for supplying these information to AddrParams is shown below:<P><PRE>AddrParams set domain_num_ 2lappend cluster_num 2 2AddrParams set cluster_num_ \$cluster_numlappend eilastlevel 2 3 2 3AddrParams set nodes_num_ \$eilastlevel</PRE><P>This defines a topology with 2 domains, say D1 and D2 with 2 clusterseach (C11 &amp; C12 in D1 and C21 &amp; C22 in D2). Then number of nodes ineach of these 4 clusters is specified as 2,3,2 and 3 respectively.<P>The default values used by AddrParams provide a topology with a singledomain with 4 clusters, with each cluster consisting of 5 nodes.<P>Appropriate mask and shift values are generated by AddrParams for thehierarchical node address space.<P>Each HierNode at the time of its creation calls the method`mk-default-classifier '' to setup n numbers of addressclassifiers for n levels of hierarchy defined in the topology.<P><PRE>  HierNode instproc mk-default-classifier {} {    \$self instvar np_ id_ classifiers_ agents_ dmux_ neighbor_ address_     # puts "id=\$id_"    set levels [AddrParams set hlevel_]    for {set n 1} {\$n \&lt;= \$levels} {incr n} {      set classifiers_(\$n) [new Classifier/Addr]      \$classifiers_(\$n) set mask_ [AddrParams set NodeMask_(\$n)]      \$classifiers_(\$n) set shift_ [AddrParams set NodeShift_(\$n)]      }    }</PRE><P>At the time of route computation, a call is made to add-route.add-route populates classifiers as shown in the otcl method below:<P><PRE>Node instproc add-route { dst target } { 	\$self instvar rtnotif_	# Notify every module that is interested about this 	# route installation		if {\$rtnotif_ != ""} {		\$rtnotif_ add-route \$dst \$target	}	\$self incr-rtgtable-size}</PRE><P>For an example of 3 level of hierarchy, the level 1 classifier demuxesfor domains, level 2 for all clusters inside the node's domain andfinally classifier 3 demuxes for all nodes in the particular clusterthat the node itself resides. For such a topology, a HierNode withaddress of 0.1.2 looks like the figure below:<DIV ALIGN="CENTER"><A NAME="fig:hier-classifier"></A><A NAME="13364"></A><TABLE><CAPTION ALIGN="BOTTOM"><STRONG>Figure 29.1:</STRONG>Hierarchical classifiers</CAPTION><TR><TD><DIV ALIGN="CENTER">hier-classifier</DIV></TD></TR></TABLE></DIV><P>Thus the size of the routing tables are considerably reduced from  as seen for flat routing where each node had to store the  next_hop info of all other nodes in the topology. Instead, for  hierarchical routing, a given node needs to know about its neighbours  in its own cluster, about the all clusters in its domain and about all  the domains. This saves on memory consumption as well as run-time for  the simulations using several thousands of nodes in their topology.<P><HR><!--Navigation Panel--><A NAME="tex2html6787"  HREF="node357.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node357.html"><IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="file:/usr/share/latex2html/icons/next.png"></A> <A NAME="tex2html6781"  HREF="node354.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node354.html"><IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="file:/usr/share/latex2html/icons/up.png"></A> <A NAME="tex2html6775"  HREF="node355.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node355.html"><IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="file:/usr/share/latex2html/icons/prev.png"></A> <A NAME="tex2html6783"  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="tex2html6785"  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="tex2html6788"  HREF="node357.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node357.html">29.3 Creating large Hierarchical</A><B> Up:</B> <A NAME="tex2html6782"  HREF="node354.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node354.html">29. Hierarchical Routing</A><B> Previous:</B> <A NAME="tex2html6776"  HREF="node355.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node355.html">29.1 Overview of Hierarchical</A> &nbsp <B>  <A NAME="tex2html6784"  HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html">Contents</A></B>  &nbsp <B>  <A NAME="tex2html6786"  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 + -