Professional Documents
Culture Documents
Aodv
Aodv
while {$a == 1 } {
puts "Enter the Routing Agents in mobile networking"
puts "1. AODV"
puts "2. DSDV"
puts "3. DSR"
set top [gets stdin]
if {$top == 1} {
set opt(chan)
set opt(prop)
set opt(netif)
set opt(mac)
set opt(ifq)
set opt(ll)
set opt(ant)
set opt(ifqlen)
set opt(nn)
set opt(rp)
set opt(x)
set opt(y)
Channel/WirelessChannel
Propagation/TwoRayGround
Phy/WirelessPhy
Mac/802_11
Queue/DropTail/PriQueue
LL
Antenna/OmniAntenna
50
22
AODV
1800
840
;#
;#
;#
;#
;#
;#
;#
;#
;#
;#
;#
;#
channel type
radio-propagation model
network interface type
MAC type
interface queue type
link layer type
antenna model
max packet in ifq
number of mobilenodes
routing protocol
X dimension of topography
Y dimension of topography
at
at
at
at
at
at
at
at
at
at
at
at
at
at
at
at
at
at
at
at
at
0.75
0.75
0.20
1.25
0.75
0.75
1.50
1.25
1.25
1.25
0.50
0.25
1.25
1.25
1.25
1.25
0.75
0.75
0.20
1.25
0.75
initial_node_pos
initial_node_pos
initial_node_pos
initial_node_pos
initial_node_pos
initial_node_pos
initial_node_pos
initial_node_pos
$Server1 125
$Server2 125
$n2 70
$n3 70
$n4 40
$n5 70
$n6 70
$n7 70
$ns_
$ns_
$ns_
$ns_
$ns_
$ns_
$ns_
$ns_
$ns_
$ns_
$ns_
$ns_
$ns_
$ns_
$ns_
initial_node_pos
initial_node_pos
initial_node_pos
initial_node_pos
initial_node_pos
initial_node_pos
initial_node_pos
initial_node_pos
initial_node_pos
initial_node_pos
initial_node_pos
initial_node_pos
initial_node_pos
initial_node_pos
initial_node_pos
$n8 70
$n9 70
$n10 70
$n11 70
$n12 70
$n13 70
$n14 70
$n15 70
$n16 70
$n17 70
$n18 70
$n19 70
$n20 70
$n21 70
$n22 70
at
at
at
at
at
at
at
at
at
at
at
at
at
at
at
at
at
at
at
at
at
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
} elseif {$top == 2} {
# 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(ifqlen)
50
set val(nn)
7
set val(rp)
DSDV
set val(x)
500
set val(y)
400
set
set
set
set
$ns
$ns
$ns
;#
;#
;#
;#
;#
;#
;#
;#
;#
;#
;#
;#
channel type
radio-propagation model
network interface type
MAC type
interface queue type
link layer type
antenna model
max packet in ifq
number of mobilenodes
routing protocol
X dimension of topography
Y dimension of topography
val(stop)
100
;# time of simulation end
ns
[new Simulator]
tracefd
[open dsdv.tr w]
namtrace
[open dsdv.nam w]
use-newtrace
trace-all $tracefd
namtrace-all-wireless $namtrace $val(x) $val(y)
Antenna/OmniAntenna
Antenna/OmniAntenna
Antenna/OmniAntenna
Antenna/OmniAntenna
Antenna/OmniAntenna
set
set
set
set
set
X_ 0
Y_ 0
Z_ 1.5
Gt_ 1.0
Gr_ 1.0
# Generation of movements
$ns at 10.0 "$node_(0) setdest
$ns at 15.0 "$node_(1) setdest
$ns at 29.0 "$node_(2) setdest
$ns at 70.0 "$node_(3) setdest
$ns at 80.0 "$node_(4) setdest
$ns at 90.0 "$node_(5) setdest
$ns at 80.0 "$node_(6) setdest
[open dsr.nam w]