README
author Tom Henderson <tomh@tomh.org>
Fri, 18 May 2007 10:27:42 -0700
changeset 657 be551a3b07c6
parent 655 f2ee52034178
child 663 48c05ee9fb6a
permissions -rw-r--r--
minor changes due to documentation review
     1 
     2     The Network Simulator, Version 3
     3     --------------------------------
     4 
     5 Table of Contents:
     6 ------------------
     7 
     8 1) An Open Source project
     9 2) An overview of the ns-3 project
    10 3) Building ns-3
    11 4) Running ns-3
    12 5) Getting access to the ns-3 documentation
    13 6) Working with the development version of ns-3
    14 
    15 
    16 1) An Open Source project
    17 -------------------------
    18 
    19 ns-3 is an Open Source project.   We intend to make this
    20 project a successful collaborative project: we hope that 
    21 the missing pieces of the models we have not yet implemented
    22 will be contributed by the community in an open collaboration
    23 process.
    24 
    25 Contributing to the ns-3 project is still a very informal
    26 process because that process depends heavily on the personality
    27 of the people involved, the amount of time they can invest
    28 and the type of model they want to work on.  
    29 
    30 Despite this lack of a formal process, there are a number of 
    31 steps which naturally stem from the open-source roots of the
    32 project.  These steps are described in doc/contributing.txt
    33 
    34 2) An overview of the ns-3 project
    35 ----------------------------------
    36 
    37 This package contains the latest version of ns-3 which is aims 
    38 at being a replacement for ns-2. Currently, ns-3 provides a 
    39 number of very simple network simulation models:
    40   - an ipv4 and udp stack
    41   - arp support at the bottom of the stack
    42   - point-to-point physical-layer links
    43   - OnOff traffic generator
    44 
    45 Our focus to date has been on getting an overall software
    46 framework in place.  The framework is there to make adding 
    47 new models as simple as possible:
    48   - an extensive tracing system can be used to connect
    49     any number of arbitrary trace sources to any number
    50     of trace sinks. This tracing system is decoupled
    51     from the act of serializing the trace events to a 
    52     file: users can and should provide their own
    53     trace handling routines.
    54 
    55   - simple file trace serialization support is included
    56     to both text and pcap files.
    57 
    58   - adding new MAC-level models simply requires subclassing
    59     the pair of classes NetDevice and Channel.
    60 
    61   - adding new traffic generation algorithms is also very 
    62     simple through the Application and the Socket classes.
    63 
    64 3) Building ns-3
    65 ----------------
    66 
    67 The code for the framework and the default models provided
    68 by ns-3 is built as a set of libraries. User simulations
    69 are expected to be written as simple programs that make
    70 use of these ns-3 libraries.
    71 
    72 To build the set of default libraries and the example
    73 programs included in this package, you need to use the
    74 tool 'scons'. Detailed information on how to install
    75 and use scons is included in the file doc/build.txt
    76 
    77 However, the real quick and dirty way to get started is to
    78 type the command "scons" the the directory which contains
    79 this README file. The files built will be copied in the
    80 build-dir/dbg-shared/bin and build-dir/dbg-shared/lib
    81 directories. build-dir/dbg-shared/bin will contain
    82 one binary for each of the sample code in the 'samples'
    83 directory and one binary for each of the detailed examples
    84 found in the 'examples' directory.
    85 
    86 The current codebase is expected to build and run on the
    87 following set of platforms:
    88   - linux x86 gcc 4.2, 4.1, and, 3.4.
    89   - MacOS X ppc and x86
    90 
    91 The current codebase is expected to fail to build on
    92 the following platforms:
    93   - gcc 3.3 and earlier
    94   - optimized builds on linux x86 gcc 4.0 
    95 
    96 Other platforms may or may not work: we welcome 
    97 patches to improve the portability of the code to these
    98 other platforms.
    99 
   100 4) Running ns-3
   101 ---------------
   102 
   103 On recent Linux systems, once you have built ns-3, it 
   104 should be easy to run the sample programs with the
   105 following command:
   106 
   107 ./build-dir/dbg-shared/bin/simple-p2p
   108 
   109 or:
   110 
   111 cd build-dir/dbg-shared/bin
   112 ./simple-p2p
   113 
   114 That program should generate a simple-p2p.tr text 
   115 trace file and a set of simple-p2p-xx-xx.pcap binary
   116 pcap trace files, which can be read by tcpdump.
   117 
   118 5) Getting access to the ns-3 documentation
   119 -------------------------------------------
   120 
   121 Once you have verified that your build of ns-3 works by running
   122 the simple-p2p example as outlined in 4) above, it is
   123 quite likely that you will want to get started on reading
   124 some ns-3 documentation. 
   125 
   126 All of that documentation should always be available from
   127 the ns-3 website: http:://www.nsnam.org/ but we
   128 include some of it in this release for ease of use.
   129 
   130 This documentation includes:
   131 
   132   - an architecture document which describes a very 
   133     high-level view of ns-3: it tries to explain the
   134     use-cases the ns-3 developers really focused on when
   135     doing the initial design and then goes on to explain
   136     the structure of the resulting framework.
   137     See the file doc/architecture.pdf
   138 
   139   - a wiki for user-contributed tips: http://www.nsnam.org/wiki/
   140 
   141   - an API documentation generated using doxygen: this is
   142     a reference manual, most likely not very well suited 
   143     as introductory text:
   144     http://www.nsnam.org/doxygen/index.html
   145 
   146 If you want to re-generate this documentation, you can 
   147 easily do so:
   148 
   149   - doc/architecture.pdf is generated from the architecture.tex
   150     file in http://code.nsnam.org/docs
   151 
   152   - the doxygen documentation is generated from the doc/doxygen.conf
   153     configuration file. The command "scons doc" will generate it
   154     as doc/html/index.html if you have installed the doxygen tools 
   155     (see http://www.doxygen.org)
   156 
   157 6) Working with the development version of ns-3
   158 -----------------------------------------------
   159 
   160 If you want to download and use the development version 
   161 of ns-3, you need to use the tool 'mercurial'. A quick and
   162 dirty cheat sheet is included in doc/mercurial.txt but
   163 reading through the mercurial tutorials included on the
   164 mercurial website is usually a good idea if you are not
   165 familiar with it.
   166 
   167 If you have successfully installed mercurial, you can get
   168 a copy of the development version with the following
   169 command:
   170 "hg clone http://code.nsnam.org/ns-3-dev"