Docsity

Network Simulation Configuration: Nodes, Queues, Routing Protocol, and Traffic Types, Assignments of Computer Science

Toggle sidebar
bg1
1
Design and setup
1. Consist of 20 nodes
2. Queue types: DropTail, RE D,DRR
3. Routing protocol: DSDV
4. Traffic types: CBR, Telnet, FTP
# Define options
============== ============ ============= ============= ============
set val(chan) Channel/WirelessChannel ;# channel type
set val(prop) Propagation/TwoRayGround ;# radio-propagation model
set val(netif) Phy/WirelessPhy ;# network interface type
set val(mac) Mac/802_11 ;# MAC type
set val(ifq) Queue/DropTail/PriQueue ;# interface queue type
setval(ll) LL ;# link layer type
setval(ant) Antenna/OmniAntenna ;# antenna model
setval(ifqlen) 50 ;# max packet inifq
setval(nn) 20 ;# number ofmobilenodes
setval(rp) DSDV ;# routing protocol
set val(x) 500 ;# Size of topology in X axis
set val(y) 500 ;# Size of topology in Y axis
setval(scenario) "tao-20" ;# Scenario file
………………..
# UDP connections from node_(0) and node _(10) (with CBR source agent )
set udp1 [new Agent/UDP]
$ns_ attach-agent $node_(1) $udp1
$udp1 set class_ 2
$udp1 set fid_ 2
set cbr1 [new Application/Traffic/C BR]
$cbr1 attach-agent $udp1
$cbr1 set packetSize_ 1000
$cbr1 set interval_ 0.002
# Set loss monitor at node 10
set mon1 [new Agent/LossMon itor]
$ns_ attach-agent $node_(10) $mon 1
$ns_ connect $udp1 $mon1
pf2

Partial preview of the text

Download Network Simulation Configuration: Nodes, Queues, Routing Protocol, and Traffic Types and more Assignments Computer Science in PDF only on Docsity!

Design and setup

1. Consist of 20 nodes

2. Queue types: DropTail, RED,DRR

3. Routing protocol: DSDV

4. Traffic types: CBR, Telnet, FTP

Define options

================================================================ set val(chan) Channel/WirelessChannel ;# channel type set val(prop) Propagation/TwoRayGround ;# radio-propagation model set val(netif) Phy/WirelessPhy ;# network interface type set val(mac) Mac/802_11 ;# MAC type set val(ifq) Queue/DropTail/PriQueue ;# interface queue type set val(ll) LL ;# link layer type set val(ant) Antenna/OmniAntenna ;# antenna model set val(ifqlen) 50 ;# max packet in ifq set val(nn) 20 ;# number of mobilenodes set val(rp) DSDV ;# routing protocol set val(x) 500 ;# Size of topology in X axis set val(y) 500 ;# Size of topology in Y axis set val(scenario) "tao-20" ;# Scenario file

………………..

UDP connections from node_(0) and node_(10) (with CBR source agent )

set udp1 [new Agent/UDP] $ns_ attach-agent $node_(1) $udp $udp1 set class_ 2 $udp1 set fid_ 2 set cbr1 [new Application/Traffic/CBR] $cbr1 attach-agent $udp $cbr1 set packetSize_ 1000 $cbr1 set interval_ 0.

Set loss monitor at node 10

set mon1 [new Agent/LossMonitor] $ns_ attach-agent $node_(10) $mon $ns_ connect $udp1 $mon

DropTail RED DRR

FTP

Telnet

UDP

Packet Drop Rate