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

📄 node316.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>27.1 Multicast API</TITLE><META NAME="description" CONTENT="27.1 Multicast API"><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="node323.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node323.html"><LINK REL="previous" HREF="node315.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node315.html"><LINK REL="up" HREF="node315.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node315.html"><LINK REL="next" HREF="node317.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node317.html"></HEAD><BODY ><!--Navigation Panel--><A NAME="tex2html6184"  HREF="node317.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node317.html"><IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="file:/usr/share/latex2html/icons/next.png"></A> <A NAME="tex2html6178"  HREF="node315.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node315.html"><IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="file:/usr/share/latex2html/icons/up.png"></A> <A NAME="tex2html6172"  HREF="node315.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node315.html"><IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="file:/usr/share/latex2html/icons/prev.png"></A> <A NAME="tex2html6180"  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="tex2html6182"  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="tex2html6185"  HREF="node317.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node317.html">27.1.1 Multicast Behavior Monitor</A><B> Up:</B> <A NAME="tex2html6179"  HREF="node315.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node315.html">27. Multicast Routing</A><B> Previous:</B> <A NAME="tex2html6173"  HREF="node315.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node315.html">27. Multicast Routing</A> &nbsp <B>  <A NAME="tex2html6181"  HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html">Contents</A></B>  &nbsp <B>  <A NAME="tex2html6183"  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="SECTION05210000000000000000"></A><A NAME="sec:mcast-api"></A><BR>27.1 Multicast API</H1><P>Multicast forwarding requires enhancementsto the nodes and links in the topology.Therefore, the user must specify multicast requirementsto the Simulator class before creating the topology.This is done in one of two ways:<PRE>        set ns [new Simulator -multicast on]    {\rm or}        set ns [new Simulator]        $ns multicast</PRE>                   When multicast extensions are thus enabled, nodes will be created withadditional classifiers and replicators for multicast forwarding, andlinks will contain elements to assign incoming interface labels to allpackets entering a node.<P>A multicast routing strategy is the mechanism by whichthe multicast distribution tree is computed in the simulation. supports three multiast route computation strategies:        centralised, dense mode(DM) or shared tree mode(ST).<P>The method []mrtproto in the Class Simulator specifies eitherthe route computation strategy, for centralised multicast routing, orthe specific detailed multicast routing protocol that should be used.<P>The following are examples of validinvocations of multicast routing in :<PRE>        set cmc [$ns mrtproto CtrMcast]    # specify centralized multicast for all nodes;        # cmc is the handle for multicast protocol object;        $ns mrtproto DM                   # specify dense mode multicast for all nodes;        $ns mrtproto ST                  # specify shared tree mode to run on all nodes;</PRE>Notice in the above examples that CtrMcast returns a handle that canbe used for additional configuration of centralised multicast routing.The other routing protocols will return a null string.  All thenodes in the topology will run instances of the same protocol.<P>Multiple multicast routing protocols can be run at a node, but in thiscase the user must specify which protocol owns which incominginterface.  For this finer control []mrtproto-iifs is used.<P>New/unused multicast address are allocated using the procedure[]allocaddr.<P>The agents use the instance procedures[]join-group and []leave-group, inthe class Node to join and leave multicast groups. These procedurestake two mandatory arguments. The first argument identifies thecorresponding agent and second argument specifies the group address.<P>An example of a relatively simple multicast configuration is:<PRE>        set ns [new Simulator {\bfseries{}-multicast on}] # enable multicast routing;        set group [{\bfseries{}Node allocaddr}]   # allocate a multicast address;        set node0 [$ns node]         # create multicast capable nodes;        set node1 [$ns node]        $ns duplex-link $node0 $node1 1.5Mb 10ms DropTail        set mproto DM          # configure multicast protocol;        set mrthandle [{\bfseries{}$ns mrtproto $mproto}] # all nodes will contain multicast protocol agents;        set udp [new Agent/UDP]         # create a source agent at node 0;        $ns attach-agent $node0 $udp         set src [new Application/Traffic/CBR]                $src attach-agent $udp        {\bfseries{}$udp set dst_addr_ $group}        {\bfseries{}$udp set dst_port_ 0}        set rcvr [new Agent/LossMonitor]  # create a receiver agent at node 1;        $ns attach-agent $node1 $rcvr        $ns at 0.3 "{\bfseries{}$node1 join-group $rcvr $group}" # join the group at simulation time 0.3 (sec);</PRE> <P><BR><HR><!--Table of Child-Links--><A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></A><UL><LI><A NAME="tex2html6186"  HREF="node317.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node317.html">27.1.1 Multicast Behavior Monitor Configuration</A><LI><A NAME="tex2html6187"  HREF="node318.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node318.html">27.1.2 Protocol Specific configuration</A><UL><LI><A NAME="tex2html6188"  HREF="node319.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node319.html">27.1.2.0.1 Centralized Multicast</A><LI><A NAME="tex2html6189"  HREF="node320.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node320.html">27.1.2.0.2 Dense Mode</A><LI><A NAME="tex2html6190"  HREF="node321.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node321.html">27.1.2.0.3 Shared Tree Mode</A><LI><A NAME="tex2html6191"  HREF="node322.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node322.html">27.1.2.0.4 Bi-directional Shared Tree Mode</A></UL></UL><!--End of Table of Child-Links--><HR><!--Navigation Panel--><A NAME="tex2html6184"  HREF="node317.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node317.html"><IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="file:/usr/share/latex2html/icons/next.png"></A> <A NAME="tex2html6178"  HREF="node315.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node315.html"><IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="file:/usr/share/latex2html/icons/up.png"></A> <A NAME="tex2html6172"  HREF="node315.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node315.html"><IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="file:/usr/share/latex2html/icons/prev.png"></A> <A NAME="tex2html6180"  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="tex2html6182"  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="tex2html6185"  HREF="node317.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node317.html">27.1.1 Multicast Behavior Monitor</A><B> Up:</B> <A NAME="tex2html6179"  HREF="node315.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node315.html">27. Multicast Routing</A><B> Previous:</B> <A NAME="tex2html6173"  HREF="node315.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node315.html">27. Multicast Routing</A> &nbsp <B>  <A NAME="tex2html6181"  HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html">Contents</A></B>  &nbsp <B>  <A NAME="tex2html6183"  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 + -