Next:
1. Introduction
Up:
The Manual (formerly Notes
Previous:
The Manual (formerly Notes
Index
Contents
1. Introduction
2. Undocumented Facilities
1 Interface to the Interpreter
3. OTcl Linkage
3.1 Concept Overview
3.2 Code Overview
3.3 Class Tcl
3.3.1 Obtain a Reference to the class Tcl instance
3.3.2 Invoking OTcl Procedures
3.3.3 Passing Results to/from the Interpreter
3.3.4 Error Reporting and Exit
3.3.5 Hash Functions within the Interpreter
3.3.6 Other Operations on the Interpreter
3.4 Class TclObject
3.4.0.0.1 Differences from v1
3.4.0.0.2 Example configuration of a TclObject
3.4.1 Creating and Destroying TclObjects
3.4.1.0.1 Creating TclObjects
3.4.1.0.2 Deletion of TclObjects
3.4.2 Variable Bindings
3.4.3 Variable Tracing
3.4.4 command Methods: Definition and Invocation
3.5 Class TclClass
3.5.1 How to Bind Static C++ Class Member Variables
3.6 Class TclCommand
3.7 Class EmbeddedTcl
3.8 Class InstVar
2 Simulator Basics
4. The Class Simulator
4.1 Simulator Initialization
4.2 Schedulers and Events
4.2.1 The List Scheduler
4.2.2 the heap scheduler
4.2.3 The Calendar Queue Scheduler
4.2.4 The Real-Time Scheduler
4.3 Other Methods
5. Nodes and Packet Forwarding
5.1 Node Basics
5.2 Node Methods: Configuring the Node
5.2.0.0.1 Control functions
5.2.0.0.2 Address and Port number management
5.2.0.0.3 Agent management
5.2.0.0.4 Tracking Neighbors
5.3 Node Configuration Interface
5.4 The Classifier
5.4.1 Address Classifiers
5.4.2 Multicast Classifiers
5.4.3 MultiPath Classifier
5.4.4 Hash Classifier
5.4.5 Replicator
5.5 Routing Module and Classifier Organization
5.5.1 Routing Module
5.5.2 Node Interface
5.6 Commands at a glance
6. Links: Simple Links
6.1 Instance Procedures for Links and SimpleLinks
6.1.0.0.1 Link procedures
6.1.0.0.2 SimpleLink Procedures
6.2 Connectors
6.3 Object hierarchy
6.4 Commands at a glance
7. Queue Management and Packet Scheduling
7.1 The C++ Queue Class
7.1.1 Queue blocking
7.1.2 PacketQueue Class
7.2 Example: Drop Tail
7.3 Different types of Queue objects
7.4 Commands at a glance
7.5 Queue/JoBS
7.5.1 The JoBS algorithm
7.5.1.1 Objective
7.5.1.2 Mechanisms
7.5.2 Configuration
7.5.2.1 Initial Setup
7.5.2.2 Creating the JoBS links
7.5.2.3 Marking the traffic
7.5.3 Tracing
7.5.4 Variables
7.5.4.1 JoBS objects
7.5.4.2 Marker objects
7.5.4.3 Demarker objects
7.5.5 Commands at a glance
7.5.5.1 JoBS objects
7.5.5.2 Marker objects
7.5.5.3 Demarker objects
8. Delays and Links
8.1 The LinkDelay Class
8.2 Commands at a glance
9. Differentiated Services Module in
9.1 Overview
9.2 Implementation
9.2.1 RED queue in DiffServ module
9.2.2 Edge and core routers
9.2.3 Policy
9.3 Configuration
9.4 Commands at a glance
10. Agents
10.1 Agent state
10.2 Agent methods
10.3 Protocol Agents
10.4 OTcl Linkage
10.4.1 Creating and Manipulating Agents
10.4.2 Default Values
10.4.3 OTcl Methods
10.5 Examples: Tcp, TCP Sink Agents
10.5.1 Creating the Agent
10.5.2 Starting the Agent
10.5.3 Processing Input at Receiver
10.5.4 Processing Responses at the Sender
10.5.5 Implementing Timers
10.6 Creating a New Agent
10.6.1 Example: A ``ping'' requestor (Inheritance Structure)
10.6.2 The recv() and timeout() Methods
10.6.3 Linking the ``ping'' Agent with OTcl
10.6.4 Using the agent through OTcl
10.7 The Agent API
10.8 Different agent objects
10.9 Commands at a glance
11. Timers
11.1 C++ abstract base class TimerHandler
11.1.1 Definition of a new timer
11.1.2 Example: Tcp retransmission timer
11.2 OTcl Timer class
11.3 Commands at a glance
12. Packet Headers and Formats
12.1 A Protocol-Specific Packet Header
12.1.1 Adding a New Packet Header Type
12.1.2 Selectively Including Packet Headers in Your Simulation
12.2 Packet Classes
12.2.1 The Packet Class
12.2.2 p_info Class
12.2.3 The hdr_cmn Class
12.2.4 The PacketHeaderManager Class
12.3 Commands at a glance
13. Error Model
13.1 Implementation
13.2 Configuration
13.3 Multi-state error model
13.4 Commands at a glance
14. Local Area Networks
14.1 Tcl configuration
14.2 Components of a LAN
14.3 Channel Class
14.3.1 Channel State
14.3.2 Example: Channel and classifier of the physical layer
14.3.3 Channel Class in C++
14.4 MacClassifier Class
14.5 MAC Class
14.5.1 Mac State
14.5.2 Mac Methods
14.5.3 Mac Class in C++
14.5.4 CSMA-based MAC
14.6 LL (link-layer) Class
14.6.1 LL Class in C++
14.6.2 Example: Link Layer configuration
14.7 LanRouter class
14.8 Other Components
14.9 LANs and routing
14.10 Commands at a glance
15. The (Revised) Addressing Structure in NS
15.1 The Default Address Format
15.2 The Hierarchical Address Format
15.2.1 Default Hierarchical Setting
15.2.2 Specific Hierarchical Setting
15.3 The Expanded Node-Address Format
15.4 Expanding port-id field
15.5 Errors in setting address format
15.6 Commands at a glance
16. Mobile Networking in ns
16.1 The basic wireless model in ns
16.1.1 Mobilenode: creating wireless topology
16.1.2 Creating Node movements
16.1.3 Network Components in a mobilenode
16.1.4 Different MAC layer protocols for mobile networking
16.1.4.1 802.11 MAC protocol
16.1.4.2 Preamble based TDMA protocol
16.1.5 Different types of Routing Agents in mobile networking
16.1.5.1 DSDV
16.1.5.2 DSR
16.1.5.3 TORA
16.1.5.4 AODV
16.1.6 Trace Support
16.1.7 Revised format for wireless traces
16.1.7.1 Explanation of new trace format
16.1.8 Generation of node-movement and traffic-connection for wireless scenarios
16.1.8.1 MobileNode Movement
16.1.8.2 Generating traffic pattern files
16.2 Extensions made to CMU's wireless model
16.2.1 wired-cum-wireless scenarios
16.2.2 MobileIP
16.3 Lists of changes for merging code developed in older version of ns (2.1b5 or later) into the current version (2.1b8)
16.4 Commands at a glance
17. Satellite Networking in
17.1 Overview of satellite models
17.1.1 Geostationary satellites
17.1.2 Low-earth-orbiting satellites
17.2 Using the satellite extensions
17.2.1 Nodes and node positions
17.2.2 Satellite links
17.2.3 Handoffs
17.2.4 Routing
17.2.5 Trace support
17.2.6 Error models
17.2.7 Other configuration options
17.2.8 support
17.2.9 Integration with wired and wireless code
17.2.10 Example scripts
17.3 Implementation
17.3.1 Use of linked lists
17.3.2 Node structure
17.3.3 Detailed look at satellite links
17.4 Commands at a glance
18. Radio Propagation Models
18.1 Free space model
18.2 Two-ray ground reflection model
18.3 Shadowing model
18.3.1 Backgroud
18.3.2 Using shadowing model
18.4 Communication range
18.5 Commands at a glance
19. Energy Model in ns
19.1 The C++ EnergyModel Class
19.2 The OTcl interface
20. Directed Diffusion
20.1 What is Directed Diffusion?
20.2 The diffusion model in ns
20.3 Some mac issues for diffusion in ns
20.4 Ping: an example diffusion application implementation
20.4.1 Ping Application as implemented in C++
20.4.2 Tcl APIs for the ping application
20.5 Test-suites for diffusion
20.6 Commands at a glance
3 Support
21. Debugging ns
21.1 Tcl-level Debugging
21.2 C++-Level Debugging
21.3 Mixing Tcl and C debugging
21.4 Memory Debugging
21.4.1 Using dmalloc
21.4.2 Memory Conservation Tips
21.4.3 Some statistics collected by dmalloc
21.5 Memory Leaks
21.5.1 OTcl
21.5.2 C/C++
22. Mathematical Support
22.1 Random Number Generation
22.1.1 Seeding The RNG
22.1.1.1 Example
22.1.1.2 Output
22.1.2 OTcl Support
22.1.2.1 Commands
22.1.2.2 Example
22.1.2.3 Output
22.1.3 C++ Support
22.1.3.1 Member Functions
22.1.3.2 Example
22.1.3.3 Output
22.2 Random Variables
22.3 Integrals
22.4 ns-random
22.5 Some mathematical-support related objects
22.6 Commands at a glance
23. Trace and Monitoring Support
23.1 Trace Support
23.1.1 OTcl Helper Functions
23.2 Library support and examples
23.3 The C++ Trace Class
23.4 Trace File Format
23.5 Packet Types
23.6 Queue Monitoring
23.7 Per-Flow Monitoring
23.7.1 The Flow Monitor
23.7.2 Flow Monitor Trace Format
23.7.3 The Flow Class
23.8 Commands at a glance
24. Test Suite Support
24.1 Test Suite Components
24.2 Write a Test Suite
25. ns Code Styles
25.1 Indentation style
25.2 Variable Naming Conventions
25.3 Miscellaneous
4 Routing
26. Unicast Routing
26.1 The Interface to the Simulation Operator (The API)
26.1.0.0.1 Preference Assignment and Control
26.1.0.0.2 Link Cost Assignment and Control
26.2 Other Configuration Mechanisms for Specialised Routing
26.2.0.0.1 Asymmetric Routing
26.2.0.0.2 MultiPath Routing
26.3 Protocol Specific Configuration Parameters
26.3.0.0.1 Static Routing
26.3.0.0.2 Session Routing
26.3.0.0.3 DV Routing
26.3.0.0.4 Manual Routing
26.4 Internals and Architecture of Routing
26.4.1 The classes
26.4.1.0.1 RouteLogic../ns-2/route-proto.tcl
26.4.1.0.2 rtObject../ns-2/route-proto.tcl
26.4.1.0.3 The rtPeer../ns-2/route-proto.tcl
26.4.1.0.4 Agent/rtProto../ns-2/route-proto.tcl
26.4.1.0.5 Other Extensions to the Simulator, Node, Link, and Classifier
26.4.2 Interface to Network Dynamics and Multicast
26.4.2.0.1 Actions at the individual nodes
26.4.2.0.2 Global Actions
26.5 Protocol Internals
26.5.0.0.1 Direct Routing
26.5.0.0.2 Static Routing
26.5.0.0.3 Session Routing
26.5.0.0.4 DV Routing
26.6 Unicast routing objects
26.7 Commands at a glance
27. Multicast Routing
27.1 Multicast API
27.1.1 Multicast Behavior Monitor Configuration
27.1.2 Protocol Specific configuration
27.1.2.0.1 Centralized Multicast
27.1.2.0.2 Dense Mode
27.1.2.0.3 Shared Tree Mode
27.1.2.0.4 Bi-directional Shared Tree Mode
27.2 Internals of Multicast Routing
27.2.1 The classes
27.2.1.0.1 mrtObject class
27.2.1.0.2 McastProtocol class
27.2.2 Extensions to other classes in
27.2.2.0.1 Class Node
27.2.2.0.2 Class Link and SimpleLink
27.2.2.0.3 Class NetworkInterface
27.2.2.0.4 Class Multicast Classifier
27.2.2.0.5 Class Replicator
27.2.3 Protocol Internals
27.2.3.1 Centralized Multicast
27.2.3.2 Dense Mode
27.2.4 The internal variables
27.3 Commands at a glance
28. Network Dynamics
28.1 The user level API
28.2 The Internal Architecture
28.2.1 The class rtModel
28.2.1.0.1 Exponential
28.2.1.0.2 Deterministic
28.2.1.0.3 Trace
28.2.1.0.4 Manual
28.2.2 rtQueue../ns-2/dynamics.tcl
28.3 Interaction with Unicast Routing
28.3.1 Extensions to Other Classes
28.3.1.0.1 DynamicLink../ns-2/dynalink.cc.tcl
28.3.1.0.2 Link../ns-2/ns-link.tcl
28.3.1.0.3 SimpleLink../ns-2/ns-link.tcl
28.4 Deficencies in the Current Network Dynamics API
28.5 Commands at a glance
29. Hierarchical Routing
29.1 Overview of Hierarchical Routing
29.2 Usage of Hierarchical routing
29.3 Creating large Hierarchical topologies
29.4 Hierarchical Routing with SessionSim
29.5 Commands at a glance
5 Transport
30. UDP Agents
30.1 UDP Agents
30.2 Commands at a glance
31. TCP Agents
31.1 One-Way TCP Senders
31.1.1 The Base TCP Sender (Tahoe TCP)
31.1.1.0.1 Responses to Congestion
31.1.1.0.2 Round-Trip Time Estimation and RTO Timeout Selection
31.1.2 Configuration
31.1.3 Simple Configuration
31.1.3.0.1 Creating the Agent
31.1.3.0.2 TCP Data Source
31.1.4 Other Configuration Parameters
31.1.5 Other One-Way TCP Senders
31.1.5.0.1 Reno TCP
31.1.5.0.2 Newreno TCP
31.1.5.0.3 Vegas TCP
31.1.5.0.4 Sack TCP
31.1.5.0.5 Fack TCP
31.2 TCP Receivers (sinks)
31.2.1 The Base TCP Sink
31.2.1.0.1 configuration parameters
31.2.2 Delayed-ACK TCP Sink
31.2.2.0.1 configuration parameters
31.2.3 Sack TCP Sink
31.2.3.0.1 configuration parameters
31.3 Two-Way TCP Agents (FullTcp)
31.3.1 Simple Configuration
31.3.1.0.1 Creating the Agent
31.3.1.0.2 Configuration Parameters
31.3.2 BayFullTcp
31.4 Architecture and Internals
31.4.0.0.1 The TCP header
31.4.0.0.2 Functions for Sending Data
31.4.0.0.3 Functions for Window Management
31.4.0.0.4 Functions for Processing ACKs
31.4.0.0.5 Functions for Managing the Retransmission Timer
31.5 Tracing TCP Dynamics
31.6 One-Way Trace TCP Trace Dynamics
31.7 One-Way Trace TCP Trace Dynamics
31.8 Commands at a glance
32. Agent/SRM
32.1 Configuration
32.1.1 Trivial Configuration
32.1.1.0.1 Creating the Agent
32.1.1.0.2 Application Data Handling
32.1.1.0.3 Starting the Agent and Traffic Generator
32.1.2 Other Configuration Parameters
32.1.3 Statistics
32.1.3.0.1 Data Loss
32.1.3.0.2 Overall Statistics
32.1.3.0.3 Miscellaneous Information
32.1.4 Tracing
32.2 Architecture and Internals
32.3 Packet Handling: Processing received messages
32.3.0.0.1 Data Packets
32.3.0.0.2 Request Packets
32.3.0.0.3 Repair Packets
32.3.0.0.4 Session Packets
32.4 Loss Detection--The Class SRMinfo
32.5 Loss Recovery Objects
32.5.0.0.1 Request Mechanisms
32.5.0.0.2 Repair Mechanisms
32.5.0.0.3 Mechanisms for Statistics
32.6 Session Objects
32.7 Extending the Base Class Agent
32.7.1 Fixed Timers
32.7.2 Adaptive Timers
32.7.2.0.1 Recompute for Each New Loss Object
32.7.2.0.2 Sending a Message
32.7.2.0.3 Advertising the Distance
32.8 SRM objects
32.9 Commands at a glance
33. PLM
33.1 Configuration
33.1.0.0.1 Creating a simple scenario with one PLM flow (only one receiver)
33.2 The Packet Pair Source Generator
33.3 Architecture of the PLM Protocol
33.3.1 Instantiation of a PLM Source
33.3.2 Instantiation of a PLM Receiver
33.3.3 Reception of a Packet
33.3.4 Detection of a Loss
33.3.5 Joining or Leaving a Layer
33.4 Commands at a Glance
6 Application
34. Applications and transport agent API
34.1 The class Application
34.2 The transport agent API
34.2.1 Attaching transport agents to nodes
34.2.2 Attaching applications to agents
34.2.3 Using transport agents via system calls
34.2.4 Agent upcalls to applications
34.2.5 An example
34.3 The class TrafficGenerator
34.3.0.0.1 Exponential On/Off
34.3.0.0.2 Pareto On/Off
34.3.0.0.3 CBR
34.3.0.0.4 Traffic Trace
34.3.1 An example
34.4 Simulated applications: Telnet and FTP
34.4.0.0.1 Application/FTP
34.4.0.0.2 Application/Telnet
34.5 Applications objects
34.6 Commands at a glance
35. Web cache as an application
35.1 Using application-level data in
35.1.1 ADU
35.1.2 Passing data between applications
35.1.3 Transmitting user data over UDP
35.1.4 Transmitting user data over TCP
35.1.5 Class hierarchy related to user data handling
35.2 Overview of web cache classes
35.2.1 Managing HTTP connections
35.2.1.0.1 OTcl methods
35.2.1.0.2 Configuration parameter
35.2.2 Managing web pages
35.2.3 Debugging
35.3 Representing web pages
35.4 Page pools
35.4.1 PagePool/Math
35.4.2 PagePool/CompMath
35.4.3 PagePool/ProxyTrace
35.4.4 PagePool/Client
35.4.5 PagePool/WebTraf
35.5 Web client
35.5.0.0.1 Creating a client
35.5.0.0.2 Configuring request generation
35.5.0.0.3 Starting
35.5.0.0.4 OTcl interfaces
35.6 Web server
35.7 Web cache
35.7.1 Http/Cache
35.7.1.0.1 Creation and startup
35.7.1.0.2 OTcl methods
35.8 Putting together: a simple example
35.9 Http trace format
35.10 Commands at a glance
7 Scale
36. Session-level Packet Distribution
36.1 Configuration
36.1.1 Basic Configuration
36.1.2 Inserting a Loss Module
36.1.2.0.1 Creating a Loss Module
36.1.2.0.2 Inserting a Loss Module
36.2 Architecture
36.3 Internals
36.3.1 Object Linkage
36.3.1.0.1 Nodes and Links
36.3.1.0.2 Session Helper
36.3.1.0.3 Delay and Loss Modules
36.3.2 Packet Forwarding
36.4 Commands at a glance
37. Asim: approximate analytical simulation
8 Emulation
38. Emulation
38.1 Introduction
38.2 Real-Time Scheduler
38.3 Tap Agents
38.3.0.0.1 Configuration
38.4 Network Objects
38.4.1 Pcap/BPF Network Objects
38.4.1.0.1 Configuration
38.4.2 IP Network Objects
38.4.2.0.1 Configuration
38.4.3 IP/UDP Network Objects
38.5 An Example
38.6 Commands at a glance
9 Visualization with Nam - The Network Animator
39. Nam
39.1 Introduction
39.2 Nam Command Line Options
39.3 User Interface
39.4 Keyboard Commands
39.5 Generating External Animations from Nam
39.6 Network Layout
39.7 Animation Objects
40. Nam Trace
40.1 Nam Trace Format
40.1.1 Initialization Events
40.1.2 Nodes
40.1.3 Links
40.1.4 Queues
40.1.5 Packets
40.1.6 Node Marking
40.1.7 Agent Tracing
40.1.8 Variable Tracing
40.1.9 Executing Tcl Procedures and External Code from within Nam
40.1.9.1 Setting playback speed
40.1.9.2 Annotation
40.1.9.3 Node Exec Button
40.1.10 Using Streams for Realtime Applications
40.1.11 Nam Trace File Format Lookup Table
40.2 Ns commands for creating and controlling nam animations
40.2.1 Node
40.2.2 Link/Queue
40.2.3 Agent and Features
40.2.4 Some Generic Commands
10 Other
41. Educational use of NS and NAM
41.1 Using NS for educational purposes
41.1.1 Installing/building/running
41.1.2 The educational scripts' inventory page:
41.2 Using NAM for educational purposes
Bibliography
Index
Subsections
1
. Introduction
2
. Undocumented Facilities
Paul Kroon 2008-03-16