# 6.263/16.37: Lectures 3 & 4. The Data Link Layer: ARQ Protocols

Save this PDF as:

Size: px
Start display at page:

## Transcription

1 6.263/16.37: Lectures 3 & 4 The Data Link Layer: ARQ Protocols MIT 1

2 Automatic Repeat ReQuest (ARQ) When the receiver detects errors in a packet, how does it let the transmitter know to re-send the corresponding packet? Systems which automatically request the retransmission of missing packets or packets with errors are called ARQ systems. Three common schemes Stop & Wait Go Back N Selective Repeat 2

3 Pure Stop and Wait Protocol Transmitter departure times at A Time -----> packet 0 CRC packet 1 CRC packet 1 CRC ACK NAK Packet 0 Accepted arrival times at receiver Packet 1 Accepted Problem: Lost Packets Sender will wait forever for an acknowledgement Packet may be lost due to framing errors Solution: Use time-out (TO) Sender retransmits the packet after a timeout 3

4 The Use Of Timeouts For Lost Packets Requires Sequence Numbers packet 0 CRC <---- timeout -----> packet 0 CRC packet 0 accepted packet 0 or 1? Problem: Unless packets are numbered the receiver cannot tell which packet it received Solution: Use packet numbers (sequence numbers) 4

5 Request Numbers Are Required On ACKs To Distinguish Packet ACKed 0 packet 0 timeout 0 packet 0 1 packet 1? ACK ACK Packet 0 accepted REQUEST NUMBERS: Instead of sending "ack" or "nak", the receiver sends the number of the packet currently awaited. Sequence numbers and request numbers can be sent modulo 2. This works correctly assuming that 1) Frames travel in order (FCFS) on links 2) The CRC never fails to detect errors 3) The system is correctly initialized. 5

6 Stop and Wait Protocol Algorithm at sender (node A) (with initial condition SN=0) 1) Accept packet from higher layer when available; assign number SN to it 2) Transmit packet SN in frame with sequence # SN 3) Wait for an error free frame from B i. if received and it contains RN>SN in the request # field, set SN to RN and go to 1 ii. if not received within given time, go to 2 6

7 Stop and Wait Algorithm at receiver (node B) (with initial condition RN=0) 1) Whenever an error-free frame is received from A with a sequence # equal to RN, release received packet to higher layer and increment RN. 2) At arbitrary times, but within bounded delay after receiving any error free frame from A, transmit a frame to A containing RN in the request # field. 7

8 Correctness of stop & wait with integer SN, RN Assume, for A to (from) B transmission, that All errors are detected as errors Initially no frames are on link, SN=0, RN=0 Frames may be arbitrarily delayed or lost Each frame is correctly received with at least some probability q>0. Split proof of correctness into two parts: SAFETY: show that no packet is ever released out of order or more than once LIVENESS: show that every packet is eventually released 8

9 Safety No frames on link initially, packet 0 is first packet accepted at A, it is the only packet assigned SN=0, and must be the packet released by B if B ever releases a packet Subsequently (using induction) if B has released packets up to and including n-1, then RN is updated to n when n-1 is released, and only n can be released next 9

10 LIVENESS SN Node A t Node B RN 1 i i i i x i i+1 t 2 x i+1 t 3 Packets out i t 1 = time at which A first starts to transmit packet i t 2 = time at which B correctly receives & releases i, and increases RN to i+1 t 3 = time at which SN is increased to i+1 Will prove that t 1 < t 2 < t 3 <. Liveness 10

11 Liveness Argument Let SN(t), RN(t) be values of SN and RN at time t From the algorithm, (1) SN(t) and RN(t) are increasing in t and SN(t) RN(t) for all t (2) From safety (since i has not been sent before t 1 ) RN(t 1 ) i and SN(t 1 ) = i From (1) and (2), RN(t 1 ) = SN(t 1 ) = i RN is incremented at t 2 and SN at t 3, so t 2 < t 3 A transmits i repeatedly up to t 3, and thus to t 2 when it is correctly received. Since q>0, t 2 is finite B transmits RN=i+1 repeatedly until correctly received at t 3, and q > 0 implies that t 3 is finite. 11

12 Correctness of Stop & Wait with binary (finite) SN, RN Assume that frames travel on link in order Note that with integer SN, RN, either SN=RN (from t 1 to t 2 ) or (3) SN=RN-1 (from t 2 to t 3 ) (4) Since frames travel in order, the sequence numbers arriving at B and the request numbers arriving at A are increasing, so a single bit can resolve the ambiguity between (3) and (4) RN = 0 and SN = 1 or RN =1 and SN = 0 => received packet is an old packet RN = 0 and SN = 0 or RN = 1 and SN = 1 => received packet is new 12

13 Efficiency of stop and wait Let S = time between the transmission of a packet and reception of its ACK D TP = transmission time of the packet Efficiency (no errors) = D TP /S A packet S S = D TP + 2D P + D TA B ACK D TP D P D TA D P E = D TP /(D TP + 2D P + D TA ) D P = prop delay D TA = ACK trans. Time DTP = packet trans. time 13

14 Stop and wait in the presence of errors Let P = the probability of an error in the transmission of a packet or in its acknowledgment S = D TP + 2D P + D TA TO = the timeout interval X = the amount of time that it takes to transmit a packet and receive its ACK. This time accounts for retransmissions due to errors E[X] = S + TO*P/(1-P), Efficiency = D TP /E[X] Where, TO = D TP in a full duplex system TO = S in a half duplex system 14

15 Go Back N ARQ (Sliding Window) Stop and Wait is inefficient when propagation delay is larger than the packet transmission time Can only send one packet per round-trip time Go Back N allows the transmission of new packets before earlier ones are acknowledged Go back N uses a window mechanism where the sender can send packets that are within a window (range) of packets The window advances as acknowledgements for earlier packets are received WINDOW WINDOW WINDOW WINDOW PKT-0 PKT-1 PKT-2 PKT-3 PKT-4 PKT-5 PKT-6 PKT-7 PKT-8 PKT-9 ACK-0 ACK-1 ACK-2 ACK-3 ACK-4 ACK-5 ACK-6 ACK-7 ACK-8 15

16 Features of Go Back N Window size = N Sender cannot send packet i+n until it has received the ACK for packet i Receiver operates just like in Stop and Wait Receive packets in order Receiver cannot accept packet out of sequence Send RN = i + 1 => ACK for all packets up to and including i Use of piggybacking When traffic is bi-directional RN s are piggybacked on packets going in the other direction Each packet contains a SN field indicating that packet s sequence number and a RN field acknowledging packets in the other direction <--Frame Header > SN RN Packet CRC 16

17 Go Back N ARQ The transmitter has a "window" of N packets that can be sent without acknowledgements This window ranges from the last value of RN obtained from the receiver (denoted SN min ) to SN min +N-1 When the transmitter reaches the end of its window, or times out, it goes back and retransmits packet SN min Let SN min be the smallest number packet not yet ACKed Let SN max be the number of the next packet to be accepted from the higher layer (I.e., the next new packet to be transmitted) 17

18 Sender Max ACK received SN min SN max Next seqnum Sender window Sent & Acked Sent Not Acked OK to Send Not Usable 18

19 Go Back N: Sender Rules SN min = 0; SN max = 0 Repeat If SN max < SN min + N (entire window not yet sent) Send packet SN max ; SN max = SN max + 1; If packet arrives from receiver with RN > SN min SN min = RN; If SN min < SN max (there are still some unacknowledged packets) and sender cannot send any new packets Choose some packet between SN min and SN max and re-send it The last rule says that when you cannot send any new packets you should re-send an old (not yet ACKed) packet There may be two reasons for not being able to send a new packet Nothing new from higher layer Window expired (SN max = SN min + N ) No set rule on which packet to re-send Least recently sent 19

20 Go Back N: Receiver Rules RN = 0; Repeat When a good packet arrives, if SN = RN Accept packet Increment RN = RN +1 At regular intervals send an ACK packet with RN Most DLCs send an ACK whenever they receive a packet from the other direction Delayed ACK for piggybacking Receiver reject all packets with SN not equal RN However, those packets may still contain useful RN numbers (see homework assignment) 20

21 Example of Go Back 7 ARQ SN Window (0,6) (1,7) (2,8) (3,9) (5,11) Node A t Node B RN Packets delivered Note that packet RN-1 must be accepted at B before a frame containing request RN can start transmission at B 21

22 RETRANSMISSION BECAUSE OF ERRORS FOR GO BACK 4 ARQ Window (0,3) (1,4) (2,5) SN Node A x t Node B RN Packets delivered Note that the timeout value here is take to be the time to send a full window of packets Note that entire window has to be retransmitted after an error 22

23 RETRANSMISSION DUE TO FEEDBACK ERRORS FOR GO BACK 4 ARQ SN Window (0,3) (2,5) (4,7) (5,8) Node A Node B x x RN t 6 Packets delivered When an error occurs in the reverse direction the ACK may still arrive in time. This is the case here where the packet from B to A with RN=2 arrives in time to prevent retransmission of packet 0 Packet 2 is retransmitted because RN = 4 did not arrive in time, however it did arrive in time to prevent retransmission of packet 3 Was retransmission of packet 4 and 5 really necessary? Strictly no because the window allows transmission of packets 6 and 7 before further retransmissions. However, this is implementation dependent 23

24 EFFECT OF LONG FRAMES SN Window Node A (0,3) (1,4) (3,6) (4,7) t Node B RN Packets delivered Long frames in feedback direction slow down the ACKs This causes a transmitter with short frames to wait or go back Notice again that the retransmission of packets 3 and 4 was not strictly required because the sender could have sent new packets within the window Again, this is implementation dependent 24

25 Efficiency of Go Back N N*D TP A packet S packet packet packet S = D TP + 2D P + D TA B ACK D TP D P D TA D P We want to choose N large enough to allow continuous transmission while waiting for an ACK for the first packet of the window, N > S/ D TP Without errors the efficiency of Go Back N is, E = min{1, N*D TP /S} 25

26 Efficiency of Go Back N with transmission errors Approximate analysis Assume: N =! " S D TP # \$ TO = N*D TP When an error occurs the entire window of N packets must be retransmitted Let X = the number of packets sent per successful transmission E[X] = 1*(1-P) + (X+N)*P = 1 + N*P/(1-P) Efficiency = 1/E[X] 26

27 Go Back N Requirements Go Back N is guaranteed to work correctly, independent of the detailed choice of which packets to repeat, if 1) System is correctly initialized 2) No failures in detecting errors 3) Packets travel in FCFS order 4) Positive probability of correct reception 5) Transmitter occasionally resends Sn min (e.g., upon timeout) 6) Receiver occasionally sends RN 27

28 Notes on Go Back N Requires no buffering of packets at the receiver Sender must buffer up to N packets while waiting for their ACK Sender must re-send entire window in the event of an error Packets can be numbered modulo M where M > N Because at most N packets can be sent simultaneously Receiver can only accept packets in order Receiver must deliver packets in order to higher layer Cannot accept packet i+1 before packet i This removes the need for buffering This introduces the need to re-send the entire window upon error The major problem with Go Back N is this need to re-send the entire window when an error occurs. This is due to the fact that the receiver can only accept packets in order 28

29 Selective Repeat Protocol (SRP) Selective Repeat attempts to retransmit only those packets that are actually lost (due to errors) Receiver must be able to accept packets out of order Since receiver must release packets to higher layer in order, the receiver must be able to buffer some packets Retransmission requests Implicit The receiver acknowledges every good packet, packets that are not ACKed before a time-out are assumed lost or in error Notice that this approach must be used to be sure that every packet is eventually received Explicit An explicit NAK (selective reject) can request retransmission of just one packet This approach can expedite the retransmission but is not strictly needed One or both approaches are used in practice 29

30 SRP Rules Window protocol just like GO Back N Window size W Packets are numbered Mod M where M >= 2W Sender can transmit new packets as long as their number is with W of all un- ACKed packets Sender retransmit un-acked packets after a timeout Or upon a NAK if NAK is employed Receiver ACKs all correct packets Receiver stores correct packets until they can be delivered in order to the higher layer 30

31 Need for buffering Sender must buffer all packets until they are ACKed Up to W un-acked packet are possible Receiver must buffer packets until they can be delivered in order I.e., until all lower numbered packets have been received Needed for orderly delivery of packets to the higher layer Up to W packets may have to be buffered (in the event that the first packet of a window is lost) Implication of buffer size = W Number of un-acked packets at sender W Buffer limit at sender Number of un-acked packets at sender cannot differ by more than W Buffer limit at the receiver (need to deliver packets in order) Packets must be numbered modulo M 2W (using log 2 (M) bits) 31

32 EFFICIENCY For ideal SRP, only packets containing errors will be retransmitted Ideal is not realistic because sometimes packets may have to be retransmitted because their window expired. However, if the window size is set to be much larger than the timeout value then this is unlikely With ideal SRP, efficiency = 1 - P P = probability of a packet error Notice the difference with Go Back N where efficiency (Go Back N) = 1/(1 + N*P/(1-P)) When the window size is small performance is about the same, however with a large window SRP is much better As transmission rates increase we need larger windows and hence the increased use of SRP 32

33 Why are packets numbered Modulo 2W? Lets consider the range of packets that may follow packet i at the receiver i - W +1 i i - W +1 x i i - W +1 Packet i may be followed by the first packet of the window (i -W+1) if it requires retransmission i i+1 i+2 i+w x x x x i i - W Packet i may be followed by the last packet of the window (i+w) if all Of the ACKs between i and i +W are lost Receiver must differentiate between packets i -W+1... i +W These 2W packets can be differentiated using Mod 2W numbering 33

34 STANDARD DLC's HDLC, LAPB (X.25), and SDLC are almost the same HDLC/ SDLC developed by IBM for IBM SNA networks LAPB developed for X.25 networks They all use bit oriented framing with flag = They all use a 16-bit CRC for error detection They all use Go Back N ARQ with N = 7 or 127 (optional) SDLC packet flag address control data CRC flag Multipoint SN,RN communication Older protocols (used for modems, e.g., xmodem) used stop and wait and simple checksums 34

35 Reliability in the Protocol Stack Application Virtual network service Application FEC/ARQ Presentation Presentation Virtual session Session Session Virtual link for end to end messages Transport Transport ARQ Virtual link for end to end packets Network Network Network Network Data link Control Virtual link for reliable packets DLC DLC DLC DLC Data link Control ARQ physical interface Virtual bit pipe phys. int. phys. int. phys. int. phys. int. physical interface FEC coding Physical link External Site subnet node subnet node External site 35

36 Transmission Control Protocol (TCP) Transport layer protocol Reliable transmission of messages Connection oriented Stream traffic Must re-sequence out of order IP packets Reliable ARQ mechanism Notice that packets have a sequence number and an ack number Notice that packet header has a window size (for Go Back N) Flow/congestion control mechanism Limits the size of the window in response to congestion 36

37 TCP header fields Source port Destination port Sequence number Request number Data Offset Reserved Control Window Check sum Urgent pointer Options (if any) Data 37

38 TCP error recovery Error recovery is done at multiple layers Link, transport, application Transport layer error recovery is needed because Packet losses can occur at network layer E.g., buffer overflow Some link layers may not be reliable SN and RN are used for error recovery in a similar way to Go Back N at the link layer Large SN needed for re-sequencing out of order packets Notice difference from Link Layer ARQ TCP uses a timeout mechanism for packet retransmission Timeout calculation Fast retransmission 38

39 Retransmissions in TCP: A variation of Go-Back-N Sliding window with cumulative acks Receiver can only return a single ack sequence number to the sender. Acknowledges all bytes with a lower sequence number Starting point for retransmission Duplicate acks sent when out-of-order packet received Sender only retransmits a single packet at a time Optimistic assumption: only one that it knows is lost Network is congested shouldn t overload it Error control is based on byte sequences, not packets. Retransmitted packet can be different from the original lost packet (e.g., due to fragmentation) 39

40 TCP timeout calculation Based on round trip time measurement (RTT) Weighted average RTT_AVE = a*(rtt_measured) + (1-a)*RTT_AVE ; a ~ 0.1 Timeout is a multiple of RTT_AVE (usually two) Short Timeout would lead to too many retransmissions Long Timeout would lead to large delays and inefficiency In order to make Timeout be more tolerant of delay variations it has been proposed (Jacobson) to set the timeout value based on the standard deviation of RTT Timeout = RTT_AVE + 4*RTT_SD In many TCP implementations the minimum value of Timeout is 500 ms due to the clock granularity 40

41 Fast Retransmit When TCP receives a packet with a SN that is greater than the expected SN, it sends an ACK packet with a request number of the expected packet SN This could be due to out-of-order delivery or packet loss If a packet is lost then duplicate RNs will be sent by TCP until the packet it correctly received But the packet will not be retransmitted until a Timeout occurs This leads to added delay and inefficiency Fast retransmit assumes that if 3 duplicate RNs are received by the sending module that the packet was lost After 3 duplicate RNs are received the packet is retransmitted After retransmission, continue to send new data Fast retransmit allows TCP retransmission to behave more like Selective repeat ARQ 41

42 SACK: A variation on SRP ARQ Option for selective ACKs (SACK) also widely deployed Selective acknowledgement (SACK) essentially adds a bitmask of packets received Implemented as a TCP option (extended TCP header) Encoded as a set of received byte ranges (max of 4 ranges/often max of 3) When to retransmit? Packets may experience different delays Still need to deal with reordering Wait for out of order by 3pkts 42

43 TCP Error Control Original TCP designed for low BER, low delay links New implementations (RFC 1323) allow for larger windows and selective retransmissions 43

### Transport Layer Protocols

Transport Layer Protocols Version. Transport layer performs two main tasks for the application layer by using the network layer. It provides end to end communication between two applications, and implements

### Good Ideas So Far Computer Networking. Outline. Sequence Number Space. Lecture 18 More TCP & Congestion Control. The devilish details of TCP

Good Ideas So Far 15-441 Computer Networking Lecture 18 More TCP & Congestion Control Flow control Stop & wait Parallel stop & wait Sliding window (e.g., advertised windows) Loss recovery outs Acknowledgement-driven

### TCP: Overview RFCs: 793, 1122, 1323, 2018, 2581

TCP: Overview RFCs: 793, 1122, 1323, 2018, 2581 socket door point-to-point: one sender, one receiver reliable, in-order byte steam: no message boundaries pipelined: TCP congestion and flow control set

### Computer Networks. Data Link Layer

Computer Networks The Data Link Layer 1 Data Link Layer Application Transport Network DLL PHY 2 What does it do? What functions it performs? Typically: Handling transmission errors, a.k.a., error control.

### Higher Layer Protocols: UDP, TCP, ATM, MPLS

Higher Layer Protocols: UDP, TCP, ATM, MPLS Massachusetts Institute of Technology Slide 1 The TCP/IP Protocol Suite Transmission Control Protocol / Internet Protocol Developed by DARPA to connect Universities

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

TCP over Multi-hop Wireless Networks * Overview of Transmission Control Protocol / Internet Protocol (TCP/IP) *Slides adapted from a talk given by Nitin Vaidya. Wireless Computing and Network Systems Page

### CMPE 150 Winter 2009

CMPE 150 Winter 2009 Lecture 6 January 22, 2009 P.E. Mantey CMPE 150 -- Introduction to Computer Networks Instructor: Patrick Mantey mantey@soe.ucsc.edu http://www.soe.ucsc.edu/~mantey/ / t / Office: Engr.

### CSE331: Introduction to Networks and Security. Lecture 9 Fall 2006

CSE33: Introduction to Networks and Security Lecture 9 Fall 2006 Announcements Project Due TODAY HW Due on Friday Midterm I will be held next Friday, Oct. 6th. Will cover all course material up to next

### TCP: Reliable, In-Order Delivery

TCP: Reliable, In-Order Delivery EE 122: Intro to Communication Networks Fall 2006 (MW 4-5:30 in Donner 155) Vern Paxson TAs: Dilip Antony Joseph and Sukun Kim http://inst.eecs.berkeley.edu/~ee122/ Materials

### TCP in Wireless Mobile Networks

TCP in Wireless Mobile Networks 1 Outline Introduction to transport layer Introduction to TCP (Internet) congestion control Congestion control in wireless networks 2 Transport Layer v.s. Network Layer

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

TCP Flow Control Computer Networks The receiver side of a TCP connection maintains a receiver buffer: Lecture : Flow Control, eliable elivery application process may be slow at reading from the buffer

### Computer Networks. Chapter 5 Transport Protocols

Computer Networks Chapter 5 Transport Protocols Transport Protocol Provides end-to-end transport Hides the network details Transport protocol or service (TS) offers: Different types of services QoS Data

### TCP Service Model. Announcements. TCP: Reliable, In-Order Delivery. Today s Lecture. TCP Header. TCP Support for Reliable Delivery

Announcements Sukun is away this week. Dilip will cover his section and office hours. TCP: Reliable, In-Order Delivery EE 122: Intro to Communication Networks Fall 2006 (MW 4-5:30 in Donner 155) Vern Paxson

### Guide to TCP/IP, Third Edition. Chapter 5: Transport Layer TCP/IP Protocols

Guide to TCP/IP, Third Edition Chapter 5: Transport Layer TCP/IP Protocols Objectives Understand the key features and functions of the User Datagram Protocol Explain the mechanisms that drive segmentation,

### Tutorial 1 (Week 6) Introduction

COMP 333/933 Computer Networks and Applications Tutorial (Week 6) Introduction Problem Set, Question 7 Suppose two hosts, A and B are separated by, kms and are connected by a direct link of R = Mbps. Suppose

### TCP over Wireless Networks

TCP over Wireless Networks Raj Jain Professor of Computer Science and Engineering Washington University in Saint Louis Saint Louis, MO 63130 Audio/Video recordings of this lecture are available at: http://www.cse.wustl.edu/~jain/cse574-10/

### TCP (Transmission Control Protocol)

TCP (Transmission Control Protocol) Originally defined in RFC 793 (September 1981) UDP features: multiplexing + protection against bit errors Ports, checksum Connection-oriented Establishment and teardown

### Computer Networks UDP and TCP

Computer Networks UDP and TCP Saad Mneimneh Computer Science Hunter College of CUNY New York I m a system programmer specializing in TCP/IP communication protocol on UNIX systems. How can I explain a thing

### TCP. Raj Jain. Professor of CIS The Ohio State University Columbus, OH 43210 Raj Jain 20-1

TCP Professor of CIS Columbus, OH 43210 Jain@ACM.Org http://www.cis.ohio-state.edu/~jain/ 20-1 Overview Key features, Header format Mechanisms, Implementation choices Slow start congestion avoidance, Fast

### TCP transmission control protocol

TCP transmission control protocol Suguru Yamaguchi 2014 Information Network 1 Functions that transport layer provides! Model: inter-process communication Identification of process Communication pair of

### TCP and UDP. Raj Jain. Professor of CIS The Ohio State University Columbus, OH

TCP and UDP Professor of CIS Columbus, OH 43210 Jain@ACM.Org http://www.cis.ohio-state.edu/~jain/ 12-1 Overview Key features Header format Mechanisms Implementation choices Slow start congestion avoidance

### TCP - Introduction. Features of TCP

TCP - Introduction The Internet Protocol (IP) provides unreliable datagram service between hosts The Transmission Control Protocol (TCP) provides reliable data delivery It uses IP for datagram delivery

### Midterm Exam CMPSCI 453: Computer Networks Fall 2011 Prof. Jim Kurose

Midterm Exam CMPSCI 453: Computer Networks Fall 2011 Prof. Jim Kurose Instructions: There are 4 questions on this exam. Please use two exam blue books answer questions 1, 2 in one book, and the remaining

### Guide to TCP/IP Fourth Edition. Chapter 9: TCP/IP Transport Layer Protocols

Guide to TCP/IP Fourth Edition Chapter 9: TCP/IP Transport Layer Protocols Objectives Explain the key features and functions of the User Datagram Protocol and the Transmission Control Protocol Explain,

### Overview. Lecture 4: Congestion Control TCP. Transport. A Bit of History TCP. Internet is a network of networks

Overview Internet is a network of networks Lecture 4: Congestion Control Narrow waist of IP: unreliable, best-effort datagram delivery Packet forwarding: input port to output port Routing protocols: computing

### The Transmission Control Protocol (TCP): Lecture 1

Today s Lecture The Transmission Control Protocol (TCP): Lecture 1 I. TCP overview II. The TCP Header III. Connection establishment and termination Internet Protocols CSC / ECE 573 Fall, 2005 N. C. State

### Data Communication & Networks G22.2262-001. Session 9 - Main Theme The Internet Transport Protocols: TCP, UDP. Dr. Jean-Claude Franchitti

Data Communication & Networks G22.2262-001 Session 9 - Main Theme The Internet Transport Protocols: TCP, UDP Dr. Jean-Claude Franchitti New York University Computer Science Department Courant Institute

### Data Link Layer(1) Principal service: Transferring data from the network layer of the source machine to the one of the destination machine

Data Link Layer(1) Principal service: Transferring data from the network layer of the source machine to the one of the destination machine Virtual communication versus actual communication: Specific functions

### TCP III - Error Control

TCP III - Error Control TCP Error Control 1 ARQ Error Control Two types of errors: Lost packets Damaged packets Most Error Control techniques are based on: 1. Error Detection Scheme (Parity checks, CRC).

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

B-2 Analyzing TCP/IP Networks with Wireshark June 15, 2010 Ray Tompkins Founder of Gearbit www.gearbit.com SHARKFEST 10 Stanford University June 14-17, 2010 TCP In this session we will examine the details

### Transports and TCP. Adolfo Rodriguez CPS 214

Transports and TCP Adolfo Rodriguez CPS 214 Host-to to-host vs. Process-to to-process Communication Until now, we have focused on delivering packets between arbitrary hosts connected to Internet Routing

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

CSE 473 Introduction to Computer Networks Jon Turner Exam Solutions Your name: 0/3/03. (0 points). Consider a circular DHT with 7 nodes numbered 0,,...,6, where the nodes cache key-values pairs for 60

### Chapter 15. Transmission Control Protocol (TCP) TCP/IP Protocol Suite 1

Chapter 15 Transmission Control Protocol (TCP) TCP/IP Protocol Suite 1 Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display. OBJECTIVES: To introduce TCP as a protocol

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

Improving the Performance of TCP Using Window Adjustment Procedure and Bandwidth Estimation R.Navaneethakrishnan Assistant Professor (SG) Bharathiyar College of Engineering and Technology, Karaikal, India.

### Process-to. to-process Communication. Transports and TCP. A Brief Internet History UDP. TCP Timeline. TCP: After 1990

Transports and TCP Adolfo Rodriguez CPS 214 Host-to to-host vs. Process-to to-process Communication Until now, we have focused on delivering packets between arbitrary hosts connected to Internet Routing

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

Outline 15-441 Computer Networking Lecture 8 TCP & Congestion Control TCP connection setup/data transfer TCP Reliability Congestion sources and collapse Congestion control basics Lecture 8: 09-23-2002

### CS268 Exam Solutions. 1) End-to-End (20 pts)

CS268 Exam Solutions General comments: ) If you would like a re-grade, submit in email a complete explanation of why your solution should be re-graded. Quote parts of your solution if necessary. In person

### Internet Protocol Stack. TCP: Transmission Control Protocol

Internet Protocol tack application: supporting network applications HTTP, MTP, FTP, etc transport: endhost-endhost data transfer TCP, UP network: routing of datagrams from source to destination IP, routing

### Data Link Layer. Flow Control. Flow Control

Data Link Layer Flow Control 1 Flow Control Flow Control is a technique for speed-matching of transmitter and receiver. Flow control ensures that a transmitting station does not overflow a receiving station

### - TCP and UDP - Transport Layer Protocols

1 Transport Layer Protocols - TCP and UDP - The Transport layer (OSI Layer-4) does not actually transport data, despite its name. Instead, this layer is responsible for the reliable transfer of data, by

### 1. The subnet must prevent additional packets from entering the congested region until those already present can be processed.

Congestion Control When one part of the subnet (e.g. one or more routers in an area) becomes overloaded, congestion results. Because routers are receiving packets faster than they can forward them, one

### Problem 1 Suppose that the client A initiates a TCP connection to a Web server whose name is S. More or less simultaneously,

Note: Here you have the original answer proposed by working groups. Spelling mistakes from original answers have not been corrected. Sometimes teacher note is included in red. Problem 1 Suppose that the

### Chapter 15. Transmission Control Protocol (TCP) TCP/IP Protocol Suite 1

Chapter 15 Transmission Control Protocol (TCP) TCP/IP Protocol Suite 1 Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter Outline TCP/IP Protocol Suite 2

### TCP/IP. IPv4 packet layout. IPv4 packet layout. Emin Gun Sirer

IP TCP/IP Emin Gun Sirer Internetworking protocol Network layer Common packet format for the Internet Specifies what packets look like Fragments long packets into shorter packets Reassembles fragments

### Transmission Control Protocol (TCP) Reliable Connection-oriented Point-to-point Full-duplex Streams, not messages

Transmission Control Protocol (TCP) Reliable Connection-oriented Point-to-point Full-duplex Streams, not messages Initialization: 3 Way Handshake Initiator SYN (Synchronization Sequence Number) SYN = ISN

### ALOHA Class of Multiple Access Protocols

ALOHA Class of Multiple Access Protocols ALOHA, also called pure ALOHA: Whenever a user has a frame to send, it simply transmits the frame. If collision occurs, it waits for a random period of time and

### TCP/IP Tutorial. Transmission Control Protocol Internet Protocol

TCP/IP Tutorial Transmission Control Protocol Internet Protocol 1 TCP/IP & OSI In OSI reference model terminology -the TCP/IP protocol suite covers the network and transport layers. TCP/IP can be used

### A Comparative Analysis of TCP Tahoe, Reno, New-Reno, SACK and Vegas

A Comparative Analysis of TCP Tahoe, Reno, New-Reno, SACK and Vegas Abstract: The purpose of this paper is to analyze and compare the different congestion control and avoidance mechanisms which have been

### [Prof. Rupesh G Vaishnav] Page 1

Basics The function of transport layer is to provide a reliable end-to-end communications service. It also provides data transfer service for the user layers above and shield the upper layers from the

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

Lecture Objectives Wireless and Mobile Systems Design Lecture 07 Mobile Networks: TCP in Wireless Networks Describe TCP s flow control mechanism Describe operation of TCP Reno and TCP Vegas, including

### Module 11: TCP/IP Transport and Application Layers

Module 11: TCP/IP Transport and Application Layers 11.1 TCP/IP Transport Layer 11.1.1 Introduction to the TCP/IP transport layer The primary duties of the transport layer are to transport and regulate

### TCP for Wireless Networks

TCP for Wireless Networks Outline Motivation TCP mechanisms Indirect TCP Snooping TCP Mobile TCP Fast retransmit/recovery Transmission freezing Selective retransmission Transaction oriented TCP Adapted

### Mobile Communications Chapter 9: Mobile Transport Layer

Mobile Communications Chapter 9: Mobile Transport Layer Motivation TCP-mechanisms Classical approaches Indirect TCP Snooping TCP Mobile TCP PEPs in general Additional optimizations Fast retransmit/recovery

### Chapter 5. Transport layer protocols

Chapter 5. Transport layer protocols This chapter provides an overview of the most important and common protocols of the TCP/IP transport layer. These include: User Datagram Protocol (UDP) Transmission

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

ICOM 5026-090: Computer Networks Chapter 6: The Transport Layer By Dr Yi Qian Department of Electronic and Computer Engineering Fall 2006 Outline The transport service Elements of transport protocols A

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

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,

### TCP - Part I. Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.

TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management. 1 Overview TCP = Transmission Control Protocol Connection-oriented protocol Provides

### Visualizations and Correlations in Troubleshooting

Visualizations and Correlations in Troubleshooting Kevin Burns Comcast kevin_burns@cable.comcast.com 1 Comcast Technology Groups Cable CMTS, Modem, Edge Services Backbone Transport, Routing Converged Regional

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

Chapter 2 Technical Basics: Layer 1 Methods for Medium Access: Layer 2 Chapter 3 Wireless Networks: Bluetooth, WLAN, WirelessMAN, WirelessWAN Mobile Networks: GSM, GPRS, UMTS Chapter 4 Mobility on the

### WORST-CASE PERFORMANCE LIMITATION OF TCP SACK AND A FEASIBLE SOLUTION

WORST-CASE PERFORMANCE LIMITATION OF TCP SACK AND A FEASIBLE SOLUTION K.N. Srijith, Lillykutty Jacob, A.L. Ananda School of Computing, National University of Singapore, Singapore 117543, {srijith,jacobl,ananda}@comp.nus.edu.sg

### 15-441: Computer Networks Homework 2 Solution

5-44: omputer Networks Homework 2 Solution Assigned: September 25, 2002. Due: October 7, 2002 in class. In this homework you will test your understanding of the TP concepts taught in class including flow

### By: Chunyan Fu, PhD, Ericsson Canada

TCP/UDP Basics By: Chunyan Fu, PhD, Ericsson Canada Internet Model Application TCP/UDP IP Link layer Physical layer Transport Service Overview Provide service to application layer by using the service

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

1 First Midterm for ECE374 03/09/12 Solution!! Instructions: Put your name and student number on each sheet of paper! The exam is closed book. You have 90 minutes to complete the exam. Be a smart exam

### Lectures 24 & 25. Higher Layer Protocols: TCP/IP and ATM

Lectures 24 & 25 Higher Layer Protocols: TCP/IP and ATM Massachusetts Institute of Technology Laboratory for Information and Decision Systems Slide 1 Outline Network Layer and Internetworking The TCP/IP

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

Lecture 15: Congestion Control CSE 123: Computer Networks Stefan Savage Overview Yesterday: TCP & UDP overview Connection setup Flow control: resource exhaustion at end node Today: Congestion control Resource

### TCP in Wireless Networks

Outline Lecture 10 TCP Performance and QoS in Wireless s TCP Performance in wireless networks TCP performance in asymmetric networks WAP Kurose-Ross: Chapter 3, 6.8 On-line: TCP over Wireless Systems Problems

### Access Control: Firewalls (1)

Access Control: Firewalls (1) World is divided in good and bad guys ---> access control (security checks) at a single point of entry/exit: in medieval castles: drawbridge in corporate buildings: security/reception

### Stop And Wait. ACK received; transmit frame 2 CS 455 3

Data Link Layer, Part 5 Sliding Window Protocols These slides are created by Dr. Yih Huang of George Mason University. Students registered in Dr. Huang's courses at GMU can make a single machine-readable

### TCP Flow Controls. Matthew Roughan. Adelaide-Melbourne Grampians Workshop. Copyright, 1996 Dale Carnegie & Associates, Inc.

TCP Flow Controls Matthew Roughan Adelaide-Melbourne Grampians Workshop 1999 Copyright, 1996 Dale Carnegie & Associates, Inc. TCP/IP Primary protocols used in the Internet IP (Internet Protocol) Transmission

### Transportation Protocols: UDP, TCP & RTP

Transportation Protocols: UDP, TCP & RTP Transportation Functions UDP (User Datagram Protocol) Port Number to Identify Different Applications Server and Client as well as Port TCP (Transmission Control

### Mobile IP Network Layer Lesson 02 TCP/IP Suite and IP Protocol

Mobile IP Network Layer Lesson 02 TCP/IP Suite and IP Protocol 1 TCP/IP protocol suite A suite of protocols for networking for the Internet Transmission control protocol (TCP) or User Datagram protocol

### TCP PERFORMANCE IN MOBILE-IP

TCP PERFORMANCE IN MOBILE-IP Foo Chun Choong Department of Electrical Engineering, National University of Singapore ABSTRACT The throughput performance of TCP in Mobile-IP [1] was investigated. Compared

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

Names & Addresses EE 122: IP Forwarding and Transport Protocols Scott Shenker http://inst.eecs.berkeley.edu/~ee122/ (Materials with thanks to Vern Paxson, Jennifer Rexford, and colleagues at UC Berkeley)

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

Simulation-Based Comparisons of Solutions for TCP Packet Reordering in Wireless Network 作 者 :Daiqin Yang, Ka-Cheong Leung, and Victor O. K. Li 出 處 :Wireless Communications and Networking Conference, 2007.WCNC

### A Survey on Congestion Control Mechanisms for Performance Improvement of TCP

A Survey on Congestion Control Mechanisms for Performance Improvement of TCP Shital N. Karande Department of Computer Science Engineering, VIT, Pune, Maharashtra, India Sanjesh S. Pawale Department of

### EKSAMEN / EXAM TTM

1.1 1.1.1...... 1.1.6...... 1.1.2...... 1.1.3..... 1.1.4...... 1.1.5..... 1.1.7...... 1.1.8..... 1.1.9...... 1.1.10... 1.2 1.2.1...... 1.2.2...... 1.2.3..... 1.2.4...... 1.2.5..... 1.2.6...... 1.2.7......

### This sequence diagram was generated with EventStudio System Designer (http://www.eventhelix.com/eventstudio).

Client App Network Server App 25-May-13 15:32 (Page 1) This sequence diagram was generated with EventStudio System Designer (http://www.eventhelix.com/eventstudio). TCP is an end to end protocol which

### Applied Data Communication Lecture 14

Applied Data Communication Lecture 14 Character oriented Data Link Character-oriented data link control Asynchronous Synchronous Kristjan Sillmann reaalajasüsteemide õppetool TTÜ automaatikainstituut character-oriented

### EINDHOVEN UNIVERSITY OF TECHNOLOGY Department of Mathematics and Computer Science

EINDHOVEN UNIVERSITY OF TECHNOLOGY Department of Mathematics and Computer Science Examination Computer Networks (2IC15) on Monday, June 22 nd 2009, 9.00h-12.00h. First read the entire examination. There

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

TCP/IP Optimization for Wide Area Storage Networks Dr. Joseph L White Juniper Networks SNIA Legal Notice The material contained in this tutorial is copyrighted by the SNIA. Member companies and individuals

### Computer Networks - CS132/EECS148 - Spring 2013 ------------------------------------------------------------------------------

Computer Networks - CS132/EECS148 - Spring 2013 Instructor: Karim El Defrawy Assignment 3 - Solutions Deadline : May 9 th 9:30pm (hard and soft copies required) ------------------------------------------------------------------------------

### CS 268: Lecture 5 (TCP/IP Architecture)

CS 268: Lecture 5 (TCP/IP Architecture) Ion Stoica February 1, 2006 The Problem Before Internet: different packet-switching networks (e.g., ARPANET, ARPA packet radio) - only nodes on the same network

### Lecture 8 Performance Measurements and Metrics. Performance Metrics. Outline. Performance Metrics. Performance Metrics Performance Measurements

Outline Lecture 8 Performance Measurements and Metrics Performance Metrics Performance Measurements Kurose-Ross: 1.2-1.4 (Hassan-Jain: Chapter 3 Performance Measurement of TCP/IP Networks ) 2010-02-17

### COMP 361 Computer Communications Networks. Fall Semester 2003. Midterm Examination

COMP 361 Computer Communications Networks Fall Semester 2003 Midterm Examination Date: October 23, 2003, Time 18:30pm --19:50pm Name: Student ID: Email: Instructions: 1. This is a closed book exam 2. This

### TCP over Wireless Networks. CS 653, Fall 2010

TCP over Wireless Networks CS 653, Fall 2010 Outline! TCP over Wireless: Problems! TCP over Wireless: Solutions! Link-layer based! Split TCP! TCP-aware link layer! Explicit notification! Network-assisted

### Data Communications & Networks. Session 6 Main Theme Reliable Data Transfer. Dr. Jean-Claude Franchitti

Data Communications & Networks Session 6 Main Theme Reliable Data Transfer Dr. Jean-Claude Franchitti New York University Computer Science Department Courant Institute of Mathematical Sciences Adapted

### Mathematical Modelling of Computer Networks: Part II. Module 1: Network Coding

Mathematical Modelling of Computer Networks: Part II Module 1: Network Coding Lecture 3: Network coding and TCP 12th November 2013 Laila Daniel and Krishnan Narayanan Dept. of Computer Science, University

### Indian Institute of Technology Kharagpur. TCP/IP Part I. Prof Indranil Sengupta Computer Science and Engineering Indian Institute of Technology

Indian Institute of Technology Kharagpur TCP/IP Part I Prof Indranil Sengupta Computer Science and Engineering Indian Institute of Technology Kharagpur Lecture 3: TCP/IP Part I On completion, the student

### Sliding Window Protocol and TCP Congestion Control

Sliding Window Protocol and TCP Congestion Control Simon S. Lam Department of Computer Science The University it of Texas at Austin 2/25/2014 1 1 2 Sliding Window Protocol Consider an infinite array, Source,

### TCP context and interfaces

Linux Networking: tcp David Morgan TCP context and interfaces Computer A Computer B application process application process data data data data TCP process TCP process a network 1 TCP purposes and features

### 0,2 D(0) A(1) D(1) 1,3 D(2) 0,2 D(0) A(1) D(1) 1,3 D(2) D(3) D(3) D(1) D(1) A(4) D(2) 4,6 D(3) A(4) 4,6 GO BACK 3 SELECTIVE REJECT WINDOW SLIDES

WASHINGTON UNIVERSITY DEPARTMENT OF COMPUTER SCIENCE CS423 Computer Communications: More Error Recovery Fall 1995 This is the fourth of probably 7 lectures on the Data Link Layer. In the last lecture we

### The following reference answers are based on the trace files provided with the text book, which can be downloaded from the textbook website.

Wireshark Lab 3 TCP The following reference answers are based on the trace files provided with the text book, which can be downloaded from the textbook website. TCP Basics Answer the following questions

### Quality of Service versus Fairness. Inelastic Applications. QoS Analogy: Surface Mail. How to Provide QoS?

18-345: Introduction to Telecommunication Networks Lectures 20: Quality of Service Peter Steenkiste Spring 2015 www.cs.cmu.edu/~prs/nets-ece Overview What is QoS? Queuing discipline and scheduling Traffic

### Digital Audio and Video Data

Multimedia Networking Reading: Sections 3.1.2, 3.3, 4.5, and 6.5 CS-375: Computer Networks Dr. Thomas C. Bressoud 1 Digital Audio and Video Data 2 Challenges for Media Streaming Large volume of data Each

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

1 First Midterm for ECE374 03/24/11 Solution!! Note: In all written assignments, please show as much of your work as you can. Even if you get a wrong answer, you can get partial credit if you show your

### Networking Overview. (as usual, thanks to Dave Wagner and Vern Paxson)

Networking Overview (as usual, thanks to Dave Wagner and Vern Paxson) Focus For This Lecture Sufficient background in networking to then explore security issues in next few lectures Networking = the Internet

### Note! The problem set consists of two parts: Part I: The problem specifications pages Part II: The answer pages

Part I: The problem specifications NTNU The Norwegian University of Science and Technology Department of Telematics Note! The problem set consists of two parts: Part I: The problem specifications pages

### Lecture 15. IP address space managed by Internet Assigned Numbers Authority (IANA)

Lecture 15 IP Address Each host and router on the Internet has an IP address, which consist of a combination of network number and host number. The combination is unique; no two machines have the same