La couche transport dans l'internet (la suite TCP/IP)

Similar documents
La couche transport dans l'internet (la suite TCP/IP)

Transport Layer Protocols

Outline. TCP connection setup/data transfer Computer Networking. TCP Reliability. Congestion sources and collapse. Congestion control basics

TCP/IP Over Lossy Links - TCP SACK without Congestion Control

Chapter 5. Transport layer protocols

Lecture Objectives. Lecture 07 Mobile Networks: TCP in Wireless Networks. Agenda. TCP Flow Control. Flow Control Can Limit Throughput (1)

Improving the Performance of TCP Using Window Adjustment Procedure and Bandwidth Estimation

TCP over Multi-hop Wireless Networks * Overview of Transmission Control Protocol / Internet Protocol (TCP/IP) Internet Protocol (IP)

First Midterm for ECE374 03/09/12 Solution!!

First Midterm for ECE374 03/24/11 Solution!!

TCP in Wireless Mobile Networks

ICOM : Computer Networks Chapter 6: The Transport Layer. By Dr Yi Qian Department of Electronic and Computer Engineering Fall 2006 UPRM

Mobile Communications Chapter 9: Mobile Transport Layer

TCP over Wireless Networks

This sequence diagram was generated with EventStudio System Designer (

Lecture 15: Congestion Control. CSE 123: Computer Networks Stefan Savage

Names & Addresses. Names & Addresses. Hop-by-Hop Packet Forwarding. Longest-Prefix-Match Forwarding. Longest-Prefix-Match Forwarding

TCP and Wireless Networks Classical Approaches Optimizations TCP for 2.5G/3G Systems. Lehrstuhl für Informatik 4 Kommunikation und verteilte Systeme

SJBIT, Bangalore, KARNATAKA

B-2 Analyzing TCP/IP Networks with Wireshark. Ray Tompkins Founder of Gearbit

Computer Networks. Chapter 5 Transport Protocols

Overview of TCP/IP. TCP/IP and Internet

Data Networks Summer 2007 Homework #3

2 TCP-like Design. Answer

[Prof. Rupesh G Vaishnav] Page 1

COMP 3331/9331: Computer Networks and Applications. Lab Exercise 3: TCP and UDP (Solutions)

High Performance VPN Solutions Over Satellite Networks

TCP/IP Networking for Wireless Systems. Integrated Communication Systems Group Ilmenau University of Technology

TCP/IP Optimization for Wide Area Storage Networks. Dr. Joseph L White Juniper Networks

Application Level Congestion Control Enhancements in High BDP Networks. Anupama Sundaresan

Internet Protocol: IP packet headers. vendredi 18 octobre 13

TFTP TRIVIAL FILE TRANSFER PROTOCOL OVERVIEW OF TFTP, A VERY SIMPLE FILE TRANSFER PROTOCOL FOR SIMPLE AND CONSTRAINED DEVICES

We will give some overview of firewalls. Figure 1 explains the position of a firewall. Figure 1: A Firewall

q Connection establishment (if connection-oriented) q Data transfer q Connection release (if conn-oriented) q Addressing the transport user

High Speed Internet Access Using Satellite-Based DVB Networks

Solution of Exercise Sheet 5

A Survey on Congestion Control Mechanisms for Performance Improvement of TCP

How do I get to

Transport layer issues in ad hoc wireless networks Dmitrij Lagutin,

Higher Layer Protocols: UDP, TCP, ATM, MPLS

Servicesin ns-3. Outline SIMULACIÓN DE PROTOCOLOS DE ENRUTAMIENTO PARA REDES MÓVILES AD-HOC MEDIANTE HERRRAMIENTA DE SIMULACIÓN NS-3

EINDHOVEN UNIVERSITY OF TECHNOLOGY Department of Mathematics and Computer Science

TCP/IP Fundamentals. OSI Seven Layer Model & Seminar Outline

Architecture and Performance of the Internet

TCP for Wireless Networks

17: Queue Management. Queuing. Mark Handley

Computer Networks UDP and TCP

Ethernet. Ethernet. Network Devices

Optimization of Communication Systems Lecture 6: Internet TCP Congestion Control

Chapter 11. User Datagram Protocol (UDP)

Effect of Packet-Size over Network Performance

Final for ECE374 05/06/13 Solution!!

Performance evaluation of TCP connections in ideal and non-ideal network environments

TCP Performance Management for Dummies

Internet Protocols. Background CHAPTER

Prefix AggregaNon. Company X and Company Y connect to the same ISP, and they are assigned the prefixes:

LESSON Networking Fundamentals. Understand TCP/IP

AN IMPROVED SNOOP FOR TCP RENO AND TCP SACK IN WIRED-CUM- WIRELESS NETWORKS

First Midterm for ECE374 02/25/15 Solution!!

First Workshop on Open Source and Internet Technology for Scientific Environment: with case studies from Environmental Monitoring

COMP 361 Computer Communications Networks. Fall Semester Midterm Examination

User Datagram Protocol - Wikipedia, the free encyclopedia

Multipath TCP in Practice (Work in Progress) Mark Handley Damon Wischik Costin Raiciu Alan Ford

IP - The Internet Protocol

Computer Networks Homework 1

A Passive Method for Estimating End-to-End TCP Packet Loss

Simulation-Based Comparisons of Solutions for TCP Packet Reordering in Wireless Network

CS551 End-to-End Internet Packet Dynamics [Paxson99b]

Transport and Network Layer

Congestions and Control Mechanisms n Wired and Wireless Networks

Research of TCP ssthresh Dynamical Adjustment Algorithm Based on Available Bandwidth in Mixed Networks

The present and the future of TCP/IP

What is a DoS attack?

STUDY OF TCP VARIANTS OVER WIRELESS NETWORK

Secure SCTP against DoS Attacks in Wireless Internet

Transport layer protocols for ad hoc networks

TCP Westwood for Wireless

Performance improvement of active queue management with per-flow scheduling

Overview. Securing TCP/IP. Introduction to TCP/IP (cont d) Introduction to TCP/IP

Low-rate TCP-targeted Denial of Service Attack Defense

Congestion Control Review Computer Networking. Resource Management Approaches. Traffic and Resource Management. What is congestion control?

CSE 473 Introduction to Computer Networks. Exam 2 Solutions. Your name: 10/31/2013

Computer Networks - CS132/EECS148 - Spring

Networks: IP and TCP. Internet Protocol

TCP Flow Control. TCP Receiver Window. Sliding Window. Computer Networks. Lecture 30: Flow Control, Reliable Delivery

International Journal of Scientific & Engineering Research, Volume 6, Issue 7, July ISSN

Access Control: Firewalls (1)

TCP Over Wireless Network. Jinhua Zhu Jie Xu

FEW would argue that one of TCP s strengths lies in its

SELECTIVE-TCP FOR WIRED/WIRELESS NETWORKS

Voice over IP. Demonstration 1: VoIP Protocols. Network Environment

An Improved TCP Congestion Control Algorithm for Wireless Networks

Course Overview: Learn the essential skills needed to set up, configure, support, and troubleshoot your TCP/IP-based network.

Improving Effective WAN Throughput for Large Data Flows By Peter Sevcik and Rebecca Wetzel November 2008

IP Network Layer. Datagram ID FLAG Fragment Offset. IP Datagrams. IP Addresses. IP Addresses. CSCE 515: Computer Network Programming TCP/IP

Transcription:

La couche transport dans l'internet (la suite TCP/IP) C. Pham Université de Pau et des Pays de l Adour Département Informatique http://www.univ-pau.fr/~cpham Congduc.Pham@univ-pau.fr

Cours de C. Pham, Univ. Pau

La couche transport dans l'internet La couche Transport (couche 4) est composé de 2 protocoles: TCP (RFC 793) et UDP (RFC 768) TCP mode connecté fiable contrôle de la congestion sélection sur le champ protocol du packet IP UDP TCP ICMP UDP mode datagramme non fiable IP data Cours de C. Pham, Univ. Pau

Cours de C. Pham, Univ. Pau

Cours de C. Pham, Univ. Pau

Ports standards Cours de C. Pham, Univ. Pau SMTP: 25, HTTP: 80, Telnet: 23 FTP control: 20, FTP transfer: 21 DNS: 53

Cours de C. Pham, Univ. Pau

Cours de C. Pham, Univ. Pau

UDP Port Numbers (some examples) 0 Reserved 7 Echo 11 Users (Gives list of active users) 13 Daytime 17 Quote (Gives the quote of the day) 53 Domain (Domain name server) 67 BOOTPS (Bootstrap Protocol Server) 68 BOOTPC (Bootstrap Protocol Client) 69 TFTP (Trivial File Transfer Protocol) 123 NTP (Network Time Protocol) Cours de C. Pham, Univ. Pau

UDP Checksum Pseudohdr UDP header UDP Data Area Pad Source IP Address Destination IP Address Zero Proto UDP Length zero s to adjust length to mult. of 16 bit. Checksum := Complemented 16 bit, one s complement sum of all fields, grouped by 16 bit. The checksum is considered 0 for this computation. Including the pseudoheader is against strict layering! Cours de C. Pham, Univ. Pau

UDP checksum Goal: detect errors (e.g., flipped bits) in transmitted segment Sender: treat segment contents as sequence of 16-bit integers checksum: addition (1 s complement sum) of segment contents sender puts checksum value into UDP checksum field In reality some IP header fields are included w/ the UDP segment for checksumming. Receiver: compute checksum of received segment check if computed checksum equals checksum field value: NO - error detected YES - no error detected. But maybe errors nonetheless? More in chap 5 on stronger error detection methods Cours de C. Pham, Univ. Pau

UDP Checksum Example Consider three 16-bit words: 0110011001100110 0101010101010101 0000111100001111 (1 s complement) sum of first two 16-bit words is: 1011101110111011 Adding the third word to the above sum gives: 1100101011001010 1 s complement of this sum => invert 0 s and 1 s 0011010100110101 (this is the checksum field) If no errors, sum of all four 16-bit words (incl. Checksum) will be all 1s, I.e., 1111111111111111 Cours de C. Pham, Univ. Pau

Cours de C. Pham, Univ. Pau

Cours de C. Pham, Univ. Pau

TCP Checksum Pseudohdr TCP header TCP Data Area Pad Source IP Address Destination IP Address Zero Proto TCP Length zero s to adjust length to mult. of 16 bit. Checksum := Complemented 16 bit, one s complement sum of all fields, grouped by 16 bit. The checksum is considered 0 for this computation. Including the pseudoheader is against strict layering! Cours de C. Pham, Univ. Pau

TCP Error Correction Sliding window error correction Cumulative Acknowledgment Position in stream of last received byte Acknowledgments piggybacking with reverse traffic Retransmission policy implementation dependent Adaptive time-out Network delays vary widely due to traffic fluctuations Round-trip time continuously monitored Time-out based on weighted average of round-trip times Congestion control Receiver congestion prevented by adapting window size Network Congestion detected by round-trip delay analysis Congestion cured by slowing down transmissions Cours de C. Pham, Univ. Pau

Cours de C. Pham, Univ. Pau

Cours de C. Pham, Univ. Pau

TCP: scenarios de retransmission Host A Host B Host A Host B timeout Seq=92, 8 bytes data X loss ACK=100 Seq=92, 8 bytes data Seq=100 timeout Seq=92 timeout Seq=92, 8 bytes data Seq=100, 20 bytes data ACK=100 ACK=120 Seq=92, 8 bytes data ACK=100 ACK=120 time ACK perdu time timeout prématuré, ACKs cumulés Cours de C. Pham, Univ. Pau

Cours de C. Pham, Univ. Pau

TCP Window Flow Control: Coté émetteur fenêtre Envoyés et accusés Envoyés mais pas accusés Pas encore envoyé Prochain à envoyer Cours de C. Pham, Univ. Pau

Window Flow Control: Coté récepteur Packet Sent Source Port Dest. Port Sequence Number Acknowledgment HL/Flags Window D. Checksum Urgent Pointer Options.. Packet Received Source Port Dest. Port Sequence Number Acknowledgment HL/Flags Window D. Checksum Urgent Pointer Options.. App write acknowledged sent to be sentoutside window Cours de C. Pham, Univ. Pau

How to estimate RTT? RTT = prop + queuing delay Queuing delay highly variable So, different samples of RTTs will give different random values of queuing delay Q: how to estimate RTT? SampleRTT (M): measured time from segment transmission until ACK receipt M will vary wildly use several recent measurements, not just current SampleRTT to calculate "AverageRTT" (A) A (1-x)*A + x*m and then set RTO=Rβ, x=0.1 (old version) Cours de C. Pham, Univ. Pau slide modified by C. Pham

Round Trip Time and Timeout (II) New version (Jacobson, 1988) constant multiple of the mean is not good better use mean (A) and variance (D) Setting the RTO timeout Err=M-A A A+gErr, g=1/8 D D+h( Err -D), h=1/4 RTO = A+ 4D In 1988, Jacobson specified 2D, but corrected it into 4D in 1990 Example A=0, D=3s and RTO=A+2D initially. So RTO 1 =6s If M=1.5s for 1st segment Err=1.5-0=1.5 A=0+O.125*1.5=O.1875 D=3+0.25( 1.5-3)=2.625 RTO 2 =0.1875+4*2.625=10.6875 Cours de C. Pham, Univ. Pau slide added by C. Pham

Timer Granularity Many TCP implementations set RTO in multiples of 200,500 or 1000ms Why? Avoid spurious timeouts RTTs can vary quickly due to cross traffic Delayed-ack timer can delay valid acks by up to 200ms Make timers interrupts efficient What happens for the first couple of packets? Pick a very conservative value (seconds) Can lead to stall if early packet lost Cours de C. Pham, Univ. Pau

Cours de C. Pham, Univ. Pau

connection establisment Client Server Client request connection SYN 1415531521:145531521(0) mss<1024> SYN 1823083521:1823083521(0) ACK 1415531522, mss(1024> serveracks receipt of SYN, sends back SYNACK client ACKs receipt of SYNACK ACK 1823083522 Trace obtained with tcpdump showing seq#:implied_seq#(ndata) Cours de C. Pham, Univ. Pau slide added by C. Pham

Cours de C. Pham, Univ. Pau

Cours de C. Pham, Univ. Pau

The congestion phenomenon 10 Mbps 1.5 Mbps 100 Mbps Too many packets sent to the same interface. Difference bandwidth from one network to another Main consequence: packet losses in routers

Congestion dans le réseau (2) Flow control is for receivers Congestion control is for the network From Computer Networks, A. Tanenbaum Congestion collapse was first observed in 1986 by V. Jacobson. Congestion control was added to TCP (TCP Reno) in 1988. Cours de C. Pham, Univ. Pau

Cours de C. Pham, Univ. Pau

Cours de C. Pham, Univ. Pau

Cours de C. Pham, Univ. Pau

Cours de C. Pham, Univ. Pau

TCP congestion control: the big picture Congestion window doubles every round-trip time Sequence No From Computer Networks, A. Tanenbaum packet ack Time cwnd grows exponentially (slow start), then linearly (congestion avoidance) with 1 more segment per RTT If loss, divides threshold by 2 (multiplicative decrease) and restart with cwnd=1 packet Cours de C. Pham, Univ. Pau

Cours de C. Pham, Univ. Pau

AIMD Phase plot User 2 s Allocation x 2 t 0 Convergence point Fairness Line x 1 =x 2 Efficiency Line x 1 +x 2 =C Multiplicative Decrease preserves the fairness because the user s allocation ratio remains the same Ex: x 2 = x.b 2 x 1 x 1.b User 1 s Allocation x 1 Assumption: decrease policy must (at minimum) reverse the load increase over-and-above efficiency line Implication: decrease factor should be conservatively set to account for any congestion detection lags etc! Cours de C. Pham, Univ. Pau

Evolutions de TCP 1975 Three-way handshake Raymond Tomlinson In SIGCOMM 75 1974 TCP described by Vint Cerf and Bob Kahn In IEEE Trans Comm 1982 TCP & IP RFC 793 & 791 1983 BSD Unix 4.2 supports TCP/IP 1984 Nagel s algorithm to reduce overhead of small packets; predicts congestion collapse 1986 Congestion collapse observed 1987 Karn s algorithm to better estimate round-trip time 1988 Van Jacobson s algorithms congestion avoidance and congestion control (most implemented in 4.3BSD Tahoe) 1990 4.3BSD Reno fast retransmit delayed ACK s 1975 1980 1985 1990

TCP dans les années 1990s 1994 T/TCP (Braden) Transaction TCP 1996 SACK TCP (Floyd et al) Selective Acknowledgement 1993 TCP Vegas (Brakmo et al) real congestion avoidance 1994 ECN (Floyd) Explicit Congestion Notification 1996 Hoe Improving TCP startup 1996 FACK TCP (Mathis et al) extension to SACK 1993 1994 1996