📄 node401.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>31.8 Commands at a glance</TITLE><META NAME="description" CONTENT="31.8 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="node400.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node400.html"><LINK REL="up" HREF="node364.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node364.html"><LINK REL="next" HREF="node402.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node402.html"></HEAD><BODY ><!--Navigation Panel--><A NAME="tex2html7533" HREF="node402.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node402.html"><IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="file:/usr/share/latex2html/icons/next.png"></A> <A NAME="tex2html7527" HREF="node364.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node364.html"><IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="file:/usr/share/latex2html/icons/up.png"></A> <A NAME="tex2html7523" HREF="node400.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node400.html"><IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="file:/usr/share/latex2html/icons/prev.png"></A> <A NAME="tex2html7529" 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="tex2html7531" 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="tex2html7534" HREF="node402.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node402.html">32. SCTP Agents</A><B> Up:</B> <A NAME="tex2html7528" HREF="node364.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node364.html">31. TCP Agents</A><B> Previous:</B> <A NAME="tex2html7524" HREF="node400.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node400.html">31.7 One-Way Trace TCP</A>   <B> <A NAME="tex2html7530" HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html">Contents</A></B>   <B> <A NAME="tex2html7532" 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="SECTION06280000000000000000"></A><A NAME="sec:tcpcommand"></A><BR>31.8 Commands at a glance</H1><P>The following is a list of commands used to setup/manipulate TCP flowsfor simulations:<DIV ALIGN="LEFT"><TT>set tcp0 [new Agent/TCP]</TT><BR>This creates an instance of a TCP agent. There are several flavors ofTCP-sender and TCP-receiver (or sink) agent currently implemented in ns.TCP-senders currently available are:Agent/TCP, Agent/TCP/Reno, Agent/TCP/Newreno, Agent/TCP/Sack1, Agent/TCP/Vegas,Agent/TCP/Fack. <BR>TCP-receivers currently available are:Agent/TCPSink, Agent/TCPSink/DelAck, Agent/TCPSink/Sack1,Agent/TCPSink/Sack1/DelAck.<BR>There is also a two-way implementation of tcp called Agent/TCP/FullTcp. Fordetails on the different TCP flavors see earlier sections of this chapter.</DIV><P><DIV ALIGN="LEFT">Configuration parameters for TCP flows maybe set as follows:<BR><TT>$tcp set window_ wnd-size</TT><BR>For all possible configuration parameters available for TCP see section<A HREF="node373.html#sec:other-tcp-config" tppabs="http://www.isi.edu/nsnam/ns/doc/node373.html#sec:other-tcp-config">31.1.4</A>. The default configuration values can also befound in /tcl/lib/ns-default.tcl.</DIV><P><DIV ALIGN="LEFT">Following is an example of a simple TCP connection setup:</DIV><PRE>set tcp [new Agent/TCP] # create tcp agent;\$ns\_ attach-agent \$node\_(s1) \$tcp # bind src to node;\$tcp set fid\_ 0 # set flow ID field;set ftp [new Application/FTP] # create ftp traffic;\$ftp attach-agent \$tcp # bind ftp traffic to tcp agent;set sink [new Agent/TCPSink] # create tcpsink agent;\$ns\_ attach-agent \$node\_(k1) \$sink # bind sink to node;\$sink set fid\_ 0 # set flow ID field;\$ns\_ connect \$ftp \$sink # active connection src to sink;\$ns\_ at \$start-time "\$ftp start" # start ftp flow;</PRE><DIV ALIGN="LEFT"></DIV><P><DIV ALIGN="LEFT">For an example of setting up a full-tcp connection see section<A HREF="node388.html#sec:simpleconfig" tppabs="http://www.isi.edu/nsnam/ns/doc/node388.html#sec:simpleconfig">31.3.1</A>.</DIV><P><DIV ALIGN="LEFT"></DIV><HR><!--Navigation Panel--><A NAME="tex2html7533" HREF="node402.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node402.html"><IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="file:/usr/share/latex2html/icons/next.png"></A> <A NAME="tex2html7527" HREF="node364.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node364.html"><IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="file:/usr/share/latex2html/icons/up.png"></A> <A NAME="tex2html7523" HREF="node400.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node400.html"><IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="file:/usr/share/latex2html/icons/prev.png"></A> <A NAME="tex2html7529" 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="tex2html7531" 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="tex2html7534" HREF="node402.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node402.html">32. SCTP Agents</A><B> Up:</B> <A NAME="tex2html7528" HREF="node364.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node364.html">31. TCP Agents</A><B> Previous:</B> <A NAME="tex2html7524" HREF="node400.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node400.html">31.7 One-Way Trace TCP</A>   <B> <A NAME="tex2html7530" HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html">Contents</A></B>   <B> <A NAME="tex2html7532" 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 + -