LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   problem with Mobiwan Or ns-2.35 ?? (https://www.linuxquestions.org/questions/linux-newbie-8/problem-with-mobiwan-or-ns-2-35-a-4175549210/)

aavi 07-28-2015 08:56 PM

problem with Mobiwan Or ns-2.35 ??
 
hii
i applied the mobiwan pathch.
when i tried to run this "Simple-mipv6.tcl"
i got the following errors

Code:

aavi@ubuntu:~$ ns235-mobiwan simple-mipv6.tcl
couldn't read file "../../tcl/mobility/timer.tcl": no such file or directory
    while executing
"source.orig ../../tcl/mobility/timer.tcl"
    ("uplevel" body line 1)
    invoked from within
"uplevel source.orig[list $fileName]"
    invoked from within
"if [$instance_ is_http_url $fileName] {
set buffer [$instance_ read_url $fileName]
uplevel eval $buffer
} else {
uplevel source.orig[list $fileName]
..."
    (procedure "source" line 8)
    invoked from within
"source ../../tcl/mobility/timer.tcl"
    (procedure "main" line 3)
    invoked from within
"main"
    (file "simple-mipv6.tcl" line 152)

plz help me out ...
this is the simple-mipv6.tcl

Code:

# Basic Mobile IPv6 example without using ns-topoman
# Needs proc defined in file proc-mipv6-config.tcl

Agent/MIPv6/MN set bs_forwarding_    0      ; # 1 if forwarding from previous BS
################################################################
proc log-mn-movement_no_topo { } {
  global logtimer ns
  Class LogTimer -superclass Timer
  LogTimer instproc timeout {} {
        global mobile_
        $mobile_ log-movement
        $self sched 1
  }
  set logtimer [new LogTimer]
  $logtimer sched 1 
}

################################################################
# Create Topology
################################################################
proc create-my-topo {} {
  global ns opt topo mobile_ cn_ mnn_nodes_

  # Create and define topography
  set topo        [new Topography]
  #  set prop        [new $opt(prop)]
  #  $prop topography $topo
  $topo load_flatgrid 800 800

  # god is a necessary object when wireless is used
  # set to a value equal to the number of mobile nodes
  create-god 5

  # Call node-config
  $ns node-config \
        -addressType hierarchical \
        -agentTrace ON \
        -routerTrace ON

  # Set NS Addressing
  AddrParams set domain_num_ 2
  AddrParams set cluster_num_ {1 5}
  AddrParams set nodes_num_ {1 1 3 1 1 1}

  # Create Nodes
  set cn_ [create-router 0.0.0]
  set router_ [create-router 1.0.0]
  set bs1_ [create-base-station 1.1.0 1.0.0 200 200 0]
  set bs2_ [create-base-station 1.2.0 1.0.0 200 600 0]
  set bs3_ [create-base-station 1.3.0 1.0.0 600 200 0]
  set bs4_ [create-base-station 1.4.0 1.0.0 600 600 0]
  set mobile_ [create-mobile 1.1.1 1.1.0 190 190 0 1 0.01]


  # Create Links
  $ns duplex-link $cn_ $router_ 100Mb 1.80ms DropTail
  $ns duplex-link $router_ $bs1_ 100Mb 1.80ms DropTail
  $ns duplex-link $router_ $bs2_ 100Mb 1.80ms DropTail

  display_ns_addr_domain
}

################################################################
# End of Simulation
################################################################
proc finish { } {
  global tracef ns namf opt mobile_ cn_
 
  puts "Simulation finished"
  # Dump the Binding Update List of MN and Binding Cache of HA
  [[$mobile_ set ha_] set regagent_] dump
  [$cn_ set regagent_] dump
  [$mobile_ set regagent_] dump

  $ns flush-trace
  flush $tracef
  close $tracef
  close $namf
  #puts "running nam with $opt(namfile) ... "
  #exec nam $opt(namfile) &
  exit 0
}


################################################################
# Main
################################################################
proc main { } {
  global opt ns TOPOM namf n tracef mobile_ cn_
  source ../../tcl/mobility/timer.tcl

  set NAMF out.nam
  set TRACEF out.tr
  set INFOF out.info

  set opt(mactrace) ON
  set opt(NAM) 1
  set opt(namfile) $NAMF
  set opt(stop) 100
  set opt(tracefile) $TRACEF
 
  #>--------------- Extract options from command line ---------------<
  #Getopt        ; # Get option from the command line       
  #DisplayCommandLine
 
  #>---------------------- Simulator Settings ----------------------<
  set ns [new Simulator]
  #>------------------------ Open trace files ----------------------<
  exec rm -f $opt(tracefile)
  set tracef [open $opt(tracefile) w]
  #... dump the file
  $ns trace-all $tracef
   
  set namf [open $opt(namfile) w]
  $ns namtrace-all $namf

  #>------------- Protocol and Topology Settings -------------------<
  create-my-topo
  log-mn-movement_no_topo
 
  set-cbr
  # set-ping-int 0.1 $cn_ $mobile_ 10 $opt(stop)


  #>----------------------- Run Simulation -------------------------<
  $ns at $opt(stop) "finish"
  $ns run

  $ns dump-topology $namf
  close $namf
  #puts "running nam with $opt(namfile) ... "
  #exec nam $opt(namfile) &
}

proc set-cbr { } {
  global ns cn_ mobile_
  set udp [new Agent/UDP]
  $ns attach-agent $cn_ $udp
 
  set dst [new Agent/Null]
  $ns attach-agent $mobile_ $dst
  $ns connect $udp $dst

  set src [new Application/Traffic/CBR]
  $src set packetSize_ 1000
  $src set rate_ 100k
  $src set interval_ 0.05
  $src attach-agent $udp
  $ns at 20.0 "$src start"
}

main


knudfl 07-29-2015 06:48 AM

Quote:

couldn't read file "../../tcl/mobility/timer.tcl"
Well, then copy the example to ns-2.35/tcl/ex/,
... then you have tcl/mobility/ located two levels up.
I.e. that's what "../../" means : Two levels up.

aavi 07-29-2015 08:42 AM

thats the oput. what is the problem ??
 
i copied the exmples to ns2.35/tcl/ex
now it generating the following output. i think it is not tha correct output. now plz tell me what to do ??

Code:

aavi@ubuntu:~$ ns235-mobiwan simple-mipv6.tcl
num_nodes is set 5
warning: no class variable SrcRouting::debug_

        see tcl-object.tcl in tclcl for info about this warning.

warning: no class variable SrcRouting::debug_

        see tcl-object.tcl in tclcl for info about this warning.

warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl (except for MobiWAN simulations)
warning: no class variable SrcRouting::debug_

        see tcl-object.tcl in tclcl for info about this warning.

INITIALIZE THE LIST xListHead
warning: no class variable SrcRouting::debug_

        see tcl-object.tcl in tclcl for info about this warning.

warning: no class variable SrcRouting::debug_

        see tcl-object.tcl in tclcl for info about this warning.

warning: no class variable SrcRouting::debug_

        see tcl-object.tcl in tclcl for info about this warning.

warning: no class variable SrcRouting::debug_

        see tcl-object.tcl in tclcl for info about this warning.


  >-------------------- NS Addressing --------------------<
  Domains (domain_num) : 2
  Clusters (cluster_num) : 1 5
  Nodes (nodes_num) :  1 1 3 1 1 1
  >-------------------------------------------------------<

SORTING LISTS ...DONE!
channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5,  distCST_ = 550.0


knudfl 07-29-2015 03:02 PM

Re #3.
Quote:

aavi@ubuntu:~$ ns235-mobiwan simple-mipv6.tcl
num_nodes is set 5
.
.
>-------------------- NS Addressing --------------------<
Domains (domain_num) : 2
Clusters (cluster_num) : 1 5
Nodes (nodes_num) : 1 1 3 1 1 1
>-------------------------------------------------------<

SORTING LISTS ...DONE!
channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5, distCST_ = 550.0
That's the usual OK result ( warnings can be ignored ) :
The files out.nam 260kB, out.tr 156kB are created OK !

-

aavi 07-29-2015 03:14 PM

Ok sr... thanks ..
your work is realy appreciatable :)

mjahidi 02-08-2016 03:35 PM

The same problem with Mobiwan on ns-2.35
 
I followed all the instruction on installing mobiwan with ns-2.35 and i tried to run "simple-mipv6.tcl" it gives me the same warning but with error of "Segmentation fault (core dumped)". Please help me how can I correct this error.


The error is shown below:

num_nodes is set 5
warning: no class variable SrcRouting::debug_

see tcl-object.tcl in tclcl for info about this warning.

warning: no class variable SrcRouting::debug_

see tcl-object.tcl in tclcl for info about this warning.

warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl (except for MobiWAN simulations)
warning: no class variable SrcRouting::debug_

see tcl-object.tcl in tclcl for info about this warning.

INITIALIZE THE LIST xListHead
warning: no class variable SrcRouting::debug_

see tcl-object.tcl in tclcl for info about this warning.

warning: no class variable SrcRouting::debug_

see tcl-object.tcl in tclcl for info about this warning.

warning: no class variable SrcRouting::debug_

see tcl-object.tcl in tclcl for info about this warning.

warning: no class variable SrcRouting::debug_

see tcl-object.tcl in tclcl for info about this warning.


>-------------------- NS Addressing --------------------<
Domains (domain_num) : 2
Clusters (cluster_num) : 1 5
Nodes (nodes_num) : 1 1 3 1 1 1
>-------------------------------------------------------<

Segmentation fault (core dumped)

knudfl 02-12-2016 01:43 PM

Re #6, @mjahidi.

If the trace files are created in reasonable sizes, the 'Segmentation fault' can be ignored.

I get no 'Segmentation fault' with $ ns235-mobiwan simple-mipv6.tcl
... and the created files are : out.nam 260kB, out.tr 156kB.


To avoid 'Segmentation fault', please use another OS, i386/i686, e.g. the 32bits CentOS 6.7
http://ftp.funet.fi/pub/mirrors/cent...386-LiveCD.iso


-

mjahidi 02-12-2016 05:02 PM

When I run simple-mipv6.tcl the resulted trace file (out.nam and out.tr) are all empty.

I use ubuntu 14.04 64 bit

knudfl 02-13-2016 02:33 PM

Re #8.

OK, then please use a 32bits OS. See post #7.

mjahidi 02-14-2016 03:47 AM

Ok Thanks, I will try

Radhika Patel 01-29-2017 10:50 PM

Facing error in simulating TORA in ns2.35 on ubuntu 14.04
 
"INITIALIZE THE LIST xListHead"
The above is the error I m facing. I viewed the tcl-object.tcl file in tclcl folder. Please guide me what changes are to be done in tcl-object.tcl to solve the error.
Thank you in advance.


All times are GMT -5. The time now is 03:57 AM.