Download - Project PPT_2
![Page 1: Project PPT_2](https://reader036.vdocuments.site/reader036/viewer/2022062302/5899b9ab1a28aba11e8b6bc3/html5/thumbnails/1.jpg)
Simple TCP Protocol Simulation : Ns3
Presentation by,
Jaswanth Vishwananda Sanket Vilekar
Under Professor,
Dr. Nasir Ghani
![Page 2: Project PPT_2](https://reader036.vdocuments.site/reader036/viewer/2022062302/5899b9ab1a28aba11e8b6bc3/html5/thumbnails/2.jpg)
Introduction
Internet to Network Agreements and Decentralized Widely used protocols of Internet – TCP, IP and UDP Ns-3 , Java language
![Page 3: Project PPT_2](https://reader036.vdocuments.site/reader036/viewer/2022062302/5899b9ab1a28aba11e8b6bc3/html5/thumbnails/3.jpg)
UDP and TCP : Which is better?
TCP -- Connection oriented It avoids tolls – latency, Jitter Manages flow control 3-way handshake Flow and congestion controll
UDP – Connectionless No congestion control No error recovery
Text Communication Multimedia streaming
![Page 4: Project PPT_2](https://reader036.vdocuments.site/reader036/viewer/2022062302/5899b9ab1a28aba11e8b6bc3/html5/thumbnails/4.jpg)
Example
![Page 5: Project PPT_2](https://reader036.vdocuments.site/reader036/viewer/2022062302/5899b9ab1a28aba11e8b6bc3/html5/thumbnails/5.jpg)
Packet Structure
![Page 6: Project PPT_2](https://reader036.vdocuments.site/reader036/viewer/2022062302/5899b9ab1a28aba11e8b6bc3/html5/thumbnails/6.jpg)
Encapsulation and De-Encapsulation
![Page 7: Project PPT_2](https://reader036.vdocuments.site/reader036/viewer/2022062302/5899b9ab1a28aba11e8b6bc3/html5/thumbnails/7.jpg)
TCP’s Congestion Control
Principles Congestion Collapse in the internet in 80’s TCP – window based protocol Actual – flow control mechanism Special congestion algorithms developed Slow start, Congestion avoidance, fast retransmit, fast recovery Awnd, cwnd – to reflect the load of the network – Packet loss
![Page 8: Project PPT_2](https://reader036.vdocuments.site/reader036/viewer/2022062302/5899b9ab1a28aba11e8b6bc3/html5/thumbnails/8.jpg)
Continued..
![Page 9: Project PPT_2](https://reader036.vdocuments.site/reader036/viewer/2022062302/5899b9ab1a28aba11e8b6bc3/html5/thumbnails/9.jpg)
Continued..
![Page 10: Project PPT_2](https://reader036.vdocuments.site/reader036/viewer/2022062302/5899b9ab1a28aba11e8b6bc3/html5/thumbnails/10.jpg)
Software and Libraries’
Network Simulator – 3 Vmware workstation 12 player Ubuntu 14.04.4 LTS – 32 bit Desktop version Netanim Eclipse
![Page 11: Project PPT_2](https://reader036.vdocuments.site/reader036/viewer/2022062302/5899b9ab1a28aba11e8b6bc3/html5/thumbnails/11.jpg)
Node to Node.. ExampleTime::SetResolution (Time::NS);LogComponentEnable ("UdpEchoClientApplication", LOG_LEVEL_INFO);LogComponentEnable ("UdpEchoServerApplication", LOG_LEVEL_INFO);NodeContainer nodes;nodes.Create (2);PointToPointHelper pointToPoint;PointToPoint.SetDeviceAttribute ("DataRate", StringValue ("5Mbps"));pointToPoint.SetChannelAttribute ("Delay", StringValue ("2ms"));NetDeviceContainer devices;devices = pointToPoint.Install (nodes);InternetStackHelper stack;stack.Install (nodes);Ipv4AddressHelper address;address.SetBase ("10.1.1.0", "255.255.255.0");Ipv4InterfaceContainer interfaces = address.Assign (devices);
![Page 12: Project PPT_2](https://reader036.vdocuments.site/reader036/viewer/2022062302/5899b9ab1a28aba11e8b6bc3/html5/thumbnails/12.jpg)
Continued.. UdpEchoServerHelper echoServer (9);ApplicationContainer serverApps = echoServer.Install (nodes.Get (1));serverApps.Start (Seconds (1.0));serverApps.Stop (Seconds (10.0));UdpEchoClientHelper echoClient (interfaces.GetAddress (1), 9);echoClient.SetAttribute ("MaxPackets", UintegerValue (1));echoClient.SetAttribute ("Interval", TimeValue (Seconds (1.0)));echoClient.SetAttribute ("PacketSize", UintegerValue (1024));ApplicationContainer clientApps = echoClient.Install (nodes.Get (0));clientApps.Start (Seconds (2.0));clientApps.Stop (Seconds (10.0));Simulator::Run ();Simulator::Destroy ();return 0;}
![Page 13: Project PPT_2](https://reader036.vdocuments.site/reader036/viewer/2022062302/5899b9ab1a28aba11e8b6bc3/html5/thumbnails/13.jpg)
Output Command used to run the code = ./waf –run folder_name/file_name
Result:-
![Page 14: Project PPT_2](https://reader036.vdocuments.site/reader036/viewer/2022062302/5899b9ab1a28aba11e8b6bc3/html5/thumbnails/14.jpg)
Animated result:- 1
2
3
4
![Page 15: Project PPT_2](https://reader036.vdocuments.site/reader036/viewer/2022062302/5899b9ab1a28aba11e8b6bc3/html5/thumbnails/15.jpg)
TCP bulk transfer example
![Page 16: Project PPT_2](https://reader036.vdocuments.site/reader036/viewer/2022062302/5899b9ab1a28aba11e8b6bc3/html5/thumbnails/16.jpg)
Continued..
![Page 17: Project PPT_2](https://reader036.vdocuments.site/reader036/viewer/2022062302/5899b9ab1a28aba11e8b6bc3/html5/thumbnails/17.jpg)
Continued..
![Page 18: Project PPT_2](https://reader036.vdocuments.site/reader036/viewer/2022062302/5899b9ab1a28aba11e8b6bc3/html5/thumbnails/18.jpg)
Output..
![Page 19: Project PPT_2](https://reader036.vdocuments.site/reader036/viewer/2022062302/5899b9ab1a28aba11e8b6bc3/html5/thumbnails/19.jpg)
Details of Simulator Consists of network elements – endpoint hosts and router sender link1 network/router link2 receiver Unidirectional transmission
![Page 20: Project PPT_2](https://reader036.vdocuments.site/reader036/viewer/2022062302/5899b9ab1a28aba11e8b6bc3/html5/thumbnails/20.jpg)
Continued..
![Page 21: Project PPT_2](https://reader036.vdocuments.site/reader036/viewer/2022062302/5899b9ab1a28aba11e8b6bc3/html5/thumbnails/21.jpg)
Models – TCP performance Simple model
(1)
Complex model
(2)
![Page 22: Project PPT_2](https://reader036.vdocuments.site/reader036/viewer/2022062302/5899b9ab1a28aba11e8b6bc3/html5/thumbnails/22.jpg)
Description of the problem To verify the models for TCP’s throughput With 3 different simulation scenarios using the topology shown below.
Scenario 1: - 2 competing connections; TCP and UDP Scenario 2 :- interarrival times are exponentially distributed Scenario 3 :- homogeneous TCP population
Throughput Calculations Quantities measured
![Page 23: Project PPT_2](https://reader036.vdocuments.site/reader036/viewer/2022062302/5899b9ab1a28aba11e8b6bc3/html5/thumbnails/23.jpg)
Simulator Parameters Access-link bandwidth – 100 Mbps Bottleneck-link bandwidth – 10 Mbps Access-link delay – 1 ms Bottleneck-link delay – 29 ms Queue limits: 100 TCP type – Tahoe or Reno TCP TCP’s maximum window size – 100 Packet size – 1460 or 512 (in bytes) Queue management – RED queue management is used in the bottleneck
link and DropTail in the access link Simulation time = 250seconds, Transient phase = 50seconds accurate
throughput
![Page 24: Project PPT_2](https://reader036.vdocuments.site/reader036/viewer/2022062302/5899b9ab1a28aba11e8b6bc3/html5/thumbnails/24.jpg)
Numerical Results Throughput is calculated based on:- (RTT =
0.06sec) Simulated data Simple and complex models
![Page 25: Project PPT_2](https://reader036.vdocuments.site/reader036/viewer/2022062302/5899b9ab1a28aba11e8b6bc3/html5/thumbnails/25.jpg)
Results:- Scenario 1
![Page 26: Project PPT_2](https://reader036.vdocuments.site/reader036/viewer/2022062302/5899b9ab1a28aba11e8b6bc3/html5/thumbnails/26.jpg)
Results:- Continued
![Page 27: Project PPT_2](https://reader036.vdocuments.site/reader036/viewer/2022062302/5899b9ab1a28aba11e8b6bc3/html5/thumbnails/27.jpg)
Results:- Scenario 2
![Page 28: Project PPT_2](https://reader036.vdocuments.site/reader036/viewer/2022062302/5899b9ab1a28aba11e8b6bc3/html5/thumbnails/28.jpg)
Results:- Scenario 3
![Page 29: Project PPT_2](https://reader036.vdocuments.site/reader036/viewer/2022062302/5899b9ab1a28aba11e8b6bc3/html5/thumbnails/29.jpg)
With different RTTs’
![Page 30: Project PPT_2](https://reader036.vdocuments.site/reader036/viewer/2022062302/5899b9ab1a28aba11e8b6bc3/html5/thumbnails/30.jpg)
References https://www.nsnam.org/docs/tutorial/html/ https://www.youtube.com/channel/UCXgGY0wkgOzynnHvSEVmE3A?noht
ml5=False https://en.wikipedia.org/wiki/TCP_congestion-avoidance_algorithm TCP Performance Simulations Using Ns2 - Johanna Antila http://ilab.cs.byu.edu/cs460/2009f/assignments/lab3.htm