30
Simple TCP Protocol Simulation : Ns3 Presentation by, Jaswanth Vishwananda Sanket Vilekar Under Professor, Dr. Nasir Ghani

Project PPT_2

Embed Size (px)

Citation preview

Page 1: Project PPT_2

Simple TCP Protocol Simulation : Ns3

Presentation by,

Jaswanth Vishwananda Sanket Vilekar

Under Professor,

Dr. Nasir Ghani

Page 2: Project PPT_2

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

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

Example

Page 5: Project PPT_2

Packet Structure

Page 6: Project PPT_2

Encapsulation and De-Encapsulation

Page 7: Project PPT_2

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

Continued..

Page 9: Project PPT_2

Continued..

Page 10: Project PPT_2

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

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

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

Output Command used to run the code = ./waf –run folder_name/file_name

Result:-

Page 14: Project PPT_2

Animated result:- 1

2

3

4

Page 15: Project PPT_2

TCP bulk transfer example

Page 16: Project PPT_2

Continued..

Page 17: Project PPT_2

Continued..

Page 18: Project PPT_2

Output..

Page 19: Project PPT_2

Details of Simulator Consists of network elements – endpoint hosts and router sender link1 network/router link2 receiver Unidirectional transmission

Page 20: Project PPT_2

Continued..

Page 21: Project PPT_2

Models – TCP performance Simple model

(1)

Complex model

(2)

Page 22: Project PPT_2

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

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

Numerical Results Throughput is calculated based on:- (RTT =

0.06sec) Simulated data Simple and complex models

Page 25: Project PPT_2

Results:- Scenario 1

Page 26: Project PPT_2

Results:- Continued

Page 27: Project PPT_2

Results:- Scenario 2

Page 28: Project PPT_2

Results:- Scenario 3

Page 29: Project PPT_2

With different RTTs’

Page 30: Project PPT_2

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