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

Similar documents
Communications Software. CSE 123b. CSE 123b. Spring Lecture 2: Internet architecture and. Internetworking. Stefan Savage

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

CSE 123b Communications Software

Welcome (day 2) CSE 123b Communications Software. Application layer (HTTP) Application layer? Name resolution (DNS) Transport layer (TCP)

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

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

Lecture 12: Addressing. CSE 123: Computer Networks Alex C. Snoeren

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

Lecture 11: Fragmentation & Addressing. CSE 123: Computer Networks Stefan Savage

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

ECE 4450:427/527 - Computer Networks Spring 2017

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

CS419: Computer Networks. Lecture 10, Part 2: Apr 11, 2005 Transport: TCP mechanics (RFCs: 793, 1122, 1323, 2018, 2581)

Lecture 12: Aggregation. CSE 123: Computer Networks Alex C. Snoeren

Lecture 9: Internetworking

Multiple unconnected networks

Transport Layer Marcos Vieira

CSCI-1680 Network Layer: IP & Forwarding Rodrigo Fonseca

CPSC 826 Internetworking. The Network Layer: Routing & Addressing Outline. The Network Layer

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

The Transport Layer: TCP & Reliable Data Transfer

Transport: How Applications Communicate

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

CSCI-1680 Network Layer: IP & Forwarding John Jannotti

Outline. Internet. Router. Network Model. Internet Protocol (IP) Design Principles

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

Network Layer: Internet Protocol

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

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

TCP Basics : Computer Networking. Overview. What s Different From Link Layers? Introduction to TCP. TCP reliability Assigned reading

User Datagram Protocol

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

TCP: Flow and Error Control

internet technologies and standards

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

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

Lecture 10: Addressing

STEVEN R. BAGLEY PACKETS

COMP/ELEC 429/556 Introduction to Computer Networks

CSE 123: Computer Networks Alex C. Snoeren. HW 1 due NOW!

ECE 158A: Lecture 7. Fall 2015

Outline Computer Networking. Functionality Split. Transport Protocols

CS 43: Computer Networks. 21: The Network Layer & IP November 7, 2018

Computer Network Fundamentals Spring Week 4 Network Layer Andreas Terzis

Vorlesung Kommunikationsnetze

CSCI-1680 Network Layer: IP & Forwarding Rodrigo Fonseca Instructor: Nicholas DeMarinis

Introduction to Networks and the Internet

Principles of Reliable Data Transfer

ECE 435 Network Engineering Lecture 9

User Datagram Protocol (UDP):

Lecture 7: Flow Control"

Computer Networks. Transmission Control Protocol. Jianping Pan Spring /3/17 CSC361 1

Transport Layer: Outline

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

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

NWEN 243. Networked Applications. Layer 4 TCP and UDP

ELEC / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition

Functionality Split Computer Networking. Transport Protocols. Overview. Multiplexing & Demultiplexing

CSCI Topics: Internet Programming Fall 2008

Network layer: Overview. Network layer functions IP Routing and forwarding NAT ARP IPv6 Routing

ELEC / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition

Lecture 3: Packet Forwarding

UNIT IV -- TRANSPORT LAYER

Network layer: Overview. Network Layer Functions

Lecture 4: CRC & Reliable Transmission. Lecture 4 Overview. Checksum review. CRC toward a better EDC. Reliable Transmission

Lecture 3 The Transport Control Protocol (TCP) Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

CSCD 330 Network Programming

UDP, TCP, IP multicast

University of Toronto Faculty of Applied Science and Engineering. Final Exam, December ECE 461: Internetworking Examiner: J.

TCP : Fundamentals of Computer Networks Bill Nace

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

Network Layer: Control/data plane, addressing, routers

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

TCP/IP Protocol Suite

Lecture 7: Sliding Windows. CSE 123: Computer Networks Geoff Voelker (guest lecture)

ERROR AND FLOW CONTROL. Lecture: 10 Instructor Mazhar Hussain

CSCI-1680 Network Layer: IP & Forwarding Rodrigo Fonseca

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

CS 356: Computer Network Architectures. Lecture 10: IP Fragmentation, ARP, and ICMP. Xiaowei Yang

ECE 435 Network Engineering Lecture 9

TCP/IP Protocol Suite 1

QUIZ: Longest Matching Prefix

Lecture 2: Basic routing, ARP, and basic IP

2/22/2008. Outline Computer Networking Lecture 9 IP Protocol. Hop-by-Hop Packet Forwarding in the Internet. Internetworking.

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

Reliable Transport I: Concepts and TCP Protocol

Prof. Shervin Shirmohammadi SITE, University of Ottawa. Internet Protocol (IP) Lecture 2: Prof. Shervin Shirmohammadi CEG

Transport Protocols & TCP TCP

Introduction to TCP/IP networking

Chapter 4: Network Layer

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

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

Lecture 16: Network Layer Overview, Internet Protocol

Introduction to Internetworking

EE 122: IP Forwarding and Transport Protocols

Internetworking Part 2

Congestion Control End Hosts. CSE 561 Lecture 7, Spring David Wetherall. How fast should the sender transmit data?

CS 3640: Introduction to Networks and Their Applications

ECE697AA Lecture 3. Today s lecture

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

Transcription:

Internetworking and Reliable Transmission CSE 561 Lecture 3, Spring 2002. David Wetherall Overview Internetworking Addressing Packet size Error detection Gateway services Reliable Transmission Stop and wait Sliding window Connections djw // CSE 561, Spring 2002, with credit to savage L3.2 1

How to connect different networks? Cerf&Kahn74, A Protocol for Packet Network Intercommunication Foundation for Internetworking and hence, the Internet Gateways Connect different networks together One half of gateway is in each network Two options Translation: Gateway translates directly between different network formats Indirection: Gateway translates between local network format and universal intermediate format Pros/cons of each approach? djw // CSE 561, Spring 2002, with credit to savage L3.3 Addressing Hierarchical addressing Global inter-network address Local network-specific address 8 16 Network TCP Identifier Why hierarchical? Assumptions about networks? djw // CSE 561, Spring 2002, with credit to savage L3.4 2

Packet size Heterogeneous maximum packet size E.g. Ethernet 1500B, FDDI 4500B, SLIP ~250B Options Mandate minimum packet size The Internet did this (576B IPv4, ~1500 IPv6) Fragmentation Gateway splits packets into smaller acceptable packets We ll talk about this next time djw // CSE 561, Spring 2002, with credit to savage L3.5 Error detection Bit errors Checksum written at end of packet Checked by receiving hosts. Pros/cons? CRC vs Checksum: performance/detection tradeoff Error distribution assumptions? When the CRC and TCP Checksum Disagree, Stone& Partridge, SIGCOMM 2000. Packet losses We ll deal with this shortly djw // CSE 561, Spring 2002, with credit to savage L3.6 3

Gateway services Things Gateways do Forward packets Fragment (must parse sequence numbers/length) Things they do not do Reassembly or duplicate detection. Why? Error detection Loss detection/retransmit requests Failure detection djw // CSE 561, Spring 2002, with credit to savage L3.7 How IP works today? Packet format Header checksum Time-to-live Protocol demultiplexing Type-of-Service Options Addressing Fragmentation Next lecture djw // CSE 561, Spring 2002, with credit to savage L3.8 4

IP Packet Format 0 15 16 ver HL TOS identification R M D E S F F options (if any) data (if any) length offset TTL protocol header checksum source address destination address 31 20 bytes djw // CSE 561, Spring 2002, with credit to savage L3.9 IP addressing 32-bits in an IPv4 address Dotted decimal format a.b.c.d Each represent 8 bits of address Network part and host part E.g. IP address 132.239.15.3 132.239 refers to the UCSD campus network 15.3 refers to the host gremlin.ucsd.edu Which part is network vs host? Pre-1993 class-based addressing, static determination Post-1993 classless addressing, dynamic split This is what the network mask is all about djw // CSE 561, Spring 2002, with credit to savage L3.10 5

Class-based routing (<1993) Most significant bits determines class of address Class A 0 Network Host 127 nets, 16M hosts Class B Class C 14 Network Pro Single lookup to find address Con Fragmentation Can t aggregate 1 1 0 1 0 21 Network 16 Host 8 Host 16K nets, 64K hosts 2M nets, 254 hosts djw // CSE 561, Spring 2002, with credit to savage L3.11 Classless addressing (now) In 1993, Classless Inter-Domain Routing introduced Routes represented by tuple (network prefix/mask) Allows arbitrary allocation between network and host address Network Host Prefix Mask=# significant bits representing prefix e.g. 10.95.1.2/8: 10 is network and remainder (95.1.2) is host Pro: Finer grained allocation, aggregation of suballocations Con: More expensive lookup: longest prefix match djw // CSE 561, Spring 2002, with credit to savage L3.12 6

Reliable Transmission How do we reliably send a message when packets can be lost in the network? Obvious options: Detect a loss and retransmit (Cerf&Kahn74) Send redundantly (Byers et al.98) djw // CSE 561, Spring 2002, with credit to savage L3.13 Simplest Protocol: Stop and Wait Sender Receiver Time Timeout Packet ACK Send a packet Stop and wait until an acknowledgement arrives from receiver Retransmit if timeout occurs before ACK arrives djw // CSE 561, Spring 2002, with credit to savage L3.14 7

Recovering From Errors Time Timeout Timeout Packet ACK Packet ACK Timeout Timeout Packet Packet ACK Timeout Timeout Packet ACK Packet ACK 1. ACK lost 2. Packet lost 3. Early timeout djw // CSE 561, Spring 2002, with credit to savage L3.15 How does receiver recognize duplicate? Add sequence numbers to packet Both in data packets and ACKs Sequence # in packet is finite, though How many bits do we need? One bit for stop and wait Won t send seq#1 until receive ACK for seq#0 Pkt 0 ACK 0 Pkt 0 ACK 0 Pkt 1 ACK 1 djw // CSE 561, Spring 2002, with credit to savage L3.16 8

What if packets are delayed? Never reuse a seq #? Finite Require in order delivery? Prevent very late delivery? TTL: Decrement hop count per packet, discard if exceeded Seq #s not reused within delay bound TCP standard: Maximum segment lifetime (MSL) of 120 seconds. 0 0 0 1 0 1 Accept! Reject! djw // CSE 561, Spring 2002, with credit to savage L3.17 Performance issues Capacity For a network with bandwidth BW and delay D, a sender can transmit BW*D bytes before the network is full Stop-and-wait is inefficient pipe is empty most of the time Delay Time to detect loss limited by timeout. How to select timeout? How could you do better that a timeout-based scheme? djw // CSE 561, Spring 2002, with credit to savage L3.18 9

Pipeline transmission Send multiple packets without waiting for the first to be ACKed Hypothetical, reliable, unordered delivery: Send new packet after each ACK Sender keeps list of unack ed packets and resends after timeout Receiver same as stop & wait This leads to Sliding Window, where an allowed range of numbered packets can be outstanding at any given time. djw // CSE 561, Spring 2002, with credit to savage L3.19 Sliding Window Sender puts sequence number on packet Receiver acknowledges packets by number Replies with highest in-order number received Receiver includes the highest number that can be sent It controls the size of the window Sliding window is a mechanism. It implements multiple functions: Reliability (retransmit unacknowledged packets) Ordered delivery (use numbering to order) Flow control (match fast sender to slow receiver) djw // CSE 561, Spring 2002, with credit to savage L3.20 10

Visualizing a Sliding Window Left side of window advances when data is ACKed offered window (advertised by receiver) effective window Right side controlled by size of Advertised Window 1 2 3 4 5 6 7 8 9 10 11 12 sent and acknowledged sent, not ACKed can send ASAP can t send until window moves djw // CSE 561, Spring 2002, with credit to savage L3.21 What if we lose a packet? Go back N Receiver provides cumulative ACKs got up through packet k If multiple packets received, only one ACK needed OK for receiver to buffer out of order packets Should you send an ACK for out-of-order packets? On timeout, sender restarts from k+1 Selective acknowledgement (SACK) Receiver sends ACK for each packet in window On timeout, sender resends only the missing packet We cover ways to avoid timeouts later Fast Retransmit (TCP Congestion Control) djw // CSE 561, Spring 2002, with credit to savage L3.22 11

How TCP works today? Packet format Process demultiplexing Data checksum Options Connection management Flow control djw // CSE 561, Spring 2002, with credit to savage L3.23 TCP Packet Format 0 15 16 31 source port destination port sequence number header length reserved acknowledgement number U R G A C K TCP checksum P S H R S T S Y N F I N window size urgent pointer 20 bytes options (if any) data (if any) djw // CSE 561, Spring 2002, with credit to savage L3.24 12

TCP Connection Establishment How to synchronize initial sequence numbers on each side? Touched on in Cerf&Kahn, but they didn t know how to do it right Tomlinson invents three-way handshake in 1975 Initiator Server SYN, ISN = x SYN+ACK, ISN = y and Ack = x + 1 ACK, Ack = y + 1 Why do we need the last ACK? djw // CSE 561, Spring 2002, with credit to savage L3.25 TCP Flow control Sliding window Byte granularity for sequence numbers and advertised window Pro/con of bytes vs packets? Go-Back-N where out-of-order packets buffered More efficient alternatives later (congestion control) Fast retransmit (invented for TCP in 1988) SACK option (just becoming widespread) Lots of icky details Window probes, Silly Window Syndrome, Nagel algorithm, MTU discovery, PAWS, etc Steven s TCP/IP Illustrated is a great source for these details djw // CSE 561, Spring 2002, with credit to savage L3.26 13

Example Icky Detail: Advertised Window Deadlock If the receiving process does not empty the buffer (e.g., not scheduled), then the sender fills up the receiver s buffer Advertised Window is 0 Effective Window goes to 0 when all data is ACKed Problem: When can the sender start sending again? No timeouts because all data is ACKed No packets from receiver with a new Advertised Window because receiver isn t running Solution: Ping with a segment of 1 byte of data Eventually receiver responds with a new Advert. Window djw // CSE 561, Spring 2002, with credit to savage L3.27 14