CS 455: INTRODUCTION TO DISTRIBUTED SYSTEMS [NETWORKING] Frequently asked questions from the previous class surveys

Similar documents
TCP. Sliding Windows, Flow Control, and Congestion Control. Networks : TCP Sliding Windows 1

Flow Control, and Congestion Control

Application Service Models

Problem. Chapter Outline. Chapter Goal. End-to-end Protocols. End-to-end Protocols. Chapter 5. End-to-End Protocols

Reliable Byte-Stream (TCP)

COMPUTER NETWORKS CS CS 55201

COMPUTER NETWORKS CS CS 55201

Flow Control, and Congestion Control

Islamic University of Gaza Faculty of Engineering Department of Computer Engineering ECOM 4021: Networks Discussion. Chapter 5 - Part 2

EE 122: Transport Protocols. Kevin Lai October 16, 2002

Chapter 5 End-to-End Protocols

End-to-End Protocols. End-to-End Protocols

Fundamentals of Computer Networks ECE 478/578. Transport Layer. End- to- End Protocols 4/16/13. Spring Application. Application.

CSE/EE 461. Sliding Windows and ARQ. Last Time. This Time. We finished up the Network layer Internetworks (IP) Routing (DV/RIP, LS/OSPF)

End-to-End Protocols: UDP and TCP. Hui Chen, Ph.D. Dept. of Engineering & Computer Science Virginia State University Petersburg, VA 23806

TCP Overview. Connection-oriented Byte-stream

EE 122: Transport Protocols: UDP and TCP

Internet transport protocols

ECE 650 Systems Programming & Engineering. Spring 2018

Page 1. Goals for Today" Placing Network Functionality" Basic Observation" CS162 Operating Systems and Systems Programming Lecture 15

11/24/2009. Fundamentals of Computer Networks ECE 478/578. Flow Control in TCP

Some slides courtesy David Wetherall. Communications Software. Lecture 4: Connections and Flow Control. CSE 123b. Spring 2003.

End-to-End Protocols. Transport Protocols. User Datagram Protocol (UDP) Application Layer Expectations

Transport Protocols. CSCI 363 Computer Networks Department of Computer Science

Transport Layer Marcos Vieira

The Internet. Overview. Network building blocks

CSE/EE 461 Lecture 12 TCP. A brief Internet history...

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

CS457 Transport Protocols. CS 457 Fall 2014

User Datagram Protocol

Networking Technologies and Applications

Chapter 5 OSI Network Layer

CSE/EE 461 Lecture 13 Connections and Fragmentation. TCP Connection Management

Multiple unconnected networks

Transport Protocols CS 640 1

Computer and Network Security

EE 610 Part 2: Encapsulation and network utilities

Introduction to Networking. Operating Systems In Depth XXVII 1 Copyright 2017 Thomas W. Doeppner. All rights reserved.

Position of IP and other network-layer protocols in TCP/IP protocol suite

CSCD 330 Network Programming Winter 2015

Announcements Computer Networking. Outline. Transport Protocols. Transport introduction. Error recovery & flow control. Mid-semester grades

Network Model. Why a Layered Model? All People Seem To Need Data Processing

UNIT V. Computer Networks [10MCA32] 1

Connections. Topics. Focus. Presentation Session. Application. Data Link. Transport. Physical. Network

TSIN02 - Internetworking

xkcd.com End To End Protocols End to End Protocols This section is about Process to Process communications.

TCP & UDP. Transport Layer. Transport. Network. Functions. End-to-end Reliable Byte Stream. Unreliable End-to-end. C.K. Kim

CMPE 80N: Introduction to Networking and the Internet

Chapter 23 Process-to-Process Delivery: UDP, TCP, and SCTP 23.1

Information Network 1 TCP 1/2

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

Goals and topics. Verkkomedian perusteet Fundamentals of Network Media T Circuit switching networks. Topics. Packet-switching networks

The Transmission Control Protocol (TCP)

TSIN02 - Internetworking

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

EE 122: IP Forwarding and Transport Protocols

Chapter 7 Internet Protocol Version 4 (IPv4) Kyung Hee University

TCP/IP-2. Transmission control protocol:

EITF25 Internet Techniques and Applications L7: Internet. Stefan Höst

NT1210 Introduction to Networking. Unit 10

Transport Protocols Reading: Sections 2.5, 5.1, and 5.2

TSIN02 - Internetworking

Announcements Computer Networking. What was hard. Midterm. Lecture 16 Transport Protocols. Avg: 62 Med: 67 STD: 13.

QUIZ: Longest Matching Prefix

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

Chapter 20 Network Layer: Internet Protocol 20.1

IP - The Internet Protocol. Based on the slides of Dr. Jorg Liebeherr, University of Virginia

UNIT IV. UDP TCP Adaptive Flow Control-Adaptive Retransmission Congestion Control Congestion avoidance QoS.

CS455: Introduction to Distributed Systems [Spring 2018] Dept. Of Computer Science, Colorado State University

CSE 461 Module 10. Introduction to the Transport Layer

ET4254 Communications and Networking 1

UDP and TCP. Introduction. So far we have studied some data link layer protocols such as PPP which are responsible for getting data

CS Lecture 1 Review of Basic Protocols

Internet Protocol. Outline Introduction to Internet Protocol Header and address formats ICMP Tools CS 640 1

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

TSIN02 - Internetworking

CS 4390 Computer Networks. Transport Services and Protocols

CCNA Exploration Network Fundamentals. Chapter 04 OSI Transport Layer

Last Class. CSE 123b Communications Software. Today. Naming Processes/Services. Transmission Control Protocol (TCP) Picking Port Numbers.

Programming Assignment 3: Transmission Control Protocol

Ref: A. Leon Garcia and I. Widjaja, Communication Networks, 2 nd Ed. McGraw Hill, 2006 Latest update of this lecture was on

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

Chapter 2 - Part 1. The TCP/IP Protocol: The Language of the Internet

Lecture 9: Internetworking

CH. 3 IP FORWARDING AND ROUTING

Introduction to TCP/IP networking

Introduction to Networks and the Internet

IPv6 is Internet protocol version 6. Following are its distinctive features as compared to IPv4. Header format simplification Expanded routing and

Internet Layers. Physical Layer. Application. Application. Transport. Transport. Network. Network. Network. Network. Link. Link. Link.

TCP/IP Networking. Part 4: Network and Transport Layer Protocols

ECE697AA Lecture 3. Today s lecture


Internet Protocols Fall Outline

CSCI-1680 Transport Layer I Rodrigo Fonseca

CSCI-1680 Transport Layer I Rodrigo Fonseca

CSE/EE 461 Lecture 14. Connections. Last Time. This Time. We began on the Transport layer. Focus How do we send information reliably?

Transport Layer. Gursharan Singh Tatla. Upendra Sharma. 1

The Transport Layer. Part 1

UDP, TCP, IP multicast

CCNA 1 Chapter 7 v5.0 Exam Answers 2013

Transcription:

CS 455: INTRODUCTION TO DISTRIBUTED SYSTEMS [NETWORKING] The Receiver's Buffer Small it may be But throttle the mightiest sender It can Not just the how much But also the when Or if at all Shrideep Pallickara Computer Science Colorado State University L4.1 Frequently asked questions from the previous class surveys When are trailers necessary? Are encryptions only on the payloads? What is connectionless? TCP vs UDP L4.2 SLIDES CREATED BY: SHRIDEEP PALLICKARA L4.1

Topics covered in today s lecture IP routing IPv6 UDP TCP L4.3 Every network type has a Maximum Transmission Unit (MTU) Largest IP datagram that it can carry in its frame This is smaller than the largest packet-size of network IP datagram needs to fit in the payload of the link-layer frame L4.4 SLIDES CREATED BY: SHRIDEEP PALLICKARA L4.2

Fragmentation necessary when datagram path includes network with smaller MTU All fragments carry same identifier in Ident field To enable fragment reassembly Chosen by the source host If all fragments do not arrive at receiving host? 1 2 Receiver gives up reassembly [reassembly timeout: 15 seconds RFC0791] Discards fragments that did arrive IP does not attempt to recover from missing fragments L4.5 IPv4 Packet header 0 4 8 16 19 31 Version HLen TOS Length Ident Flags Offset TTL Protocol Checksum SourceAddr DestinationAddr Options (variable) Pad (variable) Data L4.6 SLIDES CREATED BY: SHRIDEEP PALLICKARA L4.3

Header fields used in IP fragmentation: Fragmentation occurs at 8-byte boundaries Start of header Ident = x 0 DF 0 Offset = 0 Rest of header 1400 data bytes Unfragmented packet Start of header Ident = x 1 Offset = 0 Rest of header 512 data bytes Fragmented packet L4.7 Header fields used in IP fragmentation: Fragmentation occurs at 8-byte boundaries Start of header Ident = x 1 Offset = 64 Rest of header 512 data bytes Fragmented packet Start of header Ident = x 0 Offset = 128 Rest of header 376 data bytes Fragmented packet L4.8 SLIDES CREATED BY: SHRIDEEP PALLICKARA L4.4

IPV6 (AND COMPARING WITH IPV4) L4.9 IPv6 versus IPv4: Key Differences Source and destination addresses are 128-bits (16 bytes) in IPv6 IPv6 treats Options as extension headers To simplify processing of packets in routers, IPv6 did away with fragmentation Responsibility for packet fragmentation is at the end points IPv6 hosts must perform : (1) path MTU discovery, (2) perform end-to-end fragmentation, OR (3) send packets no larger than the default MTU=1280 As of 2014, IPv4 still carried >99% of worldwide Internet traffic L4.10 SLIDES CREATED BY: SHRIDEEP PALLICKARA L4.5

IPv6 Packet Header 0 4 8 16 19 31 12 Version Traffic Class Flow Label Payload Length Next Header Hop Limit SourceAddr [16 bytes] DestinationAddr [16 bytes] IPv6 Packet Header is fixed at 40 bytes... So there is no Header Length L4.11 IPv6 Packet Header: Some more details [1/2] Version: 4 bits [0110] Traffic Class: 6+2 bits Differentiated Services for QoS Anything that ends in 2 1 bits is intended for experimental or local use Flow Label (20 bits) If it is non-zero: Serves as a hint to routers and switches with multiple outbound paths that these packets should stay on the same path, so that they will not be reordered Payload length (16 bits): Size of payload including extension headers L4.12 SLIDES CREATED BY: SHRIDEEP PALLICKARA L4.6

IPv6 Packet Header: Some more details [2/2] Next Header (8 bits) Specifies the type of the next header Hop Limit (8 bits) Replaces the time-to-live field of IPv4 Destination and Source Addresses (128-bits or 16 bytes each) Note: The IPv6 packet header has no checksum Transport or application layer protocols are assumed to provide sufficient error detection L4.13 Structure of the IPv6 Packet IPv6 Packet IPv6 Header Extension Headers Upper Layer Protocol Data Unit (PDU) Payload PDU typically contains an upper layer protocol header and its payload. For e.g.: a TCP segment, UDP Datagram, or an ICMPv6 message L4.14 SLIDES CREATED BY: SHRIDEEP PALLICKARA L4.7

Extension Header If the Next Header field is non-zero It defines an extension header Current extension header types Information for routers, route definition, fragment handling, authentication, encryption, etc. Each extension header has a specific size and defined format If an extension header is present? Follows the basic header and precedes the payload AND Includes a Next Header L4.15 IPv6 Extension Headers: The chain of pointers using the Next Header field IPv6 Header Next Header=6 (TCP) TCP Segment Each extension header must fall on a 64-bit (8-byte) boundary. Use Padding to get there if less than that. IPv6 Header Next Header=43 (Routing) Routing Header Next Header=6 (TCP) TCP Segment IPv6 Header Next Header=43 (Routing) Routing Header Next Header=51 (AH) Authentication Header Next Header=6 (TCP) TCP Segment Fragmentation Header: 44 L4.16 SLIDES CREATED BY: SHRIDEEP PALLICKARA L4.8

UDP SIMPLE DEMULTIPLEXER L4.17 User Datagram Protocol Simplest possible transport protocol Extends host-to-host into process-to-process communications No additional functionality to best-effort service provided by underlying network Adds demultiplexing Allows applications on a host to share the service L4.18 SLIDES CREATED BY: SHRIDEEP PALLICKARA L4.9

UDP identification of processes Processes indirectly indentify each other Abstract locator called port Source sends a message to a port Destination receives messages from a port Process is identified by a port on a particular host L4.19 Format of a UDP header 0 16 31 SrcPort DstPort Length Checksum Data L4.20 SLIDES CREATED BY: SHRIDEEP PALLICKARA L4.10

A port is just an abstraction Typically implemented as a message queue When message arrives? Protocol appends message to end of the queue UDP If the queue is full, message is discarded No flow-control mechanism L4.21 UDP message queue: The port abstraction Application Process Application Process Application Process Ports Queues UDP Packets demultiplexed Packets arrive L4.22 SLIDES CREATED BY: SHRIDEEP PALLICKARA L4.11

Some work that UDP does do besides demultiplexing: Checksumming UDP header Message body Psuedoheader: From the IP header Protocol number Source IP address Destination IP address UDP length Used twice Verify if message is delivered between the correct endpoints L4.23 RELIABLE BYTE STREAM TCP L4.24 SLIDES CREATED BY: SHRIDEEP PALLICKARA L4.12

Components of Reliable delivery Acknowledgements Confirm receipt of data Timeouts Retransmit if ACK not received within a specified time Use of ACKs and timeouts to implement reliable delivery Sometime called ARQ (automatic repeat request) L4.25 Simplest ARQ is the stop-and-wait algorithm After transmitting one frame Sender waits for ACK before transmitting the next frame If the ACK does not arrive after a period of time Sender retransmits the original frame L4.26 SLIDES CREATED BY: SHRIDEEP PALLICKARA L4.13

Stop-and-wait [1/2] SENDER RECEIVER SENDER RECEIVER Frame TIME TIMEOUT Frame ACK TIMEOUT X ACK Frame TIMEOUT ACK L4.27 Stop-and-wait [2/2] SENDER RECEIVER SENDER RECEIVER TIMEOUT Frame X TIMEOUT Frame ACK Frame Frame TIMEOUT ACK TIMEOUT ACK L4.28 SLIDES CREATED BY: SHRIDEEP PALLICKARA L4.14

Sliding window: Try to fill the network pipe DELAY x BANDWIDTH product is 8 KB Data frames = 1KB Sender could transmit 9 th frame When ACK for the 1 st frame arrives L4.29 Timeline for the sliding window SENDER RECEIVER TIME L4.30 SLIDES CREATED BY: SHRIDEEP PALLICKARA L4.15

Sliding Window on Sender/Receiver Send Window Size...... LAR {Last ACK Received} LFS {Last Frame Sent} Receive Window Size...... LFR {Last Frame Received} LAF {Largest Acceptable Frame} L4.31 Transmission Control Protocol (TCP) [1/2] Reliable, in-order delivery of byte streams Full duplex protocol Each connection supports a pair of byte streams n Flowing in different directions Includes flow control mechanism Allows receiver to limit the data sender n Control how much data can be transmitted at a time L4.32 SLIDES CREATED BY: SHRIDEEP PALLICKARA L4.16

Transmission Control Protocol (TCP) [2/2] Includes multiplexing mechanism Multiple applications on a given host Implements a congestion-control mechanism 1 Throttle how fast TCP sends data 2 Keep sender from overloading the network L4.33 Flow control and congestion control Flow control is an end-to-end issue Don t overrun capacity of receiver Congestion control is about hosts & networks interact Don t cause switches and links to be overloaded L4.34 SLIDES CREATED BY: SHRIDEEP PALLICKARA L4.17

TCP: Setup and Teardown Two sides of the connection agree to exchange data Establish shared state 3 packets exchanged (SYN, SYN-ACK, ACK) Connection teardown Let each host know it is OK to free the shared state 4 packets exchanged (FIN, ACK, FIN, ACK) L4.35 TCP Segments & how they come about TCP Accepts data from a data stream Breaks it up into chunks Adds a TCP header creating a TCP segment Segment is then encapsulated in a IP datagram TCP packet is a term that you will often hear Segment is more precise, packets are generally datagrams, frames are at the link layer L4.36 SLIDES CREATED BY: SHRIDEEP PALLICKARA L4.18

How TCP manages a byte stream Application Process Application Process TCP.. Write Bytes TCP.. Read Bytes Send Buffer Receive Buffer Segment Segment Segment... Transmit Segments L4.37 TCP Header Format 0 4 10 16 31 SrcPort SequenceNum Acknowledgement DestPort HdrLen 0 Flags AdvertisedWindow Checksum Options (variable) Data UrgPtr Sliding Window Protocol Extensions SourceAddr and DestinationAddr from IP L4.38 SLIDES CREATED BY: SHRIDEEP PALLICKARA L4.19

Relationship between SequenceNum, Acknowledgement and AdvertisedWindow Data (SequenceNum) Sender Receiver Acknowledgement + AdvertisedWindow Each byte of data has a sequence number SequenceNum contains sequence number for first byte of data in segment L4.39 TCP Sliding Window [1/2] Guarantees reliable delivery of data Data is delivered in order Enforces flow control between the sender and receiver L4.40 SLIDES CREATED BY: SHRIDEEP PALLICKARA L4.20

TCP Sliding Window [2/2] Sender has a limit on unacknowledged data Limited to no more than AdvertisedWindow bytes of unacknowledged data Receiver selects AdvertisedWindow Based on memory set aside for connection s buffer space L4.41 TCP Send Buffer Sending Application LastByteWritten TCP LastByteAcked LastByteSent LastByteAcked LastByteSent LastByteSent LastByteWritten Example: LastByteWritten= 3000 LastByteSent=2800 LastByteAcked:= 2400 How many unacknowledged bytes? (3000-2400)= 600 L4.42 SLIDES CREATED BY: SHRIDEEP PALLICKARA L4.21

TCP Receive Buffer Receiving Application LastByteRead TCP NextByteExpected LastByteRecvd LastByteRead < NextByteExpected NextByteExpected LastByteRecvd + 1 L4.43 Flow Control: Buffers are of finite size MaxSendBuffer and MaxRcvBuffer Receiver throttles sender Advertises a window No bigger than what it can buffer LastByteRcvd LastByteRead MaxRcvBuffer AdvertisedWindow = MaxRcvBuffer ( (NextByteExpected -1) LastByteRead)) Space Utilized in the receiver s buffer L4.44 SLIDES CREATED BY: SHRIDEEP PALLICKARA L4.22

The advertised window may potentially shrink If the process is reading data as fast as it arrives? The advertised window stays open n i.e. AdvertisedWindow = MaxRcvBuffer If the receiving process falls behind? Advertised window becomes smaller with every segment that arrives Until it becomes 0 L4.45 Flow Control: Buffers are of finite size MaxSendBuffer and MaxRcvBuffer On the sender size, TCP adheres to the advertised window from the receiver LastByteSent LastByteAcked AdvertisedWindow EffectiveWindow = AdvertisedWindow (LastByteSent LastByteAcked) EffectiveWindow should be > 0 before source can send more data L4.46 SLIDES CREATED BY: SHRIDEEP PALLICKARA L4.23

The contents of this slide-set are based on the following references Computer Networks: A Systems Approach. Larry Peterson and Bruce Davie. 4th edition. Morgan Kaufmann. ISBN: 978-0-12-370548-8. Chapters [4, 5] https://en.wikipedia.org/wiki/ipv6 Understanding the IPv6 Header: https://www.microsoftpressstore.com/articles/article.aspx?p=2225063&seqnum=4 L4.47 SLIDES CREATED BY: SHRIDEEP PALLICKARA L4.24