📄 node229.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>20.3 Some mac issues for diffusion in ns</TITLE><META NAME="description" CONTENT="20.3 Some mac issues for diffusion in ns"><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="node230.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node230.html"><LINK REL="previous" HREF="node228.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node228.html"><LINK REL="up" HREF="node226.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node226.html"><LINK REL="next" HREF="node230.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node230.html"></HEAD><BODY ><!--Navigation Panel--><A NAME="tex2html4776" HREF="node230.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node230.html"><IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="file:/usr/share/latex2html/icons/next.png"></A> <A NAME="tex2html4770" HREF="node226.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node226.html"><IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="file:/usr/share/latex2html/icons/up.png"></A> <A NAME="tex2html4764" HREF="node228.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node228.html"><IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="file:/usr/share/latex2html/icons/prev.png"></A> <A NAME="tex2html4772" 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="tex2html4774" 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="tex2html4777" HREF="node230.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node230.html">20.4 Ping: an example</A><B> Up:</B> <A NAME="tex2html4771" HREF="node226.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node226.html">20. Directed Diffusion</A><B> Previous:</B> <A NAME="tex2html4765" HREF="node228.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node228.html">20.2 The diffusion model</A>   <B> <A NAME="tex2html4773" HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html">Contents</A></B>   <B> <A NAME="tex2html4775" 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="SECTION031730000000000000000">20.3 Some mac issues for diffusion in ns</A></H1>First of all, all diffusion packets in ns are broadcasted. In the shim layer that sits between diffusion and ns, (see diffusion3/ns dir for code implementing this layer) all diffusion packets are encapsulated within ns packets and are marked to be broadcasted.<P>This can result in some problems at the mac layer. The mac-802.11 doesnot try to re-transmit a broadcast packet incase there is a collision and the packet is dropped. Coupled to this was the fact that mac-802.11 didn't do random selection of slots in the contention window before it transmitted a packet (a brdcast data or rts for unicast pkts). As a result there were a high number of collisions at the mac layer and a lot of packets were lost. This was fixed by adding random selection of slots before mac tx'ed a brdcast pkt (or a rts pkt).<P>However if we have a large and dense topology, there is a chance that two or more nodes may select the same slot in the mac contention window (the contention window size varies from 31 to 1023 for DSSS PHY MIB specifications). Thus now we need to add some extra jitters at the higher application layer. Diffusion has a provision to do this by compiling ns with the macro USE_BROADCAST_MAC. What this does is it in addition to delaying certain messages (to avoid collisions), when run with a BROADCAST MAC layer, diffusion will use a different set of values for delays and jitters. These different delay/jitter values are defined under diffusion3/lib/main/config.hh. Since this might increase the latency you might want to fine-tune the delay values by hand. <P><HR><!--Navigation Panel--><A NAME="tex2html4776" HREF="node230.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node230.html"><IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="file:/usr/share/latex2html/icons/next.png"></A> <A NAME="tex2html4770" HREF="node226.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node226.html"><IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="file:/usr/share/latex2html/icons/up.png"></A> <A NAME="tex2html4764" HREF="node228.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node228.html"><IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="file:/usr/share/latex2html/icons/prev.png"></A> <A NAME="tex2html4772" 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="tex2html4774" 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="tex2html4777" HREF="node230.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node230.html">20.4 Ping: an example</A><B> Up:</B> <A NAME="tex2html4771" HREF="node226.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node226.html">20. Directed Diffusion</A><B> Previous:</B> <A NAME="tex2html4765" HREF="node228.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node228.html">20.2 The diffusion model</A>   <B> <A NAME="tex2html4773" HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html">Contents</A></B>   <B> <A NAME="tex2html4775" 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 + -