project ppt_2
TRANSCRIPT
Simple TCP Protocol Simulation : Ns3
Presentation by,
Jaswanth Vishwananda Sanket Vilekar
Under Professor,
Dr. Nasir Ghani
Introduction
Internet to Network Agreements and Decentralized Widely used protocols of Internet – TCP, IP and UDP Ns-3 , Java language
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
Example
Packet Structure
Encapsulation and De-Encapsulation
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
Continued..
Continued..
Software and Libraries’
Network Simulator – 3 Vmware workstation 12 player Ubuntu 14.04.4 LTS – 32 bit Desktop version Netanim Eclipse
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);
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;}
Output Command used to run the code = ./waf –run folder_name/file_name
Result:-
Animated result:- 1
2
3
4
TCP bulk transfer example
Continued..
Continued..
Output..
Details of Simulator Consists of network elements – endpoint hosts and router sender link1 network/router link2 receiver Unidirectional transmission
Continued..
Models – TCP performance Simple model
(1)
Complex model
(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
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
Numerical Results Throughput is calculated based on:- (RTT =
0.06sec) Simulated data Simple and complex models
Results:- Scenario 1
Results:- Continued
Results:- Scenario 2
Results:- Scenario 3
With different RTTs’
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