Network Protocols. Sarah Diesburg Operating Systems CS 3430

Similar documents
CS 162 Operating Systems and Systems Programming Professor: Anthony D. Joseph Spring Lecture 21: Network Protocols (and 2 Phase Commit)

CS162 Operating Systems and Systems Programming Lecture 22. Networking II

Problem 7. Problem 8. Problem 9

TCP/IP Protocol Suite 1

CSE 461 Module 10. Introduction to the Transport Layer

ECE697AA Lecture 3. Today s lecture

Transport Layer Marcos Vieira

Networks and Distributed Systems. Sarah Diesburg Operating Systems CS 3430

6.033 Lecture 12 3/16/09. Last time: network layer -- how to deliver a packet across a network of multiple links

CS 716: Introduction to communication networks th class; 7 th Oct Instructor: Sridhar Iyer IIT Bombay

User Datagram Protocol

UNIT IV -- TRANSPORT LAYER

Transport Layer Protocols TCP

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

Networking Technologies and Applications

Lecture 3: The Transport Layer: UDP and TCP

Page 1. CS194-3/CS16x Introduction to Systems. Lecture 21. Networking II. Review: Networking Definitions

NWEN 243. Networked Applications. Layer 4 TCP and UDP

CSCI-131 Networking: the End-to-End Layer. Rodrigo Fonseca March 12 th, 2013

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

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

CS 5520/ECE 5590NA: Network Architecture I Spring Lecture 13: UDP and TCP

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

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

CS 43: Computer Networks. 16: Reliable Data Transfer October 8, 2018

The Transmission Control Protocol (TCP)

STEVEN R. BAGLEY PACKETS

Introduction to Networks and the Internet

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

The Transport Layer: TCP & Reliable Data Transfer

CSC 4900 Computer Networks: TCP

Layered Network Architecture. CSC358 - Introduction to Computer Networks

Communications Software. CSE 123b. CSE 123b. Spring Lecture 3: Reliable Communications. Stefan Savage. Some slides couresty David Wetherall

Chapter 3: Transport Layer

CS43: Computer Networks Reliable Data Transfer. Kevin Webb Swarthmore College October 5, 2017

CS162 Operating Systems and Systems Programming Lecture 23. Networking III

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

23-3 TCP. Topics discussed in this section: TCP Services TCP Features Segment A TCP Connection Flow Control Error Control 23.22

Transport Protocols & TCP TCP

Page 1. Review: Internet Protocol Stack. Transport Layer Services. Design Issue EEC173B/ECS152C. Review: TCP

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

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

Outline. CS5984 Mobile Computing

CS 43: Computer Networks. 18: Transmission Control Protocol October 12-29, 2018

Distributed Systems Fault Tolerance

THE TRANSPORT LAYER UNIT IV

EE 122: Transport Protocols: UDP and TCP

Transport Protocols and TCP

Chapter 24. Transport-Layer Protocols

Transport Layer. Gursharan Singh Tatla. Upendra Sharma. 1

05 Transmission Control Protocol (TCP)

Chapter 3: Transport Layer Part A

Stream Control Transmission Protocol

UNIT V. Computer Networks [10MCA32] 1

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

6.1 Internet Transport Layer Architecture 6.2 UDP (User Datagram Protocol) 6.3 TCP (Transmission Control Protocol) 6. Transport Layer 6-1

CMSC 332 Computer Networks Reliable Data Transfer

Unit 2.

Process groups and message ordering

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

Transport Layer Review

Information Network 1 TCP 1/2

CSC358 Week 4. Adapted from slides by J.F. Kurose and K. W. Ross. All material copyright J.F Kurose and K.W. Ross, All Rights Reserved

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

Overview. Internetworking and Reliable Transmission. CSE 561 Lecture 3, Spring David Wetherall. Internetworking. Reliable Transmission

COSC4377. Useful Linux Tool: screen

ELEN Network Fundamentals Lecture 15

Page 1. Review: Internet Protocol Stack. Transport Layer Services EEC173B/ECS152C. Review: TCP. Transport Layer: Connectionless Service

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

CSC 4900 Computer Networks: Reliable Data Transport

Transport Layer. The transport layer is responsible for the delivery of a message from one process to another. RSManiaol

Different Layers Lecture 20

Basic Reliable Transport Protocols

CS 4390 Computer Networks. Transport Services and Protocols

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

Today: Fault Tolerance

Connection-oriented (virtual circuit) Reliable Transfer Buffered Transfer Unstructured Stream Full Duplex Point-to-point Connection End-to-end service

Data Transport over IP Networks

Discussion: Messaging

Internetworking Models The OSI Reference Model

UDP, TCP, IP multicast

Mobile Transport Layer Lesson 02 TCP Data Stream and Data Delivery

7. TCP 최양희서울대학교컴퓨터공학부

TDTS06: Computer Networks

ETSF05/ETSF10 Internet Protocols Transport Layer Protocols

Page 1. CS194-3/CS16x Introduction to Systems. Lecture 22. TCP congestion control, Two-Phase Commit. 3-way handshake. ½ close.

Fault Tolerance. Basic Concepts

Chapter 5 End-to-End Protocols

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

TCP Congestion Control

TCP Congestion Control

MODELS OF DISTRIBUTED SYSTEMS

TCP : Fundamentals of Computer Networks Bill Nace

Chapter 3 Review Questions

CSE 461 The Transport Layer

Internet Networking recitation #10 TCP New Reno Vs. Reno

Transport Layer (TCP/UDP)

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

Intro to LAN/WAN. Transport Layer

Failures, Elections, and Raft

Transcription:

Network Protocols Sarah Diesburg Operating Systems CS 3430

Protocol An agreement between two parties as to how information is to be transmitted A network protocol abstracts packets into messages

Physical Reality vs. Abstraction Physical reality: packets Abstraction: messages Limited size Arbitrary size Unordered Ordered Unreliable Reliable Machine-to-machine Process-to-process Only on local area network Routed anywhere Asynchronous Synchronous Insecure Secure

Arbitrary-Size Messages Can be built on top of limited-size ones By splitting a message into fix-sized packets Checksum can be computed on each fragment or the whole message

Internet Protocol (IP) Provides unreliable, unordered, machine-tomachine transmission of arbitrary-size messages

Process-to-Process Communications Built on top of machine-to-machine communications through the use of port addresses Each message contains the destination port to talk to the correct process

Unreliable Data Protocol (UDP) Provides unreliable, unordered, user-to-user communication Built on the top of IP

Ordered Messages Built on top of unordered ones Use sequence numbers to indicate the order of arrival Specific to a connection If packet 3 arrives before packet 2, wait for packet 2. Always deliver packets in order, to user applications

Reliable Message Delivery Built on top of unreliable delivery Problem: Network infrastructure can garble messages Packets can be dropped if network buffers are full

Solution Checksum each message At a receiver, discard messages with mismatching checksums A receiver acknowledges if a packet is received properly A sender resends the same message after not hearing the acknowledgment for some time (a timeout period)

A Minor Problem A sender may send twice, if the first acknowledge is lost The receiver needs to discard duplicate packets

Implications A sender needs to buffer messages that are not yet acknowledged The receiver must track messages that could be duplicates

Transmission Control Protocol (TCP) Provides a reliable byte stream between two processes on different machines over the Internet sequence number: 1 checksum: fa73cd10

Transmission Control Protocol Fragments the byte stream into packets and hands them to IP

TCP Message Categories Sender Sent and acknowledged Sent and not acknowledged Not yet sent Receiver Forwarded to application Received and buffered Not yet received

More on the Sequence Number Need a way to recycle sequence numbers Each TCP packet has a time-to-live field If the packet is not delivered in X seconds The packet is dropped Sequence numbers can be reused An epoch number used to identify which set of sequence numbers is being used Incremented at each boot Stored on disk

Congestion Implications of timeout period at a sender Too long unnecessary waiting Too short a message is transmitted when an acknowledgement is in transit Network congestion delayed acknowledgement timeout data retransmission more congestion

TCP Solution Slow start: TCP starts by sending a small amount of data If no timeout, more data is sent If timeout, TCP reduces the amount of data being sent

The Byzantine Generals Problem Two generals are on the tops of two mountains They communicate only through messengers They need to coordinate the attack If they attack at the same time, they win If they attack at different times, they will die

The Byzantine Generals Problem Question: can they guarantee a synchronized attack?

The Byzantine Generals Problem Illustrated General X 11am OK? So, 11am it is. General Y 11am sounds good Yeah, what if you don t get this ack?

The Byzantine Generals Problem Over an unreliable network, we cannot guarantee that two computers will synchronize

Distributed Transaction Multiple machines agree to do something atomically, but not necessarily at exactly the same time Mechanism: two-phase commit

Two-Phase Commit Account X Phase 1: ask if each can commit 1. Begin transaction Ask Y for $1 Phase 2: commit 3. Write X = X + $1 4. Commit Ask Y to commit Account Y Enough cash 2. Write Y = Y - $1 Ready to commit 5. Commit

Scenarios If X crashes between 1 and 2 Y will wake up and do nothing X will timeout and abort the transaction If X crashes before step 4 X will wake up and abort the transaction If X crashes between 4 and 5 Y will timeout and ask X for the transaction

Scenarios If Y crashes between 2 and 5 Y will wake up and check the log When X sends Y the commit message, Y will commit Y can also timeout and ask X the current status