LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-28-2015, 09:56 PM   #1
aavi
LQ Newbie
 
Registered: Jul 2015
Posts: 22

Rep: Reputation: Disabled
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
 
Old 07-29-2015, 07:48 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,322

Rep: Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581
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.
 
Old 07-29-2015, 09:42 AM   #3
aavi
LQ Newbie
 
Registered: Jul 2015
Posts: 22

Original Poster
Rep: Reputation: Disabled
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
 
Old 07-29-2015, 04:02 PM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,322

Rep: Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581
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 !

-
 
Old 07-29-2015, 04:14 PM   #5
aavi
LQ Newbie
 
Registered: Jul 2015
Posts: 22

Original Poster
Rep: Reputation: Disabled
Ok sr... thanks ..
your work is realy appreciatable
 
Old 02-08-2016, 04:35 PM   #6
mjahidi
LQ Newbie
 
Registered: Feb 2016
Posts: 4

Rep: Reputation: Disabled
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)
 
Old 02-12-2016, 02:43 PM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,322

Rep: Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581
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


-
 
Old 02-12-2016, 06:02 PM   #8
mjahidi
LQ Newbie
 
Registered: Feb 2016
Posts: 4

Rep: Reputation: Disabled
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
 
Old 02-13-2016, 03:33 PM   #9
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,322

Rep: Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581
Re #8.

OK, then please use a 32bits OS. See post #7.
 
Old 02-14-2016, 04:47 AM   #10
mjahidi
LQ Newbie
 
Registered: Feb 2016
Posts: 4

Rep: Reputation: Disabled
Ok Thanks, I will try
 
Old 01-29-2017, 11:50 PM   #11
Radhika Patel
LQ Newbie
 
Registered: Jan 2017
Posts: 1

Rep: Reputation: Disabled
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.
 
  


Reply

Tags
mobiwan, ns2


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] mobiwan for ns-2.35 aavi Linux - Newbie 7 07-29-2015 07:22 AM
Mobiwan for NS2.29 yotta15 Linux - Newbie 1 07-28-2012 06:18 AM
ns-2.33 with mobiwan errors Riaz Khan Linux - Newbie 1 05-04-2012 06:34 AM
Mobiwan and NS 2.34 ? Augengrun Linux - Networking 16 04-01-2012 09:49 AM
Mobiwan for Ns2.33 bsyew Linux - Newbie 37 01-22-2012 06:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration