📄 node78.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>7.5.2.3 Marking the traffic</TITLE><META NAME="description" CONTENT="7.5.2.3 Marking the traffic"><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="previous" HREF="node77.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node77.html"><LINK REL="up" HREF="node75.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node75.html"><LINK REL="next" HREF="node79.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node79.html"></HEAD><BODY ><!--Navigation Panel--><A NAME="tex2html2517" HREF="node79.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node79.html"><IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="file:/usr/share/latex2html/icons/next.png"></A> <A NAME="tex2html2511" HREF="node75.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node75.html"><IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="file:/usr/share/latex2html/icons/up.png"></A> <A NAME="tex2html2507" HREF="node77.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node77.html"><IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="file:/usr/share/latex2html/icons/prev.png"></A> <A NAME="tex2html2513" 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="tex2html2515" 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="tex2html2518" HREF="node79.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node79.html">7.5.3 Tracing</A><B> Up:</B> <A NAME="tex2html2512" HREF="node75.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node75.html">7.5.2 Configuration</A><B> Previous:</B> <A NAME="tex2html2508" HREF="node77.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node77.html">7.5.2.2 Creating the JoBS</A>   <B> <A NAME="tex2html2514" HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html">Contents</A></B>   <B> <A NAME="tex2html2516" HREF="node590.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node590.html">Index</A></B> <BR><BR><!--End of Navigation Panel--><H3><A NAME="SECTION03452300000000000000">7.5.2.3 Marking the traffic</A></H3>Marking the traffic is handled by Marker objects. Markers are FIFO queues that set the class index of each packet. To ensure accuracy of the simulations, it is best to configure these queues to have a very large buffer, so that no packets are dropped in the Marker. Demarkers are used to gather end-to-end delay statistics.<PRE>{\bfseries{}$ns_ simplex-link $source $router(1) $bw $delay Marker} # set-up marker;$ns_ queue-limit $source $router(1) [expr $buff*10] # Select huge buffers for markers;$ns_ queue-limit $router(1) $source [expr $buff*10] # to avoid traffic drops; set q [$ns_ get-queue $source $router(1)] #in the marker;{\bfseries{}$q marker_type 2} # Statistical marker;{\bfseries{}$q marker_frc 0.1 0.2 0.3 0.4} # 10\% Class 1, 20\% Class 2, 30\% Class 3, 40\% Class 4.;{\bfseries{}$ns_ simplex-link $router(2) $sink $bw $delay Demarker} # set-up demarker;$ns_ queue-limit $router(2) $sink [expr $buff*10] {\bfseries{}$q trace-file e2e} # trace end-to-end delays to file e2e;</PRE>The remaining steps (attaching agents and traffic generators or applications to the nodes) are explained in Chapters <A HREF="node99.html#sec:agents" tppabs="http://www.isi.edu/nsnam/ns/doc/node99.html#sec:agents">10</A> and <A HREF="node471.html#chap:applications" tppabs="http://www.isi.edu/nsnam/ns/doc/node471.html#chap:applications">35</A>, and are handled as usual. We refer to these chapters and the example scripts provided with your <EM>ns</EM> distribution. <P><BR><HR><ADDRESS>2003-09-23</ADDRESS></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -