Chapter 5 Peer-to-Peer Protocols and Data Link Layer

Size: px
Start display at page:

Download "Chapter 5 Peer-to-Peer Protocols and Data Link Layer"

Transcription

1 Chapter 5 Peer-to-Peer Protocols and Data Link Layer PRT I: Peer-to-Peer Protocols Peer-to-Peer Protocols and Service Models RQ Protocols and Reliable Data Transfer Flow Control Timing Recovery TCP Reliable Stream Service & Flow Control

2 Chapter 5 Peer-to-Peer Protocols and Data Link Layer PRT II: Data Link Controls Framing Point-to-Point Protocol High-Level Data Link Control Link Sharing Using Statistical Multiplexing

3 Chapter Overview Peer-to-Peer protocols: many protocols involve the interaction between two peers Service Models are discussed & examples given Detailed discussion of RQ provides example of development of peer-to-peer protocols Flow control, TCP reliable stream, and timing recovery Data Link Layer Framing PPP & HDLC protocols Statistical multiplexing for link sharing

4 Chapter 5 Peer-to-Peer Protocols and Data Link Layer Peer-to-Peer Protocols and Service Models

5 Peer-to-Peer Protocols n + 1 peer process SDU n peer process n 1 peer process PDU n + 1 peer process SDU n peer process n 1 peer process Peer-to-Peer processes execute layer-n protocol to provide service to layer-(n+1) Layer-(n+1) peer calls layer-n and passes Service Data Units (SDUs) for transfer Layer-n peers exchange Protocol Data Units (PDUs) to effect transfer Layer-n delivers SDUs to destination layer-(n+1) peer

6 Service Models The service model specifies the information transfer service layer-n provides to layer-(n+1) The most important distinction is whether the service is: Connection-oriented Connectionless Service model possible features: rbitrary message size or structure Sequencing and Reliability Timing, Pacing, and Flow control Multiplexing Privacy, integrity, and authentication

7 Connection-Oriented Transfer Service Connection Establishment Connection must be established between layer-(n+1) peers Layer-n protocol must: Set initial parameters, e.g. sequence numbers; and llocate resources, e.g. buffers Message transfer phase Exchange of SDUs Disconnect phase Example: TCP, PPP n + 1 peer process send n + 1 peer process receive SDU Layer n connection-oriented service SDU

8 Connectionless Transfer Service No Connection setup, simply send SDU Each message send independently Must provide all address information per message Simple & quick Example: UDP, IP n + 1 peer process send n + 1 peer process receive SDU Layer n connectionless service

9 Message Size and Structure What message size and structure will a service model accept? Different services impose restrictions on size & structure of data it will transfer Single bit? Block of bytes? Byte stream? Ex: Transfer of voice mail = 1 long message Ex: Transfer of voice call = byte stream (a) 1 voice mail= 1 message = entire sequence of speech samples 1 call = sequence of 1-byte messages (b)

10 Segmentation & Blocking To accommodate arbitrary message size, a layer may have to deal with messages that are too long or too short for its protocol Segmentation & Reassembly: a layer breaks long messages into smaller blocks and reassembles these at the destination Blocking & Unblocking: a layer combines small messages into bigger blocks prior to transfer 1 long message 2 or more short messages 2 or more blocks 1 block

11 Reliability & Sequencing Reliability: re messages or information stream delivered error-ee and without loss or duplication? Sequencing: re messages or information stream delivered in order? RQ protocols combine error detection, retransmission, and sequence numbering to provide reliability & sequencing Examples: TCP and HDLC

12 Pacing and Flow Control Messages can be lost if receiving system does not have sufficient buffering to store arriving messages If destination layer-(n+1) does not retrieve its information fast enough, destination layer-n buffers may overflow Pacing & Flow Control provide backpressure mechanisms that control transfer according to availability of buffers at the destination Examples: TCP and HDLC

13 Timing pplications involving voice and video generate units of information that are related temporally Destination application must reconstruct temporal relation in voice/video units Network transfer introduces delay & jitter Timing Recovery protocols use timestamps & sequence numbering to control the delay & jitter in delivered information Examples: RTP & associated protocols in Voice over IP

14 Multiplexing Multiplexing enables multiple layer-(n+1) users to share a layer-n service multiplexing tag is required to identify specific users at the destination Examples: UDP, IP

15 Privacy, Integrity, & uthentication Privacy: ensuring that information transferred cannot be read by others Integrity: ensuring that information is not altered during transfer uthentication: verifying that sender and/or receiver are who they claim to be Security protocols provide these services and are discussed in Chapter 11 Examples: IPSec, SSL

16 End-to-End vs. Hop-by-Hop service feature can be provided by implementing a protocol end-to-end across the network across every hop in the network Example: Perform error control at every hop in the network or only between the source and destination? Perform flow control between every hop in the network or only between source & destination? We next consider the tradeoffs between the two approaches

17 Error control in Data Link Layer (a) (b) Packets Data link layer Physical layer 1 Frames Physical layer entity Packets Data link layer Physical layer Medium B 1 B Data Link operates over wire-like, directly-connected systems Frames can be corrupted or lost, but arrive in order Data link performs error-checking & retransmission Ensures error-ee packet transfer between two systems 2 Data link layer entity 3 Network layer entity

18 Error Control in Transport Layer Transport layer protocol (e.g. TCP) sends segments across network and performs end-to-end error checking & retransmission Underlying network is assumed to be unreliable End system Messages Transport layer Network layer Data link layer Physical layer Network layer Data link layer Physical layer Segments Network layer Data link layer Physical layer Messages Transport layer Network layer Data link layer Physical layer End system B Network

19 Segments can experience long delays, can be lost, or arrive out-of-order because packets can follow different paths across network End-to-end error control protocol more difficult C End System α End System β Medium B 2 1 Network 3 Network layer entity 4 Transport layer entity

20 End-to-End pproach Preferred Hop-by-hop Data Data Data Data CK/ NK CK/ NK CK/ NK CK/ NK Hop-by-hop cannot ensure E2E correctness Faster recovery End-to-end CK/NK Simple inside the network Data Data Data Data More scalable if complexity at the edge

21 Chapter 5 Peer-to-Peer Protocols and Data Link Layer RQ Protocols and Reliable Data Transfer

22 utomatic Repeat Request (RQ) Purpose: to ensure a sequence of information packets is delivered in order and without errors or duplications despite transmission errors & losses We will look at: Stop-and-Wait RQ Go-Back N RQ Selective Repeat RQ Basic elements of RQ: Error-detecting code with high error coverage CKs (positive acknowledgments NKs (negative acknowlegments) Timeout mechanism

23 Stop-and-Wait RQ Transmit a ame, wait for CK Packet Timer set after each ame transmission Transmitter (Process ) Information ame Control ame Receiver (Process B) Error-ee packet Header Information packet CRC Header CRC Information ame Control ame: CKs

24 Need for Sequence Numbers (a) Frame 1 lost B Frame 0 CK Time-out Frame 1 Frame 1 CK Frame 2 Time (b) CK lost B Frame 0 CK Time-out Frame 1 CK Frame 1 CK Frame 2 Time In cases (a) & (b) the transmitting station acts the same way But in case (b) the receiving station B accepts ame 1 twice Question: How is the receiver to know the second ame is also ame 1? nswer: dd ame sequence number in header S last is sequence number of most recent transmitted ame

25 Sequence Numbers (c) Premature Time-out B Time-out Frame 0 Frame CK 0 CK Frame 1 Frame 2 Time The transmitting station misinterprets duplicate CKs Incorrectly assumes second CK acknowledges Frame 1 Question: How is the receiver to know second CK is for ame 0? nswer: dd ame sequence number in CK header R next is sequence number of next ame expected by the receiver Implicitly acknowledges receipt of all prior ames

26 1-Bit Sequence Numbering Suffices S last Timer R next Transmitter S last Receiver B R next Global State: (S last, R next ) (0,0) Error-ee ame 0 (0,1) arrives at receiver CK for ame 1 arrives at transmitter Error-ee ame 1 arrives at receiver (1,0) (1,1) CK for ame 0 arrives at transmitter

27 Stop-and-Wait RQ Transmitter Ready state wait request om higher layer for packet transfer When request arrives, transmit ame with updated S last and CRC Go to Wait State Wait state Wait for CK or timer to expire; block requests om higher layer If timeout expires retransmit ame and reset timer If CK received: If sequence number is incorrect or if errors detected: ignore CK If sequence number is correct (R next = S last +1): accept ame, go to Ready state Receiver lways in Ready State Wait for arrival of new ame When ame arrives, check for errors If no errors detected and sequence number is correct (S last =R next ), then accept ame, update R next, send CK ame with R next, deliver packet to higher layer If no errors detected and wrong sequence number discard ame send CK ame with R next If errors detected discard ame

28 pplications of Stop-and-Wait RQ IBM Binary Synchronous Communications protocol (Bisync): character-oriented data link control Xmodem: modem file transfer protocol Trivial File Transfer Protocol (RFC 1350): simple protocol for file transfer over UDP

29 Stop-and-Wait Efficiency First ame bit enters channel Last ame bit enters channel Channel idle while transmitter waits for CK CK arrives t B t First ame bit arrives at receiver Last ame bit arrives at receiver Receiver processes ame and prepares CK bit 1 Mbps takes 10 ms to transmit If wait for CK = 1 ms, then efficiency = 10/11= 91% If wait for CK = 20 ms, then efficiency =10/30 = 33%

30 Stop-and-Wait Model t 0 = total time to transmit 1 ame t proc B t prop ame t f time t proc t ack t prop t 0 = 2t = 2t prop prop + 2t + 2t proc proc + t + f n f R + t ack na + R bits/info ame bits/ck ame channel transmission rate

31 S&W Efficiency on Error-ee channel Effective transmission rate: R 0 eff bits for header & CRC number of information bits delivered to destination = = total time required to deliver the information bits n f t 0 n o, Transmission efficiency: η 0 = R eff R = n f n t0 R o = 1+ n n a f + n 1 n 2( t o f prop + t n f proc ) R. Effect of ame overhead Effect of CK ame Effect of Delay-Bandwidth Product

32 Example: Impact of Delay- Bandwidth Product n f =1250 bytes = bits, n a =n o =25 bytes = 200 bits 2xDelayxBW Efficiency 1 ms 200 km 10 ms 2000 km 100 ms km 1 sec km 1 Mbps % 49% 9% 1% 1 Gbps % 0.1% 0.01% 0.001% Stop-and-Wait does not work well for very high speeds or long propagation delays

33 S&W Efficiency in Channel with Errors Let 1 P f = probability ame arrives w/o errors vg. # of transmissions to first correct arrival is then 1/ (1 P f ) If 1-in-10 get through without error, then avg. 10 tries to success vg. Total Time per ame is then t 0 /(1 P f ) η SW = R eff R = n t 0 f n o 1 P R f = 1+ n n a f + n 1 n 2( t o f prop + t n f proc ) R (1 P f ) Effect of ame loss

34 Example: Impact Bit Error Rate n f =1250 bytes = bits, n a =n o =25 bytes = 200 bits Find efficiency for random bit errors with p=0, 10-6, 10-5, P f = (1 p) n f e n f p for large n f and small p 1 P f Efficiency 1 Mbps & 1 ms % 86.6% 79.2% 32.2% Bit errors impact performance as n f p approach 1

35 Go-Back-N Improve Stop-and-Wait by not waiting! Keep channel busy by continuing to send ames llow a window of up to W s outstanding ames Use m-bit sequence numbering If CK for oldest ame arrives before window is exhausted, we can continue transmitting If window is exhausted, pull back and retransmit all outstanding ames lternative: Use timeout

36 Go-Back-N RQ Go-Back-4: 4 ames are outstanding; so go back Time B C K 1 C K 2 C K 3 out of sequence ames C K 4 C K 5 C K 6 C K 7 C K 8 C K 9 R next Frame transmission are pipelined to keep the channel busy Frame with errors and subsequent out-of-sequence ames are ignored Transmitter is forced to go back when window of 4 is exhausted

37 Window size long enough to cover round trip time Stop-and-Wait RQ 0 Time-out expires 0 1 Time B Receiver is looking for R next =0 C K 1 Go-Back-N RQ Four ames are outstanding; so go back Time B Receiver is looking for R next =0 Out-ofsequence ames C K 1 C K 2 C K 3 C K 4 C K 5 C K 6

38 Go-Back-N with Timeout Problem with Go-Back-N as presented: If ame is lost and source does not have ame to send, then window will not be exhausted and recovery will not commence Use a timeout with each ame When timeout expires, resend all outstanding ames

39 Go-Back-N Transmitter & Receiver Frames transmitted and CKed Timer Timer Timer Transmitter Send Window... S last S recent S last +W s -1 Buffers S last S last S recent... S last +W s -1 oldest un- CKed ame most recent transmission max Seq # allowed Receiver Frames received Receive Window R next Receiver will only accept a ame that is error-ee and that has sequence number R next When such ame arrives R next is incremented by one, so the receive window slides forward by one

40 Sliding Window Operation Transmitter Send Window... m-bit Sequence Numbering Frames transmitted and CKed S last S recent S last +W s -1 2 m Transmitter waits for error-ee CK ame with sequence number S last When such CK ame arrives, S last is incremented by one, and the send window slides forward by one S last send window i + W s 1 i + 1 i 2

41 Maximum llowable Window Size is W s = 2 m -1 M = 2 2 = 4, Go-Back - 4: Transmitter goes back Time B C K 1 R next C K 2 C K 3 C K 0 Receiver has R next = 0, but it does not know whether its CK for ame 0 was received, so it does not know whether this is the old ame 0 or a new ame 0 M = 2 2 = 4, Go-Back-3: Transmitter goes back Time B C K 1 C K 2 R next C K 3 Receiver has R next = 3, so it rejects the old ame 0

42 CK Piggybacking in Bidirectional GBN Transmitter Receiver S B recent RB next S recent R next Receiver Transmitter Receive Window B Receive Window R next Send Window... R B next B Send Window... S last S last +W s -1 Timer Timer Timer Timer Buffers S last S last S recent... S last +W s -1 Note: Out-ofsequence error-ee ames discarded after R next examined S B last S B last +W B s -1 Buffers Timer S B last Timer S B last Timer S B recent... Timer S B last +W B s -1

43 pplications of Go-Back-N RQ HDLC (High-Level Data Link Control): bitoriented data link control V.42 modem: error control over telephone modem links

44 Required Timeout & Window Size T out T proc T prop T f T f T prop Timeout value should allow for: Two propagation times + 1 processing time: 2 T prop + T proc ame that begins transmission right before our ame arrives T f Next ame carries the CK, T f W s should be large enough to keep channel busy for T out

45 Required Window Size for Delay-Bandwidth Product Frame = 1250 bytes =10,000 bits, R = 1 Mbps 2(t prop + t proc ) 2 x Delay x BW Window 1 ms 1000 bits 1 10 ms 10,000 bits ms 100,000 bits 11 1 second 1,000,000 bits 101

46 Efficiency of Go-Back-N GBN is completely efficient, if W s large enough to keep channel busy, and if channel is error-ee ssume P f ame loss probability, then time to deliver a ame is: t f if first ame transmission succeeds (1 P f ) The image cannot be displayed. Your computer may not have enough memory to open the image, or the image may have been corrupted. Restart your computer, and then open the file again. If the red x still appears, you may have to delete the image and then insert it again. T f + W s t f /(1-P f ) if the first transmission does not succeed P f t η GBN GBN = t f (1 Pf n f no tgbn = R ) + P f { t f s Wst f + 1 P no 1 n f = 1+ ( W 1) P f f } = t f (1 P f + ) P f W t s f 1 P f and Delay-bandwidth product determines W s

47 Example: Impact Bit Error Rate on GBN n f =1250 bytes = bits, n a =n o =25 bytes = 200 bits Compare S&W with GBN efficiency for random bit errors with p = 0, 10-6, 10-5, 10-4 and R = 1 Mbps & 100 ms 1 Mbps x 100 ms = bits = 10 ames Use W s = 11 Efficiency S&W 8.9% 8.8% 8.0% 3.3% GBN 98% 88.2% 45.4% 4.9% Go-Back-N significant improvement over Stop-and-Wait for large delay-bandwidth product Go-Back-N becomes inefficient as error rate increases

48 Selective Repeat RQ Go-Back-N RQ inefficient because multiple ames are resent when errors or losses occur Selective Repeat retransmits only an individual ame Timeout causes individual corresponding ame to be resent NK causes retransmission of oldest un-acked ame Receiver maintains a receive window of sequence numbers that can be accepted Error-ee, but out-of-sequence ames with sequence numbers within the receive window are buffered rrival of ame with R next causes window to slide forward by 1 or more

49 B 0 Time C K C K 2 N K 2 C K 7 C K 8 C K 9 C K 1 0 C K 1 1 C K 1 2 C K 2 C K 2 C K 2 Selective Repeat RQ

50 Selective Repeat RQ Transmitter Send Window... Receiver Receive Window Frames transmitted and CKed S last S recent S last + W s -1 Frames received R next R next + W r -1 Timer Buffers S last Buffers R next + 1 Timer S last + 1 R next + 2 Timer... S recent R next + W r - 1 max Seq # accepted S last + W s - 1

51 Send & Receive Windows Transmitter Receiver 2 m m S last send window i + W s 1 i + 1 Moves k forward when CK arrives with R next = S last + k k = 1,, W s -1 i 2 j + W r 1 R next receive window Moves forward by 1 or more when ame arrives with Seq. # = R next i 2 j

52 What size W s and W r allowed? Example: M=2 2 =4, W s =3, W r =3 Send Window Frame 0 resent {0,1,2} {1,2} {2} {.} Time Receive Window B CK1 CK2 CK3 {0,1,2} {1,2,3} {2,3,0} {3,0,1} Old ame 0 accepted as a new ame because it falls in the receive window

53 W s + W r = 2 m is maximum allowed Example: M=2 2 =4, W s =2, W r =2 Send Window {0,1} {1} {.} 0 1 Frame 0 resent 0 Time Receive Window B CK1 {0,1} {1,2} CK2 {2,3} Old ame 0 rejected because it falls outside the receive window

54 Why W s + W r = 2 m works Transmitter sends ames 0 to Ws-1; send window empty ll arrive at receiver ll CKs lost Transmitter resends ame 0 Receiver window starts at {0,, W r } Window slides forward to {W s,,w s +W r -1} Receiver rejects ame 0 because it is outside receive window 2 m m S last 2 W s +W r -1 2 send window W s -1 receive window R next W s

55 pplications of Selective Repeat RQ TCP (Transmission Control Protocol): transport layer protocol uses variation of selective repeat to provide reliable stream service Service Specific Connection Oriented Protocol: error control for signaling messages in TM networks

56 Efficiency of Selective Repeat ssume P f ame loss probability, then number of transmissions required to deliver a ame is: t f / (1-P f ) The image cannot be displayed. Your computer may not have enough memory to open the image, or the image may have been corrupted. Restart your computer, and then open the file again. If the red x still appears, you may have to delete the image and then insert it again. η SR = t f n f R n o /(1 P f ) = (1 n n o f )(1 P f )

57 Example: Impact Bit Error Rate on Selective Repeat n f =1250 bytes = bits, n a =n o =25 bytes = 200 bits Compare S&W, GBN & SR efficiency for random bit errors with p=0, 10-6, 10-5, 10-4 and R= 1 Mbps & 100 ms Efficiency S&W 8.9% 8.8% 8.0% 3.3% GBN 98% 88.2% 45.4% 4.9% SR 98% 97% 89% 36% Selective Repeat outperforms GBN and S&W, but efficiency drops as error rate increases

58 Comparison of RQ Efficiencies ssume n a and n o are negligible relative to n f, and L = 2(t prop +t proc )R/n f =(W s -1), then Selective-Repeat: Go-Back-N: η η SR GBN no = ( 1 Pf )(1 ) (1 Pf ) n 1 Pf = 1+ ( W 1) P Stop-and-Wait: (1 P ηsw = n 2( t a 1+ + n f S f prop ) + t n f f f 1 Pf = 1+ LP proc ) R f 1 Pf 1+ L For P f 0, SR & GBN same For P f 1, GBN & SW same

59 RQ Efficiencies Efficiency RQ Efficiency Comparison LOG(p) p Delay-Bandwidth product = 10, 100 Selective Repeat Go Back N 10 Stop and Wait 100 Go Back N 100 Stop and Wait 10

60 Chapter 5 Peer-to-Peer Protocols and Data Link Layer Flow Control

61 Flow Control Transmitter Information ame buffer fill Receiver Control ame Receiver has limited buffering to store arriving ames Several situations cause buffer overflow Mismatch between sending rate & rate at which user can retrieve data Surges in ame arrivals Flow control prevents buffer overflow by regulating rate at which source is allowed to send information

62 X ON / X OFF Information ame threshold Transmitter Receiver Transmit X OFF Transmit Time on off off on B Time 2T prop Threshold must activate OFF signal while 2 T prop R bits still remain in buffer

63 Window Flow Control t cycle Return of permits Time B Sliding Window RQ method with W s equal to buffer available Transmitter can never send more than W s ames CKs that slide window forward can be viewed as permits to transmit more Can also pace CKs as shown above Return permits (CKs) at end of cycle regulates transmission rate Problems using sliding window for both error & flow control Choice of window size Interplay between transmission rate & retransmissions TCP separates error & flow control Time

64 Chapter 5 Peer-to-Peer Protocols and Data Link Layer Timing Recovery

65 Timing Recovery for Synchronous Services Synchronous source sends periodic information blocks Network output not periodic Network pplications that involve voice, audio, or video can generate a synchronous information stream Information carried by equally-spaced fixed-length packets Network multiplexing & switching introduces random delays Packets experience variable transfer delay Jitter (variation in interpacket arrival times) also introduced Timing recovery re-establishes the synchronous nature of the stream

66 Introduce Playout Buffer Packet rrivals Packet rrivals Playout Buffer Packet Playout Packet Playout Sequence numbers help order packets T max Delay first packet by maximum network delay ll other packets arrive with less delay Playout packet uniformly thereafter

67 Playout clock must be synchronized to transmitter clock Time Send times rrival times Playout times Receiver too slow; buffer fills and overflows T playout time Time Receiver too fast buffer starvation Time Receiver speed just right Many late packets T playout time T playout time

68 Clock Recovery Timestamps inserted in packet payloads indicate when info was produced t 4 t 3 t 2 t 1 Timestamps + - Buffer for information blocks Error signal dd Smoothing filter Counter djust equency Playout command Recovered clock Counter attempts to replicate transmitter clock Frequency of counter is adjusted according to arriving timestamps Jitter introduced by network causes fluctuations in buffer & in local clock

69 Synchronization to a Common Clock Transmitter Receiver f s M Network M f r M=#ticks in local clock In time that net clock does N ticks f n /f s =N/M N ticks f n N ticks Δf=f n -f s =f n -(M/N)f n f r =f n -Δf Network clock Clock recovery simple if a common clock is available to transmitter & receiver E.g. SONET network clock; Global Positioning System (GPS) Transmitter sends Δf of its equency & network equency Receiver adjusts network equency by Δf Packet delay jitter can be removed completely

70 Example: Real-Time Protocol RTP (RFC 1889) designed to support realtime applications such as voice, audio, video RTP provides means to carry: Type of information source Sequence numbers Timestamps ctual timing recovery must be done by higher layer protocol MPEG2 for video, MP3 for audio

71 Chapter 5 Peer-to-Peer Protocols and Data Link Layer TCP Reliable Stream Service & Flow Control

72 TCP Reliable Stream Service pplication Layer writes bytes into send buffer through socket pplication layer Transport layer Write 45 bytes Write 15 bytes Write 20 bytes TCP transfers byte stream in order, without errors or duplications Segments pplication Layer reads bytes om receive buffer through socket Read 40 bytes Read 40 bytes Transmitter Send buffer CKs Receive buffer Receiver

73 TCP RQ Method TCP uses Selective Repeat RQ Transfers byte stream without preserving boundaries Operates over best effort service of IP Packets can arrive with errors or be lost Packets can arrive out-of-order Packets can arrive after very long delays Duplicate segments must be detected & discarded Must protect against segments om previous connections Sequence Numbers Seq. # is number of first byte in segment payload Very long Seq. #s (32 bits) to deal with long delays Initial sequence numbers negotiated during connection setup (to deal with very old duplicates) ccept segments within a receive window

74 Transmitter Send Window S last + W a Receiver Receive Window R last R last + W R 1 octets transmitted & CKed S last S last + W s 1 S recent R next R new S last oldest unacknowledged byte S recent highest-numbered transmitted byte S last +W a -1 highest-numbered byte that can be transmitted S last +W s -1 highest-numbered byte that can be accepted om the application R last highest-numbered byte not yet read by the application R next next expected byte R new highest numbered byte received correctly R last +W R -1 highest-numbered byte that can be accommodated in receive buffer

75 TCP Connections TCP Connection One connection each way Identified uniquely by Send IP ddress, Send TCP Port #, Receive IP ddress, Receive TCP Port # Connection Setup with Three-Way Handshake Three-way exchange to negotiate initial Seq. # s for connections in each direction Data Transfer Exchange segments carrying data Graceful Close Close each direction separately

76 Three Phases of TCP Connection Host SYN, Seq_no = x Host B Three-way Handshake SYN, Seq_no = y, CK, ck_no = x+1 Seq_no = x+1, CK, ck_no = y+1 Data Transfer FIN, Seq_no = w Graceful Close CK, ck_no = w+1 Data Transfer FIN, Seq_no = z CK, ck_no = z+1

77 1st Handshake: Client-Server Connection Request Initial Seq. # om client to server SYN bit set indicates request to establish connection om client to server

78 2 nd Handshake: CK om Server CK Seq. # = Init. Seq. # + 1 CK bit set acknowledges connection request; Clientto-Server connection established

79 2nd Handshake: Server-Client Connection Request Initial Seq. # om server to client SYN bit set indicates request to establish connection om server to client

80 3 rd Handshake: CK om Client CK Seq. # = Init. Seq. # + 1 CK bit set acknowledges connection request; Connections in both directions established

81 TCP Data Exchange pplication Layers write bytes into buffers TCP sender forms segments When bytes exceed threshold or timer expires Upon PUSH command om applications Consecutive bytes om buffer inserted in payload Sequence # & CK # inserted in header Checksum calculated and included in header TCP receiver Performs selective repeat RQ functions Writes error-ee, in-sequence bytes to receive buffer

82 Data Transfer: Server-to-Client Segment 12 bytes of payload Push set 12 bytes of payload carries telnet option negotiation

83 Graceful Close: Client-to-Server Connection Client initiates closing of its connection to server

84 Graceful Close: Client-to-Server Connection CK Seq. # = Previous Seq. # + 1 Server CKs request; clientto-server connection closed

85 Flow Control TCP receiver controls rate at which sender transmits to prevent buffer overflow TCP receiver advertises a window size specifying number of bytes that can be accommodated by receiver W = W R (R new R last ) TCP sender obliged to keep # outstanding bytes below W (S recent - S last ) W Send Window S last + W Receive Window W S last S last + W s 1 S recent R last R new R last + W R 1

86 TCP window flow control Host Host B Seq_no = 1, ck_no = 2000, Win = 2048, No Data t 0 t 1 t 2 Seq_no = 2000, ck_no = 1, Win = 1024, Data = Seq_no = 3024, ck_no = 1, Win = 1024, Data = Seq_no = 1, ck_no = 4048, Win = 512, Data = t 3 t 4 Seq_no = 4048, ck_no = 129, Win = 1024, Data =

87 TCP Retransmission Timeout TCP retransmits a segment after timeout period Timeout too short: excessive number of retransmissions Timeout too long: recovery too slow Timeout depends on RTT: time om when segment is sent to when CK is received Round trip time (RTT) in Internet is highly variable Routes vary and can change in mid-connection Traffic fluctuates TCP uses adaptive estimation of RTT Measure RTT each time CK received: τ n t RTT (new) = α t RTT (old) + (1 α) τ n α = 7/8 typical

88 RTT Variability Estimate variance σ 2 of RTT variation Estimate for timeout: t out = t RTT + k σ RTT If RTT highly variable, timeout increase accordingly If RTT nearly constant, timeout close to RTT estimate pproximate estimation of deviation d RTT (new) = β d RTT (old) + (1-β) τ n - t RTT t out = t RTT + 4 d RTT

CSE3213 Computer Network I

CSE3213 Computer Network I SE33 omputer Network I Service Model, Error ontrol, Flow ontrol, and Link Sharing (h. 5. 5.3. and 5.7.) ourse page: http://www.cse.yorku.ca/course/33 Slides modiied om lberto Leon-Garcia and Indra Widjaja

More information

INF4/MSc Computer Networking. Lectures 3-4 Transport layer protocols TCP/UDP automatic repeat request

INF4/MSc Computer Networking. Lectures 3-4 Transport layer protocols TCP/UDP automatic repeat request INF4/MSc omputer Networking Lectures 3-4 Transport layer protocols TP/UDP automatic repeat request Transport services and protocols provide logical communication between app processes running on different

More information

Chapter 5 Peer-to-Peer Protocols. School of Info. Sci. & Eng. Shandong Univ..

Chapter 5 Peer-to-Peer Protocols. School of Info. Sci. & Eng. Shandong Univ.. hapter 5 Peer-to-Peer Protocols School of Info. Sci. & Eng. Shandong Univ.. Outline 5. Peer-to-peer protocols and service models 5. RQ Protocols 5.3 Other daptation Functions Sliding Window Flow ontrol

More information

Peer-to-Peer Protocols and Data Link Layer. Chapter 5 from Communication Networks Leon-Gracia and Widjaja

Peer-to-Peer Protocols and Data Link Layer. Chapter 5 from Communication Networks Leon-Gracia and Widjaja Peer-to-Peer Protocols and Data Link Layer Chapter 5 from Communication Networks Leon-Gracia and Widjaja Peer-to-Peer Protocols At each layer two (or more) entities execute These are peer processes For

More information

CS4/MSc Computer Networking. Lectures 4-5 Transport layer protocols TCP/UDP automatic repeat request

CS4/MSc Computer Networking. Lectures 4-5 Transport layer protocols TCP/UDP automatic repeat request S4/MSc omputer Networking Lectures 4-5 Transport layer protocols TP/UDP automatic repeat request omputer Networking, opyright University o Edinburgh 005 Transport services and protocols provide logical

More information

Transport Layer. Application / Transport Interface. Transport Layer Services. Transport Layer Connections

Transport Layer. Application / Transport Interface. Transport Layer Services. Transport Layer Connections Application / Transport Interface Application requests service from transport layer Transport Layer Application Layer Prepare Transport service requirements Data for transport Local endpoint node address

More information

CSCD 330 Network Programming

CSCD 330 Network Programming CSCD 330 Network Programming Lecture 10 Transport Layer Continued Spring 2018 Reading: Chapter 3 Some Material in these slides from J.F Kurose and K.W. Ross All material copyright 1996-2007 1 Last Time.

More information

CS422 Computer Networks

CS422 Computer Networks CS422 Computer Networks Lecture 3 Data Link Layer Dr. Xiaobo Zhou Department of Computer Science CS422 DataLinkLayer.1 Data Link Layer Design Issues Services Provided to the Network Layer Provide service

More information

CMSC 417. Computer Networks Prof. Ashok K Agrawala Ashok Agrawala. October 11, 2018

CMSC 417. Computer Networks Prof. Ashok K Agrawala Ashok Agrawala. October 11, 2018 CMSC 417 Computer Networks Prof. Ashok K Agrawala 2018 Ashok Agrawala Message, Segment, Packet, and Frame host host HTTP HTTP message HTTP TCP TCP segment TCP router router IP IP packet IP IP packet IP

More information

User Datagram Protocol

User Datagram Protocol Topics Transport Layer TCP s three-way handshake TCP s connection termination sequence TCP s TIME_WAIT state TCP and UDP buffering by the socket layer 2 Introduction UDP is a simple, unreliable datagram

More information

Principles of Reliable Data Transfer

Principles of Reliable Data Transfer Principles of Reliable Data Transfer 1 Reliable Delivery Making sure that the packets sent by the sender are correctly and reliably received by the receiver amid network errors, i.e., corrupted/lost packets

More information

Transport Protocols & TCP TCP

Transport Protocols & TCP TCP Transport Protocols & TCP CSE 3213 Fall 2007 13 November 2007 1 TCP Services Flow control Connection establishment and termination Congestion control 2 1 TCP Services Transmission Control Protocol (RFC

More information

Transport Protocols and TCP: Review

Transport Protocols and TCP: Review Transport Protocols and TCP: Review CSE 6590 Fall 2010 Department of Computer Science & Engineering York University 1 19 September 2010 1 Connection Establishment and Termination 2 2 1 Connection Establishment

More information

Data Link Control Protocols

Data Link Control Protocols Protocols : Introduction to Data Communications Sirindhorn International Institute of Technology Thammasat University Prepared by Steven Gordon on 23 May 2012 Y12S1L07, Steve/Courses/2012/s1/its323/lectures/datalink.tex,

More information

Transport Protocols and TCP

Transport Protocols and TCP Transport Protocols and TCP Functions Connection establishment and termination Breaking message into packets Error recovery ARQ Flow control Multiplexing, de-multiplexing Transport service is end to end

More information

CSC 4900 Computer Networks: TCP

CSC 4900 Computer Networks: TCP CSC 4900 Computer Networks: TCP Professor Henry Carter Fall 2017 Project 2: mymusic You will be building an application that allows you to synchronize your music across machines. The details of which are

More information

32 bits. source port # dest port # sequence number acknowledgement number not used. checksum. Options (variable length)

32 bits. source port # dest port # sequence number acknowledgement number not used. checksum. Options (variable length) Chapter 3 outline 3.1 Transport-layer services 3.2 Multiplexing and demultiplexing 3.3 Connectionless transport: UDP 3.4 Principles of reliable data transfer 3.5 Connectionoriented transport: TCP segment

More information

CS457 Transport Protocols. CS 457 Fall 2014

CS457 Transport Protocols. CS 457 Fall 2014 CS457 Transport Protocols CS 457 Fall 2014 Topics Principles underlying transport-layer services Demultiplexing Detecting corruption Reliable delivery Flow control Transport-layer protocols User Datagram

More information

UNIT IV -- TRANSPORT LAYER

UNIT IV -- TRANSPORT LAYER UNIT IV -- TRANSPORT LAYER TABLE OF CONTENTS 4.1. Transport layer. 02 4.2. Reliable delivery service. 03 4.3. Congestion control. 05 4.4. Connection establishment.. 07 4.5. Flow control 09 4.6. Transmission

More information

Transport Layer: outline

Transport Layer: outline Transport Layer: outline Transport-layer services Multiplexing and demultiplexing Connectionless transport: UDP Principles of reliable data transfer Connection-oriented transport: TCP Segment structure

More information

Lecture 5: Flow Control. CSE 123: Computer Networks Alex C. Snoeren

Lecture 5: Flow Control. CSE 123: Computer Networks Alex C. Snoeren Lecture 5: Flow Control CSE 123: Computer Networks Alex C. Snoeren Pipelined Transmission Sender Receiver Sender Receiver Ignored! Keep multiple packets in flight Allows sender to make efficient use of

More information

TCP and Congestion Control (Day 1) Yoshifumi Nishida Sony Computer Science Labs, Inc. Today's Lecture

TCP and Congestion Control (Day 1) Yoshifumi Nishida Sony Computer Science Labs, Inc. Today's Lecture TCP and Congestion Control (Day 1) Yoshifumi Nishida nishida@csl.sony.co.jp Sony Computer Science Labs, Inc 1 Today's Lecture Part1: TCP concept Part2: TCP detailed mechanisms Part3: Tools for TCP 2 1

More information

Transport Over IP. CSCI 690 Michael Hutt New York Institute of Technology

Transport Over IP. CSCI 690 Michael Hutt New York Institute of Technology Transport Over IP CSCI 690 Michael Hutt New York Institute of Technology Transport Over IP What is a transport protocol? Choosing to use a transport protocol Ports and Addresses Datagrams UDP What is a

More information

Fall 2012: FCM 708 Bridge Foundation I

Fall 2012: FCM 708 Bridge Foundation I Fall 2012: FCM 708 Bridge Foundation I Prof. Shamik Sengupta Instructor s Website: http://jjcweb.jjay.cuny.edu/ssengupta/ Blackboard Website: https://bbhosted.cuny.edu/ Intro to Computer Networking Transport

More information

Guide To TCP/IP, Second Edition UDP Header Source Port Number (16 bits) IP HEADER Protocol Field = 17 Destination Port Number (16 bit) 15 16

Guide To TCP/IP, Second Edition UDP Header Source Port Number (16 bits) IP HEADER Protocol Field = 17 Destination Port Number (16 bit) 15 16 Guide To TCP/IP, Second Edition Chapter 5 Transport Layer TCP/IP Protocols Objectives Understand the key features and functions of the User Datagram Protocol (UDP) Explain the mechanisms that drive segmentation,

More information

Lecture 20 Overview. Last Lecture. This Lecture. Next Lecture. Transport Control Protocol (1) Transport Control Protocol (2) Source: chapters 23, 24

Lecture 20 Overview. Last Lecture. This Lecture. Next Lecture. Transport Control Protocol (1) Transport Control Protocol (2) Source: chapters 23, 24 Lecture 20 Overview Last Lecture Transport Control Protocol (1) This Lecture Transport Control Protocol (2) Source: chapters 23, 24 Next Lecture Internet Applications Source: chapter 26 COSC244 & TELE202

More information

TCP/IP-2. Transmission control protocol:

TCP/IP-2. Transmission control protocol: TCP/IP-2 Transmission control protocol: TCP and IP are the workhorses in the Internet. In this section we first discuss how TCP provides reliable, connectionoriented stream service over IP. To do so, TCP

More information

Kommunikationssysteme [KS]

Kommunikationssysteme [KS] Kommunikationssysteme [KS] Dr.-Ing. Falko Dressler Computer Networks and Communication Systems Department of Computer Sciences University of Erlangen-Nürnberg http://www7.informatik.uni-erlangen.de/~dressler/

More information

Problem 7. Problem 8. Problem 9

Problem 7. Problem 8. Problem 9 Problem 7 To best answer this question, consider why we needed sequence numbers in the first place. We saw that the sender needs sequence numbers so that the receiver can tell if a data packet is a duplicate

More information

NWEN 243. Networked Applications. Layer 4 TCP and UDP

NWEN 243. Networked Applications. Layer 4 TCP and UDP NWEN 243 Networked Applications Layer 4 TCP and UDP 1 About the second lecturer Aaron Chen Office: AM405 Phone: 463 5114 Email: aaron.chen@ecs.vuw.ac.nz Transport layer and application layer protocols

More information

Transport Layer. -UDP (User Datagram Protocol) -TCP (Transport Control Protocol)

Transport Layer. -UDP (User Datagram Protocol) -TCP (Transport Control Protocol) Transport Layer -UDP (User Datagram Protocol) -TCP (Transport Control Protocol) 1 Transport Services The transport layer has the duty to set up logical connections between two applications running on remote

More information

Page 1. Goals for Today" Discussion" Example: Reliable File Transfer" CS162 Operating Systems and Systems Programming Lecture 11

Page 1. Goals for Today Discussion Example: Reliable File Transfer CS162 Operating Systems and Systems Programming Lecture 11 Goals for Today" CS162 Operating Systems and Systems Programming Lecture 11 Reliability, Transport Protocols" Finish e2e argument & fate sharing Transport: TCP/UDP Reliability Flow control October 5, 2011

More information

Lecture 08: The Transport Layer (Part 2) The Transport Layer Protocol (TCP) Dr. Anis Koubaa

Lecture 08: The Transport Layer (Part 2) The Transport Layer Protocol (TCP) Dr. Anis Koubaa NET 331 Computer Networks Lecture 08: The Transport Layer (Part 2) The Transport Layer Protocol (TCP) Dr. Anis Koubaa Reformatted slides from textbook Computer Networking a top-down appraoch, Fifth Edition

More information

Intro to LAN/WAN. Transport Layer

Intro to LAN/WAN. Transport Layer Intro to LAN/WAN Transport Layer Transport Layer Topics Introduction (6.1) Elements of Transport Protocols (6.2) Internet Transport Protocols: TDP (6.5) Internet Transport Protocols: UDP (6.4) socket interface

More information

CMSC 417. Computer Networks Prof. Ashok K Agrawala Ashok Agrawala. October 25, 2018

CMSC 417. Computer Networks Prof. Ashok K Agrawala Ashok Agrawala. October 25, 2018 CMSC 417 Computer Networks Prof. Ashok K Agrawala 2018 Ashok Agrawala Message, Segment, Packet, and Frame host host HTTP HTTP message HTTP TCP TCP segment TCP router router IP IP packet IP IP packet IP

More information

TCP: Flow and Error Control

TCP: Flow and Error Control 1 TCP: Flow and Error Control Required reading: Kurose 3.5.3, 3.5.4, 3.5.5 CSE 4213, Fall 2006 Instructor: N. Vlajic TCP Stream Delivery 2 TCP Stream Delivery unlike UDP, TCP is a stream-oriented protocol

More information

CS4700/CS5700 Fundamentals of Computer Networks

CS4700/CS5700 Fundamentals of Computer Networks CS4700/CS5700 Fundamentals of Computer Networks Lecture 14: TCP Slides used with permissions from Edward W. Knightly, T. S. Eugene Ng, Ion Stoica, Hui Zhang Alan Mislove amislove at ccs.neu.edu Northeastern

More information

ECE697AA Lecture 3. Today s lecture

ECE697AA Lecture 3. Today s lecture ECE697AA Lecture 3 Transport Layer: TCP and UDP Tilman Wolf Department of Electrical and Computer Engineering 09/09/08 Today s lecture Transport layer User datagram protocol (UDP) Reliable data transfer

More information

Reliable Transport I: Concepts and TCP Protocol

Reliable Transport I: Concepts and TCP Protocol Reliable Transport I: Concepts and TCP Protocol Stefano Vissicchio UCL Computer Science COMP0023 Today Transport Concepts Layering context Transport goals Transport mechanisms and design choices TCP Protocol

More information

Transport Protocols. ISO Defined Types of Network Service: rate and acceptable rate of signaled failures.

Transport Protocols. ISO Defined Types of Network Service: rate and acceptable rate of signaled failures. Transport Protocols! Type A: ISO Defined Types of Network Service: Network connection with acceptable residual error rate and acceptable rate of signaled failures. - Reliable, sequencing network service

More information

ECE 435 Network Engineering Lecture 10

ECE 435 Network Engineering Lecture 10 ECE 435 Network Engineering Lecture 10 Vince Weaver http://web.eece.maine.edu/~vweaver vincent.weaver@maine.edu 28 September 2017 Announcements HW#4 was due HW#5 will be posted. midterm/fall break You

More information

Chapter 3: Transport Layer Part A

Chapter 3: Transport Layer Part A Chapter 3: Transport Layer Part A Course on Computer Communication and Networks, CTH/GU The slides are adaptation of the slides made available by the authors of the course s main textbook 3: Transport

More information

Networked Systems and Services, Fall 2018 Chapter 3

Networked Systems and Services, Fall 2018 Chapter 3 Networked Systems and Services, Fall 2018 Chapter 3 Jussi Kangasharju Markku Kojo Lea Kutvonen 4. Transport Layer Reliability with TCP Transmission Control Protocol (TCP) RFC 793 + more than hundred other

More information

Chapter 24. Transport-Layer Protocols

Chapter 24. Transport-Layer Protocols Chapter 24. Transport-Layer Protocols 23.1 Introduction 23.2 User Datagram Protocol 23.3 Transmission Control Protocol 23.4 SCTP Computer Networks 24-1 Position of Transport-Layer Protocols UDP is an unreliable

More information

Lecture 5. Transport Layer. Transport Layer 1-1

Lecture 5. Transport Layer. Transport Layer 1-1 Lecture 5 Transport Layer Transport Layer 1-1 Agenda The Transport Layer (TL) Introduction to TL Protocols and Services Connectionless and Connection-oriented Processes in TL Unreliable Data Transfer User

More information

Computer Network. Direct Link Networks Reliable Transmission. rev /2/2004 1

Computer Network. Direct Link Networks Reliable Transmission. rev /2/2004 1 Computer Network Direct Link Networks Reliable Transmission rev 1.01 24/2/2004 1 Outline Direct link networks (Ch. 2) Encoding Framing Error detection Reliable delivery Media access control Network Adapter

More information

Networked Systems and Services, Fall 2017 Reliability with TCP

Networked Systems and Services, Fall 2017 Reliability with TCP Networked Systems and Services, Fall 2017 Reliability with TCP Jussi Kangasharju Markku Kojo Lea Kutvonen 4. Transmission Control Protocol (TCP) RFC 793 + more than hundred other RFCs TCP Loss Recovery

More information

User Datagram Protocol (UDP):

User Datagram Protocol (UDP): SFWR 4C03: Computer Networks and Computer Security Feb 2-5 2004 Lecturer: Kartik Krishnan Lectures 13-15 User Datagram Protocol (UDP): UDP is a connectionless transport layer protocol: each output operation

More information

Lecture 3: The Transport Layer: UDP and TCP

Lecture 3: The Transport Layer: UDP and TCP Lecture 3: The Transport Layer: UDP and TCP Prof. Shervin Shirmohammadi SITE, University of Ottawa Prof. Shervin Shirmohammadi CEG 4395 3-1 The Transport Layer Provides efficient and robust end-to-end

More information

Introduction to Networks and the Internet

Introduction to Networks and the Internet Introduction to Networks and the Internet CMPE 80N Announcements Project 2. Reference page. Library presentation. Internet History video. Spring 2003 Week 7 1 2 Today Internetworking (cont d). Fragmentation.

More information

Computer Networking. Reliable Transport. Reliable Transport. Principles of reliable data transfer. Reliable data transfer. Elements of Procedure

Computer Networking. Reliable Transport. Reliable Transport. Principles of reliable data transfer. Reliable data transfer. Elements of Procedure Computer Networking Reliable Transport Prof. Andrzej Duda duda@imag.fr Reliable Transport Reliable data transfer Data are received ordered and error-free Elements of procedure usually means the set of

More information

TCP/IP Performance ITL

TCP/IP Performance ITL TCP/IP Performance ITL Protocol Overview E-Mail HTTP (WWW) Remote Login File Transfer TCP UDP IP ICMP ARP RARP (Auxiliary Services) Ethernet, X.25, HDLC etc. ATM 4/30/2002 Hans Kruse & Shawn Ostermann,

More information

Networking Technologies and Applications

Networking Technologies and Applications Networking Technologies and Applications Rolland Vida BME TMIT Transport Protocols UDP User Datagram Protocol TCP Transport Control Protocol and many others UDP One of the core transport protocols Used

More information

Transport Protocols Reading: Sections 2.5, 5.1, and 5.2. Goals for Todayʼs Lecture. Role of Transport Layer

Transport Protocols Reading: Sections 2.5, 5.1, and 5.2. Goals for Todayʼs Lecture. Role of Transport Layer Transport Protocols Reading: Sections 2.5, 5.1, and 5.2 CS 375: Computer Networks Thomas C. Bressoud 1 Goals for Todayʼs Lecture Principles underlying transport-layer services (De)multiplexing Detecting

More information

Reliable Transport I: Concepts and TCP Protocol

Reliable Transport I: Concepts and TCP Protocol Reliable Transport I: Concepts and TCP Protocol Brad Karp UCL Computer Science CS 3035/GZ01 29 th October 2013 Part I: Transport Concepts Layering context Transport goals Transport mechanisms 2 Context:

More information

Transport layer. UDP: User Datagram Protocol [RFC 768] Review principles: Instantiation in the Internet UDP TCP

Transport layer. UDP: User Datagram Protocol [RFC 768] Review principles: Instantiation in the Internet UDP TCP Transport layer Review principles: Reliable data transfer Flow control Congestion control Instantiation in the Internet UDP TCP 1 UDP: User Datagram Protocol [RFC 768] No frills, bare bones Internet transport

More information

file:///c:/users/hpguo/dropbox/website/teaching/fall 2017/CS4470/H...

file:///c:/users/hpguo/dropbox/website/teaching/fall 2017/CS4470/H... 1 of 9 11/26/2017, 11:28 AM Homework 3 solutions 1. A window holds bytes 2001 to 5000. The next byte to be sent is 3001. Draw a figure to show the situation of the window after the following two events:

More information

Transport layer. Review principles: Instantiation in the Internet UDP TCP. Reliable data transfer Flow control Congestion control

Transport layer. Review principles: Instantiation in the Internet UDP TCP. Reliable data transfer Flow control Congestion control Transport layer Review principles: Reliable data transfer Flow control Congestion control Instantiation in the Internet UDP TCP 1 UDP: User Datagram Protocol [RFC 768] No frills, bare bones Internet transport

More information

The Transport Layer Reliability

The Transport Layer Reliability The Transport Layer Reliability CS 3, Lecture 7 http://www.cs.rutgers.edu/~sn4/3-s9 Srinivas Narayana (slides heavily adapted from text authors material) Quick recap: Transport Provide logical communication

More information

Announcements. No book chapter for this topic! Slides are posted online as usual Homework: Will be posted online Due 12/6

Announcements. No book chapter for this topic! Slides are posted online as usual Homework: Will be posted online Due 12/6 Announcements No book chapter for this topic! Slides are posted online as usual Homework: Will be posted online Due 12/6 Copyright c 2002 2017 UMaine Computer Science Department 1 / 33 1 COS 140: Foundations

More information

Suprakash Datta. Office: CSEB 3043 Phone: ext Course page:

Suprakash Datta. Office: CSEB 3043 Phone: ext Course page: CSE 3214: Computer Networks Protocols and Applications Suprakash Datta datta@cse.yorku.ca Office: CSEB 3043 Phone: 416-736-2100 ext 77875 Course page: http://www.cse.yorku.ca/course/3214 These slides are

More information

TCP : Fundamentals of Computer Networks Bill Nace

TCP : Fundamentals of Computer Networks Bill Nace TCP 14-740: Fundamentals of Computer Networks Bill Nace Material from Computer Networking: A Top Down Approach, 6 th edition. J.F. Kurose and K.W. Ross Administrivia Lab #1 due now! Reminder: Paper Review

More information

16.682: Communication Systems Engineering. Lecture 17. ARQ Protocols

16.682: Communication Systems Engineering. Lecture 17. ARQ Protocols 16.682: Communication Systems Engineering Lecture 17 ARQ Protocols Eytan Modiano Automatic repeat request (ARQ) Break large files into packets FILE PKT H PKT H PKT H Check received packets for errors Use

More information

OSI Transport Layer. Network Fundamentals Chapter 4. Version Cisco Systems, Inc. All rights reserved. Cisco Public 1

OSI Transport Layer. Network Fundamentals Chapter 4. Version Cisco Systems, Inc. All rights reserved. Cisco Public 1 OSI Transport Layer Network Fundamentals Chapter 4 Version 4.0 1 Transport Layer Role and Services Transport layer is responsible for overall end-to-end transfer of application data 2 Transport Layer Role

More information

Computer Communication Networks Midterm Review

Computer Communication Networks Midterm Review Computer Communication Networks Midterm Review ICEN/ICSI 416 Fall 2018 Prof. Aveek Dutta 1 Instructions The exam is closed book, notes, computers, phones. You can use calculator, but not one from your

More information

Transport Layer: Outline

Transport Layer: Outline Transport Layer: Outline Transport-layer services Multiplexing and demultiplexing Connectionless transport: UDP Principles of reliable data transfer Connection-oriented transport: TCP Segment structure

More information

ICS 451: Today's plan. Sliding Window Reliable Transmission Acknowledgements Windows and Bandwidth-Delay Product Retransmission Timers Connections

ICS 451: Today's plan. Sliding Window Reliable Transmission Acknowledgements Windows and Bandwidth-Delay Product Retransmission Timers Connections ICS 451: Today's plan Sliding Window Reliable Transmission Acknowledgements Windows and Bandwidth-Delay Product Retransmission Timers Connections Alternating Bit Protocol: throughput tied to latency with

More information

Computer Networking : Principles, Protocols and Practice

Computer Networking : Principles, Protocols and Practice Computer Networking : Principles, Protocols and Practice Part 3 : Transport Layer Olivier Bonaventure http://inl.info.ucl.ac.be/ O. Bonaventure 2008 Basics Module 3 : Transport Layer Building a reliable

More information

Transport Protocols Reading: Sections 2.5, 5.1, and 5.2

Transport Protocols Reading: Sections 2.5, 5.1, and 5.2 Transport Protocols Reading: Sections 2.5, 5.1, and 5.2 CE443 - Fall 1390 Acknowledgments: Lecture slides are from Computer networks course thought by Jennifer Rexford at Princeton University. When slides

More information

Flow control: Ensuring the source sending frames does not overflow the receiver

Flow control: Ensuring the source sending frames does not overflow the receiver Layer 2 Technologies Layer 2: final level of encapsulation of data before transmission over a physical link responsible for reliable transfer of frames between hosts, hop by hop, i.e. on a per link basis

More information

CSE 4213: Computer Networks II

CSE 4213: Computer Networks II Next CSE 4213: Computer Networks II The layer Suprakash Datta datta@cs.yorku.ca Office: CSEB 3043 Phone: 416-736-2100 ext 77875 Course page: http://www.cs.yorku.ca/course/4213 These slides are adapted

More information

CSC 401 Data and Computer Communications Networks

CSC 401 Data and Computer Communications Networks CSC 401 Data and Computer Communications Networks Transport Layer Connection Oriented Transport: TCP Sec 3.5 Prof. Lina Battestilli Fall 2017 Transport Layer Chapter 3 Outline 3.1 Transport-layer Services

More information

CSCI-1680 Link Layer I Rodrigo Fonseca

CSCI-1680 Link Layer I Rodrigo Fonseca CSCI-1680 Link Layer I Rodrigo Fonseca Based partly on lecture notes by David Mazières, Phil Levis, John Jannotti Last time Physical layer: encoding, modulation Today Link layer framing Getting frames

More information

CSCE 463/612 Networks and Distributed Processing Spring 2017

CSCE 463/612 Networks and Distributed Processing Spring 2017 CSCE 463/612 Networks and Distributed Processing Spring 2017 Transport Layer IV Dmitri Loguinov Texas A&M University March 9, 2017 Original slides copyright 1996-2004 J.F Kurose and K.W. Ross 1 Chapter

More information

Data Link Layer. Indian Institute of Technology Madras

Data Link Layer. Indian Institute of Technology Madras Data Link Layer Study of algorithms for achieving reliable, efficient communication between two adjacent machines at DLL. adjacent - two machines physically connected using a communication channel that

More information

No book chapter for this topic! Slides are posted online as usual Homework: Will be posted online Due 12/6

No book chapter for this topic! Slides are posted online as usual Homework: Will be posted online Due 12/6 Announcements No book chapter for this topic! Slides are posted online as usual Homework: Will be posted online Due 12/6 Copyright c 2002 2017 UMaine School of Computing and Information S 1 / 33 COS 140:

More information

Linux Networking: tcp. TCP context and interfaces

Linux Networking: tcp. 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

More information

TCP Adaptive Retransmission Algorithm - Original TCP. TCP Adaptive Retransmission Algorithm Jacobson

TCP Adaptive Retransmission Algorithm - Original TCP. TCP Adaptive Retransmission Algorithm Jacobson TCP Adaptive Retransmission Algorithm - Original TCP Theory Estimate RTT Multiply by 2 to allow for variations Practice Use exponential moving average (A = 0.1 to 0.2) Estimate = (A) * measurement + (1-

More information

CSCI Topics: Internet Programming Fall 2008

CSCI Topics: Internet Programming Fall 2008 CSCI 491-01 Topics: Internet Programming Fall 2008 Transport Layer Derek Leonard Hendrix College October 15, 2008 Original slides copyright 1996-2007 J.F Kurose and K.W. Ross 1 Chapter 3: Roadmap 3.1 Transport-layer

More information

Advanced Computer Networks. Rab Nawaz Jadoon DCS. Assistant Professor COMSATS University, Lahore Pakistan. Department of Computer Science

Advanced Computer Networks. Rab Nawaz Jadoon DCS. Assistant Professor COMSATS University, Lahore Pakistan. Department of Computer Science Advanced Computer Networks Rab Nawaz Jadoon Department of Computer Science DCS COMSATS Institute of Information Technology Assistant Professor COMSATS University, Lahore Pakistan Advanced Computer Networks

More information

The Transport Layer. Why is there a transport layer? Addressing

The Transport Layer. Why is there a transport layer? Addressing The Transport Layer Provides logical communication between processes network layer: data transfer between end systems transport layer: data transfer between processes Two types of transport service is

More information

4.0.1 CHAPTER INTRODUCTION

4.0.1 CHAPTER INTRODUCTION 4.0.1 CHAPTER INTRODUCTION Data networks and the Internet support the human network by supplying seamless, reliable communication between people - both locally and around the globe. On a single device,

More information

EEC-484/584 Computer Networks. Lecture 16. Wenbing Zhao

EEC-484/584 Computer Networks. Lecture 16. Wenbing Zhao EEC-484/584 Computer Networks Lecture 16 wenbing@ieee.org (Lecture nodes are based on materials supplied by Dr. Louise Moser at UCSB and Prentice-Hall) Outline 2 Review Services provided by transport layer

More information

Department of Computer and IT Engineering University of Kurdistan. Transport Layer. By: Dr. Alireza Abdollahpouri

Department of Computer and IT Engineering University of Kurdistan. Transport Layer. By: Dr. Alireza Abdollahpouri Department of Computer and IT Engineering University of Kurdistan Transport Layer By: Dr. Alireza Abdollahpouri TCP/IP protocol suite 2 Transport Layer The transport layer is responsible for process-to-process

More information

TCP. CSU CS557, Spring 2018 Instructor: Lorenzo De Carli (Slides by Christos Papadopoulos, remixed by Lorenzo De Carli)

TCP. CSU CS557, Spring 2018 Instructor: Lorenzo De Carli (Slides by Christos Papadopoulos, remixed by Lorenzo De Carli) TCP CSU CS557, Spring 2018 Instructor: Lorenzo De Carli (Slides by Christos Papadopoulos, remixed by Lorenzo De Carli) 1 Sources Fall and Stevens, TCP/IP Illustrated Vol. 1, 2nd edition Congestion Avoidance

More information

Internet transport-layer protocols. Transport services and protocols. Sending and receiving. Connection-oriented (TCP) Connection-oriented

Internet transport-layer protocols. Transport services and protocols. Sending and receiving. Connection-oriented (TCP) Connection-oriented Transport services and protocols Internet -layer protocols logical communication between processes protocols run in end systems send side: breaks app messages into segments, passes to layer rcv side: reassembles

More information

TDTS06: Computer Networks

TDTS06: Computer Networks TDTS06: Computer Networks Instructor: Niklas Carlsson Email: niklas.carlsson@liu.se Notes derived from Computer Networking: A Top Down Approach, by Jim Kurose and Keith Ross, Addison-Wesley. The slides

More information

Chapter 3 Transport Layer

Chapter 3 Transport Layer Chapter 3 Transport Layer Reti degli Elaboratori Canale AL Prof.ssa Chiara Petrioli a.a. 2013/2014 We thank for the support material Prof. Kurose-Ross All material copyright 1996-2012 J.F Kurose and K.W.

More information

Performance of UMTS Radio Link Control

Performance of UMTS Radio Link Control Performance of UMTS Radio Link Control Qinqing Zhang, Hsuan-Jung Su Bell Laboratories, Lucent Technologies Holmdel, NJ 77 Abstract- The Radio Link Control (RLC) protocol in Universal Mobile Telecommunication

More information

ET4254 Communications and Networking 1

ET4254 Communications and Networking 1 Topic 9 Internet Protocols Aims:- basic protocol functions internetworking principles connectionless internetworking IP IPv6 IPSec 1 Protocol Functions have a small set of functions that form basis of

More information

ERROR AND FLOW CONTROL. Lecture: 10 Instructor Mazhar Hussain

ERROR AND FLOW CONTROL. Lecture: 10 Instructor Mazhar Hussain ERROR AND FLOW CONTROL Lecture: 10 Instructor Mazhar Hussain 1 FLOW CONTROL Flow control coordinates the amount of data that can be sent before receiving acknowledgement It is one of the most important

More information

TCP Service Model. Today s Lecture. TCP Support for Reliable Delivery. EE 122:TCP, Connection Setup, Reliability

TCP Service Model. Today s Lecture. TCP Support for Reliable Delivery. EE 122:TCP, Connection Setup, Reliability Today s Lecture How does TCP achieve correct operation? EE 122:TCP, Connection Setup, Reliability Ion Stoica TAs: Junda Liu, DK Moon, David Zats Reliability in the face of IP s best effort service 3-way

More information

CS 640 Introduction to Computer Networks. Role of data link layer. Today s lecture. Lecture16

CS 640 Introduction to Computer Networks. Role of data link layer. Today s lecture. Lecture16 Introduction to Computer Networks Lecture16 Role of data link layer Service offered by layer 1: a stream of bits Service to layer 3: sending & receiving frames To achieve this layer 2 does Framing Error

More information

ETSF05/ETSF10 Internet Protocols Transport Layer Protocols

ETSF05/ETSF10 Internet Protocols Transport Layer Protocols ETSF05/ETSF10 Internet Protocols Transport Layer Protocols 2016 Jens Andersson Transport Layer Communication between applications Process-to-process delivery Client/server concept Local host Normally initialiser

More information

Congestion Control in Communication Networks

Congestion Control in Communication Networks Congestion Control in Communication Networks Introduction Congestion occurs when number of packets transmitted approaches network capacity Objective of congestion control: keep number of packets below

More information

Sequence Number. Acknowledgment Number. Data

Sequence Number. Acknowledgment Number. Data CS 455 TCP, Page 1 Transport Layer, Part II Transmission Control Protocol These slides are created by Dr. Yih Huang of George Mason University. Students registered in Dr. Huang's courses at GMU can make

More information

CRC. Implementation. Error control. Software schemes. Packet errors. Types of packet errors

CRC. Implementation. Error control. Software schemes. Packet errors. Types of packet errors CRC Implementation Error control An Engineering Approach to Computer Networking Detects all single bit errors almost all 2-bit errors any odd number of errors all bursts up to M, where generator length

More information

Department of Computer and IT Engineering University of Kurdistan. Data Communication Netwotks (Graduate level) Data Link Layer

Department of Computer and IT Engineering University of Kurdistan. Data Communication Netwotks (Graduate level) Data Link Layer Department of Computer and IT Engineering University of Kurdistan Data Communication Netwotks (Graduate level) Data Link Layer By: Dr. Alireza Abdollahpouri Data Link Layer 2 Data Link Layer Application

More information

TCP/IP. Chapter 5: Transport Layer TCP/IP Protocols

TCP/IP. Chapter 5: Transport Layer TCP/IP Protocols TCP/IP Chapter 5: Transport Layer TCP/IP Protocols 1 Objectives Understand the key features and functions of the User Datagram Protocol Explain the mechanisms that drive segmentation, reassembly, and retransmission

More information

Multiple unconnected networks

Multiple unconnected networks TCP/IP Life in the Early 1970s Multiple unconnected networks ARPAnet Data-over-cable Packet satellite (Aloha) Packet radio ARPAnet satellite net Differences Across Packet-Switched Networks Addressing Maximum

More information