Download presentation
Presentation is loading. Please wait.
Published bySheldon Digby Modified over 9 years ago
1
1 NS Fundamentals (contd..) Padma Haldar USC/ISI
2
2 Outline Ns fundamentals – Part I (by Chen) NS fundamentals –Part II NS Internals
3
3 Ns Internals Tcl commands translates into series of object creation plumbing of these objects Step-by-step review of how each network component gets set up in ns
4
4 Network Topology: Node n0n1 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] 00 1
5
5 Node Addressing Two basic address styles available: flat and hierarchical Default flat address: 32 bits each for node and port id Default hier address: 3 levels of hierarchy 10 11 11 or 1 9 11 11 if mcast specified Different bit allocation possible for specific hier addresses
6
6 Hierarchical Node n2 Node entry Level 1 Level 2 Level 3 Address classifier To Port demux ns_ node-config –addressing hier
7
7 Network Topology: Link n0n1 enqT_queue_deqT_ drophead_ drpT_ link_ttl_ n1 entry_ head_ tracing simplex link duplex link [ns_ duplex-link $n0 $n1 5Mb 2ms drop-tail]
8
8 Transport n0n1 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
9
9 Application: Traffic Generator n0n1 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 Application/FTP set ftp [new Application/FTP] $ftp attach-agent $tcp $ns at 1.2 “$ftp start” 0 0 1 0
10
10 Routing n0n1 Addr Classifier Port Classifier classifier_ dmux_ entry_ Node entry 0 1 enqT_queue_deqT_ drophead_drpT_ link_ttl_ n1 entry _ head_ 0 Agent/TCP agents_ Application/FTP
11
11 Routing (con’t) n0n1 Addr Classifier Port Classifier classifier_ dmux_ entry_ 0 1 Addr Classifier Port Classifier classifier_ dmux_ entry_ 1 0 Link n0-n1 Link n1-n0 Agent/TCP agents_ Application/FTP Agent/TCP
12
12 Plumbing: Packet Flow 0 1 n0n1 Addr Classifier Port Classifier entry_ 0 Agent/TCP Addr Classifier Port Classifier entry_ 1 0 Link n0-n1 Link n1-n0 0 Agent/TCPSink dst_=1.0 dst_=0.0 Application/FTP
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.