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

📄 agents.tex

📁 柯老师网站上找到的
💻 TEX
📖 第 1 页 / 共 3 页
字号:
Null objects are a subclass of agent objects that implement a trafficsink. They inherit all of the generic agent object functionality. Thereare no methods specific to this object. The state variables are:\begin{itemize}\item sport\_\item dport\_\end{itemize}\item[LossMonitor Objects]LossMonitor objects are a subclass of agent objects that implement atraffic sink which also maintains some statistics about the received datae.g., number of bytes received, number of packets lost etc. They inheritall of the generic agent object functionality. \code{$lossmonitor clear}\\Resets the expected sequence number to -1. State Variables are:\begin{description}\item[nlost\_] Number of packets lost. \item[npkts\_] Number of packets received. \item[bytes\_] Number of bytes received. \item[lastPktTime\_] Time at which the last packet was received. \item[expected\_] The expected sequence number of the next packet. \end{description}\item[TCP objects]TCP objects are a subclass of agent objects that implement the BSD TahoeTCP transport protocol as described in paper: "Fall, K., and Floyd, S.Comparisons of Tahoe, Reno, and Sack TCP. December 1995." URL ftp://ftp.ee.lbl.gov/papers/sacks.ps.Z. They inheritall of the generic agent functionality. Configuration Parameters are:\begin{description}\item[window\_] The upper bound on the advertised window for the TCPconnection. \item[maxcwnd\_]The upper bound on the congestion window for the TCP connection. Set tozero to ignore. (This is the default.) \item[windowInit\_]The initial size of the congestion window on slow-start. \item[windowOption\_]The algorithm to use for managing the congestion window. \item[windowThresh\_]Gain constant to exponential averaging filter used to compute awnd (seebelow). For investigations of different window-increase algorithms. \item[overhead\_]The range of a uniform random variable used to delay each output packet.The idea is to insert random delays at the source in order to avoid phaseeffects, when desired [see Floyd, S., and Jacobson, V. On Traffic PhaseEffects in Packet-Switched Gateways. Internetworking: Research andExperience, V.3 N.3, September 1992. pp. 115-156 ]. This has only beenimplemented for the Tahoe ("tcp") version of tcp, not for tcp-reno. Thisis not intended to be a realistic model of CPU processing overhead. \item[ecn\_] Set to true to use explicit congestion notification inaddition to packet drops to signal congestion. This allows a FastRetransmit after a quench() due to an ECN (explicit congestionnotification) bit. \item[packetSize\_]The size in bytes to use for all packets from this source. \item[tcpTick\_]The TCP clock granularity for measuring roundtrip times. Note that it isset by default to the non-standard value of 100ms. \item[bugFix\_]Set to true to remove a bug when multiple fast retransmits are allowed forpackets dropped in a single window of data. \item[maxburst\_]Set to zero to ignore. Otherwise, the maximum number of packets that thesource can send in response to a single incoming ACK. \item[slow\_start\_restart\_]Set to 1 to slow-start after the connection goes idle. On by default. \end{description}Defined Constants are:\begin{description}\item[MWS] The Maximum Window Size in packets for a TCP connection. MWSdetermines the size of an array in tcp-sink.cc. The default for MWS is1024 packets. For Tahoe TCP, the "window" parameter, representing thereceiver's advertised window, should be less than MWS-1. For Reno TCP, the"window" parameter should be less than (MWS-1)/2. \end{description}State Variables are:\begin{description}\item[dupacks\_]Number of duplicate acks seen since any new data was acknowledged. \item[seqno\_]Highest sequence number for data from data source to TCP. \item[t\_seqno\_]Current transmit sequence number. \item[ack\_] Highest acknowledgment seen from receiver. cwnd\_Current value of the congestion window. \item[awnd\_]Current value of a low-pass filtered version of the congestion window. Forinvestigations of different window-increase algorithms. \item[ssthresh\_]Current value of the slow-start threshold. \item[rtt\_] Round-trip time estimate. \item[srtt\_]Smoothed round-trip time estimate. \item[rttvar\_]Round-trip time mean deviation estimate. \item[backoff\_]Round-trip time exponential backoff constant. \end{description}\item[TCP/Reno Objects]TCP/Reno objects are a subclass of TCP objects that implement the Reno TCPtransport protocol described in paper: "Fall, K., and Floyd, S.Comparisons of Tahoe, Reno, and Sack TCP. December 1995." URL ftp://ftp.ee.lbl.gov/papers/sacks.ps.Z. There are no methods,configuration parameters or state variables specific to this object. \item[TCP/Newreno Objects]TCP/Newreno objects are a subclass of TCP objects that implement amodified version of the BSD Reno TCP transport protocol. There are no methods or state variables specific to this object. Configuration Parameters are:\begin{description}\item[newreno\_changes\_]Set to zero for the default NewReno described in "Fall, K., and Floyd, S.Comparisons of Tahoe, Reno, and Sack TCP. December 1995". Set to 1 foradditional NewReno algorithms [see Hoe, J., Improving the Start-upBehavior of a Congestion Control Scheme for TCP. in SIGCOMM 96, August1996, pp. 270-280. URL http://www.acm.org/sigcomm/sigcomm96/papers/hoe.html.]; this includes theestimation of the ssthresh parameter during slow-start. \end{description}\item[TCP/Vegas Objects]There are no methods or configuration parameters specific to thisobject. State variables are:\begin{itemize}\item v\_alpha\_\item v\_beta\_\item v\_gamma\_\item v\_rtt\_\end{itemize}\item[TCP/Sack1 Objects]TCP/Sack1 objects are a subclass of TCP objects that implement the BSDReno TCP transport protocol with Selective Acknowledgement Extensionsdescribed in "Fall, K., and Floyd, S. Comparisons of Tahoe, Reno, andSack TCP. December 1995". URL ftp:// ftp.ee.lbl.gov/papers/sacks.ps.Z. They inherit all of the TCP object functionality. There are no methods,configuration parameters or state variables specific to this object. \item[TCP/FACK Objects]TCP/Fack objects are a subclass of TCP objects that implement the BSD RenoTCP transport protocol with Forward Acknowledgement congestion control. They inherit all of the TCP object functionality. There are no methods orstate variables specific to this object. Configuration Parameters are:\begin{description}\item[ss-div4]Overdamping algorithm. Divides ssthresh by 4 (instead of 2) if congestionis detected within 1/2 RTT of slow-start. (1=Enable, 0=Disable) \item[rampdown]Rampdown data smoothing algorithm. Slowly reduces congestion window ratherthan instantly halving it. (1=Enable, 0=Disable) \end{description}\item[TCP/FULLTCP Objects]This section has not yet been added here. The implementationand the configuration parameters are described in paper: "Fall, K.,Floyd, S., and Henderson, T., Ns Simulator Tests for Reno FullTCP.July, 1997." URL ftp://ftp.ee.lbl.gov/papers/fulltcp.ps. \item[TCPSINK Objects]TCPSink objects are a subclass of agent objects that implement a receiverfor TCP packets. The simulator only implements "one-way" TCP connections,where the TCP source sends data packets and the TCP sink sends ACKpackets. TCPSink objects inherit all of the generic agent functionality.There are no methods or state variables specific to the TCPSink object. Configuration Parameters are\begin{description}\item[packetSize\_]The size in bytes to use for all acknowledgment packets. \item[maxSackBlocks\_]The maximum number of blocks of data that can be acknowledged in a SACKoption. For a receiver that is also using the time stamp option [RFC1323], the SACK option specified in RFC 2018 has room to include threeSACK blocks. This is only used by the TCPSink/Sack1 subclass. This valuemay not be increased within any particular TCPSink object after thatobject has been allocated. (Once a TCPSink object has been allocated, thevalue of this parameter may be decreased but not increased). \end{description}\item[TCPSINK/DELACK Objects]DelAck objects are a subclass of TCPSink that implement a delayed-ACKreceiver for TCP packets. They inherit all of the TCPSink objectfunctionality. There are no methods or state variables specific to theDelAck object. Configuration Parameters are:\begin{description}\item[interval\_]The amount of time to delay before generating an acknowledgment for asingle packet. If another packet arrives before this time expires,generate an acknowledgment immediately. \end{description}\item[TCPSINK/SACK1 Objects]TCPSink/Sack1 objects are a subclass of TCPSink that implement a SACKreceiver for TCP packets. They inherit all of the TCPSink objectfunctionality. There are no methods, configuration parameters or statevariables specific to this object. \item[TCPSINK/SACK1/DELACK Objects]TCPSink/Sack1/DelAck objects are a subclass of TCPSink/Sack1 thatimplement a delayed-SACK receiver for TCP packets. They inherit all of theTCPSink/Sack1 object functionality. There are no methods or statevariables specific to this object. Configuration Parameters are:\begin{description}\item[interval\_]The amount of time to delay before generating an acknowledgment for asingle packet. If another packet arrives before this time expires,generate an acknowledgment immediately. \end{description}\end{description}\section{Commands at a glance}\label{sec:agentscommand}Following are the agent related commands used in simulation scripts:\begin{flushleft}\code{ns_ attach-agent <node> <agent>}\\This command attaches the <agent> to the <node>. We assume here that the<agent> has already been created. An agent is typically created by\code{set agent [new Agent/AgentType]}where Agent/AgentType defines the class definiton of the specified agenttype.\code{$agent port}\\This returns the port number to which the agent is attached.\code{$agent dst-port}\\This returns the port number of the destination.When any connection is setup between 2 nodes, each agent stores the destination port in its instance variable called \code{dst_port_}.\code{$agent attach-app <s_type>}\\This commands attaches an application of type \code{<s_type>} to the agent.A handle to the application object is returned. Also note that the applicationtype must be defined as a packet type in packet.h.\code{$agent attach-source <s_type>}\\This used to be the procedure to attach source of type \code{<s_type>} tothe agent. But this is obsolete now. Use attach-app (described above)instead.\code{$agent attach-tbf <tbf>}\\Attaches a token bucket filter (tbf) to the agent.\code{$ns_ connect <src> <dst>}\\Sets up a connection between the src and dst agents. \code{$ns_ create-connection <srctype> <src> <dsttype> <dst> <pktclass>}\\This sets up a complete connection between two agents. First creates a sourceof type <srctype> and binds it to <src>. Then creates a destination of type<dsttype> and binds it to <dst>. Finally connects the src and dst agents andreturns a handle to the source agent.\code{$ns_ create-connection-list <srctype> <src> <dsttype> <dst> <pktclass>}\\This command is exactly similar to create-connection described above. Butinstead of returning only the source-agent, this returns a list of source anddestination agents.Internal procedures:\code{$ns_ simplex-connect <src> <dst>}\\This is an internal method that actually sets up an unidirectional connectionbetween the <src> agent and <dst> agent. It simply sets the destination addressand destination port of the <src> as <dst>'s agent-address and agent-port.The "connect" described above calls this method twice to set up a bi-directionalconnection between the src and dst.\code{$agent set <args>}\\This is an internal procedure used to inform users of the backward compatibilityissues resulting from the upgrade to 32-bit addressing space currently usedin \ns.\code{$agent attach-trace <file>}\\This attaches the <file> to the agent to allow nam-tracing of the agentevents.In addition to the agent related procedures described here, there are additionalmethods that support different type of agents like Agent/Null, Agent/TCP,Agent/CBR, Agent/TORA, Agent/mcast etc. These additional methods alongwith the procedures described here can be found in \ns/tcl/lib/(ns-agent.tcl,ns-lib.tcl, ns-mip.tcl, ns-mobilenode.tcl, ns-namsupp.tcl, ns-queue.tcl,ns-route.tcl, ns-sat.tcl, ns-source.tcl). They are also described in theprevious section.\end{flushleft} \endinput

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -