Steve Ko Computer Sciences and Engineering University at Buffalo

Slides:



Advertisements
Similar presentations
CCNA – Network Fundamentals
Advertisements

Chapter 7: Transport Layer
© 2008 Cisco Systems, Inc. All rights reserved.Cisco ConfidentialPresentation_ID 1 Chapter 7: Transport Layer Introduction to Networking.
Lecture 7 Transport Layer
CSE 486/586, Spring 2014 CSE 486/586 Distributed Systems The Internet in 2 Hours: The Second Hour Steve Ko Computer Sciences and Engineering University.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 OSI Transport Layer Network Fundamentals – Chapter 4.
Transport Layer 3-1 Outline r TCP m Congestion control m Flow control.
CSE 486/586, Spring 2012 CSE 486/586 Distributed Systems The Internet in 2 Hours: The First Hour Steve Ko Computer Sciences and Engineering University.
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Transport Protocols Slide 1 Transport Protocols.
CSE 486/586, Spring 2012 CSE 486/586 Distributed Systems The Internet in 2 Hours: The Second Hour Steve Ko Computer Sciences and Engineering University.
Gursharan Singh Tatla Transport Layer 16-May
OIS Model TCP/IP Model.
What Can IP Do? Deliver datagrams to hosts – The IP address in a datagram header identify a host IP treats a computer as an endpoint of communication Best.
Process-to-Process Delivery:
Lect3..ppt - 09/12/04 CIS 4100 Systems Performance and Evaluation Lecture 3 by Zornitza Genova Prodanoff.
What is a Protocol A set of definitions and rules defining the method by which data is transferred between two or more entities or systems. The key elements.
© 2008 Cisco Systems, Inc. All rights reserved.Cisco ConfidentialPresentation_ID 1 Chapter 7: Transport Layer Introduction to Networking.
CSE 486/586, Spring 2014 CSE 486/586 Distributed Systems The Internet in 2 Hours: The First Hour Steve Ko Computer Sciences and Engineering University.
Introduction to Networks CS587x Lecture 1 Department of Computer Science Iowa State University.
Fundamentals of Computer Networks ECE 478/578 Lecture #19: Transport Layer Instructor: Loukas Lazos Dept of Electrical and Computer Engineering University.
Transport Layer COM211 Communications and Networks CDA College Theodoros Christophides
S305 – Network Infrastructure Chapter 5 Network and Transport Layers.
Advanced UNIX programming Fall 2002, lecture 16 Instructor: Ashok Srinivasan Acknowledgements: The syllabus and power point presentations are modified.
Transport Protocols.
1 User Datagram Protocol. 2 Transport Protocols Provide logical communication between application processes running on different hosts Run on end hosts.
1 Computer Communication & Networks Lecture 23 & 24 Transport Layer: UDP and TCP Waleed Ejaz
McGraw-Hill Chapter 23 Process-to-Process Delivery: UDP, TCP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
CSE 486/586, Spring 2013 CSE 486/586 Distributed Systems The Internet in 2 Hours: The First Hour Steve Ko Computer Sciences and Engineering University.
1 Chapter 24 Internetworking Part 4 (Transport Protocols, UDP and TCP, Protocol Port Numbers)
What is a Protocol A set of definitions and rules defining the method by which data is transferred between two or more entities or systems. The key elements.
Chapter 7: Transport Layer
Introduction to Networks
Chapter 5 Network and Transport Layers
The Transport Layer Implementation Services Functions Protocols
Steve Ko Computer Sciences and Engineering University at Buffalo
Chapter 9: Transport Layer
Introduction to TCP/IP networking
Lecture (2).
Chapter 3 outline 3.1 Transport-layer services
Instructor Materials Chapter 9: Transport Layer
Steve Ko Computer Sciences and Engineering University at Buffalo
5. End-to-end protocols (part 1)
Transport Layer.
Process-to-Process Delivery, TCP and UDP protocols
Steve Ko Computer Sciences and Engineering University at Buffalo
Lecturer, Department of Computer Application
06- Transport Layer Transport Layer.
PART 5 Transport Layer Computer Networks.
Magda El Zarki Professor, ICS UC, Irvine
Introduction to Networks
Process-to-Process Delivery:
Introduction of Transport Protocols
Packet Sniffing.
Transport Layer Unit 5.
Transport Layer Our goals:
Process-to-Process Delivery:
Lecture 4 Communication Network Protocols
Advanced Computer Networks
1 TRANSMISSION CONTROL PROTOCOL / INTERNET PROTOCOL (TCP/IP) K. PALANIVEL Systems Analyst, Computer Centre Pondicherry University, Puducherry –
CSCD 330 Network Programming
Distributed Systems CS
CS4470 Computer Networking Protocols
Transport Protocols: TCP Segments, Flow control and Connection Setup
Process-to-Process Delivery: UDP, TCP
CSE 542: Operating Systems
Computer Networks Protocols
The TCP/IP Model.
Steve Ko Computer Sciences and Engineering University at Buffalo
Transport Layer 9/22/2019.
Distributed Systems CS
Presentation transcript:

Steve Ko Computer Sciences and Engineering University at Buffalo CSE 486/586 Distributed Systems The Internet in 2 Hours: The Second Hour Steve Ko Computer Sciences and Engineering University at Buffalo

Recap The Internet Protocol Design a system A network of networks A case study as a distributed system Protocol An agreement between multiple parties Syntax & semantics Design a system Why, what, and how Connecting by layering

Layering: A Modular Approach Sub-divide the problem Each layer relies on services from layer below Each layer exports services to layer above Interface between layers defines interaction Hides implementation details Layers can change without disturbing other layers “The” computer science approach ISA, OS, networking… Application Application-to-application channels Host-to-host connectivity Link hardware

Challenges in Layering What to put on top of physical networks? Assumption (for the sake of the discussion): Packet switching (a conversation is divided into smaller units called packets). Basic things for enabling a conversation between remote hosts: Addressing (where do I send a msg?) Routing (how do I reach that address?) Most importantly, survivability Protection of a conversation as long as there’s a physical path between entities communicating and they are alive. What are some of the threats that disrupt a conversation? Packet loss, out-of-order delivery, duplicate packets, etc. Most people, when they first design and implement something, do not worry about failures. But in the end, that’s where the most amount of effort goes in.

We Must Ask Ourselves… In a conversation, there are two components involved Hosts Network So, one more question: how do you decide who does what? More specifically, what would be a good network/host division of labor? Addressing and routing? Yeah, probably in the network What about conversation protection mechanisms? The network or hosts?

So, How to Protect a Conversation? Think about the following scenario Hey! The Internet Hey!

Two Approaches to Survivability Approach 1: “stateful” network The network keeps the state information about conversations Hey! The Internet OK; Bob is sending something to Alice. I’d better keep another copy in case it gets lost…

Two Approaches to Survivability Approach 2: “stateless” network The ends keep the state information about conversations Hey! (and let me know if you receive this) (OK; Alice didn’t speak to me for a while. I’ll send it again.) The Internet

Two Approaches to Survivability Stateless networks’ principle: fate-sharing The conversation shares the same fate with the “ends.” “it is acceptable to lose the state information associated with an entity if, at the same time, the entity itself is lost.” Advantages Fate-sharing protects against any number of intermediate network failures (what about replication?) Fate-sharing is much easier to engineer. The result: a “best-effort” network The IP (Internet Protocol) layer doesn’t really provide anything other than “best-effort” delivery (i.e., addressing and routing). The end hosts provide conversation protection mechanisms.

The Internet Protocol Suite FTP HTTP NV TFTP Applications UDP TCP TCP UDP Waist IP Data Link NET1 NET2 … NETn Physical The Hourglass Model The waist facilitates interoperability

IP Suite: End Hosts vs. Routers HTTP message HTTP HTTP TCP segment TCP TCP router router IP IP packet IP IP packet IP IP packet IP Ethernet interface Ethernet interface SONET interface Ethernet interface SONET interface Ethernet interface

End-to-End Arguments Helps resisting the tendency to put and hide complicated things in the lower layers If a functionality must be implemented end-to-end, then don’t implement it in the network. Exception: when there are clear performance improvements Laid out in “End-to-End Arguments in System Design” by J.H. Saltzer, D.P. Reed and D.D. Clark (optional reading) A good rule of thumb in any system design, but still not something to follow blindly

CSE 486/586 Administrivia PA 1 Please try it out right away and see how far you can get. Please use Piazza; all announcements will go there.

TCP/IP IP network TCP TCP IP “best-effort” network The network knows the source and the destination. A conversation is divided into packets. Makes the best effort to deliver packets Packet loss, corruption, out-of-order delivery, etc. could all happen. TCP (Transmission Control Protocol) Handles the problems Implemented at the end hosts source destination IP network TCP TCP

OK; Let’s Think about It Together… Is this always a good thing? Is today’s Internet still stateless?

TCP An end-to-end protocol Protects conversations Controls congestion Receiver is supposed to send an ack (acknowledgement) packet. Packet loss  retransmission Out-of-order delivery, duplicate packets  sequence numbers Packet corruption  checksum Controls congestion The network might be over-utilized Prevents the network from collapsing (which was actually a concern in the late 80’s) TCP is an abstraction: a reliable, byte-stream connection

A (Very) Brief Overview of TCP SYN SYN ACK ACK Data Data Three-way handshake to establish connection Host A sends a SYN (open) to the host B Host B returns a SYN acknowledgment (SYN ACK) Host A sends an ACK to acknowledge the SYN ACK Why 3-way instead of 2-way? Reachability

Retransmission Timeout & retransmission to handle packet loss Packet Packet lost

The Dark Side of TCP There’s overhead associated. Connection establishment: 3-way handshake Packet loss: retransmission timeout Congestion control: doesn’t utilize full bandwidth More importantly, some applications do not need these. Examples? So, enter UDP (User Datagram Protocol): exposes almost exactly what IP can give you.

Why Would Anyone Use UDP? Fine control over what data is sent and when As soon as an application process writes … UDP will package the data and send the packet No delay for connection establishment UDP just blasts away without any formal preliminaries … which avoids introducing any unnecessary delays No connection state No allocation of buffers, parameters, sequence #s, etc. … making it easier to handle many active clients at once Small packet header overhead UDP header is only eight-bytes long

Popular Applications That Use UDP Multimedia streaming Retransmitting lost/corrupted packets is not worthwhile By the time the packet is retransmitted, it’s too late E.g., telephone calls, video conferencing, gaming Simple query protocols like Domain Name System Overhead of connection establishment is overkill Easier to have the application retransmit if needed Will cover this in a separate lecture “Address for www.cnn.com?” “12.3.4.15”

What Applications See App Socket API TCP UDP OS IP Device Drivers Network Interface

Summary What to put on top of physical networks? Layers providing survivability Where to put functionalities? Fate-sharing & end-to-end arguments IP layer doesn’t provide much TCP handles most of the survivability issues TCP & UDP: the two transport protocols of the Internet What interface do applications see? Socket API Next: An introduction to Android programming

Acknowledgements These slides contain material developed and copyrighted by Indranil Gupta at UIUC Mike Freedman and Jen Rexford at Princeton