Network simulator ns2
Utilisateur anonyme
-
Nana -
Nana -
Salut
SVP j'ai besoin d'un coup de main je n'arrive pas a relier les noeuds tcp0 et tcp1 avec le wireless des technologies(wifi,wimax et hiperlan) afin d'obtenir les differents figures du throughput et du delay (retard)
Merci de votre aide
set val(chan) Channel/WirelessChannel
set val(prop) Propagation/TwoRayGround
set val(netif) Phy/WirelessPhy
set val(mac) Mac/802_11
set val(ifq) Queue/DropTail/PriQueue
set val(ll) LL
set val(ant) Antenna/OmniAntenna
set val(ifqlen) 50
set val(nn) 6
set val(rp) DSDV
set val(x) 800
set val(y) 700
proc create_topology {} {
global ns n num_node
set num_node 6
set n0 [$ns node]
set n1 [$ns node]
set n2 [$ns node]
set n3 [$ns node]
set n4 [$ns node]
set n5 [$ns node]
# EDGES (from-node to-node length a b):
$ns duplex-link $n0 $n2 100Mb 10ms DropTail
$ns duplex-link $n1 $n2 100Mb 10ms DropTail
$ns duplex-link $n2 $n3 100Mb 10ms DropTail
$ns duplex-link $n3 $n4 100Mb 10ms DropTail
$ns duplex-link $n3 $n5 100Mb 10ms DropTail
$ns duplex-link-op $n0 $n2 orient right-down
$ns duplex-link-op $n1 $n2 orient right-up
$ns duplex-link-op $n2 $n3 orient right
$ns duplex-link-op $n3 $n4 orient right-up
$ns duplex-link-op $n3 $n5 orient right-down
$ns queue-limit $n(2) $n(3) 25
$ns duplex-link-op $n(2) $n(3) queuePos 1.5
}
# end of create_topology
set ns [new Simulator]
# set up colors for nam
$ns color 1 Blue
$ns color 2 Red
# Create nam trace and generic packet trace
$ns namtrace-all [open out.nam w]
# trace-all is the generic trace we've been using
$ns trace-all [open out.tr w]
create_topology
set tcp0 [new Agent/TCP]
$tcp0 set class_ 1
set sink0 [new Agent/TCPSink]
$ns attach-agent $n0 $tcp0
$ns attach-agent $n4 $sink0
$ns connect $tcp0 $sink0
set ftp0 [new Application/FTP]
$ftp0 attach-agent $tcp0
set tcp1 [new Agent/TCP]
$tcp1 set class_ 2
set sink1 [new Agent/TCPSink]
$ns attach-agent $n1 $tcp1
$ns attach-agent $n5 $sink1
$ns connect $tcp1 $sink1
set ftp1 [new Application/FTP]
$ftp1 attach-agent $tcp1
$ns at 30.0 "finish"
proc finish {} {
global ns
$ns flush-trace
puts "running nam..."
# exec to run unix command
exec nam out.nam &
exit 0
}
set tracefd [open out.tr w]
$ns_ trace-all $tracefd
set namtrace [open out.nam w]
$ns_ namtrace-all-wireless $namtrace $val(x) $val(y)
set f0 [open out0.tr w]
set f1 [open out1.tr w]
set tot0 0
set tot1 0
proc clean {} {
global tcp0 tcp1
$tcp0 set ndatabytes_0
$tcp0 set nrexmitbytes_0
$tcp1 set ndatabytes_0
$tcp1 set nrexmitbytes_0
}
proc record {} {
global tcp0 tcp1 tot0 tot1 psize startrecord endrecord f0 f1
set ns_ [Simulator instance]
set time 0.06
set bw0_0 [$tcp0 set ndatabytes_]
set bw0_1 [$tcp0 set nrexmitbytes_]
set bw0 [expr $bw0_0 - $bw0_1]
set tot0 [expr $tot0 + $bw0]
set bw1_0 [$tcp1 set ndatabytes_]
set bw1_1 [$tcp1 set nrexmitbytes_]
set bw1 [expr $bw1_0 - $bw1_1]
set tot1 [expr $tot1 + $bw1]
set now [$ns_now]
puts $f0 "$now [expr $bw0/$time*8/1000000]"
puts $f1 "$now [expr $bw1/$time*8/1000000]"
if {$now > $startrecord } {
puts $f2 "$now [expr $tot0/($now-$startrecord)*8/1000000]"
puts $f3 "$now [expr $tot1/($now-$startrecord)*8/1000000]"
}
$tcp0 set ndatabytes_0
$tcp0 set nrexmibytes_0
$tcp1 set ndatabytes_0
$tcp1 set nrexmibytes_0
if {$now < $endrecord } {$ns_at [expr $now+$time] "record"}
}
create_topology
proc stop {} {
global ns_ tracefd namtrace f0 f1
$ns_ flush-trace
close $tracefd
close $namtrace
close $f0
close $f1
exec nam out.nam &
exec xgraph out0.tr out1.tr -geometry 800*700 &
exit 0
create-god $val(nn)
set topo [new Topography]
$topo load_flatgrid $val(x) $val(y)
set chan_1_ [new $val(chan)]
$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_1_
set n(0) [$ns node]
$n(0) random-motion 0;
$ns initial_node_pos $n(0) 20
$god_ set-dist 0 1 1
$god_ set-dist 0 2 1
$n(0) set X _ 5.0
$n(0) set Y _ 2.0
$n(0) set Z _ 0.0
set n(1) [$ns_ node]
$n(1) random-motion 0
$ns initial_node_pos $n(1) 20
$n(1) set X _ 300.0
$n(1) set Y _ 300.0
$n(1) set Z _ 0.0
$ns at 5.0 "$n(0) setdest 50.0 20.0 10.0"
$ns at 7.0 "$n(1) setdest 200.0 20.0 40.0"
$ns at 0.5 "$ftp0 start"
$ns at 1.0 "$ftp1 start"
$ns at 5.0 "$ftp0 stop"
$ns at 6.0 "$ftp1 stop"
$ns at 50.0 "$n(0) setdest 50.0 250.0 35.0"
$ns at 65.0 "$n(1) setdest 300.0 200.0 50.0"
for {set i 0} {$i < $val(nn)} {incr i} {
$ns at 95.0 "$n($i) reset";
}
$ns at 95.0001
$ns at 95.0002 "stop"
puts "Starting Simulation..."
# Start the simualtion
$ns run
SVP j'ai besoin d'un coup de main je n'arrive pas a relier les noeuds tcp0 et tcp1 avec le wireless des technologies(wifi,wimax et hiperlan) afin d'obtenir les differents figures du throughput et du delay (retard)
Merci de votre aide
set val(chan) Channel/WirelessChannel
set val(prop) Propagation/TwoRayGround
set val(netif) Phy/WirelessPhy
set val(mac) Mac/802_11
set val(ifq) Queue/DropTail/PriQueue
set val(ll) LL
set val(ant) Antenna/OmniAntenna
set val(ifqlen) 50
set val(nn) 6
set val(rp) DSDV
set val(x) 800
set val(y) 700
proc create_topology {} {
global ns n num_node
set num_node 6
set n0 [$ns node]
set n1 [$ns node]
set n2 [$ns node]
set n3 [$ns node]
set n4 [$ns node]
set n5 [$ns node]
# EDGES (from-node to-node length a b):
$ns duplex-link $n0 $n2 100Mb 10ms DropTail
$ns duplex-link $n1 $n2 100Mb 10ms DropTail
$ns duplex-link $n2 $n3 100Mb 10ms DropTail
$ns duplex-link $n3 $n4 100Mb 10ms DropTail
$ns duplex-link $n3 $n5 100Mb 10ms DropTail
$ns duplex-link-op $n0 $n2 orient right-down
$ns duplex-link-op $n1 $n2 orient right-up
$ns duplex-link-op $n2 $n3 orient right
$ns duplex-link-op $n3 $n4 orient right-up
$ns duplex-link-op $n3 $n5 orient right-down
$ns queue-limit $n(2) $n(3) 25
$ns duplex-link-op $n(2) $n(3) queuePos 1.5
}
# end of create_topology
set ns [new Simulator]
# set up colors for nam
$ns color 1 Blue
$ns color 2 Red
# Create nam trace and generic packet trace
$ns namtrace-all [open out.nam w]
# trace-all is the generic trace we've been using
$ns trace-all [open out.tr w]
create_topology
set tcp0 [new Agent/TCP]
$tcp0 set class_ 1
set sink0 [new Agent/TCPSink]
$ns attach-agent $n0 $tcp0
$ns attach-agent $n4 $sink0
$ns connect $tcp0 $sink0
set ftp0 [new Application/FTP]
$ftp0 attach-agent $tcp0
set tcp1 [new Agent/TCP]
$tcp1 set class_ 2
set sink1 [new Agent/TCPSink]
$ns attach-agent $n1 $tcp1
$ns attach-agent $n5 $sink1
$ns connect $tcp1 $sink1
set ftp1 [new Application/FTP]
$ftp1 attach-agent $tcp1
$ns at 30.0 "finish"
proc finish {} {
global ns
$ns flush-trace
puts "running nam..."
# exec to run unix command
exec nam out.nam &
exit 0
}
set tracefd [open out.tr w]
$ns_ trace-all $tracefd
set namtrace [open out.nam w]
$ns_ namtrace-all-wireless $namtrace $val(x) $val(y)
set f0 [open out0.tr w]
set f1 [open out1.tr w]
set tot0 0
set tot1 0
proc clean {} {
global tcp0 tcp1
$tcp0 set ndatabytes_0
$tcp0 set nrexmitbytes_0
$tcp1 set ndatabytes_0
$tcp1 set nrexmitbytes_0
}
proc record {} {
global tcp0 tcp1 tot0 tot1 psize startrecord endrecord f0 f1
set ns_ [Simulator instance]
set time 0.06
set bw0_0 [$tcp0 set ndatabytes_]
set bw0_1 [$tcp0 set nrexmitbytes_]
set bw0 [expr $bw0_0 - $bw0_1]
set tot0 [expr $tot0 + $bw0]
set bw1_0 [$tcp1 set ndatabytes_]
set bw1_1 [$tcp1 set nrexmitbytes_]
set bw1 [expr $bw1_0 - $bw1_1]
set tot1 [expr $tot1 + $bw1]
set now [$ns_now]
puts $f0 "$now [expr $bw0/$time*8/1000000]"
puts $f1 "$now [expr $bw1/$time*8/1000000]"
if {$now > $startrecord } {
puts $f2 "$now [expr $tot0/($now-$startrecord)*8/1000000]"
puts $f3 "$now [expr $tot1/($now-$startrecord)*8/1000000]"
}
$tcp0 set ndatabytes_0
$tcp0 set nrexmibytes_0
$tcp1 set ndatabytes_0
$tcp1 set nrexmibytes_0
if {$now < $endrecord } {$ns_at [expr $now+$time] "record"}
}
create_topology
proc stop {} {
global ns_ tracefd namtrace f0 f1
$ns_ flush-trace
close $tracefd
close $namtrace
close $f0
close $f1
exec nam out.nam &
exec xgraph out0.tr out1.tr -geometry 800*700 &
exit 0
create-god $val(nn)
set topo [new Topography]
$topo load_flatgrid $val(x) $val(y)
set chan_1_ [new $val(chan)]
$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_1_
set n(0) [$ns node]
$n(0) random-motion 0;
$ns initial_node_pos $n(0) 20
$god_ set-dist 0 1 1
$god_ set-dist 0 2 1
$n(0) set X _ 5.0
$n(0) set Y _ 2.0
$n(0) set Z _ 0.0
set n(1) [$ns_ node]
$n(1) random-motion 0
$ns initial_node_pos $n(1) 20
$n(1) set X _ 300.0
$n(1) set Y _ 300.0
$n(1) set Z _ 0.0
$ns at 5.0 "$n(0) setdest 50.0 20.0 10.0"
$ns at 7.0 "$n(1) setdest 200.0 20.0 40.0"
$ns at 0.5 "$ftp0 start"
$ns at 1.0 "$ftp1 start"
$ns at 5.0 "$ftp0 stop"
$ns at 6.0 "$ftp1 stop"
$ns at 50.0 "$n(0) setdest 50.0 250.0 35.0"
$ns at 65.0 "$n(1) setdest 300.0 200.0 50.0"
for {set i 0} {$i < $val(nn)} {incr i} {
$ns at 95.0 "$n($i) reset";
}
$ns at 95.0001
$ns at 95.0002 "stop"
puts "Starting Simulation..."
# Start the simualtion
$ns run
A voir également:
- Network simulator ns2
- Yandere simulator - Télécharger - Stratégie
- Windows xp simulator - Télécharger - Études & Formations
- Carp fishing simulator - Télécharger - Simulation
- Farming simulator 22 clé activation gratuit ✓ - Forum Jeux vidéo
- Softperfect network scanner - Télécharger - Divers Réseau & Wi-Fi
34 réponses
salut
j'ai besoin d'un script wimax mobile sous ns2.29 avec le language tcl
si quelq'un peut m'aider...............
merci
j'ai besoin d'un script wimax mobile sous ns2.29 avec le language tcl
si quelq'un peut m'aider...............
merci
SALUT, je travaille sur NS2, je veut faire un scénario consitué d'un point d'accès et des stations mobiles où les stations communiquent entre eux à travers le point d'accès, j'ai essayé plusieurs fois, mais j'ai pas trouvé les résultats attendu, SVPP est ce que quelqu'un a travaillé le meme scénario peut m'aider, SVP je veut le script TCL de ce scénario, merci de m'aider.
salut rachelstar
Je sais pas si tu as réussi à faire ce que tu veux, mais je travaille sur à peu près le même projet. Pour cela j'ai installé la dernière version d'ns ( 2.33). Puis j'ai regardé le script TCL infra.tcl(ns-2.33/tcl/ex), mais ça marche pas bien. Cependant dans ce script on voit comment créer un access point.
Dis moi si tu as réussi à finir ton projet ça pourra m'aider aussi.
Cordialement
Je sais pas si tu as réussi à faire ce que tu veux, mais je travaille sur à peu près le même projet. Pour cela j'ai installé la dernière version d'ns ( 2.33). Puis j'ai regardé le script TCL infra.tcl(ns-2.33/tcl/ex), mais ça marche pas bien. Cependant dans ce script on voit comment créer un access point.
Dis moi si tu as réussi à finir ton projet ça pourra m'aider aussi.
Cordialement
voila un script tcl.
# Copyright (c) 1999 Regents of the University of Southern California.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. All advertising materials mentioning features or use of this software
# must display the following acknowledgement:
# This product includes software developed by the Computer Systems
# Engineering Group at Lawrence Berkeley Laboratory.
# 4. Neither the name of the University nor of the Laboratory may be used
# to endorse or promote products derived from this software without
# specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
# wireless1.tcl
# A simple example for wireless simulation
# ======================================================================
# Define options
# ======================================================================
set val(chan) Channel/WirelessChannel
set val(prop) Propagation/TwoRayGround
set val(netif) Phy/WirelessPhy
set val(mac) Mac/802_11
set val(ifq) Queue/DropTail/PriQueue
set val(ll) LL
set val(ant) Antenna/OmniAntenna
set val(x) 670 ;# X dimension of the topography
set val(y) 670 ;# Y dimension of the topography
set val(ifqlen) 50 ;# max packet in ifq
set val(seed) 0.0
set val(adhocRouting) DSR
set val(nn) 3 ;# how many nodes are simulated
set val(cp) "../mobility/scene/cbr-3-test"
set val(sc) "../mobility/scene/scen-3-test"
set val(stop) 400.0 ;# simulation time
# =====================================================================
# Main Program
# ======================================================================
#
# Initialize Global Variables
#
# create simulator instance
set ns_ [new Simulator]
# setup topography object
set topo [new Topography]
# create trace object for ns and nam
set tracefd [open wireless1-out.tr w]
set namtrace [open wireless1-out.nam w]
$ns_ trace-all $tracefd
$ns_ namtrace-all-wireless $namtrace $val(x) $val(y)
# define topology
$topo load_flatgrid $val(x) $val(y)
#
# Create God
#
set god_ [create-god $val(nn)]
#
# define how node should be created
#
#global node setting
$ns_ node-config -adhocRouting $val(adhocRouting) \
-llType $val(ll) \
-macType $val(mac) \
-ifqType $val(ifq) \
-ifqLen $val(ifqlen) \
-antType $val(ant) \
-propType $val(prop) \
-phyType $val(netif) \
-channelType $val(chan) \
-topoInstance $topo \
-agentTrace ON \
-routerTrace OFF \
-macTrace OFF
#
# Create the specified number of nodes [$val(nn)] and "attach" them
# to the channel.
for {set i 0} {$i < $val(nn) } {incr i} {
set node_($i) [$ns_ node]
$node_($i) random-motion 0 ;# disable random motion
}
#
# Define node movement model
#
puts "Loading connection pattern..."
source $val(cp)
#
# Define traffic model
#
puts "Loading scenario file..."
source $val(sc)
# Define node initial position in nam
for {set i 0} {$i < $val(nn)} {incr i} {
# 20 defines the node size in nam, must adjust it according to your scenario
# The function must be called after mobility model is defined
$ns_ initial_node_pos $node_($i) 20
}
#
# Tell nodes when the simulation ends
#
for {set i 0} {$i < $val(nn) } {incr i} {
$ns_ at $val(stop).0 "$node_($i) reset";
}
$ns_ at $val(stop).0002 "puts \"NS EXITING...\" ; $ns_ halt"
puts $tracefd "M 0.0 nn $val(nn) x $val(x) y $val(y) rp $val(adhocRouting)"
puts $tracefd "M 0.0 sc $val(sc) cp $val(cp) seed $val(seed)"
puts $tracefd "M 0.0 prop $val(prop) ant $val(ant)"
puts "Starting Simulation..."
$ns_ run
# Copyright (c) 1999 Regents of the University of Southern California.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. All advertising materials mentioning features or use of this software
# must display the following acknowledgement:
# This product includes software developed by the Computer Systems
# Engineering Group at Lawrence Berkeley Laboratory.
# 4. Neither the name of the University nor of the Laboratory may be used
# to endorse or promote products derived from this software without
# specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
# wireless1.tcl
# A simple example for wireless simulation
# ======================================================================
# Define options
# ======================================================================
set val(chan) Channel/WirelessChannel
set val(prop) Propagation/TwoRayGround
set val(netif) Phy/WirelessPhy
set val(mac) Mac/802_11
set val(ifq) Queue/DropTail/PriQueue
set val(ll) LL
set val(ant) Antenna/OmniAntenna
set val(x) 670 ;# X dimension of the topography
set val(y) 670 ;# Y dimension of the topography
set val(ifqlen) 50 ;# max packet in ifq
set val(seed) 0.0
set val(adhocRouting) DSR
set val(nn) 3 ;# how many nodes are simulated
set val(cp) "../mobility/scene/cbr-3-test"
set val(sc) "../mobility/scene/scen-3-test"
set val(stop) 400.0 ;# simulation time
# =====================================================================
# Main Program
# ======================================================================
#
# Initialize Global Variables
#
# create simulator instance
set ns_ [new Simulator]
# setup topography object
set topo [new Topography]
# create trace object for ns and nam
set tracefd [open wireless1-out.tr w]
set namtrace [open wireless1-out.nam w]
$ns_ trace-all $tracefd
$ns_ namtrace-all-wireless $namtrace $val(x) $val(y)
# define topology
$topo load_flatgrid $val(x) $val(y)
#
# Create God
#
set god_ [create-god $val(nn)]
#
# define how node should be created
#
#global node setting
$ns_ node-config -adhocRouting $val(adhocRouting) \
-llType $val(ll) \
-macType $val(mac) \
-ifqType $val(ifq) \
-ifqLen $val(ifqlen) \
-antType $val(ant) \
-propType $val(prop) \
-phyType $val(netif) \
-channelType $val(chan) \
-topoInstance $topo \
-agentTrace ON \
-routerTrace OFF \
-macTrace OFF
#
# Create the specified number of nodes [$val(nn)] and "attach" them
# to the channel.
for {set i 0} {$i < $val(nn) } {incr i} {
set node_($i) [$ns_ node]
$node_($i) random-motion 0 ;# disable random motion
}
#
# Define node movement model
#
puts "Loading connection pattern..."
source $val(cp)
#
# Define traffic model
#
puts "Loading scenario file..."
source $val(sc)
# Define node initial position in nam
for {set i 0} {$i < $val(nn)} {incr i} {
# 20 defines the node size in nam, must adjust it according to your scenario
# The function must be called after mobility model is defined
$ns_ initial_node_pos $node_($i) 20
}
#
# Tell nodes when the simulation ends
#
for {set i 0} {$i < $val(nn) } {incr i} {
$ns_ at $val(stop).0 "$node_($i) reset";
}
$ns_ at $val(stop).0002 "puts \"NS EXITING...\" ; $ns_ halt"
puts $tracefd "M 0.0 nn $val(nn) x $val(x) y $val(y) rp $val(adhocRouting)"
puts $tracefd "M 0.0 sc $val(sc) cp $val(cp) seed $val(seed)"
puts $tracefd "M 0.0 prop $val(prop) ant $val(ant)"
puts "Starting Simulation..."
$ns_ run
$ ns cm1.TCL
num_nodes is set 3
warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl
INITIALIZE THE LIST xListHead
Loading connection pattern...
couldn't read file "../mobility/scene/cbr-3-test": no such file or directory
while executing
"source.orig ../mobility/scene/cbr-3-test"
("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 $val(cp)"
(file "cm1.TCL" line 121)
Administrateur@titanium ~/ns-allinone-2.29/bin
$
REGARDE CE QUE JE RECOI QUAN J4EXUCUTE
num_nodes is set 3
warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl
INITIALIZE THE LIST xListHead
Loading connection pattern...
couldn't read file "../mobility/scene/cbr-3-test": no such file or directory
while executing
"source.orig ../mobility/scene/cbr-3-test"
("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 $val(cp)"
(file "cm1.TCL" line 121)
Administrateur@titanium ~/ns-allinone-2.29/bin
$
REGARDE CE QUE JE RECOI QUAN J4EXUCUTE
bonjour,
moi aussi j'ai le même problème!!
bon j'ai corrigé quelque erreurs, parexepmle aulieu de
set val(cp) ".. \mobility\scene\cbr-3-test"
j'ai mis ça
set val(cp) "local\ns-allinone-2.29\ns-2.29\tcl\mobility\scene\cbr-3-test"
mais ça reste encore quelques erreur , en fait ça m'affiche ça
$ ns wireless1.tcl
num_nodes is set 3
INITIALIZE THE LIST xListHead
Loading connection pattern...
couldn't read file "local
s-allinone-2.29
s-2.29 clmobilityscenecbr-3-test": no such file o
while executing
"source.orig {local
s-allinone-2.29
s-2.29 clmobilityscenecbr-3-test}"
("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 $val(cp)"
(file "wireless1.tcl" line 124)
merci de m'aider
moi aussi j'ai le même problème!!
bon j'ai corrigé quelque erreurs, parexepmle aulieu de
set val(cp) ".. \mobility\scene\cbr-3-test"
j'ai mis ça
set val(cp) "local\ns-allinone-2.29\ns-2.29\tcl\mobility\scene\cbr-3-test"
mais ça reste encore quelques erreur , en fait ça m'affiche ça
$ ns wireless1.tcl
num_nodes is set 3
INITIALIZE THE LIST xListHead
Loading connection pattern...
couldn't read file "local
s-allinone-2.29
s-2.29 clmobilityscenecbr-3-test": no such file o
while executing
"source.orig {local
s-allinone-2.29
s-2.29 clmobilityscenecbr-3-test}"
("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 $val(cp)"
(file "wireless1.tcl" line 124)
merci de m'aider
Salut,
En fait il faut faire comme tu as fait à peu près. Seulement l'ordinateur ne connaît pas local, il faut lui donner un chemin soit à partir du home-directory ( noté ~) soit à partir de la racine ( notée /), par exemple local est ton home directory ( le dossier sur lequel tu te trouve des que tu ouvres la console), donc il faut mettre ~/local/ns...etc
voilà
Cordialement
En fait il faut faire comme tu as fait à peu près. Seulement l'ordinateur ne connaît pas local, il faut lui donner un chemin soit à partir du home-directory ( noté ~) soit à partir de la racine ( notée /), par exemple local est ton home directory ( le dossier sur lequel tu te trouve des que tu ouvres la console), donc il faut mettre ~/local/ns...etc
voilà
Cordialement
slt tt le monde
j travail sur la simulation du protocol dsr sous ns2.28
lorseque j lance l'éxecution du script simple-wireless.tcl qui é ds ns2.28/tcl/ex il ne complete pas la simulation
et il m'affiche l'érreur suivante "segmentation fault segmentation fault (core dumped)
j travail sur la simulation du protocol dsr sous ns2.28
lorseque j lance l'éxecution du script simple-wireless.tcl qui é ds ns2.28/tcl/ex il ne complete pas la simulation
et il m'affiche l'érreur suivante "segmentation fault segmentation fault (core dumped)
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question
Hello Eric,
I'm too a student at telecom interested in heterogeneous networks simulations between wimax (802.16) and wifi (802.11). Had you found a way to come over your problem and solve it up?
If yes, please let me know where to find a wimax module for NS2
You can drop me a word at : providence.salumu_munga@int-evry.fr
Thanks a lot!
I'm too a student at telecom interested in heterogeneous networks simulations between wimax (802.16) and wifi (802.11). Had you found a way to come over your problem and solve it up?
If yes, please let me know where to find a wimax module for NS2
You can drop me a word at : providence.salumu_munga@int-evry.fr
Thanks a lot!
Bonjour,
j'aime utiliser le simulateur ns2 et je ne sais pas encore qoui installer t utiliser sur une plateforme windows. Est ce qu'il y a un coup de main?
merci
j'aime utiliser le simulateur ns2 et je ne sais pas encore qoui installer t utiliser sur une plateforme windows. Est ce qu'il y a un coup de main?
merci
Bonjour,
Je dois simuler le protocole LAR (location aided routing), j'ai trouvé les scripts de ce protocole mais ça ne peut marcher qu'avec la version NS2.1b7a. Si qqn a travaillé avec cette version d'NS, merci de me dire la version de linux sur laquelle je peux l'installer.
merci beaucoup pour votre aide!
Je dois simuler le protocole LAR (location aided routing), j'ai trouvé les scripts de ce protocole mais ça ne peut marcher qu'avec la version NS2.1b7a. Si qqn a travaillé avec cette version d'NS, merci de me dire la version de linux sur laquelle je peux l'installer.
merci beaucoup pour votre aide!
Bonjour,
je travail sur la simulation du protocole dsr pour la couche reseau en precison sur le maintient
des routes lors de l'acheminement du paquet RREQ ,si la route est perdue
je travail sur la simulation du protocole dsr pour la couche reseau en precison sur le maintient
des routes lors de l'acheminement du paquet RREQ ,si la route est perdue
salam,
j'ai essayé d'executer ce scripte dans cet lien:
https://www.isi.edu/nsnam/ns/tutorial/examples/simple-wireless.tcl et le terminal a affiché ce resultat sans visualisation graphique (nam)
[amine@localhost tcl l]$ ns simple-wireless.tcl num_nodes is set 2 warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl INITIALIZE THE LIST xListHead Starting Simulation... channel.cc:sendUp - Calc highestAntennaZ_ and distCST_ highestAntennaZ_ = 1.5, distCST_ = 550.0 SORTING LISTS ...DONE! NS EXITING...
[amine@localhost tcl l]$
- svp comment resoudre ce pb?
meilleur salutation
j'ai essayé d'executer ce scripte dans cet lien:
https://www.isi.edu/nsnam/ns/tutorial/examples/simple-wireless.tcl et le terminal a affiché ce resultat sans visualisation graphique (nam)
[amine@localhost tcl l]$ ns simple-wireless.tcl num_nodes is set 2 warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl INITIALIZE THE LIST xListHead Starting Simulation... channel.cc:sendUp - Calc highestAntennaZ_ and distCST_ highestAntennaZ_ = 1.5, distCST_ = 550.0 SORTING LISTS ...DONE! NS EXITING...
[amine@localhost tcl l]$
- svp comment resoudre ce pb?
meilleur salutation
Bon soir
Il faut seulement ajouter :
# Create channel #1
set chan_1_ [new $val(chan)]
$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 OFF \
-movementTrace ON \
-channel $chan_1_
Fait moi signe, si ca marche , car j'avais le meme pbm mais.
Il faut seulement ajouter :
# Create channel #1
set chan_1_ [new $val(chan)]
$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 OFF \
-movementTrace ON \
-channel $chan_1_
Fait moi signe, si ca marche , car j'avais le meme pbm mais.
Bon soir
Il faut seulement ajouter :
# Create channel #1
set chan_1_ [new $val(chan)]
$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 OFF \
-movementTrace ON \
-channel $chan_1_
Fait moi signe, si ca marche , car j'avais le meme pbm mais.1 message(s) posté(s) depuis le dimanche 26 août 2007
Il faut seulement ajouter :
# Create channel #1
set chan_1_ [new $val(chan)]
$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 OFF \
-movementTrace ON \
-channel $chan_1_
Fait moi signe, si ca marche , car j'avais le meme pbm mais.1 message(s) posté(s) depuis le dimanche 26 août 2007
Dans le simple-wireless.tcl, on n'execute pas le .nam, regarde dans la procedure finish ou (stop).
Tu a deux manières de faire
-soit tu veux que le nam s'ouvre systématiquement, donc tu rajoutes dans la procedure finish :
exec nam (nom du fichier .nam ) &
- soit dans la console, tu te met dans le repertoire ou il y le fichier .nam ( avec les cd ) et tu tape :
nam (nom du fichier .nam ) &
voilà j'espère que ça t'a aidé
Tu a deux manières de faire
-soit tu veux que le nam s'ouvre systématiquement, donc tu rajoutes dans la procedure finish :
exec nam (nom du fichier .nam ) &
- soit dans la console, tu te met dans le repertoire ou il y le fichier .nam ( avec les cd ) et tu tape :
nam (nom du fichier .nam ) &
voilà j'espère que ça t'a aidé
J'ai un problème de trouver des exemples de script TCL pour simuler le WIMAX sur ns2. Merci de bien vuloir m'aider à en trouver quelques uns.
Bonsoir à tous,
Est ce que quelqu'un peut me dire comment faire pour récuperrer la table de routage pour le protocole DSDV?
Qu'est ce que je dois ecrire dans le script TCL pour recupere cette information
Merci
Est ce que quelqu'un peut me dire comment faire pour récuperrer la table de routage pour le protocole DSDV?
Qu'est ce que je dois ecrire dans le script TCL pour recupere cette information
Merci
J'ai un problème de trouver des exemples de script TCL pour simuler le WIMAX sur ns2. Merci de bien vuloir m'aider à en trouver quelques uns.
bonjour mes amis
j'ai besoin des scripts tcl :
-script tcl de simulaation de routage dynamique par exemple .
-script tcl de simulaation d'un reseau a deux noeud mobile .
-script tcl de simulaation de la fonction de routage et visualisation de la file d'attente.
Merci de bien vouloir m'aider à en trouver quelques uns.
j'ai besoin des scripts tcl :
-script tcl de simulaation de routage dynamique par exemple .
-script tcl de simulaation d'un reseau a deux noeud mobile .
-script tcl de simulaation de la fonction de routage et visualisation de la file d'attente.
Merci de bien vouloir m'aider à en trouver quelques uns.
I am doing some research work in Wimax QoS provisioning do anyone have ns2 code simulated for any feature please send me to my mail id bhanu_365@yahoo.co.in
bonjour,
these are some links i hope that will help u
https://www.isi.edu/nsnam/ns/
https://wimaxforum.org/home
and i have some useful document if u want
good luck
these are some links i hope that will help u
https://www.isi.edu/nsnam/ns/
https://wimaxforum.org/home
and i have some useful document if u want
good luck
bonjour, je suis un etudiant et je prepare mon projet de fin d'etude, je cherche un module de protodole sip pour ns2.
(je veux simuler un reseau ad hoc on utilisant le protocome sip). merci..
(je veux simuler un reseau ad hoc on utilisant le protocome sip). merci..
salut je travail sur NS2 et j'ai des problemes de manipulations est ce qu'il y a un coup de main SVP
Salut ,
je travail avec NS ,j'ai besoin d'un script TCL de mecanisme de handover entre réseau wimax et UMTS,
si quelqu'un peut m'aider......
merci........
je travail avec NS ,j'ai besoin d'un script TCL de mecanisme de handover entre réseau wimax et UMTS,
si quelqu'un peut m'aider......
merci........
Bonjour,
SVP je travaille sur le sujet de la sécurité dans le réseau WiMAX et j'ai besoin des scripts pour pouvoir simuler ce réseau et également d'étudier sa sécurité. SVP si quelqu'un a déjà travaillé ou testé des scripts peut m'aider???
SVP j'ai besoin d'aide te merci.
NB: je travaille avec Ubuntu 12.04 et NS-2.35
SVP je travaille sur le sujet de la sécurité dans le réseau WiMAX et j'ai besoin des scripts pour pouvoir simuler ce réseau et également d'étudier sa sécurité. SVP si quelqu'un a déjà travaillé ou testé des scripts peut m'aider???
SVP j'ai besoin d'aide te merci.
NB: je travaille avec Ubuntu 12.04 et NS-2.35
voir post 15 c'est bien un script wimax sous ns2.29 .
bonne chance
voila un doc ,j'espère qu'il va t'aider pour manipuler avec NS-2 et savoir comment créer des noeuds sasn fils..
https://www.isi.edu/nsnam/ns/doc/ns_doc.pdf
bonne chance
j'utilisse une machine vertiuelle(ubuntu), mais j'arrive pas à éxecuté un scénario
tu peu me les commandes, pour faire ça??