• Shashi Guruprasad's avatar
    Distributed nse changes · 1630611a
    Shashi Guruprasad authored
    1) IP address based routes can now be added
       - The IP address is set on a link object
       - An "$ns rlink" is used to instantiate links
         that get cut and cross physical partitions
       - Traffic agents that are across physical
         partitions (i.e. different instances of nse)
         are connected by a new "$ns ip-connect"
       - A new Node instproc "add-route-to-ip" adds
         IP address based routes.
       - Changed ns multicast addressing to use 3 bits
         instead of the default 1
       - Currently, the classifier does a lookup on a
         complete 32 bit IP and if a target to route to
         is not found, uses a 24 bit IP mask. It does not
         try to match IP prefixes of all lengths. I'll add
         that later if necessary
    2) NS packets that cross partitions are encapsulated in
       IPPROTO_ENCAP IP packets.
    3) RAW IP sockets used to inject packets into the network
       now use a rtabid paramater so that packets can be
       routed according to different routing tables
    Tested with 2 test cases, one with UDP/CBR traffic
    and another with default NS TCP/FTP traffic. Setup was done
    manually. As I do testbed integration, there may be more changes.
    Here's the test setup:
       2.2    2.3   1.2      1.3   3.2      3.3
    n0 --------- n1 ----------- n2 ------------ n3
    n0,n1 are on one physical node and n2,n3 are on another. The n1-n2 link
    is cut.
    A TCP example:
    set ns [new Simulator]
    $ns use-scheduler RealTime
    set n0 [$ns node]
    set n1 [$ns node]
    $ns duplex-link $n0 $n1 10Mb 5ms DropTail
    [$ns link $n0 $n1] set-ip
    [$ns link $n1 $n0] set-ip
    set rl0 [$ns rlink $n1 2Mb 40ms DropTail]
    $rl0 set-ip
    set tcp0 [new Agent/TCP]
    # The last parameter specifies the port
    $ns attach-agent $n0 $tcp0 20
    $ns ip-connect $tcp0 20
    set ftp0 [new Application/FTP]
    $ftp0 attach-agent $tcp0
    $n0 add-route-to-ip
    $n1 add-route-to-ip
    $ns at 1.0 "$ftp0 start"
    $ns at 10.0 "$ftp0 stop"
    -----------------end physnode0---------------------
    set ns [new Simulator]
    $ns use-scheduler RealTime
    set n2 [$ns node]
    set n3 [$ns node]
    $ns duplex-link $n2 $n3 10Mb 5ms DropTail
    [$ns link $n2 $n3] set-ip
    [$ns link $n3 $n2] set-ip
    set rl1 [$ns rlink $n2 2Mb 40ms DropTail]
    $rl1 set-ip
    set tcpsink0 [new Agent/TCPSink]
    $ns attach-agent $n3 $tcpsink0 20
    $ns ip-connect $tcpsink0 20
    $n3 add-route-to-ip
    $n2 add-route-to-ip
    -----------------end physnode1---------------------
Last commit
Last update
GNUmakefile.in Loading commit data...
README Loading commit data...
ip_fw.h Loading commit data...
nse-install Loading commit data...
nse.patch Loading commit data...
nseinput.tcl Loading commit data...
nseinput.tcl.in Loading commit data...
startnse Loading commit data...
tbevent.cc Loading commit data...
tbevent.h Loading commit data...
tbnexthop.cc Loading commit data...
tbnexthop.h Loading commit data...