ns-3 tutorialupmcsms.weebly.com/uploads/3/9/4/3/39435231/lab02 … · · 2015-10-14h7ps://...
TRANSCRIPT
![Page 1: NS-3 tutorialupmcsms.weebly.com/uploads/3/9/4/3/39435231/lab02 … · · 2015-10-14h7ps:// Topology Includes Name space Logging Creang nodes ... ' ns3 /core—module . h " ' ns3](https://reader031.vdocuments.net/reader031/viewer/2022022010/5b056e0d7f8b9a93418b535a/html5/thumbnails/1.jpg)
NS-3tutorial
01-Firstmain
Source:
h7ps://www.nsnam.org/docs/release/3.24/tutorial/html/conceptual-overview.html#a-first-ns-3-script
![Page 2: NS-3 tutorialupmcsms.weebly.com/uploads/3/9/4/3/39435231/lab02 … · · 2015-10-14h7ps:// Topology Includes Name space Logging Creang nodes ... ' ns3 /core—module . h " ' ns3](https://reader031.vdocuments.net/reader031/viewer/2022022010/5b056e0d7f8b9a93418b535a/html5/thumbnails/2.jpg)
Goal
Runningaclient/serverapplicaEonon2nodesconnectedbyapointtopointlink
![Page 3: NS-3 tutorialupmcsms.weebly.com/uploads/3/9/4/3/39435231/lab02 … · · 2015-10-14h7ps:// Topology Includes Name space Logging Creang nodes ... ' ns3 /core—module . h " ' ns3](https://reader031.vdocuments.net/reader031/viewer/2022022010/5b056e0d7f8b9a93418b535a/html5/thumbnails/3.jpg)
Includes
![Page 4: NS-3 tutorialupmcsms.weebly.com/uploads/3/9/4/3/39435231/lab02 … · · 2015-10-14h7ps:// Topology Includes Name space Logging Creang nodes ... ' ns3 /core—module . h " ' ns3](https://reader031.vdocuments.net/reader031/viewer/2022022010/5b056e0d7f8b9a93418b535a/html5/thumbnails/4.jpg)
NamespaceandLogging
![Page 5: NS-3 tutorialupmcsms.weebly.com/uploads/3/9/4/3/39435231/lab02 … · · 2015-10-14h7ps:// Topology Includes Name space Logging Creang nodes ... ' ns3 /core—module . h " ' ns3](https://reader031.vdocuments.net/reader031/viewer/2022022010/5b056e0d7f8b9a93418b535a/html5/thumbnails/5.jpg)
Main
TimeResoluEon
![Page 6: NS-3 tutorialupmcsms.weebly.com/uploads/3/9/4/3/39435231/lab02 … · · 2015-10-14h7ps:// Topology Includes Name space Logging Creang nodes ... ' ns3 /core—module . h " ' ns3](https://reader031.vdocuments.net/reader031/viewer/2022022010/5b056e0d7f8b9a93418b535a/html5/thumbnails/6.jpg)
Logging
![Page 7: NS-3 tutorialupmcsms.weebly.com/uploads/3/9/4/3/39435231/lab02 … · · 2015-10-14h7ps:// Topology Includes Name space Logging Creang nodes ... ' ns3 /core—module . h " ' ns3](https://reader031.vdocuments.net/reader031/viewer/2022022010/5b056e0d7f8b9a93418b535a/html5/thumbnails/7.jpg)
CreaEngobject
PointtoPointLink
![Page 8: NS-3 tutorialupmcsms.weebly.com/uploads/3/9/4/3/39435231/lab02 … · · 2015-10-14h7ps:// Topology Includes Name space Logging Creang nodes ... ' ns3 /core—module . h " ' ns3](https://reader031.vdocuments.net/reader031/viewer/2022022010/5b056e0d7f8b9a93418b535a/html5/thumbnails/8.jpg)
NetDeviceContainer
![Page 9: NS-3 tutorialupmcsms.weebly.com/uploads/3/9/4/3/39435231/lab02 … · · 2015-10-14h7ps:// Topology Includes Name space Logging Creang nodes ... ' ns3 /core—module . h " ' ns3](https://reader031.vdocuments.net/reader031/viewer/2022022010/5b056e0d7f8b9a93418b535a/html5/thumbnails/9.jpg)
InternetStack
IPhelper
![Page 10: NS-3 tutorialupmcsms.weebly.com/uploads/3/9/4/3/39435231/lab02 … · · 2015-10-14h7ps:// Topology Includes Name space Logging Creang nodes ... ' ns3 /core—module . h " ' ns3](https://reader031.vdocuments.net/reader031/viewer/2022022010/5b056e0d7f8b9a93418b535a/html5/thumbnails/10.jpg)
ApplicaEon-UdpEchoServer
![Page 11: NS-3 tutorialupmcsms.weebly.com/uploads/3/9/4/3/39435231/lab02 … · · 2015-10-14h7ps:// Topology Includes Name space Logging Creang nodes ... ' ns3 /core—module . h " ' ns3](https://reader031.vdocuments.net/reader031/viewer/2022022010/5b056e0d7f8b9a93418b535a/html5/thumbnails/11.jpg)
ApplicaEon-UdpEchoClient
![Page 12: NS-3 tutorialupmcsms.weebly.com/uploads/3/9/4/3/39435231/lab02 … · · 2015-10-14h7ps:// Topology Includes Name space Logging Creang nodes ... ' ns3 /core—module . h " ' ns3](https://reader031.vdocuments.net/reader031/viewer/2022022010/5b056e0d7f8b9a93418b535a/html5/thumbnails/12.jpg)
RunningthesimulaEon
![Page 13: NS-3 tutorialupmcsms.weebly.com/uploads/3/9/4/3/39435231/lab02 … · · 2015-10-14h7ps:// Topology Includes Name space Logging Creang nodes ... ' ns3 /core—module . h " ' ns3](https://reader031.vdocuments.net/reader031/viewer/2022022010/5b056e0d7f8b9a93418b535a/html5/thumbnails/13.jpg)
Buildingthecode
Putyour.ccfileinscratch
![Page 14: NS-3 tutorialupmcsms.weebly.com/uploads/3/9/4/3/39435231/lab02 … · · 2015-10-14h7ps:// Topology Includes Name space Logging Creang nodes ... ' ns3 /core—module . h " ' ns3](https://reader031.vdocuments.net/reader031/viewer/2022022010/5b056e0d7f8b9a93418b535a/html5/thumbnails/14.jpg)
NS-3tutorial
02-Networktopology
Source:
h7ps://www.nsnam.org/docs/release/3.24/tutorial/html/building-topologies.html#building-a-bus-network-topology
![Page 15: NS-3 tutorialupmcsms.weebly.com/uploads/3/9/4/3/39435231/lab02 … · · 2015-10-14h7ps:// Topology Includes Name space Logging Creang nodes ... ' ns3 /core—module . h " ' ns3](https://reader031.vdocuments.net/reader031/viewer/2022022010/5b056e0d7f8b9a93418b535a/html5/thumbnails/15.jpg)
Topology
![Page 16: NS-3 tutorialupmcsms.weebly.com/uploads/3/9/4/3/39435231/lab02 … · · 2015-10-14h7ps:// Topology Includes Name space Logging Creang nodes ... ' ns3 /core—module . h " ' ns3](https://reader031.vdocuments.net/reader031/viewer/2022022010/5b056e0d7f8b9a93418b535a/html5/thumbnails/16.jpg)
Includes
![Page 17: NS-3 tutorialupmcsms.weebly.com/uploads/3/9/4/3/39435231/lab02 … · · 2015-10-14h7ps:// Topology Includes Name space Logging Creang nodes ... ' ns3 /core—module . h " ' ns3](https://reader031.vdocuments.net/reader031/viewer/2022022010/5b056e0d7f8b9a93418b535a/html5/thumbnails/17.jpg)
Namespace
Logging
![Page 18: NS-3 tutorialupmcsms.weebly.com/uploads/3/9/4/3/39435231/lab02 … · · 2015-10-14h7ps:// Topology Includes Name space Logging Creang nodes ... ' ns3 /core—module . h " ' ns3](https://reader031.vdocuments.net/reader031/viewer/2022022010/5b056e0d7f8b9a93418b535a/html5/thumbnails/18.jpg)
CreaEngnodes
![Page 19: NS-3 tutorialupmcsms.weebly.com/uploads/3/9/4/3/39435231/lab02 … · · 2015-10-14h7ps:// Topology Includes Name space Logging Creang nodes ... ' ns3 /core—module . h " ' ns3](https://reader031.vdocuments.net/reader031/viewer/2022022010/5b056e0d7f8b9a93418b535a/html5/thumbnails/19.jpg)
PointtoPointLink
![Page 20: NS-3 tutorialupmcsms.weebly.com/uploads/3/9/4/3/39435231/lab02 … · · 2015-10-14h7ps:// Topology Includes Name space Logging Creang nodes ... ' ns3 /core—module . h " ' ns3](https://reader031.vdocuments.net/reader031/viewer/2022022010/5b056e0d7f8b9a93418b535a/html5/thumbnails/20.jpg)
InternetStack
![Page 21: NS-3 tutorialupmcsms.weebly.com/uploads/3/9/4/3/39435231/lab02 … · · 2015-10-14h7ps:// Topology Includes Name space Logging Creang nodes ... ' ns3 /core—module . h " ' ns3](https://reader031.vdocuments.net/reader031/viewer/2022022010/5b056e0d7f8b9a93418b535a/html5/thumbnails/21.jpg)
ApplicaEon–UdpEchoServer
![Page 22: NS-3 tutorialupmcsms.weebly.com/uploads/3/9/4/3/39435231/lab02 … · · 2015-10-14h7ps:// Topology Includes Name space Logging Creang nodes ... ' ns3 /core—module . h " ' ns3](https://reader031.vdocuments.net/reader031/viewer/2022022010/5b056e0d7f8b9a93418b535a/html5/thumbnails/22.jpg)
ApplicaEon–UdpEchoClient
![Page 23: NS-3 tutorialupmcsms.weebly.com/uploads/3/9/4/3/39435231/lab02 … · · 2015-10-14h7ps:// Topology Includes Name space Logging Creang nodes ... ' ns3 /core—module . h " ' ns3](https://reader031.vdocuments.net/reader031/viewer/2022022010/5b056e0d7f8b9a93418b535a/html5/thumbnails/23.jpg)
IProuEng
![Page 24: NS-3 tutorialupmcsms.weebly.com/uploads/3/9/4/3/39435231/lab02 … · · 2015-10-14h7ps:// Topology Includes Name space Logging Creang nodes ... ' ns3 /core—module . h " ' ns3](https://reader031.vdocuments.net/reader031/viewer/2022022010/5b056e0d7f8b9a93418b535a/html5/thumbnails/24.jpg)
Tracing
![Page 25: NS-3 tutorialupmcsms.weebly.com/uploads/3/9/4/3/39435231/lab02 … · · 2015-10-14h7ps:// Topology Includes Name space Logging Creang nodes ... ' ns3 /core—module . h " ' ns3](https://reader031.vdocuments.net/reader031/viewer/2022022010/5b056e0d7f8b9a93418b535a/html5/thumbnails/25.jpg)
![Page 26: NS-3 tutorialupmcsms.weebly.com/uploads/3/9/4/3/39435231/lab02 … · · 2015-10-14h7ps:// Topology Includes Name space Logging Creang nodes ... ' ns3 /core—module . h " ' ns3](https://reader031.vdocuments.net/reader031/viewer/2022022010/5b056e0d7f8b9a93418b535a/html5/thumbnails/26.jpg)
Output
![Page 27: NS-3 tutorialupmcsms.weebly.com/uploads/3/9/4/3/39435231/lab02 … · · 2015-10-14h7ps:// Topology Includes Name space Logging Creang nodes ... ' ns3 /core—module . h " ' ns3](https://reader031.vdocuments.net/reader031/viewer/2022022010/5b056e0d7f8b9a93418b535a/html5/thumbnails/27.jpg)
Output-pcap
![Page 28: NS-3 tutorialupmcsms.weebly.com/uploads/3/9/4/3/39435231/lab02 … · · 2015-10-14h7ps:// Topology Includes Name space Logging Creang nodes ... ' ns3 /core—module . h " ' ns3](https://reader031.vdocuments.net/reader031/viewer/2022022010/5b056e0d7f8b9a93418b535a/html5/thumbnails/28.jpg)
Output-pcap
![Page 29: NS-3 tutorialupmcsms.weebly.com/uploads/3/9/4/3/39435231/lab02 … · · 2015-10-14h7ps:// Topology Includes Name space Logging Creang nodes ... ' ns3 /core—module . h " ' ns3](https://reader031.vdocuments.net/reader031/viewer/2022022010/5b056e0d7f8b9a93418b535a/html5/thumbnails/29.jpg)
Output-pcap
![Page 30: NS-3 tutorialupmcsms.weebly.com/uploads/3/9/4/3/39435231/lab02 … · · 2015-10-14h7ps:// Topology Includes Name space Logging Creang nodes ... ' ns3 /core—module . h " ' ns3](https://reader031.vdocuments.net/reader031/viewer/2022022010/5b056e0d7f8b9a93418b535a/html5/thumbnails/30.jpg)
NS-3tutorial
03-Wirelessnetworktopology
Source:
h7ps://www.nsnam.org/docs/release/3.24/tutorial/html/building-topologies.html#building-a-wireless-network-topology
![Page 31: NS-3 tutorialupmcsms.weebly.com/uploads/3/9/4/3/39435231/lab02 … · · 2015-10-14h7ps:// Topology Includes Name space Logging Creang nodes ... ' ns3 /core—module . h " ' ns3](https://reader031.vdocuments.net/reader031/viewer/2022022010/5b056e0d7f8b9a93418b535a/html5/thumbnails/31.jpg)
Networktopology
![Page 32: NS-3 tutorialupmcsms.weebly.com/uploads/3/9/4/3/39435231/lab02 … · · 2015-10-14h7ps:// Topology Includes Name space Logging Creang nodes ... ' ns3 /core—module . h " ' ns3](https://reader031.vdocuments.net/reader031/viewer/2022022010/5b056e0d7f8b9a93418b535a/html5/thumbnails/32.jpg)
Includes
![Page 33: NS-3 tutorialupmcsms.weebly.com/uploads/3/9/4/3/39435231/lab02 … · · 2015-10-14h7ps:// Topology Includes Name space Logging Creang nodes ... ' ns3 /core—module . h " ' ns3](https://reader031.vdocuments.net/reader031/viewer/2022022010/5b056e0d7f8b9a93418b535a/html5/thumbnails/33.jpg)
CreaEngwirelessnodes
![Page 34: NS-3 tutorialupmcsms.weebly.com/uploads/3/9/4/3/39435231/lab02 … · · 2015-10-14h7ps:// Topology Includes Name space Logging Creang nodes ... ' ns3 /core—module . h " ' ns3](https://reader031.vdocuments.net/reader031/viewer/2022022010/5b056e0d7f8b9a93418b535a/html5/thumbnails/34.jpg)
Wirelesschannel
![Page 35: NS-3 tutorialupmcsms.weebly.com/uploads/3/9/4/3/39435231/lab02 … · · 2015-10-14h7ps:// Topology Includes Name space Logging Creang nodes ... ' ns3 /core—module . h " ' ns3](https://reader031.vdocuments.net/reader031/viewer/2022022010/5b056e0d7f8b9a93418b535a/html5/thumbnails/35.jpg)
MACconfiguraEonforSTAs
![Page 36: NS-3 tutorialupmcsms.weebly.com/uploads/3/9/4/3/39435231/lab02 … · · 2015-10-14h7ps:// Topology Includes Name space Logging Creang nodes ... ' ns3 /core—module . h " ' ns3](https://reader031.vdocuments.net/reader031/viewer/2022022010/5b056e0d7f8b9a93418b535a/html5/thumbnails/36.jpg)
InstallingWiFiSTAdevices
![Page 37: NS-3 tutorialupmcsms.weebly.com/uploads/3/9/4/3/39435231/lab02 … · · 2015-10-14h7ps:// Topology Includes Name space Logging Creang nodes ... ' ns3 /core—module . h " ' ns3](https://reader031.vdocuments.net/reader031/viewer/2022022010/5b056e0d7f8b9a93418b535a/html5/thumbnails/37.jpg)
APconfiguraEon
![Page 38: NS-3 tutorialupmcsms.weebly.com/uploads/3/9/4/3/39435231/lab02 … · · 2015-10-14h7ps:// Topology Includes Name space Logging Creang nodes ... ' ns3 /core—module . h " ' ns3](https://reader031.vdocuments.net/reader031/viewer/2022022010/5b056e0d7f8b9a93418b535a/html5/thumbnails/38.jpg)
Mobility–WiFiclients
![Page 39: NS-3 tutorialupmcsms.weebly.com/uploads/3/9/4/3/39435231/lab02 … · · 2015-10-14h7ps:// Topology Includes Name space Logging Creang nodes ... ' ns3 /core—module . h " ' ns3](https://reader031.vdocuments.net/reader031/viewer/2022022010/5b056e0d7f8b9a93418b535a/html5/thumbnails/39.jpg)
Mobility-AP
![Page 40: NS-3 tutorialupmcsms.weebly.com/uploads/3/9/4/3/39435231/lab02 … · · 2015-10-14h7ps:// Topology Includes Name space Logging Creang nodes ... ' ns3 /core—module . h " ' ns3](https://reader031.vdocuments.net/reader031/viewer/2022022010/5b056e0d7f8b9a93418b535a/html5/thumbnails/40.jpg)
IPstack
![Page 41: NS-3 tutorialupmcsms.weebly.com/uploads/3/9/4/3/39435231/lab02 … · · 2015-10-14h7ps:// Topology Includes Name space Logging Creang nodes ... ' ns3 /core—module . h " ' ns3](https://reader031.vdocuments.net/reader031/viewer/2022022010/5b056e0d7f8b9a93418b535a/html5/thumbnails/41.jpg)
IPaddresses
![Page 42: NS-3 tutorialupmcsms.weebly.com/uploads/3/9/4/3/39435231/lab02 … · · 2015-10-14h7ps:// Topology Includes Name space Logging Creang nodes ... ' ns3 /core—module . h " ' ns3](https://reader031.vdocuments.net/reader031/viewer/2022022010/5b056e0d7f8b9a93418b535a/html5/thumbnails/42.jpg)
ApplicaEon–UDPserver
![Page 43: NS-3 tutorialupmcsms.weebly.com/uploads/3/9/4/3/39435231/lab02 … · · 2015-10-14h7ps:// Topology Includes Name space Logging Creang nodes ... ' ns3 /core—module . h " ' ns3](https://reader031.vdocuments.net/reader031/viewer/2022022010/5b056e0d7f8b9a93418b535a/html5/thumbnails/43.jpg)
ApplicaEon–UDPclient
![Page 44: NS-3 tutorialupmcsms.weebly.com/uploads/3/9/4/3/39435231/lab02 … · · 2015-10-14h7ps:// Topology Includes Name space Logging Creang nodes ... ' ns3 /core—module . h " ' ns3](https://reader031.vdocuments.net/reader031/viewer/2022022010/5b056e0d7f8b9a93418b535a/html5/thumbnails/44.jpg)
SimulaEon:startandend