A tutorial on the implementation of TCP in ns-3

Slides:



Advertisements
Similar presentations
Transmission Control Protocol (TCP)
Advertisements

Guide to TCP/IP, Third Edition
© 2007 Cisco Systems, Inc. All rights reserved.ICND1 v1.0—1-1 Building a Simple Network Understanding the TCP/IP Transport Layer.
Transmission Control Protocol (TCP) Basics
BZUPAGES.COM 1 User Datagram Protocol - UDP RFC 768, Protocol 17 Provides unreliable, connectionless on top of IP Minimal overhead, high performance –No.
Computer Networks 2 Lecture 2 TCP – I - Transport Protocols: TCP Segments, Flow control and Connection Setup.
Improving TCP Performance over Mobile Ad Hoc Networks by Exploiting Cross- Layer Information Awareness Xin Yu Department Of Computer Science New York University,
NS-2 TCP-Linux David Wei and Pei Cao. Outline Motivation Motivation Code structure of NS-2 TCP-Linux agent Code structure of NS-2 TCP-Linux agent Design.
EEC-484/584 Computer Networks Lecture 15 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
Anue Systems contribution to TR v Telecommunications Industry AssociationTR-30.3/11-08-xxx Arlington, VA August xx, 2011.
Computer Networks Transport Layer. Topics F Introduction  F Connection Issues F TCP.
TCP in Heterogeneous Network Md. Ehtesamul Haque # P.
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Transport Protocols Slide 1 Transport Protocols.
TCP. Learning objectives Reliable Transport in TCP TCP flow and Congestion Control.
Internetworking Fundamentals (Lecture #2) Andres Rengifo Copyright 2008.
UDP© Dr. Ayman Abdel-Hamid, CS4254 Spring CS4254 Computer Network Architecture and Programming Dr. Ayman A. Abdel-Hamid Computer Science Department.
 The Open Systems Interconnection model (OSI model) is a product of the Open Systems Interconnection effort at the International Organization for Standardization.
Lect3..ppt - 09/12/04 CIS 4100 Systems Performance and Evaluation Lecture 3 by Zornitza Genova Prodanoff.
University of the Western Cape Chapter 12: The Transport Layer.
Transport Layer Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University.
1 The Internet and Networked Multimedia. 2 Layering  Internet protocols are designed to work in layers, with each layer building on the facilities provided.
CSE679: Computer Network Review r Review of the uncounted quiz r Computer network review.
Udt.sourceforge.net 1 :: 23 Supporting Configurable Congestion Control in Data Transport Services Yunhong Gu and Robert L. Grossman Laboratory for Advanced.
TCP CUBIC in ns-3 CS577 Brett Levasseur 12/10/2013.
Compound TCP in NS-3 Keith Craig 1. Worcester Polytechnic Institute What is Compound TCP? As internet speeds increased, the long ‘ramp’ time of TCP Reno.
1 ECEN “Internet Protocols and Modeling”, Spring 2011 Slide 5.
Janey C. Hoe Laboratory for Computer Science at MIT 노상훈, Pllab.
IP Configuration API. Network Interface Configuration NAIfconfigIsDeviceUp() NAIfconfigDeviceFromInterface() NAIfconfigBringDeviceUp() NAIfconfigSetIpAddress()
Guide to TCP/IP Fourth Edition
CIS679: TCP and Multimedia r Review of last lecture r TCP and Multimedia.
Transmission Control Protocol (TCP) TCP Flow Control and Congestion Control CS 60008: Internet Architecture and Protocols Department of CSE, IIT Kharagpur.
@Yuan Xue A special acknowledge goes to J.F Kurose and K.W. Ross Some of the slides used in this lecture are adapted from their.
Represented BY:- Allauddin Ahmad.  What it is?  OSI model.  History.  Objectives.  Encapsulation and decapsulation.  Multiplexing and demultiplexing.
Fermilab Scientific Computing Division Fermi National Accelerator Laboratory, Batavia, Illinois, USA. Off-the-Shelf Hardware and Software DAQ Performance.
Computer Networking A Top-Down Approach Featuring the Internet Introduction Jaypee Institute of Information Technology.
28/09/2016 Congestion Control Ian McDonald (with many other WAND members)
Protocols and layering Network protocols and software Layered protocol suites The OSI 7 layer model Common network design issues and solutions.
Application – Transport – Network
Chapter 7: Transport Layer
Chapter 3 Transport Layer
The Transport Layer Implementation Services Functions Protocols
Chapter 9: Transport Layer
Chapter 3 outline 3.1 Transport-layer services
Instructor Materials Chapter 9: Transport Layer
Introduction to Networks
Chapter 15 Transmission Control Protocol (TCP)
PART 5 Transport Layer Computer Networks.
Magda El Zarki Professor, ICS UC, Irvine
Working at a Small-to-Medium Business or ISP – Chapter 7
Working at a Small-to-Medium Business or ISP – Chapter 7
TCP Westwood(+) Protocol Implementation in ns-3
Packet Sniffing.
Transport Layer Our goals:
TCP Parameters and Settings
Network Fundamentals – Chapter 4
Working at a Small-to-Medium Business or ISP – Chapter 7
Process-to-Process Delivery:
Chapter 5 Peer-to-Peer Protocols and Data Link Layer
CPEG514 Advanced Computer Networkst
Chapter 17. Transport Protocols
Computer Networking A Top-Down Approach Featuring the Internet
Transport Protocols: TCP Segments, Flow control and Connection Setup
The Transport Layer Chapter 6.
Transport Protocols: TCP Segments, Flow control and Connection Setup
Process-to-Process Delivery: UDP, TCP
Anant Mudambi, U. Virginia
Computer Networks Protocols
Chapter 3 Transport Layer
ns-3 training Tom Henderson ns-3 annual meeting 2019
Review of Internet Protocols Transport Layer
Presentation transcript:

A tutorial on the implementation of TCP in ns-3 ns-3 Training A tutorial on the implementation of TCP in ns-3 June 2017 ns-3 Training, June 2017

Objectives of this tutorial To provide an overview of TCP implementation in ns-3 Learn about the different implementations of TCP in ns-3 Understand the architecture of natively implemented TCP in ns-3 Walk through a simple TCP example Introduce how to write new TCP extensions Learn about writing test cases for new extensions Learn about the ongoing work related to TCP in ns-3 ns-3 Training, June 2017

Outline of the presentation TCP implementations in ns-3 History of ns-3 TCP Algorithms for congestion control and loss recovery Implementation of ns-3 TCP Demonstration of example programs How to add a new TCP extension in ns-3? Sample test cases for new TCP extension Overview of the ongoing work Review ns-3 Training, June 2017

TCP implementations in ns-3 ns-3 Training, June 2017

TCP implementations in ns-3 Presently there are following implementations of TCP available for ns-3: a native implementation of TCP in ns-3 (ns-3 TCP) support for Network Simulation Cradle (NSC) support for Direct Code Execution (DCE) others (e.g., combining virtual machines with ns-3) ns-3 TCP model supports: a full bidirectional TCP connection setup connection teardown ns-3 Training, June 2017

History of ns-3 TCP ns-3 Training, June 2017

History of ns-3 TCP Until ns-3.10 it was a port of TCP model from GTNetS (Georgia Tech Network Simulator) For ns-3.10 it was substantially rewritten by Adriam Tam in 2011 For ns-3.25 the module was refactored as a part of GSoC 2015 project by Natale Patriciello one of the major changes involved how congestion control algorithms are implemented (more details to follow) other notable change was about automating the tests Target is to align the implementation with that of Linux ns-3 Training, June 2017

Algorithms for congestion control and loss recovery ns-3 Training, June 2017

Congestion control algorithms NewReno (default) Westwood, Westwood+ Hybla HighSpeed Vegas Scalable Veno Binary Increase Congestion Control (BIC) Yet another HighSpeed TCP (YeAH) Illinois H-TCP Low Extra Delay Background Transport (LEDBAT) ns-3 Training, June 2017

Loss detection and recovery algorithms Fast retransmit Fast recovery Selective Acknowledgements (SACK) ns-3 Training, June 2017

Implementation of ns-3 TCP ns-3 Training, June 2017

TCP implementation in ns-3 Source code can be found at: src/internet/model/ tcp-header.{h,cc} tcp-socket.{h,cc} tcp-socket-base.{h,cc} tcp-socket-factory-impl.{h,cc} tcp-l4-protocol.{h,cc} tcp-congestion-ops.{h,cc} ... ns-3 Training, June 2017

TcpHeader class This class implements the TCP header and contains: port numbers sequence numbers acknowledgment numbers flags … It also contains: setters and getters methods for serialization and deserialization ns-3 Training, June 2017

TcpSocket class This class: is an abstract base class for all TcpSockets contains TcpSocket attributes that can be reused across different implementations. Examples of such attributes include: SndBufSize RcvBufSize SegmentSize InitialCwnd DelAckCount DelAckTimeout … ns-3 Training, June 2017

TcpSocketFactory class This class: is an abstract base class defines API for TCP sockets contains global default variables to initialize new sockets ns-3 Training, June 2017

TcpSocketFactoryImpl class This class: is an implementation of socket factory for ns-3 TCP creates sockets of type TcpSocketBase ns-3 Training, June 2017

TcpSocketBase class This class: is a base class for the implementation of TCP stream socket contains essential components of TCP and provides a socket interface for upper layers to call Examples of components include: Connection orientation Sliding window mechanism Fast retransmit Fast recovery Enable/disable window scaling, timestamps Congestion state machine Congestion control interface ns-3 Training, June 2017

TcpSocketState class This class: records the congestion state of a connection saves the information that is passed between the socket and the congestion control algorithms Examples of such information include: the current value of congestion window the current congestion state (CA_OPEN, CA_RECOVERY, etc) the current value of slow start threshold Last sequence number acknowledged Next sequence number to be transmitted … ns-3 Training, June 2017

TcpCongestionOps class This class: is an abstract class for congestion control provides an interface between the main socket code and congestion control; variables are stored in TcpSocketState inspired by the design in Linux Some methods implemented in this class include: GetSsThresh (Ptr<TcpSocketState>, uint32_t) IncreaseWindow (Ptr<TcpSocketState>, uint32_t) CongestionStateSet (Ptr<TcpSocketState>, TcpSocketState::TcpCongState_t) PktsAcked (Ptr<TcpSocketState>, uint32_t, Time) ns-3 Training, June 2017

TcpCongestionOps class ns-3 Training, June 2017

Demonstration of example programs: examples/tcp/ ns-3 Training, June 2017

How to add a new TCP extension in ns-3? ns-3 Training, June 2017

Steps to add a new TCP extension in ns-3 Create tcp-new.{h,cc} files for the new TCP extension in src/internet/model/ Create a class for new TCP extension, which can be inherited from TcpCongestionOps (or TcpNewReno as shown before) Some of the following methods may require a specific implementation for the new TCP extension: GetSsThresh IncreaseWindow PktsAcked Make necessary modifications in src/internet/wscript Configure and build ns-3 (resolve errors, if any) Setup an example program for this extension (or use an existing one). Write tests and update the documentation in src/internet/doc/tcp.rst ns-3 Training, June 2017

Sample test cases for new TCP extension ns-3 Training, June 2017

Sample test cases for new TCP extension Some of the following test cases are very commonly used across different TCP extensions CwndIncrementTest CwndDecrementTest Some TCP extensions need exclusive test cases, such as in the case of LEDBAT LEDBAT should be same as NewReno during Slow Start LEDBAT should be same as NewReno when timestamps are disabled Individual algorithms can be tested too test the working of slow start algorithm test the working of window scaling algorithm ns-3 Training, June 2017

Overview of the ongoing work ns-3 Training, June 2017

Ongoing work MPTCP model in ns-3 DCTCP, TCP Prague models in ns-3 TCP BBR model in ns-3 TCP Evaluation Suite for ns-3 ns-3 Training, June 2017

Review ns-3 Training, June 2017

Review Different TCP implementations can be used with ns-3 ns-3 TCP has been recently refactored The new architecture is simple and user friendly for adding new congestion control algorithms testing them Scope to develop more extensions e.g., TCP extensions for Data Center Networks ns-3 Training, June 2017

Thank you! ns-3 Training, June 2017