NdnSIM Tutorial. About ndnSIM ns-3 based Named Data Networking (NDN) simulator Current version 2.0...
-
Upload
bernice-singleton -
Category
Documents
-
view
246 -
download
6
Transcript of NdnSIM Tutorial. About ndnSIM ns-3 based Named Data Networking (NDN) simulator Current version 2.0...
![Page 1: NdnSIM Tutorial. About ndnSIM ns-3 based Named Data Networking (NDN) simulator Current version 2.0 Web, ://ndnsim.net.](https://reader035.fdocuments.net/reader035/viewer/2022081722/56649e0d5503460f94af6e9e/html5/thumbnails/1.jpg)
ndnSIM Tutorial
![Page 2: NdnSIM Tutorial. About ndnSIM ns-3 based Named Data Networking (NDN) simulator Current version 2.0 Web, ://ndnsim.net.](https://reader035.fdocuments.net/reader035/viewer/2022081722/56649e0d5503460f94af6e9e/html5/thumbnails/2.jpg)
About ndnSIM
ns-3 based Named Data Networking (NDN) simulator
Current version 2.0 Web, http://ndnsim.net
![Page 3: NdnSIM Tutorial. About ndnSIM ns-3 based Named Data Networking (NDN) simulator Current version 2.0 Web, ://ndnsim.net.](https://reader035.fdocuments.net/reader035/viewer/2022081722/56649e0d5503460f94af6e9e/html5/thumbnails/3.jpg)
Index
Getting started ndnSIM helpers Examples Metrics
![Page 4: NdnSIM Tutorial. About ndnSIM ns-3 based Named Data Networking (NDN) simulator Current version 2.0 Web, ://ndnsim.net.](https://reader035.fdocuments.net/reader035/viewer/2022081722/56649e0d5503460f94af6e9e/html5/thumbnails/4.jpg)
Getting Started
Preferred OS Ubuntu Linux 14.04 Only describe the steps on Ubuntu 14.04 Visit http://ndnsim.net/ for more
Install dependencies
![Page 5: NdnSIM Tutorial. About ndnSIM ns-3 based Named Data Networking (NDN) simulator Current version 2.0 Web, ://ndnsim.net.](https://reader035.fdocuments.net/reader035/viewer/2022081722/56649e0d5503460f94af6e9e/html5/thumbnails/5.jpg)
Download ndnSIM source
Download ndn-cxx Download ns3 and add ndnSIM into it May take hours to download, depending
on the github server
![Page 6: NdnSIM Tutorial. About ndnSIM ns-3 based Named Data Networking (NDN) simulator Current version 2.0 Web, ://ndnsim.net.](https://reader035.fdocuments.net/reader035/viewer/2022081722/56649e0d5503460f94af6e9e/html5/thumbnails/6.jpg)
Compile ndn-cxx
Compile ns-3
Enable the examples (under ./src/ndnSIM/examples/)
The g++ compiler may crash several times, retry with './waf'
![Page 7: NdnSIM Tutorial. About ndnSIM ns-3 based Named Data Networking (NDN) simulator Current version 2.0 Web, ://ndnsim.net.](https://reader035.fdocuments.net/reader035/viewer/2022081722/56649e0d5503460f94af6e9e/html5/thumbnails/7.jpg)
Index
Getting started ndnSIM helpers Examples Metrics
![Page 8: NdnSIM Tutorial. About ndnSIM ns-3 based Named Data Networking (NDN) simulator Current version 2.0 Web, ://ndnsim.net.](https://reader035.fdocuments.net/reader035/viewer/2022081722/56649e0d5503460f94af6e9e/html5/thumbnails/8.jpg)
ndmSim helpers NDN stack helper
Routing: where Interest can be forwarded Manual routes
![Page 9: NdnSIM Tutorial. About ndnSIM ns-3 based Named Data Networking (NDN) simulator Current version 2.0 Web, ://ndnsim.net.](https://reader035.fdocuments.net/reader035/viewer/2022081722/56649e0d5503460f94af6e9e/html5/thumbnails/9.jpg)
Automatic shortest path routes install NDN interfaces on nodes
specify which node exports which prefix
calculate and install FIBs on every node
![Page 10: NdnSIM Tutorial. About ndnSIM ns-3 based Named Data Networking (NDN) simulator Current version 2.0 Web, ://ndnsim.net.](https://reader035.fdocuments.net/reader035/viewer/2022081722/56649e0d5503460f94af6e9e/html5/thumbnails/10.jpg)
Forwarding strategy Specify the desired per-name prefix
forwarding strategy for one, more or all the nodes of a topology.
Strategy name /localhost/nfd/strategy/best-route /localhost/nfd/strategy/broadcast
Install on one node
Install on all nodes
![Page 11: NdnSIM Tutorial. About ndnSIM ns-3 based Named Data Networking (NDN) simulator Current version 2.0 Web, ://ndnsim.net.](https://reader035.fdocuments.net/reader035/viewer/2022081722/56649e0d5503460f94af6e9e/html5/thumbnails/11.jpg)
Link Control helper Allows scheduling of link failures and
failure recoveries
![Page 12: NdnSIM Tutorial. About ndnSIM ns-3 based Named Data Networking (NDN) simulator Current version 2.0 Web, ://ndnsim.net.](https://reader035.fdocuments.net/reader035/viewer/2022081722/56649e0d5503460f94af6e9e/html5/thumbnails/12.jpg)
Application Helper Create helper for specific applications class
Assign prefix on which application operates
Assign application-specific attributes using AppHelper::SetAttribute():
Install application on one or more nodes:
![Page 13: NdnSIM Tutorial. About ndnSIM ns-3 based Named Data Networking (NDN) simulator Current version 2.0 Web, ://ndnsim.net.](https://reader035.fdocuments.net/reader035/viewer/2022081722/56649e0d5503460f94af6e9e/html5/thumbnails/13.jpg)
Index
Getting started ndnSIM helpers Examples Metrics
![Page 14: NdnSIM Tutorial. About ndnSIM ns-3 based Named Data Networking (NDN) simulator Current version 2.0 Web, ://ndnsim.net.](https://reader035.fdocuments.net/reader035/viewer/2022081722/56649e0d5503460f94af6e9e/html5/thumbnails/14.jpg)
Example: ndn-simple.cpp
![Page 15: NdnSIM Tutorial. About ndnSIM ns-3 based Named Data Networking (NDN) simulator Current version 2.0 Web, ://ndnsim.net.](https://reader035.fdocuments.net/reader035/viewer/2022081722/56649e0d5503460f94af6e9e/html5/thumbnails/15.jpg)
Consumer is simulated using ConsumerCbr reference application and generates Interests towards the producer with frequency of 10 Interests per second
![Page 16: NdnSIM Tutorial. About ndnSIM ns-3 based Named Data Networking (NDN) simulator Current version 2.0 Web, ://ndnsim.net.](https://reader035.fdocuments.net/reader035/viewer/2022081722/56649e0d5503460f94af6e9e/html5/thumbnails/16.jpg)
Producer is simulated using Producer class, which is used to satisfy all incoming Interests with virtual payload data (1024 bytes).
![Page 17: NdnSIM Tutorial. About ndnSIM ns-3 based Named Data Networking (NDN) simulator Current version 2.0 Web, ://ndnsim.net.](https://reader035.fdocuments.net/reader035/viewer/2022081722/56649e0d5503460f94af6e9e/html5/thumbnails/17.jpg)
Run the program Run with log model
Run with Python visualizer $ NS_LOG=ndn.Producer:ndn.Consumer ./waf --run=ndn-simple
./waf --run=ndn-simple --vis
![Page 18: NdnSIM Tutorial. About ndnSIM ns-3 based Named Data Networking (NDN) simulator Current version 2.0 Web, ://ndnsim.net.](https://reader035.fdocuments.net/reader035/viewer/2022081722/56649e0d5503460f94af6e9e/html5/thumbnails/18.jpg)
Example: ndn-grid-topo-plugin.cpp
A 3 × 3 grid topology
Use AnnotatedTopologyReader to load topology file
![Page 19: NdnSIM Tutorial. About ndnSIM ns-3 based Named Data Networking (NDN) simulator Current version 2.0 Web, ://ndnsim.net.](https://reader035.fdocuments.net/reader035/viewer/2022081722/56649e0d5503460f94af6e9e/html5/thumbnails/19.jpg)
topo-grid-3x3.txt
![Page 20: NdnSIM Tutorial. About ndnSIM ns-3 based Named Data Networking (NDN) simulator Current version 2.0 Web, ://ndnsim.net.](https://reader035.fdocuments.net/reader035/viewer/2022081722/56649e0d5503460f94af6e9e/html5/thumbnails/20.jpg)
ndn-grid-topo-plugin.cpp
![Page 21: NdnSIM Tutorial. About ndnSIM ns-3 based Named Data Networking (NDN) simulator Current version 2.0 Web, ://ndnsim.net.](https://reader035.fdocuments.net/reader035/viewer/2022081722/56649e0d5503460f94af6e9e/html5/thumbnails/21.jpg)
![Page 22: NdnSIM Tutorial. About ndnSIM ns-3 based Named Data Networking (NDN) simulator Current version 2.0 Web, ://ndnsim.net.](https://reader035.fdocuments.net/reader035/viewer/2022081722/56649e0d5503460f94af6e9e/html5/thumbnails/22.jpg)
$ ./waf --run=ndn-grid-topo-plugin --vis
![Page 23: NdnSIM Tutorial. About ndnSIM ns-3 based Named Data Networking (NDN) simulator Current version 2.0 Web, ://ndnsim.net.](https://reader035.fdocuments.net/reader035/viewer/2022081722/56649e0d5503460f94af6e9e/html5/thumbnails/23.jpg)
Example: ndn-different-strategy-per-prefix.cpp
A grid topology The broadcast strategy to be installed
for the name prefix "/prefix1" in all the nodes
For the name prefix "/prefix2", the best-route strategy will be installed in all the topology nodes
![Page 24: NdnSIM Tutorial. About ndnSIM ns-3 based Named Data Networking (NDN) simulator Current version 2.0 Web, ://ndnsim.net.](https://reader035.fdocuments.net/reader035/viewer/2022081722/56649e0d5503460f94af6e9e/html5/thumbnails/24.jpg)
ndn-different-strategy-per-prefix.cpp
![Page 25: NdnSIM Tutorial. About ndnSIM ns-3 based Named Data Networking (NDN) simulator Current version 2.0 Web, ://ndnsim.net.](https://reader035.fdocuments.net/reader035/viewer/2022081722/56649e0d5503460f94af6e9e/html5/thumbnails/25.jpg)
![Page 26: NdnSIM Tutorial. About ndnSIM ns-3 based Named Data Networking (NDN) simulator Current version 2.0 Web, ://ndnsim.net.](https://reader035.fdocuments.net/reader035/viewer/2022081722/56649e0d5503460f94af6e9e/html5/thumbnails/26.jpg)
![Page 27: NdnSIM Tutorial. About ndnSIM ns-3 based Named Data Networking (NDN) simulator Current version 2.0 Web, ://ndnsim.net.](https://reader035.fdocuments.net/reader035/viewer/2022081722/56649e0d5503460f94af6e9e/html5/thumbnails/27.jpg)
$ ./waf --run=ndn-different-strategy-per-prefix --vis
![Page 28: NdnSIM Tutorial. About ndnSIM ns-3 based Named Data Networking (NDN) simulator Current version 2.0 Web, ://ndnsim.net.](https://reader035.fdocuments.net/reader035/viewer/2022081722/56649e0d5503460f94af6e9e/html5/thumbnails/28.jpg)
Example: ndn-load-balancer.cpp
A load balancer topology
![Page 29: NdnSIM Tutorial. About ndnSIM ns-3 based Named Data Networking (NDN) simulator Current version 2.0 Web, ://ndnsim.net.](https://reader035.fdocuments.net/reader035/viewer/2022081722/56649e0d5503460f94af6e9e/html5/thumbnails/29.jpg)
topo-load-balancer.txt
![Page 30: NdnSIM Tutorial. About ndnSIM ns-3 based Named Data Networking (NDN) simulator Current version 2.0 Web, ://ndnsim.net.](https://reader035.fdocuments.net/reader035/viewer/2022081722/56649e0d5503460f94af6e9e/html5/thumbnails/30.jpg)
ndn-load-balancer.cpp
![Page 31: NdnSIM Tutorial. About ndnSIM ns-3 based Named Data Networking (NDN) simulator Current version 2.0 Web, ://ndnsim.net.](https://reader035.fdocuments.net/reader035/viewer/2022081722/56649e0d5503460f94af6e9e/html5/thumbnails/31.jpg)
![Page 32: NdnSIM Tutorial. About ndnSIM ns-3 based Named Data Networking (NDN) simulator Current version 2.0 Web, ://ndnsim.net.](https://reader035.fdocuments.net/reader035/viewer/2022081722/56649e0d5503460f94af6e9e/html5/thumbnails/32.jpg)
./waf --run=ndn-load-balancer --vis
![Page 33: NdnSIM Tutorial. About ndnSIM ns-3 based Named Data Networking (NDN) simulator Current version 2.0 Web, ://ndnsim.net.](https://reader035.fdocuments.net/reader035/viewer/2022081722/56649e0d5503460f94af6e9e/html5/thumbnails/33.jpg)
Example: ndn-simple-with-link-failure.cpp
![Page 34: NdnSIM Tutorial. About ndnSIM ns-3 based Named Data Networking (NDN) simulator Current version 2.0 Web, ://ndnsim.net.](https://reader035.fdocuments.net/reader035/viewer/2022081722/56649e0d5503460f94af6e9e/html5/thumbnails/34.jpg)
![Page 35: NdnSIM Tutorial. About ndnSIM ns-3 based Named Data Networking (NDN) simulator Current version 2.0 Web, ://ndnsim.net.](https://reader035.fdocuments.net/reader035/viewer/2022081722/56649e0d5503460f94af6e9e/html5/thumbnails/35.jpg)
![Page 36: NdnSIM Tutorial. About ndnSIM ns-3 based Named Data Networking (NDN) simulator Current version 2.0 Web, ://ndnsim.net.](https://reader035.fdocuments.net/reader035/viewer/2022081722/56649e0d5503460f94af6e9e/html5/thumbnails/36.jpg)
Index
Getting started ndnSIM helpers Examples Metrics
![Page 37: NdnSIM Tutorial. About ndnSIM ns-3 based Named Data Networking (NDN) simulator Current version 2.0 Web, ://ndnsim.net.](https://reader035.fdocuments.net/reader035/viewer/2022081722/56649e0d5503460f94af6e9e/html5/thumbnails/37.jpg)
Metrics
ndn::L3RateTracer Tracing the rate in bytes and in number
of packets of Interest/Data packets forwarded by an NDN node
Output file format is tab-separated values
Time, Node, FaceId, Type, Packets, Kilobytes, PacketsRaw, KilobytesRaw
See http://ndnsim.net/2.0/metric.html for details
![Page 38: NdnSIM Tutorial. About ndnSIM ns-3 based Named Data Networking (NDN) simulator Current version 2.0 Web, ://ndnsim.net.](https://reader035.fdocuments.net/reader035/viewer/2022081722/56649e0d5503460f94af6e9e/html5/thumbnails/38.jpg)
L2Tracer traces only packet drop on layer 2 (e.g.,
due to transmission queue overflow). Output file format is tab-separated
values, Time, Node, Interface, Type, Packets,
Kilobytes, PacketsRaw, KilobytesRaw See http://ndnsim.net/2.0/metric.html for
details
![Page 39: NdnSIM Tutorial. About ndnSIM ns-3 based Named Data Networking (NDN) simulator Current version 2.0 Web, ://ndnsim.net.](https://reader035.fdocuments.net/reader035/viewer/2022081722/56649e0d5503460f94af6e9e/html5/thumbnails/39.jpg)
Example: ndn-tree-tracers.cpp topo-tree.txt
![Page 40: NdnSIM Tutorial. About ndnSIM ns-3 based Named Data Networking (NDN) simulator Current version 2.0 Web, ://ndnsim.net.](https://reader035.fdocuments.net/reader035/viewer/2022081722/56649e0d5503460f94af6e9e/html5/thumbnails/40.jpg)
ndn-tree-tracers.cpp
![Page 41: NdnSIM Tutorial. About ndnSIM ns-3 based Named Data Networking (NDN) simulator Current version 2.0 Web, ://ndnsim.net.](https://reader035.fdocuments.net/reader035/viewer/2022081722/56649e0d5503460f94af6e9e/html5/thumbnails/41.jpg)
![Page 42: NdnSIM Tutorial. About ndnSIM ns-3 based Named Data Networking (NDN) simulator Current version 2.0 Web, ://ndnsim.net.](https://reader035.fdocuments.net/reader035/viewer/2022081722/56649e0d5503460f94af6e9e/html5/thumbnails/42.jpg)
./waf --run=ndn-tree-tracers Create "rate-trace.txt", analyze
![Page 43: NdnSIM Tutorial. About ndnSIM ns-3 based Named Data Networking (NDN) simulator Current version 2.0 Web, ://ndnsim.net.](https://reader035.fdocuments.net/reader035/viewer/2022081722/56649e0d5503460f94af6e9e/html5/thumbnails/43.jpg)
Example: ndn-tree-tracers.cpp topo-tree-25-node.txt
![Page 44: NdnSIM Tutorial. About ndnSIM ns-3 based Named Data Networking (NDN) simulator Current version 2.0 Web, ://ndnsim.net.](https://reader035.fdocuments.net/reader035/viewer/2022081722/56649e0d5503460f94af6e9e/html5/thumbnails/44.jpg)
![Page 45: NdnSIM Tutorial. About ndnSIM ns-3 based Named Data Networking (NDN) simulator Current version 2.0 Web, ://ndnsim.net.](https://reader035.fdocuments.net/reader035/viewer/2022081722/56649e0d5503460f94af6e9e/html5/thumbnails/45.jpg)
![Page 46: NdnSIM Tutorial. About ndnSIM ns-3 based Named Data Networking (NDN) simulator Current version 2.0 Web, ://ndnsim.net.](https://reader035.fdocuments.net/reader035/viewer/2022081722/56649e0d5503460f94af6e9e/html5/thumbnails/46.jpg)
![Page 47: NdnSIM Tutorial. About ndnSIM ns-3 based Named Data Networking (NDN) simulator Current version 2.0 Web, ://ndnsim.net.](https://reader035.fdocuments.net/reader035/viewer/2022081722/56649e0d5503460f94af6e9e/html5/thumbnails/47.jpg)
![Page 48: NdnSIM Tutorial. About ndnSIM ns-3 based Named Data Networking (NDN) simulator Current version 2.0 Web, ://ndnsim.net.](https://reader035.fdocuments.net/reader035/viewer/2022081722/56649e0d5503460f94af6e9e/html5/thumbnails/48.jpg)
![Page 49: NdnSIM Tutorial. About ndnSIM ns-3 based Named Data Networking (NDN) simulator Current version 2.0 Web, ://ndnsim.net.](https://reader035.fdocuments.net/reader035/viewer/2022081722/56649e0d5503460f94af6e9e/html5/thumbnails/49.jpg)
./waf --run=ndn-tree-with-l2tracer --vis