Professional Documents
Culture Documents
Session 1: Xavier's Institute of Engineering, Mumbai
Session 1: Xavier's Institute of Engineering, Mumbai
DAY 1
SESSION 1
Basics of Linux
Introduction to NS-2
Installation of NS-2
Simulation System Architecture
NS-2 Directory Structure
First Simulation Scenario
Simulation Script
Running Simulation
Flow of Simulation
Structure of Animation Window
Second Simulation Scenario
Orientation of Nodes
12/08/2021
Basics of Linux (1)
3
12/08/2021
Basics of Linux (2)
4
12/08/2021
Basics of Linux (3)
5
12/08/2021
Introduction to NS-2
6
12/08/2021
Simulation System Architecture
7
12/08/2021
Installation of NS-2 (1)
8
Installation on Linux
Copy ns-allinone-2.34.tar_1.gz into /usr/local folder.
Extract ns-allinone-2.34.tar_1.gz, you will get ns-
allinone-2.34.tar_1.
Extract ns-allinone-2.34.tar_1, you will get ns-
allinone-2.34 folder
Go to ns-allinone-2.34 folder and say ./install.
After installation go to ns-2.34 folder in ns-allinone-
2.34 and say ./validate.
12/08/2021
Installation of NS-2 (2)
9
ns-allinone
12/08/2021
First Simulation Scenario
11
CB
R
UD NUL
P L
Node 1 Mb, 10ms Node
0 1
12/08/2021
Simulation Script (1)
12
12/08/2021
Simulation Script (2)
13
12/08/2021
Simulation Script (3)
14
12/08/2021
Simulation Script (4)
15
12/08/2021
Flow of Simulation (NS-Node)
17
n0 n1
Port Port
Classifier Classifier
Addr Addr
Classifier Classifier
0 dmux_ 1 dmux_
entry_ 1 entry_ 0
classifier_ classifier_
18
n0 n1
n1 entry_
head_
rcv
enqT_ queue_ deqT_ link_ ttl_
T_
drophead_ drpT_
n0 n1
Port Port
Classifier Classifier
Addr Addr
Classifier Classifier
0 dmux_ 1 dmux_
Link n0-n1
entry_ 1 entry_ 0
classifier_ classifier_
Link n1-n0
12/08/2021
Flow of Simulation (Transport)
20
n0 n1
Port Port
Classifier dst_=1.0 Classifier dst_=0.0
Addr Agent/TCP Addr Agent/TCPSink
0 0
Classifier Classifier
agents_ agents_
0 dmux_ 1 dmux_
Link n0-n1
entry_ 1 entry_ 0
classifier_ classifier_
Link n1-n0
set tcp [new Agent/TCP]
$ns attach-agent $n0 $tcp 12/08/2021
Flow of Simulation (Application)
21
n0 n1
Link n1-n0
set ftp [new Application/FTP]
$tcp attach-agent $ftp 12/08/2021
Flow of Simulation (Packet Flow)
22
n0 n1
Link n1-n0
12/08/2021
Structure of Animation Window
23
12/08/2021
Second Simulation Scenario
24
12/08/2021
Simulation Script 2 (1)
25
12/08/2021
Simulation Script 2 (6)
30
12/08/2021
Simulation Script 2 (7)
31
Up
Left-Up Right-
Up
Left-Down Right-Down
Down
Back
12/08/2021
40
DAY 1
SESSION 2
12/08/2021 Xavier’s Institute of Engineering, Mumbai
Session 2 Plan
41
12/08/2021
Third Simulation Scenario (1)
42
FTP
TCPSin
0.5 Mb, 30ms
2 Mb, 10ms k
0 1 6 8
2 Mb, 10ms
TCP 0.5 Mb, 40ms
Null
CB
R
12/08/2021
Third Simulation Scenario (2)
43
12/08/2021
Third Simulation Scenario (6)
47
Task 1
FTP TCP 0 1 2 3
4 5 6 7
8 9 10 11 TCPSink
12/08/2021
Assignment and Practice (2)
59
Task 2
Design Bus, Ring and Mesh Topology of 10 nodes.
Create TCP traffic from node0 to node9.
Do assignments in group of 3 or 4.
12/08/2021