Hello,

I have been able to implement the Manet routing protocol (protoname). I have
got it to compile successfully but when i run a test simulation using it , i
do not get any packets to be successfully transmitted. I printed out the
routing table onto the trace file and noticed that the routing table is
empty throughout the simulation. The same simulation file works fine when i
use AODV or DSR for that matter.


I am not sure why its not sending any packets.
i did not get any errors when compiling protoname.




here is the simulation script.
the trace file for this is available at www.ece.utk.edu/~njha/out_fixrt.tr


any help would be greatly appreciated.




#A simple example for wireless simulation


# ======================================================================
# Define options
# ======================================================================
set val(chan)           Channel/WirelessChannel    ;# channel type
set val(prop)           Propagation/TwoRayGround   ;# radio-propagation
model
set val(netif)          Phy/WirelessPhy            ;# network interface type

set val(mac)            Mac/802_11                 ;# MAC type
set val(ifq)            Queue/DropTail/PriQueue    ;# interface queue type
#set val(ifq)            CMUPriQueue    ;# interface queue type
set val(ll)             LL                         ;# link layer type
set val(ant)            Antenna/OmniAntenna        ;# antenna model
set val(ifqlen)         50                         ;# max packet in ifq
set val(nn)             3                      ;# number of mobilenodes
set val(rp)             Protoname              ;# routing protocol
#set val(rp)             FIXRT              ;# routing protocol
set val(x) 1000                        ;# X dimension of the topography in
meters
set val(y) 1000                        ;# Y dimension of the topography in
meters
set val(time)           25.0                      ;# Simulation time in
seconds


proc finish {} {
  global ns_ tracefile namfile
  $ns_ flush-trace
  close $tracefile
  close $namfile
  exit 0
}

# ======================================================================
# Main Program
# ======================================================================

#
# Initialize Global Variables
#
set ns_ [new Simulator]
set tracefile [open out_fixrt.tr w]
$ns_ use-newtrace
$ns_ trace-all $tracefile


set namfile [open out_fixrt.nam w]
$ns_ namtrace-all-wireless $namfile $val(x) $val(y)


# set up topography object
set topo        [new Topography]


$topo load_flatgrid $val(x) $val(y)


#
# Create God
#
create-god $val(nn)


#
#  Create the specified number of mobilenodes [$val(nn)] and "attach" them
#  to the channel.
#  Here two nodes are created : node(0) and node(1)
set chan [new $val(chan)]


# configure node

$ns_ node-config -adhocRouting $val(rp) \
 -llType $val(ll) \
 -macType $val(mac) \
 -ifqType $val(ifq) \
 -ifqLen $val(ifqlen) \
 -antType $val(ant) \
 -propType $val(prop) \
 -phyType $val(netif) \
 -topoInstance $topo \
 -agentTrace ON \
 -routerTrace ON \
 -macTrace ON \
 -movementTrace ON \
 -channel $chan


Agent/Protoname set accesible_var_  true


for {set i 0} {$i < $val(nn) } {incr i} {
set node_($i) [$ns_ node]
$node_($i) random-motion 0 ;# disable random motion
        $node_($i) color red;
$ns_ initial_node_pos $node_($i) 20
}



source Topo.tcl


for {set i 0} {$i < $val(nn) } {incr i} {
 $ns_ at 1.0 "[$node_($i) agent 255] print_rtable"
}


for {set i 0} {$i < $val(nn) } {incr i} {
 $ns_ at 2.0 "[$node_($i) agent 255] print_rtable"
}



# Initial Movement
for {set i 0} {$i < $val(nn) } {incr i} {
$ns_ at 0.0 "$node_($i) setdest 50.0 50.0 0.0"
}






# Setup traffic flow between nodes
#
# Create a CBR flow from 0 to 1 at time 61.20586847011273 (seconds)
#
set udp_(0) [new Agent/UDP]
$udp_(0) set fid_ 0
$ns_ attach-agent $node_(0) $udp_(0)
set null_(0) [new Agent/Null]
$ns_ attach-agent $node_(2) $null_(0)
set cbr_(0) [new Application/Traffic/CBR]
$cbr_(0) set packetSize_ 1024
$cbr_(0) set interval_ 0.25
$cbr_(0) set random_ 0
$cbr_(0) set maxpkts_ 1000
$cbr_(0) attach-agent $udp_(0)
$ns_ connect $udp_(0) $null_(0)
$ns_ at 2.0 "$cbr_(0) start"




# Tell nodes when the simulation ends
for {set i 0} {$i < $val(nn) } {incr i} {
    $ns_ at $val(time) "$node_($i) reset";
}
$ns_ at $val(time) "finish"
$ns_ at [expr $val(time) + 0.01] "puts \"NS EXITING...\"; $ns_ halt"


puts "Starting Simulation..."
$ns_ run

Reply via email to