CSEN 404 Transport Layer II Amr El Mougy Lamia AlBadrawy.

Slides:



Advertisements
Similar presentations
Introduction 1 Lecture 13 Transport Layer (Transmission Control Protocol) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer.
Advertisements

Transportation Layer (2). TCP full duplex data: – bi-directional data flow in same connection – MSS: maximum segment size connection-oriented: – handshaking.
Transport Layer3-1 TCP. Transport Layer3-2 TCP: Overview RFCs: 793, 1122, 1323, 2018, 2581 r full duplex data: m bi-directional data flow in same connection.
3-1 TCP Protocol r point-to-point: m one sender, one receiver r reliable, in-order byte steam: m no “message boundaries” r pipelined: m TCP congestion.
Data Communications and Computer Networks Chapter 3 CS 3830 Lecture 16 Omar Meqdadi Department of Computer Science and Software Engineering University.
1 Chapter 3 Transport Layer. 2 Chapter 3 outline 3.1 Transport-layer services 3.2 Multiplexing and demultiplexing 3.3 Connectionless transport: UDP 3.4.
1 Transport Layer Lecture 9 Imran Ahmed University of Management & Technology.
CS 471/571 Transport Layer 5 Slides from Kurose and Ross.
Transport Layer3-1 Summary of Reliable Data Transfer Checksums help us detect errors ACKs and NAKs help us deal with errors If ACK/NAK has errors sender.
Week 9 TCP9-1 Week 9 TCP 3 outline r 3.5 Connection-oriented transport: TCP m segment structure m reliable data transfer m flow control m connection management.
Transport Layer3-1 Homework r Chapter 2#10,13-18 r Due Wed September 17.
Transport Layer1 TCP: Overview RFCs: 793, 1122, 1323, 2018, 2581 r reliable, in-order byte steam: m no “message boundaries” r pipelined: m TCP congestion.
Introduction 1 Lecture 12 Transport Layer (Transmission Control Protocol) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer.
Transport Layer 3-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley Chapter3_2.
Chapter 3 outline 3.1 transport-layer services
Chapter 3 Transport Layer slides are modified from J. Kurose & K. Ross CPE 400 / 600 Computer Communication Networks Lecture 10.
EEC-484/584 Computer Networks Lecture 15 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
Transport Layer 3-1 outline r TCP m segment structure m reliable data transfer m flow control m congestion control.
Transport Layer 3-1 Fast Retransmit r time-out period often relatively long: m long delay before resending lost packet r detect lost segments via duplicate.
10/7/ /9/2003 TCP and Congestion Control October 7-9, 2003.
Transport Layer 3-1 Transport Layer r To learn about transport layer protocols in the Internet: m TCP: connection-oriented protocol m Reliability protocol.
Transport Layer Transport Layer: TCP. Transport Layer 3-2 TCP: Overview RFCs: 793, 1122, 1323, 2018, 2581 r full duplex data: m bi-directional.
Transport Layer 3-1 Transport Layer r To learn about transport layer protocols in the Internet: m TCP: connection-oriented protocol m Reliability protocol.
1 Announcement r Project 2 out m Much harder than project 1, start early! r Homework 2 due next Tuesday.
Transport Layer3-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross Addison-Wesley,
Announcement Project 2 out –Much harder than project 1, start early! Homework 2 due next Tu.
Chapter 3 Transport Layer
The Future r Let’s look at the homework r The next test is coming the 19 th (just before turkey day!) r Monday will finish TCP canned slides r Wednesday.
Transport Layer3-1 Data Communication and Networks Lecture 7 Transport Protocols: TCP October 21, 2004.
EEC-484/584 Computer Networks Lecture 13 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
Announcement Homework 1 graded Homework 2 out –Due in a week, 1/30 Project 2 problems –Minet can only compile w/ old version of gcc (2.96). –Only tlab-login.
Transport Layer session 1 TELE3118: Network Technologies Week 9: Transport Layer Basics Some slides have been taken from: r Computer Networking:
2: Application Layer 1 1DT066 Distributed Information System Chapter 3 Transport Layer.
EEC-484/584 Computer Networks Lecture 13 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
Transport Layer3-1 TCP sender (simplified) NextSeqNum = InitialSeqNum SendBase = InitialSeqNum loop (forever) { switch(event) event: data received from.
Network LayerII-1 RSC Part III: Transport Layer 3. TCP Redes y Servicios de Comunicaciones Universidad Carlos III de Madrid These slides are, mainly, part.
Transport Layer1 Reliable Transfer Ram Dantu (compiled from various text books)
Transport Layer 3-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 All.
3: Transport Layer3b-1 TCP: Overview RFCs: 793, 1122, 1323, 2018, 2581 r full duplex data: m bi-directional data flow in same connection m MSS: maximum.
2: Transport Layer 21 Transport Layer 2. 2: Transport Layer 22 TCP: Overview RFCs: 793, 1122, 1323, 2018, 2581 r full duplex data: m bi-directional data.
TCOM 509 – Internet Protocols (TCP/IP) Lecture 04_b Transport Protocols - TCP Instructor: Dr. Li-Chuan Chen Date: 09/22/2003 Based in part upon slides.
Transport Layer3-1 Chapter 3: Transport Layer Our goals: r understand principles behind transport layer services: m multiplexing/demultipl exing m reliable.
CSE679: Computer Network Review r Review of the uncounted quiz r Computer network review.
Transport Layer 3-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach 5 th edition. Jim Kurose, Keith Ross Addison-Wesley, April 2009.
Transport Layer3-1 Transport Layer Our lives begin to end, the day we become silent about things that matter.
Adapted from: Computer Networking, Kurose/Ross 1DT066 Distributed Information Systems Chapter 3 Transport Layer.
September 26 th, 2013 CS1652 The slides are adapted from the publisher’s material All material copyright J.F Kurose and K.W. Ross, All Rights.
Transport Layer3-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach 5 th edition. Jim Kurose, Keith Ross Addison-Wesley, April 2009.
Transport Layer3-1 Chapter 3 outline r 3.1 Transport-layer services r 3.2 Multiplexing and demultiplexing r 3.3 Connectionless transport: UDP r 3.4 Principles.
Transport Layer3-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach 5 th edition. Jim Kurose, Keith Ross Addison-Wesley, April 2009.
Quiz #1. Transport Layer 3-2 Chapter 3 Transport Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March.
IT 424 Networks2 IT 424 Networks2 Ack.: Slides are adapted from the slides of the book: “Computer Networking” – J. Kurose, K. Ross Chapter 3: Transport.
Transport Layer3-1 Transport Layer If you are going through Hell Keep going.
CIS679: TCP and Multimedia r Review of last lecture r TCP and Multimedia.
Transport Layer1 Goals: r understand principles behind transport layer services and protocols: m UDP m TCP Overview: r transport layer services r multiplexing/demultiplexing.
Chapter 3 Transport Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 A note on the use of these.
DMET 602: Networks and Media Lab Amr El Mougy Yasmeen EssamAlaa Tarek.
@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.
09-Transport Layer: TCP Transport Layer.
Chapter 3 Transport Layer
Chapter 3 outline 3.1 Transport-layer services
DMET 602: Networks and Media Lab
Chapter 3 outline 3.1 transport-layer services
CS 1652 Jack Lange University of Pittsburgh
TCP: Overview RFCs: 793, 1122, 1323, 2018, 2581 full duplex data:
Introduction to Networks
CS1652 TCP Jack Lange University of Pittsburgh
Review: UDP demultiplexing TCP demultiplexing Multiplexing?
Chapter 3 outline 3.1 Transport-layer services
Chapter 3 Transport Layer
Presentation transcript:

CSEN 404 Transport Layer II Amr El Mougy Lamia AlBadrawy

Transport Layer 2 Chapter 3 outline  Transport-layer services  Multiplexing and demultiplexing  Connectionless transport: UDP  Principles of reliable data transfer  Connection-oriented transport: TCP  segment structure  reliable data transfer  flow control  connection management  Principles of congestion control

Reliable Data Transfer 1-3 Reliable Channel Unreliable Channel Application Layer Transport Layer Network Layer rdt_send() udt_send() rdt_rcv() deliver_data() Provided Service Service Implementation

1-4 Transport Layer Protocol rdt 1.0: Perfectly Reliable Channel Sender Receiver Transport Layer at sender accepts packet from App Layer and sends it to Network Layer Transport Layer at receiver extracts packet from Network Layer and delivers it to App Layer Waiting

1-5 Transport Layer Protocol rdt 2.0 (stop-and-wait): Channel with Bit Errors Sender Receiver Transport Layer at sender accepts packet from App Layer and sends it to Network Layer Transport Layer at receiver extracts packet from Network Layer and delivers it to App Layer Waiting Errors Waiting for ACK or NAK Send ACK or NAK

1-6 Transport Layer Protocol rdt 2.0 (stop-and-wait): Channel with Bit Errors Sender Receiver Transport Layer at sender accepts packet from App Layer and sends it to Network Layer Transport Layer at receiver extracts packet from Network Layer and delivers it to App Layer Waiting for Call 0 Waiting for 0 Errors Waiting for ACK or NAK Send ACK or NAK Waiting for Call 1 Waiting for 1

1-7 Transport Layer Protocol rdt 2.0 (stop-and-wait): Channel with Bit Errors Sender Receiver Transport Layer at sender accepts packet from App Layer and sends it to Network Layer Transport Layer at receiver extracts packet from Network Layer and delivers it to App Layer Waiting for Call 0 Waiting for 0 Errors and Loss Waiting for ACK 0 or NAK 0 Send ACK 0 or NAK 0 Waiting for Call 1 Waiting for 1

1-8 Transport Layer

Pipelined protocols Pipelining: sender allows multiple, “in-flight”, yet-to-be- acknowledged pkts  range of sequence numbers must be increased  buffering at sender and/or receiver  Two generic forms of pipelined protocols: go-Back-N, selective repeat

Pipelining: increased utilization 1-10

Pipelining Protocols: Go-back-N  sender: up to N unACKed pkts in pipeline  receiver: only sends cumulative ACKs  doesn’t ACK pkt if there’s a gap  sender: has timer for oldest unACKed pkt  if timer expires: retransmit all unACKed packets

Pipelining Protocols: Go-back-N

Pipelining Protocols: Selective Repeat  sender: up to N unACKed packets in pipeline  receiver: ACKs individual pkts  sender: maintains timer for each unACKed pkt  if timer expires: retransmit only unACKed packet

Pipelining Protocols: Selective Repeat

Transport Layer 15 TCP: Overview  full duplex data:  bi-directional data flow in same connection  MSS: maximum segment size  connection-oriented:  handshaking (exchange of control msgs) init’s sender, receiver state before data exchange  flow controlled:  sender will not overwhelm receiver  point-to-point:  one sender, one receiver  reliable, in-order byte steam:  no “message boundaries”  pipelined:  TCP congestion and flow control set window size  send & receive buffers

Transport Layer TCP segment structure source port # dest port # 32 bits application data (variable length) sequence number acknowledgement number Receive window Urg data pointer checksum F SR PAU head len not used Options (variable length) URG: urgent data (generally not used) ACK: ACK # valid PSH: push data now (generally not used) RST, SYN, FIN: connection estab (setup, teardown commands) # bytes rcvr willing to accept counting by bytes of data (not segments!) Internet checksum (as in UDP)

Transport Layer 17 TCP seq. #’s and ACKs Seq. #’s:  byte stream “number” of first byte in segment’s data ACKs:  seq # of next byte expected from other side  cumulative ACK Q: how receiver handles out- of-order segments  A: TCP spec doesn’t say, - up to implementer Host A Host B Seq=42, ACK=79, data = ‘C’ Seq=79, ACK=43, data = ‘C’ Seq=43, ACK=80 User types ‘C’ host ACKs receipt of echoed ‘C’ host ACKs receipt of ‘C’, echoes back ‘C’ time simple telnet scenario

Transport Layer 18 TCP reliable data transfer (RDT)  TCP creates RDT service on top of IP’s unreliable service  pipelined segments  cumulative ACKs  TCP uses single retransmission timer  retransmissions are triggered by:  timeout events  duplicate ACKs  initially consider simplified TCP sender:  ignore duplicate ACKs  ignore flow control, congestion control

TCP sender events: data rcvd from app:  create segment with seq #  seq # is byte-stream number of first data byte in segment  start timer if not already running (think of timer as for oldest unACKed segment) timeout:  retransmit segment that caused timeout  restart timer ACK rcvd:  if acknowledges previously unACKed segments  update what is known to be ACKed  start timer if there are outstanding segments

TCP: retransmission scenarios Host A Seq=100, 20 bytes data ACK=100 time premature timeout Host B Seq=92, 8 bytes data ACK=120 Seq=92, 8 bytes data Seq=92 timeout ACK=120 Host A Seq=92, 8 bytes data ACK=100 loss timeout lost ACK scenario Host B X Seq=92, 8 bytes data ACK=100 time Seq=92 timeout

TCP retransmission scenarios (more) Host A Seq=92, 8 bytes data ACK=100 loss timeout Cumulative ACK scenario Host B X Seq=100, 20 bytes data ACK=120 time

Transport Layer 22 Fast Retransmit  time-out period often relatively long:  long delay before resending lost packet  detect lost segments via duplicate ACKs.  sender often sends many segments back-to-back  if segment is lost, there will likely be many duplicate ACKs for that segment  If sender receives 3 ACKs for same data, it assumes that segment after ACKed data was lost:  fast retransmit: resend segment before timer expires

Host A timeout Host B time X resend seq X2 seq # x1 seq # x2 seq # x3 seq # x4 seq # x5 ACK x1 triple duplicate ACKs

TCP Flow Control  receiver side of TCP connection has a receive buffer:  speed-matching service: matching send rate to receiving application’s drain rate  guarantees receiver’s buffer doesn’t overflow r app process may be slow at reading from buffer  receiver: advertises unused buffer space by including rwnd value in segment header  sender: limits # of unACKed bytes to rwnd sender won’t overflow receiver’s buffer by transmitting too much, too fast flow control IP datagrams TCP data (in buffer) (currently) unused buffer space application process rwnd RcvBuffer

TCP Congestion Control Transport Layer  Sliding Window Protocol  Sender maintains a congestion window (cwnd), in addition to the receiver’s window (rwnd) advertised in ACK Allowed-window = min(cwnd, rwnd)  If no congestion: Allowed-window = rwnd  Packet loss is interpreted as congestion occurrence: reduce congestion window size.

Transport Layer 1-26  Congestion control is performed at the sending host, using feedback from the destination host (acknowledgments)  The sender keeps increasing the congestion window cwnd until something happens, then it starts to react  The original version of TCP, called TCP Tahoe, had only two phases: slow start (exponential increase) and congestion avoidance (linear increase)  New version of TCP, called TCP Reno, has three states: slow start, congestion avoidance, and fast recovery (to recover from errors faster) TCP Congestion Control

1-27  Initially cwnd = 1 MSS, ssthresh = 64KB. Thus, sending rate = 1 MSS/RTT  The sender sends one segment and waits for ACK  For every ACK received, increase cwnd by one (exponential increase)  For how long? Slow Start

TCP Tahoe 1-28  Exponential increase keep happening until one of 3 things occur: cwnd ≥ ssthresh, OR timeout event occurs, OR 3 duplicate ACKs are detected  If cwnd ≥ ssthresh  go to congestion avoidance state directly  If timeout or 3 duplicate ACKs  set cwnd = 1, ssthresh = cwnd/2, Increase exponentially until cwnd ≥ ssthresh, then go to congestion avoidance state  In congestion avoidance: increase cwnd by 1/cwnd for every new ACK received (linear increase)  How long do we stay in congestion avoidance  until either a timeout or 3 duplicate ACKs are detected  Reaction: cwnd = 1, ssthresh = cwnd/2, enter slow start

Example Transport Layer 1-29 RTTcwndssthreshEvent 1Initial: 1 MSS = 1 KBInitial: 64KB Timeout or 3 dup ACKs Timeout or 3 ACKs  Assume 1 MSS = 1 KB

TCP Reno 1-30  Slow start still incorporates exponential increase  If a timeout event occurs in any state the reaction is the same  cwnd = 1, ssthresh = cwnd/2, increase exponentially until cwnd ≥ ssthresh, then enter congestion avoidance  The main difference is in the reaction to 3 duplicate ACKs  Recall: 3 duplicate ACKs means that one ACK is missing  Here, TCP Reno will enter fast recovery state: keep increasing exponentially while waiting for missing ACK  If the missing ACK did not arrive then a timeout will occur  cwnd = 1, ssthresh = cwnd/2, go to slow start (increase exponentially)  If the missing ACK arrives  cwnd = ssthresh, go to congestion avoidance directly (increase linearly)

Example 1-31