Transport layer lecture notes pdf

what is end to end protocol in computer networks and end to end protocol lecture notes, end to end protocol semantics pdf free download
Dr.GriffinWood Profile Pic
Dr.GriffinWood,United Kingdom,Teacher
Published Date:23-07-2017
Your Website URL(Optional)
Comment
' COMPUTER NETWORKS CS 45201 CS 55201 CHAPTER 5 End-to-End protocols Paul A. Farrell and H. Peyravi Department of Computer Science Kent State University Kent, Ohio 44242 farrellmcs.kent.edu http://www.cs.kent.edu/farrell Fall 2001 & % CS 4/55201: Computer Networks Fall 2001' Contents  End-to-End (Transport) Protocols  Simple Demultiplexer (UDP)  Reliable Byte-Stream (TCP)  Remote Procedure Call & % CS 4/55201: Computer Networks Fall 2001Chapter 5: End-to-End protocols End-to-End (Transport) Protocols ' End-to-End (Transport) Protocols  Underlying best-e ort network I drops messages I re-orders messages I delivers duplicate copies of a given message I limits messages to some nite size I delivers messages after an arbitrarily long delay  Common end-to-end services I guarantee message delivery I deliver messages in the same order they are sent I deliver at most one copy of each message I support arbitrarily large messages I support synchronization I allow the receiver to apply ow control to the sender I support multiple application processes on each host & % CS 4/55201: Computer Networks Fall 2001 1 of 20Chapter 5: End-to-End protocols Simple Demultiplexer (UDP) ' Simple Demultiplexer (UDP)  Unreliable and unordered datagram service  Adds multiplexing - multiple connections between hosts  No ow control  Endpoints identi ed by ports (16 bits - 64K possible per host) I servers have well-known ports I client and server use these to agree on other port for communication I see /etc/services on Unix  Checksum (Optional IPv4, Mandatory IPv6) - same as IP algorithm I pseudo header + udp header + udp data I pseudo header is IP protocol number, source and destination IP addresses, UDP length eld  Header format Src Port Dest Port Check Sum Length & % CS 4/55201: Computer Networks Fall 2001 2 of 20. . . . . . Chapter 5: End-to-End protocols Reliable Byte-Stream (TCP) ' Reliable Byte-Stream (TCP) Overview  Connection-oriented  Byte-stream I sending process writes some number of bytes I TCP breaks into segments and sends via IP I receiving process reads some number of bytes Appl Process Appl Process Read Write Bytes Bytes TCP TCP send buffer receive buffer . . . segment segment segment Transmit Segments  Full duplex  Flow control: keep sender from overrunning receiver  Congestion control: keep sender from overrunning network & % CS 4/55201: Computer Networks Fall 2001 3 of 20Chapter 5: End-to-End protocols Reliable Byte-Stream (TCP) ' End-to-End Issues Based on sliding window protocol used at data link level, but the situation is very di erent. 1. Potentially connects many di erent hosts  need explicit connection establishment and termination 2. Potentially di erent RTT  need adaptive timeout mechanism 3. Potentially long delay in network  need to be prepared for arrival of very old packets  is limit, discarded after TTL  MSL (maximum segment lifetime) - recommended 120 sec 4. Potentially di erent capacity at destination  need to accommodate di erent amounts of bu ering 5. Potentially di erent network capacity  need to be prepared for network congestion & % CS 4/55201: Computer Networks Fall 2001 4 of 20Chapter 5: End-to-End protocols Reliable Byte-Stream (TCP) ' Segment Format Src Port Dest Port SequenceNum Acknowledgement 0 HdrLen Flags Advertised (4) (6) (6) Window CheckSum UrgPtr options (variable) data  Each connection identi ed with 4-tuple: IhSrcPort, SrcIPAddr, DstPort, DstIPAddri  Sliding window + ow control I Acknowledgment, SequenceNum, AdvertisedWindow Data (SequenceNum) Sender Receiver Acknowledgement + AdvertisedWindow & % CS 4/55201: Computer Networks Fall 2001 5 of 20Chapter 5: End-to-End protocols Reliable Byte-Stream (TCP) '  Flags I SYN: TCP connection establishing I FIN: TCP connection terminating I RESET: Receiver is confused - abort connection I PUSH: Sender invokes push operation I URG: segment contains urgent data I ACK: Acknowledgment  Checksum I pseudo header + tcp header + data When does TCP send segment? 1. After MSS (Maximum Segment Size) bytes are bu ered  usually largest size that IP will not fragment  MSS = MTU - sizeof(TCP + IP headers) 2. if sender ushes bu er with push operation  Telnet does after each character 3. when timer expires & % CS 4/55201: Computer Networks Fall 2001 6 of 20ACK, Acknowledgement = y + 1 SYN, SequenceNum = x Chapter 5: End-to-End protocols Reliable Byte-Stream (TCP) ' Connection Establishment and Termination Three-Way Handshake Active Participant Passive Participant & % CS 4/55201: Computer Networks Fall 2001 7 of 20 SYN + ACK, SequenceNum = y, Acknowledgement = x + 1Chapter 5: End-to-End protocols Reliable Byte-Stream (TCP) ' Sliding Window Revisited Sending Appl Receiving Appl TCP TCP Last Byte Read Last Byte Written Last Byte Acked Last Byte Sent Next Byte Expected Last Byte Received  Each byte has a sequence number  ACKs are cumulative  Sending side I LastByteAcked  LastByteSent I LastByteSent  LastByteWritten I bytes between LastByteAcked and LastByteWritten must be bu ered  Receiving side I LastByteRead NextByteExpected, Why? I NextByteExpected  LastByteRcvd + 1, Why? & % CS 4/55201: Computer Networks Fall 2001 8 of 20Chapter 5: End-to-End protocols Reliable Byte-Stream (TCP) ' Flow Control  Receiver advertises a window size to prevent bu er over ow  Sender bu er size: MaxSendBuffer  Receive bu er size: MaxRcvBuffer  Receiving side I LastByteRcvd - LastByteRead  MaxRcvBuffer I AdvertisedWindow = MaxRcvBuffer - (LastByteRcvd - LastByteRead)  Sending side I LastByteSent - LastByteAcked  AdvertisedWindow I EffectiveWindow = AdvertisedWindow - (LastByteSent - LastByteAcked) I LastByteWritten - LastByteAcked  MaxSendBuffer I TCP blocks sender from sending y bytes if (LastByteWritten - LastByteAcked) + y MaxSendBuffer  Always send ACK in response to an arriving data segment, but not otherwise  Sender persists in sending 1 byte when AdvertisedWindow=0  Eventually ACK will arrive with new AdvertisedWindow & % CS 4/55201: Computer Networks Fall 2001 9 of 20Chapter 5: End-to-End protocols Reliable Byte-Stream (TCP) ' Keeping the Pipe Full  Wrap Around: 32-bit SequenceNum - want no wrap in 120 sec Bandwidth Time Until Wrap Around T1 (1.5Mbps) 6.4 hours 32 2 /(1.544/8) bytes =6.18 hrs Ethernet (10Mbps) 57 minutes T3 (45Mbps) 13 minutes FDDI (100Mbps) 6 minutes STS-3 (155Mbps) 4 minutes STS-12 (622Mbps) 55 seconds STS-24 (1.2Gbps) 28 seconds  Bytes in Transit: 16-bit AdvertisedWindow allows 64KB of data in pipe I Assume RTT= 100 ms typical crosscountry delay in US Bandwidth Delay  Bandwidth Product T1 (1.5Mbps) 18KB Ethernet (10Mbps) 122KB T3 (45Mbps) 549KB FDDI (100Mbps) 1.2MB STS-3 (155Mbps) 1.8MB STS-12 (622Mbps) 7.4MB STS-24 (1.2Gbps) 14.8MB & % CS 4/55201: Computer Networks Fall 2001 10 of 20Chapter 5: End-to-End protocols Reliable Byte-Stream (TCP) ' Adaptive Retransmission =) Original Algorithm  Measure SampleRTT for each segment/ACK pair  Compute weighted average of RTT I EstimatedRTT =  EstimatedRTT +  SampleRTT I where + = 1 I between 0.8 and 0.9 I between 0.1 and 0.2  Set timeout based on EstimatedRTT I TimeOut = 2  EstimatedRTT =) A aw  Does ACK really acknowledges a transmission?  No, it acknowledges receipt of a segment  How many retransmissions had taken place before ACK arrived? & % CS 4/55201: Computer Networks Fall 2001 11 of 20retransmission retransmission original transmission original transmission Chapter 5: End-to-End protocols Reliable Byte-Stream (TCP) ' =) Wrong samples Receiver Receiver Sender Sender (a) Sample RTT too long (b) Sample RTT too short  in (a) sample should be for the second attempt  in (b) sample should be for the rst attempt =) Karn/Partridge Algorithm  Do not sample RTT when retransmitting  Double timeout after each retransmission I Similar to backo algorithm & % CS 4/55201: Computer Networks Fall 2001 12 of 20 ACK ACK Sample RTT Sample RTTChapter 5: End-to-End protocols Reliable Byte-Stream (TCP) ' =) Jacobson/Karels Algorithm  Karn/Partridge algorithm was introduced when the Internet was not su ering the current congestion  Consider variance when setting timeout value  Jacobson/Karels came up with a new calculation for average RTT Difference = SampleRTT - EstimatedRTT EstimatedRTT = EstimatedRTT + (  Difference) Deviation = Deviation +  ( jDifferencej- Deviation) I where  is a fraction between 0 and 1  TimeOut =   EstimatedRTT +   Deviation I where  = 1 and  = 4 & % CS 4/55201: Computer Networks Fall 2001 13 of 20request Chapter 5: End-to-End protocols Remote Procedure Call ' Remote Procedure Call Overview  Common pattern of communication used by application programs  Also called message transaction Client Server blocked blocked computing blocked & % CS 4/55201: Computer Networks Fall 2001 14 of 20 replyChapter 5: End-to-End protocols Remote Procedure Call ' caller callee (client) (server) return return args args value value client server stub stub reply reply req req RPC RPC Protocol Protocol network Peterson divides RPC protocol into three basic functions  BLAST: fragments and reassembles large messages  CHAN: synchronizes request and reply messages  SELECT: dispatches request messages to the correct process & % CS 4/55201: Computer Networks Fall 2001 15 of 20Frag 1 Frag 2 Frag 4 Frag 5 Frag 5 Frag 3 Frag 6 Frag 3 Chapter 5: End-to-End protocols Remote Procedure Call ' Bulk Transfer (BLAST) Unlike AAL and IP in that it tries to recover from lost fragments; persistent, but does not guarantee delivery. Strategy is to use selective retransmission (or partial acknowledgments). Sender Receiver & % CS 4/55201: Computer Networks Fall 2001 16 of 20 SRR SRRChapter 5: End-to-End protocols Remote Procedure Call ' BLAST Header Format ProtNum MID Length Num− Type Frags FragMask  MID must protect against wrap around  Type = DATA or SRR  NumFrags indicates number of fragments in message  FragMask distinguishes among fragments: I if Type=DATA, identi es this fragment I if Type=SRR, identi es missing fragments & % CS 4/55201: Computer Networks Fall 2001 17 of 20. . . ACK request 1 request 2 request Chapter 5: End-to-End protocols Remote Procedure Call ' Request/Reply (CHAN) Guarantees message delivery, and synchronizes client with server; i.e., blocks client until reply received. Supports at-most-once semantics. Simple case: Client Server Implicit Acknowledgments: Client Server & % CS 4/55201: Computer Networks Fall 2001 18 of 20 ACK reply 2 reply reply 1

Advise: Why You Wasting Money in Costly SEO Tools, Use World's Best Free SEO Tool Ubersuggest.