network simulation one tool to simulation network protocols for the internet is the network...
TRANSCRIPT
![Page 1: Network Simulation One tool to simulation network protocols for the Internet is the network simulator (NS) The simulation environment needs to be set-](https://reader035.vdocuments.site/reader035/viewer/2022062515/56649c785503460f9492e318/html5/thumbnails/1.jpg)
Network Simulation
• One tool to simulation network protocols for the Internet is the network simulator (NS)
• The simulation environment needs to be set-up carefully to produce meaningful results
• The simulation set-up is called ‘simulation scenario’
![Page 2: Network Simulation One tool to simulation network protocols for the Internet is the network simulator (NS) The simulation environment needs to be set-](https://reader035.vdocuments.site/reader035/viewer/2022062515/56649c785503460f9492e318/html5/thumbnails/2.jpg)
Simulation Scenarios
• In general, a simulation scenario consists of three different main components (or dimensions)– Routed Topology– Connections, Traffic and Agents/end-host
protocols– External events and Failures
![Page 3: Network Simulation One tool to simulation network protocols for the Internet is the network simulator (NS) The simulation environment needs to be set-](https://reader035.vdocuments.site/reader035/viewer/2022062515/56649c785503460f9492e318/html5/thumbnails/3.jpg)
Routed Topology• Defines the number of nodes and their
connectivity• Defines the links connecting the nodes, their
bandwidth, delay, queuing discipline and other characteristics
• Defines the routing protocols running in the nodes in terms of unicast and multicast routing
• Can use topology generators (e.g., GT-ITM)
![Page 4: Network Simulation One tool to simulation network protocols for the Internet is the network simulator (NS) The simulation environment needs to be set-](https://reader035.vdocuments.site/reader035/viewer/2022062515/56649c785503460f9492e318/html5/thumbnails/4.jpg)
Connections, Traffic and Agents• Agents are end-host protocols, such as TCP, ftp,
Telnet, UDP.. etc.
• Traffic source can be: (uses a traffic model)– constant bit rate (CBR) at rate R
– with distribution (Poisson or Pareto)
– trace driven
• Connection definition includes spatial distribution of connections (TCP sender/receiver, or group members)
![Page 5: Network Simulation One tool to simulation network protocols for the Internet is the network simulator (NS) The simulation environment needs to be set-](https://reader035.vdocuments.site/reader035/viewer/2022062515/56649c785503460f9492e318/html5/thumbnails/5.jpg)
External events and Failures• External events include the temporal distribution
of connections:– start and end of TCP connections
– join/leave patterns for multicast group members
• Failures include link failures, packet loss patterns and congestion patterns and may follow a failure model or distribution
• Events may also include movement patterns of mobile hosts
![Page 6: Network Simulation One tool to simulation network protocols for the Internet is the network simulator (NS) The simulation environment needs to be set-](https://reader035.vdocuments.site/reader035/viewer/2022062515/56649c785503460f9492e318/html5/thumbnails/6.jpg)
The network simulator (NS)• It is a packet-level discrete-event simulator
• The simulation engine is written in C++ and mainly handles the event-queue and per packet processing (such as TCP and forwarding caches)
• Most protocols (such as unicast/multicsat) routing protocols are implemented in Otcl (Object Tcl)
• Check the vint project catarina.usc.edu/vint, and follow the on-line step-by-step tutorial
![Page 7: Network Simulation One tool to simulation network protocols for the Internet is the network simulator (NS) The simulation environment needs to be set-](https://reader035.vdocuments.site/reader035/viewer/2022062515/56649c785503460f9492e318/html5/thumbnails/7.jpg)
Getting Started• Download the ns from:
– http://www.isi.edu/nsnam/ns– Tcl/tk, otcl, tclcl, ns
• Install ns in your system– Binary release is provided for windows 9x/NT– NS-allinone package is strongly recommended
• Download nam if visualization is needed– http://www.isi.edu/nsnam/nam– Included in ns-allinone package
• Get help from [email protected]– check the mailing lists on the ns web page
![Page 8: Network Simulation One tool to simulation network protocols for the Internet is the network simulator (NS) The simulation environment needs to be set-](https://reader035.vdocuments.site/reader035/viewer/2022062515/56649c785503460f9492e318/html5/thumbnails/8.jpg)
What is ns
• otcl: Object-oriented support• tclcl: C++ and otcl linkage• Discrete event scheduler• Data network (the Internet) components
tcl8.0
otcl
tclcl
ns-2EventScheduler
Netw
orkC
omponent
![Page 9: Network Simulation One tool to simulation network protocols for the Internet is the network simulator (NS) The simulation environment needs to be set-](https://reader035.vdocuments.site/reader035/viewer/2022062515/56649c785503460f9492e318/html5/thumbnails/9.jpg)
Internals
• Discrete Event Scheduler
• Network Topology
• Routing
• Transport
• Application
• Packet Flow
![Page 10: Network Simulation One tool to simulation network protocols for the Internet is the network simulator (NS) The simulation environment needs to be set-](https://reader035.vdocuments.site/reader035/viewer/2022062515/56649c785503460f9492e318/html5/thumbnails/10.jpg)
Discrete Event Scheduler
time_, uid_, next_, handler_
head_ ->
handler_ -> handle()
time_, uid_, next_, handler_insert
head_ ->
![Page 11: Network Simulation One tool to simulation network protocols for the Internet is the network simulator (NS) The simulation environment needs to be set-](https://reader035.vdocuments.site/reader035/viewer/2022062515/56649c785503460f9492e318/html5/thumbnails/11.jpg)
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_
![Page 12: Network Simulation One tool to simulation network protocols for the Internet is the network simulator (NS) The simulation environment needs to be set-](https://reader035.vdocuments.site/reader035/viewer/2022062515/56649c785503460f9492e318/html5/thumbnails/12.jpg)
Network Topology - Link
n0 n1
enqT_ queue_ deqT_
drophead_ drpT_
link_ ttl_
n1 entry_head_
![Page 13: Network Simulation One tool to simulation network protocols for the Internet is the network simulator (NS) The simulation environment needs to be set-](https://reader035.vdocuments.site/reader035/viewer/2022062515/56649c785503460f9492e318/html5/thumbnails/13.jpg)
Routing
n0 n1
Addr Classifier
Port Classifier
classifier_
dmux_
entry_
Node entry 0
1enqT_ queue_ deqT_
drophead_ drpT_
link_ ttl_
n1 entry_head_
![Page 14: Network Simulation One tool to simulation network protocols for the Internet is the network simulator (NS) The simulation environment needs to be set-](https://reader035.vdocuments.site/reader035/viewer/2022062515/56649c785503460f9492e318/html5/thumbnails/14.jpg)
Routing (cont.)
n0 n1
Addr Classifier
Port Classifier
classifier_
dmux_
entry_
0
1
Addr Classifier
Port Classifier
classifier_
dmux_
entry_
1
0Link n0-n1
Link n1-n0
![Page 15: Network Simulation One tool to simulation network protocols for the Internet is the network simulator (NS) The simulation environment needs to be set-](https://reader035.vdocuments.site/reader035/viewer/2022062515/56649c785503460f9492e318/html5/thumbnails/15.jpg)
0
1
Transport
n0 n1
Addr Classifier
Port Classifier
classifier_
dmux_
entry_
0 Agent/TCP
agents_
Addr Classifier
Port Classifier
classifier_
dmux_
entry_
1
0Link n0-n1
Link n1-n0
0 Agent/TCPSink
agents_
dst_=1.0 dst_=0.0
![Page 16: Network Simulation One tool to simulation network protocols for the Internet is the network simulator (NS) The simulation environment needs to be set-](https://reader035.vdocuments.site/reader035/viewer/2022062515/56649c785503460f9492e318/html5/thumbnails/16.jpg)
Application
0
1
n0 n1
Addr Classifier
Port Classifier
classifier_
dmux_
entry_
0 Agent/TCP
agents_
Addr Classifier
Port Classifier
classifier_
dmux_
entry_
1
0Link n0-n1
Link n1-n0
0 Agent/TCPSink
agents_
dst_=1.0 dst_=0.0Application/FTP
![Page 17: Network Simulation One tool to simulation network protocols for the Internet is the network simulator (NS) The simulation environment needs to be set-](https://reader035.vdocuments.site/reader035/viewer/2022062515/56649c785503460f9492e318/html5/thumbnails/17.jpg)
Packet Flow
0
1
n0 n1
Addr Classifier
Port Classifier
entry_
0 Agent/TCP Addr Classifier
Port Classifier
entry_
1
0Link n0-n1
Link n1-n0
0 Agent/TCPSink
dst_=1.0 dst_=0.0Application/FTP
![Page 18: Network Simulation One tool to simulation network protocols for the Internet is the network simulator (NS) The simulation environment needs to be set-](https://reader035.vdocuments.site/reader035/viewer/2022062515/56649c785503460f9492e318/html5/thumbnails/18.jpg)
• NS\VINT web pages\tutorial:– http://catarina.usc.edu/vint– http://www.isi.edu/nsnam/vint– http://www.isi.edu/nsnam/ns/tutorial/
index.html