📄 node489.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>35.6 Commands at a glance</TITLE><META NAME="description" CONTENT="35.6 Commands at a glance"><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="node488.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node488.html"><LINK REL="up" HREF="node471.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node471.html"><LINK REL="next" HREF="node490.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node490.html"></HEAD><BODY ><!--Navigation Panel--><A NAME="tex2html8915" HREF="node490.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node490.html"><IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="file:/usr/share/latex2html/icons/next.png"></A> <A NAME="tex2html8909" HREF="node471.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node471.html"><IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="file:/usr/share/latex2html/icons/up.png"></A> <A NAME="tex2html8905" HREF="node488.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node488.html"><IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="file:/usr/share/latex2html/icons/prev.png"></A> <A NAME="tex2html8911" 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="tex2html8913" 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="tex2html8916" HREF="node490.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node490.html">36. Web cache as</A><B> Up:</B> <A NAME="tex2html8910" HREF="node471.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node471.html">35. Applications and transport</A><B> Previous:</B> <A NAME="tex2html8906" HREF="node488.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node488.html">35.5 Applications objects</A>   <B> <A NAME="tex2html8912" HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html">Contents</A></B>   <B> <A NAME="tex2html8914" 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="SECTION07160000000000000000"></A><A NAME="sec:appscommand"></A><BR>35.6 Commands at a glance</H1><P>Following are some transport agent and application related commandscommonly used in simulation scripts:<DIV ALIGN="LEFT"></DIV><PRE>set tcp1 [new Agent/TCP]\$ns\_ attach-agent \$node\_(src) \$tcp1set sink1 [new Agent/TCPSink]\$ns\_ attach-agent \$node\_(snk) \$sink1\$ns\_ connect \$tcp1 \$sink1</PRE><DIV ALIGN="LEFT">This creates a source tcp agent and a destination sink agent. Both the transportagents are attached to their resoective nodes. Finally an end-to-end connectionis setup between the src and sink.</DIV><P><DIV ALIGN="LEFT"></DIV><PRE>set ftp1 [new Application/FTP]\$ftp1 attach-agent \$agent</PRE><DIV ALIGN="LEFT">or<TT>set ftp1 [$agent attach-app FTP]</TT>Both the above commands achieve the same. An application (ftp in this example)is created and attached to the source agent. An application can be of twotypes, a traffic generator or a simulated application.Types of Traffic generators currently present are: Application/Traffic/Exponential, Application/Traffic/Pareto,Application/Traffic/CBR, and Application/Traffic/Trace. See section <A HREF="node479.html#sec:trafgenclass" tppabs="http://www.isi.edu/nsnam/ns/doc/node479.html#sec:trafgenclass">35.3</A>for details.Types of simulated applications currently implemented are:Application/FTP and Application/Telnet. See section <A HREF="node485.html#sec:simapps" tppabs="http://www.isi.edu/nsnam/ns/doc/node485.html#sec:simapps">35.4</A> fordetails.</DIV><P><DIV ALIGN="LEFT"></DIV><HR><!--Navigation Panel--><A NAME="tex2html8915" HREF="node490.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node490.html"><IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="file:/usr/share/latex2html/icons/next.png"></A> <A NAME="tex2html8909" HREF="node471.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node471.html"><IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="file:/usr/share/latex2html/icons/up.png"></A> <A NAME="tex2html8905" HREF="node488.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node488.html"><IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="file:/usr/share/latex2html/icons/prev.png"></A> <A NAME="tex2html8911" 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="tex2html8913" 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="tex2html8916" HREF="node490.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node490.html">36. Web cache as</A><B> Up:</B> <A NAME="tex2html8910" HREF="node471.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node471.html">35. Applications and transport</A><B> Previous:</B> <A NAME="tex2html8906" HREF="node488.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node488.html">35.5 Applications objects</A>   <B> <A NAME="tex2html8912" HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html">Contents</A></B>   <B> <A NAME="tex2html8914" 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 + -