ns fundamentals 2 - isi.edu internals ntclcommands translates into nseries of object creation...
TRANSCRIPT
![Page 1: NS Fundamentals 2 - isi.edu Internals nTclcommands translates into nseries of object creation nplumbing of these objects nStep-by-step review of how each network component gets set](https://reader031.vdocuments.us/reader031/viewer/2022030418/5aa492be7f8b9ac8748c1e95/html5/thumbnails/1.jpg)
1
NS Fundamentals (contd..)
Padma HaldarUSC/ISI
![Page 2: NS Fundamentals 2 - isi.edu Internals nTclcommands translates into nseries of object creation nplumbing of these objects nStep-by-step review of how each network component gets set](https://reader031.vdocuments.us/reader031/viewer/2022030418/5aa492be7f8b9ac8748c1e95/html5/thumbnails/2.jpg)
2
Outline
n Ns fundamentals – Part I (by Chen)n NS fundamentals –Part IIn NS Internals
![Page 3: NS Fundamentals 2 - isi.edu Internals nTclcommands translates into nseries of object creation nplumbing of these objects nStep-by-step review of how each network component gets set](https://reader031.vdocuments.us/reader031/viewer/2022030418/5aa492be7f8b9ac8748c1e95/html5/thumbnails/3.jpg)
3
Ns Internals
n Tcl commands translates into n series of object creation n plumbing of these objects
n Step-by-step review of how each network component gets set up in ns
![Page 4: NS Fundamentals 2 - isi.edu Internals nTclcommands translates into nseries of object creation nplumbing of these objects nStep-by-step review of how each network component gets set](https://reader031.vdocuments.us/reader031/viewer/2022030418/5aa492be7f8b9ac8748c1e95/html5/thumbnails/4.jpg)
4
Network Topology: Node
n0 n1
Addr Classifier
Port Classifier
classifier_
dmux_
entry_
Node entry
Unicast Node
Multicast Classifier
classifier_
dmux_
entry_
Node entry
Multicast Node
multiclassifier_
set n0 [ns_ node] Set ns_ [new Simulator –multicast on]Set n1 [ns_ node]
0 0
1
![Page 5: NS Fundamentals 2 - isi.edu Internals nTclcommands translates into nseries of object creation nplumbing of these objects nStep-by-step review of how each network component gets set](https://reader031.vdocuments.us/reader031/viewer/2022030418/5aa492be7f8b9ac8748c1e95/html5/thumbnails/5.jpg)
5
Node Addressing
n Two basic address styles available: flat and hierarchical
n Default flat address: 32 bits each for node and port id
n Default hier address: n 3 levels of hierarchyn 10 11 11 or 1 9 11 11 if mcast specified
n Different bit allocation possible for specific hier addresses
![Page 6: NS Fundamentals 2 - isi.edu Internals nTclcommands translates into nseries of object creation nplumbing of these objects nStep-by-step review of how each network component gets set](https://reader031.vdocuments.us/reader031/viewer/2022030418/5aa492be7f8b9ac8748c1e95/html5/thumbnails/6.jpg)
6
Hierarchical Node
n2
Nodeentry
Level 1Level 2
Level 3
Addressclassifier To Port
demux
ns_ node-config –addressing hier
![Page 7: NS Fundamentals 2 - isi.edu Internals nTclcommands translates into nseries of object creation nplumbing of these objects nStep-by-step review of how each network component gets set](https://reader031.vdocuments.us/reader031/viewer/2022030418/5aa492be7f8b9ac8748c1e95/html5/thumbnails/7.jpg)
7
Network Topology: Link
n0 n1
enqT_ queue_ deqT_
drophead_ drpT_
link_ ttl_
n1 entry_head_
tracing simplex link
duplex link
[ns_ duplex-link $n0 $n1 5Mb 2ms drop-tail]
![Page 8: NS Fundamentals 2 - isi.edu Internals nTclcommands translates into nseries of object creation nplumbing of these objects nStep-by-step review of how each network component gets set](https://reader031.vdocuments.us/reader031/viewer/2022030418/5aa492be7f8b9ac8748c1e95/html5/thumbnails/8.jpg)
8
Transport
n0 n1
Addr Classifier
Port Classifier
classifier_
dmux_
entry_
Agent/TCP
agents_
Addr Classifier
Port Classifier
classifier_
dmux_
entry_
Agent/TCPSink
agents_
dst_=1.0 dst_=0.0
set tcp [new Agent/TCP]ns_ attach-agent $n0 $tcp
set tcpsink [new Agent/TCPSink]ns_ attach-agent $n1 $tcpsink
ns_ connect $tcp $tcpsink
0
0
1
0
![Page 9: NS Fundamentals 2 - isi.edu Internals nTclcommands translates into nseries of object creation nplumbing of these objects nStep-by-step review of how each network component gets set](https://reader031.vdocuments.us/reader031/viewer/2022030418/5aa492be7f8b9ac8748c1e95/html5/thumbnails/9.jpg)
9
Application: Traffic Generator
n0 n1
Addr Classifier
Port Classifier
classifier_
dmux_
entry_
Agent/TCP
agents_
Addr Classifier
Port Classifier
classifier_
dmux_
entry_
Agent/TCPSink
agents_
dst_=1.0 dst_=0.0Application/FTP
set ftp [new Application/FTP]$ftp attach-agent $tcp$ns at 1.2 “$ftp start”
0
0
1
0
![Page 10: NS Fundamentals 2 - isi.edu Internals nTclcommands translates into nseries of object creation nplumbing of these objects nStep-by-step review of how each network component gets set](https://reader031.vdocuments.us/reader031/viewer/2022030418/5aa492be7f8b9ac8748c1e95/html5/thumbnails/10.jpg)
10
Routing
n0 n1
Addr Classifier
Port Classifier
classifier_
dmux_
entry_
Node entry 01 enqT_ queue_ deqT_
drophead_ drpT_
link_ ttl_
n1 entry_
head_
0 Agent/TCP
agents_
Application/FTP
![Page 11: NS Fundamentals 2 - isi.edu Internals nTclcommands translates into nseries of object creation nplumbing of these objects nStep-by-step review of how each network component gets set](https://reader031.vdocuments.us/reader031/viewer/2022030418/5aa492be7f8b9ac8748c1e95/html5/thumbnails/11.jpg)
11
Routing (con’t)
n0 n1
Addr Classifier
Port Classifier
classifier_
dmux_
entry_
01
Addr Classifier
Port Classifier
classifier_
dmux_
entry_
10
Link n0-n1
Link n1-n0
Agent/TCP
agents_
Application/FTP
Agent/TCP
![Page 12: NS Fundamentals 2 - isi.edu Internals nTclcommands translates into nseries of object creation nplumbing of these objects nStep-by-step review of how each network component gets set](https://reader031.vdocuments.us/reader031/viewer/2022030418/5aa492be7f8b9ac8748c1e95/html5/thumbnails/12.jpg)
12
Plumbing: Packet Flow
01
n0 n1
Addr Classifier
Port Classifier
entry_
0 Agent/TCP Addr Classifier
Port Classifier
entry_
10
Link n0-n1
Link n1-n0
0 Agent/TCPSink
dst_=1.0 dst_=0.0Application/FTP