Báo cáo định kỳ lần 1
-
Upload
vu-tien-viet -
Category
Documents
-
view
222 -
download
0
Transcript of Báo cáo định kỳ lần 1
![Page 1: Báo cáo định kỳ lần 1](https://reader030.fdocuments.net/reader030/viewer/2022021215/577d35fd1a28ab3a6b91f19f/html5/thumbnails/1.jpg)
8/8/2019 Báo cáo định kỳ lần 1
http://slidepdf.com/reader/full/bao-cao-dinh-ky-lan-1 1/18
Periodical report no.1
Lecturer: Nguyn Trung Dng
Student: Nguyn Mnh Tú (NT)
Ngô c Vinh Quang
Trn Thành
![Page 2: Báo cáo định kỳ lần 1](https://reader030.fdocuments.net/reader030/viewer/2022021215/577d35fd1a28ab3a6b91f19f/html5/thumbnails/2.jpg)
8/8/2019 Báo cáo định kỳ lần 1
http://slidepdf.com/reader/full/bao-cao-dinh-ky-lan-1 2/18
Ni Dung
1 introduction
1.1 Ns2 overview
1.2 Nam1.3 Xgraph
1.4 Format of trace file
2 Simulation
![Page 3: Báo cáo định kỳ lần 1](https://reader030.fdocuments.net/reader030/viewer/2022021215/577d35fd1a28ab3a6b91f19f/html5/thumbnails/3.jpg)
8/8/2019 Báo cáo định kỳ lần 1
http://slidepdf.com/reader/full/bao-cao-dinh-ky-lan-1 3/18
1.1 NS2 overview (1)
NS is an object oriented simulator targeted at
networking research, written in C++.
NS provide support for networking researchand education:
± Protocol design, traffic studies, etc
± Protocol comparison
± New architecture design are also support
![Page 4: Báo cáo định kỳ lần 1](https://reader030.fdocuments.net/reader030/viewer/2022021215/577d35fd1a28ab3a6b91f19f/html5/thumbnails/4.jpg)
8/8/2019 Báo cáo định kỳ lần 1
http://slidepdf.com/reader/full/bao-cao-dinh-ky-lan-1 4/18
1.1 NS2 overview (2)
Ns 2 use two languages: C++ and Otcl.
± C++ faster to run but slower to change, => suitable
for detailed protocol implementation.
± Otcl slower to run but faster to change => suitable
for simulation configuration.
![Page 5: Báo cáo định kỳ lần 1](https://reader030.fdocuments.net/reader030/viewer/2022021215/577d35fd1a28ab3a6b91f19f/html5/thumbnails/5.jpg)
8/8/2019 Báo cáo định kỳ lần 1
http://slidepdf.com/reader/full/bao-cao-dinh-ky-lan-1 5/18
1.1 NS2 overview (3)
protocol/models supported
± Wired network
Routing: unicast, multicast, hierarchical routing, etc.
Transportation: TCP, UDP, others;
Traffic sources: web, ftp, telnet, cbr, etc.
Queuing disciplines: drop-tail, RED, etc.
Qos: intServ and Diffserv wireless networking ± Adhoc routing and mobile IP
± Sensor network
± Satellite network
![Page 6: Báo cáo định kỳ lần 1](https://reader030.fdocuments.net/reader030/viewer/2022021215/577d35fd1a28ab3a6b91f19f/html5/thumbnails/6.jpg)
8/8/2019 Báo cáo định kỳ lần 1
http://slidepdf.com/reader/full/bao-cao-dinh-ky-lan-1 6/18
1.2 Nam Network animator
Nam provides a visual interpretation of the
network topology created. It can be executed
directly from a TCL script.
Nam support:
± Provide darg and drop interface for creating
topologies.
± Control button include pause, play, stop, speed
controler.
![Page 7: Báo cáo định kỳ lần 1](https://reader030.fdocuments.net/reader030/viewer/2022021215/577d35fd1a28ab3a6b91f19f/html5/thumbnails/7.jpg)
8/8/2019 Báo cáo định kỳ lần 1
http://slidepdf.com/reader/full/bao-cao-dinh-ky-lan-1 7/18
1.3 xgraph - Graph plotting tool
Xgraph analyse trace files produces from ns2
to draw graph.
We use awk script to extract the necessaryinformation from frace file (.tr)
Xgraph can be called in tcl script
![Page 8: Báo cáo định kỳ lần 1](https://reader030.fdocuments.net/reader030/viewer/2022021215/577d35fd1a28ab3a6b91f19f/html5/thumbnails/8.jpg)
8/8/2019 Báo cáo định kỳ lần 1
http://slidepdf.com/reader/full/bao-cao-dinh-ky-lan-1 8/18
1.4 Format of trace file (1)
Format of trace file generated by NS
<event> <time> <from> <to> <pkt-type> <pkt-size> <flags> <fid> <src> <dst> <seq> <uid>
Trace example
+ 1 0 2 cbr 210 ------- 0 0.0 3.1 0 0
- 1 0 2 cbr 210 ------- 0 0.0 3.1 0 0
r 1.00234 0 2 cbr 210 ------- 0 0.0 3.1 0 0
![Page 9: Báo cáo định kỳ lần 1](https://reader030.fdocuments.net/reader030/viewer/2022021215/577d35fd1a28ab3a6b91f19f/html5/thumbnails/9.jpg)
8/8/2019 Báo cáo định kỳ lần 1
http://slidepdf.com/reader/full/bao-cao-dinh-ky-lan-1 9/18
![Page 10: Báo cáo định kỳ lần 1](https://reader030.fdocuments.net/reader030/viewer/2022021215/577d35fd1a28ab3a6b91f19f/html5/thumbnails/10.jpg)
8/8/2019 Báo cáo định kỳ lần 1
http://slidepdf.com/reader/full/bao-cao-dinh-ky-lan-1 10/18
1.4 Format of trace file (new format)
(3)
Next hop info: starts with a leading -H
-Hs: id of hop source; -Hd: id of hop destination
Packet info at Mac level: start with -M Packet info at IP level: start with -I
Packet info at application level: start with -P
![Page 11: Báo cáo định kỳ lần 1](https://reader030.fdocuments.net/reader030/viewer/2022021215/577d35fd1a28ab3a6b91f19f/html5/thumbnails/11.jpg)
8/8/2019 Báo cáo định kỳ lần 1
http://slidepdf.com/reader/full/bao-cao-dinh-ky-lan-1 11/18
2 simulation
topology
TCP
UDP
![Page 12: Báo cáo định kỳ lần 1](https://reader030.fdocuments.net/reader030/viewer/2022021215/577d35fd1a28ab3a6b91f19f/html5/thumbnails/12.jpg)
8/8/2019 Báo cáo định kỳ lần 1
http://slidepdf.com/reader/full/bao-cao-dinh-ky-lan-1 12/18
screenshot
![Page 13: Báo cáo định kỳ lần 1](https://reader030.fdocuments.net/reader030/viewer/2022021215/577d35fd1a28ab3a6b91f19f/html5/thumbnails/13.jpg)
8/8/2019 Báo cáo định kỳ lần 1
http://slidepdf.com/reader/full/bao-cao-dinh-ky-lan-1 13/18
Code tcl
![Page 14: Báo cáo định kỳ lần 1](https://reader030.fdocuments.net/reader030/viewer/2022021215/577d35fd1a28ab3a6b91f19f/html5/thumbnails/14.jpg)
8/8/2019 Báo cáo định kỳ lần 1
http://slidepdf.com/reader/full/bao-cao-dinh-ky-lan-1 14/18
Drop-CBR.awk script
BEGIN {numd=0;numr=0}
{
if (($1=="d")&&($4==3)&&($8==1)) { numd++; }
if (($1=="+")&&($3==1))
{ numr++;
print $2 " " numd/numr;}
}END{}
![Page 15: Báo cáo định kỳ lần 1](https://reader030.fdocuments.net/reader030/viewer/2022021215/577d35fd1a28ab3a6b91f19f/html5/thumbnails/15.jpg)
8/8/2019 Báo cáo định kỳ lần 1
http://slidepdf.com/reader/full/bao-cao-dinh-ky-lan-1 15/18
Drop-ftp.awk script
BEGIN {numd=0;numr=0}
{
if (($1=="d")&&($4==3)&&($8==2)) { numd++; }
if (($1=="+")&&($3==0))
{ numr++;
print $2 " " numd/numr;}
}END{}
![Page 16: Báo cáo định kỳ lần 1](https://reader030.fdocuments.net/reader030/viewer/2022021215/577d35fd1a28ab3a6b91f19f/html5/thumbnails/16.jpg)
8/8/2019 Báo cáo định kỳ lần 1
http://slidepdf.com/reader/full/bao-cao-dinh-ky-lan-1 16/18
Packet loss ratio graph
![Page 17: Báo cáo định kỳ lần 1](https://reader030.fdocuments.net/reader030/viewer/2022021215/577d35fd1a28ab3a6b91f19f/html5/thumbnails/17.jpg)
8/8/2019 Báo cáo định kỳ lần 1
http://slidepdf.com/reader/full/bao-cao-dinh-ky-lan-1 17/18
Next target
Principle of adhoc network
Simulation a simple adhoc network
![Page 18: Báo cáo định kỳ lần 1](https://reader030.fdocuments.net/reader030/viewer/2022021215/577d35fd1a28ab3a6b91f19f/html5/thumbnails/18.jpg)
8/8/2019 Báo cáo định kỳ lần 1
http://slidepdf.com/reader/full/bao-cao-dinh-ky-lan-1 18/18
Thank you for listening