Introduction to Networks

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

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.
TCP: Transmission Control Protocol Overview Connection set-up and termination Interactive Bulk transfer Timers Improvements.
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.
Chapter 3 outline 3.1 transport-layer services
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.
Transport Layer 3-1 Outline r TCP m Congestion control m Flow control.
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.
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.
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.
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.
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.
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.
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.
CSEN 404 Transport Layer II Amr El Mougy Lamia AlBadrawy.
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
Chapter 3 Transport Layer
CS 1652 Jack Lange University of Pittsburgh
Slides have been adapted from:
TCP: Overview RFCs: 793, 1122, 1323, 2018, 2581 full duplex data:
CS1652 TCP Jack Lange University of Pittsburgh
Review: UDP demultiplexing TCP demultiplexing Multiplexing?
Chapter 3 Transport Layer
Transport Layer Goals: Overview:
Chapter 3 Transport Layer
CSCD 330 Network Programming
CSE 4213: Computer Networks II
Chapter 3 outline 3.1 Transport-layer services
Transmission Control Protocol (TCP)
Transportation Layer.
Chapter 3 Transport Layer
Lecture 5 – Chapter 3 CIS 5617, Spring2019 Anduo Wang
Presentation transcript:

Introduction to Networks CSEN 404 Introduction to Networks Amr El Mougy Ali Saudi ** Slides are attributed to J. F. Kurose

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

TCP: Overview point-to-point: full duplex data: one sender, one receiver reliable, in-order byte steam: no “message boundaries” pipelined: TCP congestion and flow control set window size send & receive buffers 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 Transport Layer

Reliable Data Transfer Application Layer Sending Process Receiving Process rdt_send() deliver_data() Reliable data transfer protocols (sending side) Reliable data transfer protocols (receiving side) Transport Layer Reliable Channel udt_send() rdt_rcv() Network Layer Unreliable Channel Provided Service Service Implementation

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

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 User types ‘C’ Seq=42, ACK=79, data = ‘C’ host ACKs receipt of ‘C’, echoes back ‘C’ Seq=79, ACK=43, data = ‘C’ host ACKs receipt of echoed ‘C’ Seq=43, ACK=80 time simple telnet scenario Transport Layer

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 Transport Layer

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=92, 8 bytes data ACK=100 loss timeout lost ACK scenario Host B X time Host A Host B Seq=92 timeout Seq=92, 8 bytes data Seq=100, 20 bytes data ACK=100 ACK=120 Seq=92, 8 bytes data Seq=92 timeout ACK=120 premature timeout time

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

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 Transport Layer

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

TCP Flow Control receiver side of TCP connection has a receive buffer: 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 speed-matching service: matching send rate to receiving application’s drain rate guarantees receiver’s buffer doesn’t overflow RcvBuffer 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

TCP Congestion Control 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

TCP Congestion Control 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) Transport Layer

Slow Start 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 1 MSS (exponential increase) For how long?

TCP Tahoe Exponential increase takes place 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 ssthresh = cwnd/2, set cwnd = 1, Increase exponentially (go to slow start) until cwnd ≥ ssthresh, then go to congestion avoidance state In congestion avoidance: increase cwnd by MSS2/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: ssthresh = cwnd/2, cwnd = 1, enter slow start

Example Assume 1 MSS = 1 KB RTT cwnd ssthresh Event 1 Initial: 1 MSS = 1 KB Initial: 64KB 2 64 3 4 8 5 16 Timeout or 3 dup ACKs 6 7 9 10 11 12 13 Transport Layer

TCP Reno Slow start still incorporates exponential increase If a timeout event occurs in any state the reaction is the same  ssthresh = cwnd/2, cwnd = 1, 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: go to congestion avoidance while waiting for missing ACK (increase linearly), ssthresh = cwnd/2, cwnd = cwnd/2 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, stay in congestion avoidance (increase linearly)

Example