LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-19-2012, 01:58 PM   #1
Augengrun
LQ Newbie
 
Registered: Mar 2012
Location: Montréal
Distribution: Ubuntu
Posts: 8

Rep: Reputation: Disabled
Mobiwan and NS 2.34 ?


Hello,

Currently I am working on a project with NS2(version 2.34) and I have to use MIBV6.
I want to know if Mobiwan available for version 2.34 or not ?

Thank you,
S.K

Last edited by Augengrun; 03-19-2012 at 03:35 PM.
 
Old 03-20-2012, 04:35 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2019 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,268

Rep: Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568
Welcome to LQ. .. ..

The mobiwan patch is for ns-2.33, please see post #2 here
http://www.linuxquestions.org/questi...2-33-a-856104/

And : You can have as many versions of ns-allinone-2.xx as you want,
installed at the same time. But : Do not add any of them to a *PATH.

.
 
Old 03-26-2012, 01:26 PM   #3
Augengrun
LQ Newbie
 
Registered: Mar 2012
Location: Montréal
Distribution: Ubuntu
Posts: 8

Original Poster
Rep: Reputation: Disabled
Thank you for your response
I installed ns2.33 and it works but when I add the mobiwan1 patch, the tcl programs do not work
The same problem in this post : http://www.linuxquestions.org/questi...obiwan-842269/

and I try to run this program in this post : http://www.linuxquestions.org/questi...2-33-a-843581/ and I have the same problem "Segmentation fault"

Does mobiwan depends on the version of ubuntu?


Ubuntu : 11.10

Thank you
 
Old 03-26-2012, 01:54 PM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2019 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,268

Rep: Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568
1) http://www.linuxquestions.org/questi...obiwan-842269/
The "post id" is missing. Please write e.g. #1, when it's about post #1.

2) http://www.linuxquestions.org/questi...2-33-a-843581/
Which post ?


Generally :
A default file.tcl is not supposed to work in a mobiwan patched ns2.
Only dedicated "mobiwan tcl files" must work.

The usual suggestion : Save the binary ns from an unpatched ns-2.33.
Also : copy the unpatched binary ns to /usr/local/bin/ as "ns233".
Other example (from today), post #2 here :
http://www.linuxquestions.org/questi...33-a-936417/#2

.

Last edited by knudfl; 03-26-2012 at 01:57 PM.
 
Old 03-26-2012, 02:12 PM   #5
Augengrun
LQ Newbie
 
Registered: Mar 2012
Location: Montréal
Distribution: Ubuntu
Posts: 8

Original Poster
Rep: Reputation: Disabled
1)Yes it's : http://www.linuxquestions.org/questi...iwan-842269/#1


2) this post => http://www.linuxquestions.org/questi...33-a-843581/#1
 
Old 03-26-2012, 02:24 PM   #6
Augengrun
LQ Newbie
 
Registered: Mar 2012
Location: Montréal
Distribution: Ubuntu
Posts: 8

Original Poster
Rep: Reputation: Disabled
This is the code :
Code:
# FIRST SCENARIO WITHOUT BUFFER
# 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 Off\
# Set NS Addressing
AddrParams set domain_num_ 2
AddrParams set cluster_num_ {1 3}
AddrParams set nodes_num_ {1 1 2 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 100 100 0]
set bs2_ [create-base-station 1.2.0 1.0.0 100 550 0]
set mobile_ [create-mobile 1.1.1 1.1.0 230 100 0 0 0.01]
# Create Links
$ns simplex-link $cn_ $router_ 10Mb 2.0ms DropTail
$ns duplex-link $router_ $bs1_ 10Mb 2.0ms DropTail
$ns duplex-link $router_ $bs2_ 10Mb 2.0ms 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 Files
# source set-def-options.tcl

source /home/slim/Desktop/Work/ns-allinone-2.33/ns-2.33/tcl/lib/proc-mipv6-config.tcl
source /home/slim/Desktop/Work/ns-allinone-2.33/ns-2.33/tcl/lib/proc-tools.tcl
source /home/slim/Desktop/Work/ns-allinone-2.33/ns-2.33/tcl/lib/proc-topo.tcl
source /home/slim/Desktop/Work/ns-allinone-2.33/ns-2.33/tcl/lib/ns-topoman.tcl
source /home/slim/Desktop/Work/ns-allinone-2.33/ns-2.33/tcl/lib/proc-mobi-global.tcl
source /home/slim/Desktop/Work/ns-allinone-2.33/ns-2.33/tcl/lib/proc-mobi-config.tcl
source /home/slim/Desktop/Work/ns-allinone-2.33/ns-2.33/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
#set new trace file for wireless
$ns use-newtrace
$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)
#start movement to pos(x,y) with velocity v
#$ns at 10.0 "$mobile_ setdest 700 400 10"
#MN move again to BS2#####
$ns at 2.0 "$mobile_ setdest 230 500 10"
#>----------------------- 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_ 160
$src set rate_ 64k
$src set interval_ 0.05
$src attach-agent $udp
$ns at 10.0 "$src start"
$ns at 15.0 "$src stop"
}
main
and I have this message :
"
num_nodes is set 5
warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl (except for MobiWAN simulations)
INITIALIZE THE LIST xListHead

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

Erreur de segmentation "

Last edited by Augengrun; 03-26-2012 at 02:28 PM.
 
Old 03-26-2012, 03:56 PM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2019 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,268

Rep: Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568
cd ns-allinone-2.33/ns-2.33'
./ns mobiwan-MIBV6-file.tcl ( Your file from post # 6.)
Code:
num_nodes is set 5
warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl (except for MobiWAN simulations)
INITIALIZE THE LIST xListHead

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

channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5,  distCST_ = 550.0
SORTING LISTS ...DONE!
26.3025 get_coa for BS 1.2.0:4198400
Simulation finished

|Binding Cache for node 1.1.0 at 100 --------------------------------------- |
|Node           COA             Type    Info    Flag    Last    Time            Life    Expire          Nb|
|1.1.1          1.2.4           7       MN      1       13      91.3087         10      0               13 |


|Binding Update List for node 1.1.1 at 100 --------------------------------------- |
|Node           COA             Type    Info    Flag    Last    Time            Life    Expire          Nb|
|1.1.0          1.2.4           3       HA      1       13      91.3025         10      2.68435e+08             14 |


|Base Station List for node 1.1.1 at 100 --------------------------------------- |
|Node           COA             Type    Info    Flag    Last    Time            Life    Expire          Nb|
|1.2.0          1.2.4           8       BS      1       -1      99.6504         1       0               149 |

running nam with out.nam ...
... Which the expected OK result.

About your error ( Segmentation fault ) :
Probably the usual : Avoid Ubuntu 11.04, 11.10 ( 12.04 ) for ns2. Did all tests pass ?
If it must be Ubuntu : 10.04 should be preferred.
( All ns2 was made for and tested on CentOS / RHEL / Scientific Linux.)

P.S. : You could try out the old binary "ns233-mobiwan", that I am using.

.

Last edited by knudfl; 03-26-2012 at 04:56 PM.
 
Old 03-26-2012, 04:06 PM   #8
Augengrun
LQ Newbie
 
Registered: Mar 2012
Location: Montréal
Distribution: Ubuntu
Posts: 8

Original Poster
Rep: Reputation: Disabled
I have the same problem. I will try with version 10.04 of ubuntu.
Thank you very much !
 
Old 03-26-2012, 04:37 PM   #9
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2019 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,268

Rep: Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568
# 8
Quote:
I have the same problem.
What do you mean ? ? The output shown on post # 7 is OK.
 
Old 03-27-2012, 01:30 AM   #10
Augengrun
LQ Newbie
 
Registered: Mar 2012
Location: Montréal
Distribution: Ubuntu
Posts: 8

Original Poster
Rep: Reputation: Disabled
I have the same output : (I tried with version 10.04 of ubuntu)

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

Erreur de segmentation "

I do not know what I should do..
 
Old 03-27-2012, 03:10 AM   #11
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2019 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,268

Rep: Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568
# 10

Two things : An OS for ns2 should be 32bits. ( i386 / i686.)
Not everything will work in a 64bits OS.
( The command 'uname -m' will reply with <arch>.)

And, most important :
ns-allinone-2.33 must be compiled with gcc-4.1 / g++-4.1
to get a usable result. ( sudo apt-get install g++-4.1 ).

.
 
Old 03-27-2012, 01:21 PM   #12
Augengrun
LQ Newbie
 
Registered: Mar 2012
Location: Montréal
Distribution: Ubuntu
Posts: 8

Original Poster
Rep: Reputation: Disabled
#11

Yes my os is 32 bits(i686)
"sudo apt-get install g++-4.1" not work (the same thing for gcc-4.1)

the default version that I found for gcc and g++ (gcc -v && g++ -v) is 4.6 and the minimum version that I can install with apt-get is 4.4
How I can return to the posterior versions (4.1 for example) if I use an ubuntu 11.10 ??

Last edited by Augengrun; 03-27-2012 at 01:22 PM.
 
Old 03-27-2012, 04:06 PM   #13
Augengrun
LQ Newbie
 
Registered: Mar 2012
Location: Montréal
Distribution: Ubuntu
Posts: 8

Original Poster
Rep: Reputation: Disabled
and the default gcc for ubuntu 10.04 is gcc-4.4..
 
Old 03-27-2012, 04:08 PM   #14
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2019 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,268

Rep: Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568
# 12 : No old Ubuntu compilers will work in Ubuntu 11.10.

I have patched up the Ubuntu 11.04 gcc41-compat,
so it will work in Ubuntu 11.10 :
sudo dpkg -i \
gcc41-compat-4.1.2.ubu1110_i386.deb g++41-compat-4.1.2_i386.deb
.. Then reboot, and the new gcc41 / g++41 will work.

Download gcc41-compat for Ubuntu 11.10 here ..
https://docs.google.com/open?id=0B7S...NjZmMHkyaE9Odw
g++41-compat https://docs.google.com/open?id=0B7S...FlODA4YWFiMTcx

Probably start from scratch with :
cd ns-allinone-2.33/ && export CC=gcc41 CXX=g++41 && ./install

Result, ns-2.33/validate :
Code:
validate overall report: all portable tests passed but
some non-portable tests failed:
     ./test-all-session
.

Last edited by knudfl; 03-27-2012 at 04:16 PM.
 
Old 03-27-2012, 04:14 PM   #15
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2019 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,268

Rep: Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568
# 13

Ubuntu 10.04 isn't a problem. You can just do :
sudo apt-get install g++-4.1
 
  


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
Mobiwan for Ns2.33 bsyew Linux - Newbie 37 01-22-2012 05:16 AM
not able to run tcl for mobiwan manjunath11 Linux - Newbie 6 11-05-2010 03:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:43 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