CS144 An Introduc8on to Computer Networks

Similar documents
048866: Packet Switch Architectures

CS344 - Build an Internet Router. Nick McKeown, Steve Ibanez (TF)

CS144: Intro to Computer Networks Homework 1 Scan and submit your solution online. Due Friday January 30, 4pm

CS144: Intro to Computer Networks Homework 1 Scan and submit your solution online. Due Friday January 30, 4pm

The Network Layer and Routers

Mul$media Networking. #10 QoS Semester Ganjil 2012 PTIIK Universitas Brawijaya

Quality of Service (QoS)

Kommunikationssysteme [KS]

Computer Network Fundamentals Spring Week 4 Network Layer Andreas Terzis

Episode 5. Scheduling and Traffic Management

CSC 401 Data and Computer Communications Networks

Network Layer: Control/data plane, addressing, routers

Resource allocation in networks. Resource Allocation in Networks. Resource allocation

CSC 401 Data and Computer Communications Networks

Network Layer Enhancements

Where we are in the Course

CS244a: An Introduction to Computer Networks

Module objectives. Integrated services. Support for real-time applications. Real-time flows and the current Internet protocols

PARALLEL ALGORITHMS FOR IP SWITCHERS/ROUTERS

Conges'on. Last Week: Discovery and Rou'ng. Today: Conges'on Control. Distributed Resource Sharing. Conges'on Collapse. Conges'on

EEC-484/584 Computer Networks

CSE398: Network Systems Design

Real-Time Protocol (RTP)

Lecture 22: Buffering & Scheduling. CSE 123: Computer Networks Alex C. Snoeren

Lecture 3: Packet Forwarding

TELE Switching Systems and Architecture. Assignment Week 10 Lecture Summary - Traffic Management (including scheduling)

Lecture Outline. Bag of Tricks

CS244a: An Introduction to Computer Networks

Department of Computer Science and Engineering. CSE 3214: Computer Network Protocols and Applications Instructor: N. Vlajic Date: Feb 23, 2016

Overview Computer Networking What is QoS? Queuing discipline and scheduling. Traffic Enforcement. Integrated services

Routing, Routers, Switching Fabrics

Chapter 4: network layer. Network service model. Two key network-layer functions. Network layer. Input port functions. Router architecture overview

CS244a: An Introduction to Computer Networks

Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ

Lecture 16: Network Layer Overview, Internet Protocol

ECE 650 Systems Programming & Engineering. Spring 2018

Wireless Networks (CSC-7602) Lecture 8 (22 Oct. 2007) Seung-Jong Park (Jay) Fair Queueing

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

Lecture 24: Scheduling and QoS

ECSE-6600: Internet Protocols Spring 2007, Exam 1 SOLUTIONS

CSE/ISE 311: Systems Administra5on Basic Network Organiza5on

Packet Scheduling and QoS

Advanced Computer Networks

Episode 5. Scheduling and Traffic Management

Configuring QoS CHAPTER

Unit 2 Packet Switching Networks - II

UNIT IV TRANSPORT LAYER

Internet Services & Protocols. Quality of Service Architecture

QUALITY of SERVICE. Introduction

CS 43: Computer Networks. 20: The Network Layer November 5, 2018

Routers. Session 12 INST 346 Technologies, Infrastructure and Architecture

Conges'on Control Reading: Sec'ons

Topic 4b: QoS Principles. Chapter 9 Multimedia Networking. Computer Networking: A Top Down Approach

CSCI Spring Final Exam Solution

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

CS 344/444 Computer Network Fundamentals Final Exam Solutions Spring 2007

LS Example 5 3 C 5 A 1 D

Network core and metrics

Router Design: Table Lookups and Packet Scheduling EECS 122: Lecture 13

Scheduling. Scheduling algorithms. Scheduling. Output buffered architecture. QoS scheduling algorithms. QoS-capable router

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

CS 5114 Network Programming Languages Data Plane. Nate Foster Cornell University Spring 2013

Donato Ba*aglino Lorenzo Bracciale

Reminder: Datalink Functions Computer Networking. Datalink Architectures

Chapter 4 Network Layer: The Data Plane

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

Traffic Access Control. Hamid R. Rabiee Mostafa Salehi, Fatemeh Dabiran, Hoda Ayatollahi Spring 2011

Network Support for Multimedia

internet technologies and standards

Priority Traffic CSCD 433/533. Advanced Networks Spring Lecture 21 Congestion Control and Queuing Strategies

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

CSE 461 Quality of Service. David Wetherall

Chapter 4 Network Layer: The Data Plane

Performance Modeling

CSE 123b Communications Software

Fairness, Queue Management, and QoS

Network Management & Monitoring Network Delay

7010INT Data Communications Lecture 7 The Network Layer

CSC 401 Data and Computer Communications Networks

CS 3516: Advanced Computer Networks

CS244 Advanced Topics in Computer Networks Midterm Exam Monday, May 2, 2016 OPEN BOOK, OPEN NOTES, INTERNET OFF

Lecture 8. Basic Internetworking (IP) Outline. Basic Internetworking (IP) Basic Internetworking (IP) Service Model

H3C S9500 QoS Technology White Paper

CSE 473 Introduction to Computer Networks. Exam 1. Your name: 9/26/2013

Network Layer: Router Architecture, IP Addressing

Page 1. Quality of Service. CS 268: Lecture 13. QoS: DiffServ and IntServ. Three Relevant Factors. Providing Better Service.

CMPE 150/L : Introduction to Computer Networks. Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 18

Kent State University

Lecture 8. Reminder: Homework 3, Programming Project 2 due on Thursday. Questions? Tuesday, September 20 CS 475 Networks - Lecture 8 1

Part1: Lecture 4 QoS

CS 43: Computer Networks The Network Layer. Kevin Webb Swarthmore College November 2, 2017

Network Layer PREPARED BY AHMED ABDEL-RAOUF

Last time! Overview! 14/04/15. Part1: Lecture 4! QoS! Router architectures! How to improve TCP? SYN attacks SCTP. SIP and H.

The Network Layer. Network Layer Design Objectives

Worst-case Ethernet Network Latency for Shaped Sources

Frame Relay. Frame Relay: characteristics

RSVP 1. Resource Control and Reservation

Resource Control and Reservation

Southern Polytechnic State University Spring Semester 2009

Quality of Service II

Transcription:

CS144 An Introduc8on to Computer Networks Packet Switching Philip Levis Oct 11, 2017

Packet Switching A Source R1 R2 R3 B Des8na8on R4 - Packets are routed individually, by looking up address in router s local table. - All packets share the full capacity of a link. - The routers maintain no per-communica8on state. 2

Packet Switching Data Data B Header A B Packet Switch Address S2 Next-hop B S2 C S3 D S3 S1 S4 S3 C D 3

Packet Switching Packet Switch 4

Packet switches have buffers Data H Data H Buffers hold packets: - When two or more packets arrive at the same 8me - During periods of conges8on 5

Efficient use of expensive links - Links were assumed to be expensive and scarce. - Packet switching allows many, bursty flows to share the same link efficiently. - Circuit switching is rarely used for data networks,... because of very inefficient use of the links Bertsekas/Gallager Resilience to failure of links & routers - For high reliability,... [the Internet] was to be a datagram subnet, so if some lines and [routers] were destroyed, messages could be... rerouted - Tanenbaum 6

ping demo 7

End-to-end Delay Packets take 8me to travel between hosts End-to-end delay: 8me from the start of first bit leaving the source and the end of the last bit arriving at the des8na8on End-to-end delay measures the travel 8me due to the network: endpoint so_ware adds more 8

Propaga;on Delay, t l : The 8me it takes a single bit to travel over a link at propaga8on speed c. l t l = l c Example: A bit takes 5ms to travel 1,000km in an op8cal fiber with propaga8on speed 2 x 10 8 m/s. 9

Packe;za;on Delay, t p : The 8me from when the first to the last bit of a packet is transmibed. p r bits/s t p = p r Example 1: A 64byte packet takes 5.12µs to be transmibed onto a 100Mb/s link. Example 2: A 1kbit packet takes 1.024s to be transmibed onto a 1kb/s link. 10

End-to-end delay A l 1, r 1 l 2, r 2 l 3, r 3 l 4, r 4 B Example: How long will it take a packet of length p to travel from A to B, from when the 1 st bit is sent, un8l the last bit arrives? Assume the switches store-and-forward packets along the path. End-to-end delay, t = i! # " p r i + l i c $ & % 11

A l 1, r 1 l 2, r 2 l 3, r 3 l 4, r 4 B S1 S2 S3 A p/r 1 time S1 S2 l 1 /c p/r 2 l 2 /c p/r 3 End-to-end delay, t = i! # " p r i + l i c $ & % S3 B l 3 /c p/r 4 l 4 /c time 12

What about buffers? Data H Data H Buffers hold packets: - When two or more packets arrive at the same 8me - During periods of conges8on - Add addi8onal delay, wai8ng to get to head of line 13

Queuing Delay Queuing delay: 8me a packet waits in a queue Queuing delay is a dynamic value: depends on depth of queue, so other packets Queuing delay is the source of (almost) all end-toend delay varia8on along a wired network path 1 1 there are some exceptions (e.g., some links have variable r), but we'll just assume r is constant 14

Examples queueing delay 0ms 9ms 4ms Assume all packets are same length, 10kbit. Link speed is 10Mbps. 15

A Data H Other packets l 1, r 1 l 2, r 2 l 3, r 3 l 4, r 4 Q 2 (t) S1 S2 S3 B A S1 S2 p/r 1 l 1 /c p/r 2 l 2 /c Q 2 (t) p/r 3 End-to-end delay, t = i! # " p r i + l i c +Q i t ( ) $ & % S3 B l 3 /c p/r 4 time l 4 /c *Queueing = UK spelling, adopted by Kleinrock at UCLA in 1960s. Queueing and queuing (US spelling) are both widely used. 16

End-to-end Delay End to end delay is made up of three main components: - Propaga8on delay along the links (fixed) - Packe8za8on delay to place packets onto links (fixed) - Queueing delay in the packet buffers of the routers (variable) 17

Simple model of a queue Q(t) Cumula8ve number of bytes arrived up un8l 8me t. A(t) R Link rate D(t) Cumula8ve number of bytes departed up un8l 8me t. Cumula8ve number of bytes R A(t) D(t) time Proper8es of A(t), D(t): - A(t), D(t) are non-decreasing - A(t) >= D(t) 18

Simple model of a queue A(t) Cumulative number of bytes Q(t) d(t) D(t) Time Queue occupancy: Q(t) = A(t) - D(t). Queueing delay, d(t), is the 8me spent in the queue by a byte that arrived at 8me t, assuming the queue is served first-come-first-served (FCFS). 19

Example Every second, a 100 bit packet arrives to a queue at rate 1000b/s. The maximum departure rate is 500b/s. What is the average occupancy of the queue? Cumula8ve number of bits 100 A(t) D(t) 0.1s 0.2s 1.0s 8me Solu8on: During each repea8ng 1s cycle, the queue fills at rate 500b/s for 0.1s, then drains at rate 500b/s for 0.1s. Over the first 0.2s, the average queue occupancy is therefore 0.5 (0.1 500) = 25bits. The queue is empty for 0.8s every cycle, and so average queue occupancy: Q (t) = (0.2 25bits) + (0.8 0) = 5bits 20

Packet Switching Why not send the en8re message in one packet? A M/r 1 p/r 1 B R1 R2 R3 R1 R2 R3 End-to-end delay, t = i! # " M r i + l i c $ & % End-to-end delay, t = i! # " p r i + l i c $! & + # M % " p 1 $ & p % r min Breaking message into packets allows parallel transmission across links in a path, reducing end to end delay. 21

Packet Switching Why not send the en8re message in one packet? p/r 1 p/r 1 R1 R2 R3 Rmin R2 R3 End-to-end delay, t = i! # " p r i + l i c $! & + # M % " p 1 $ & p % r min This term describes the queuing delay at the bobleneck link. This behavior is going to come up when we talk about TCP again next week! 22

Time evolu8on of a queue Packet Arrivals: Departures: time Q(t) 23

Queue Property #1 Burs8ness increases delay Example 1: Periodic single arrivals Arrivals: Departures: time 24

Queue Property #1 Burs8ness increases delay Example 2: Periodic burst arrivals Arrivals: Departures: 25

In general, burs8ness increases delay 26

Queue Property #3 Lible s Result 27

Real-8me applica8ons (e.g. YouTube and Skype) have to cope with variable queueing delay 28

Playback buffers Playing here Buffered to here Playback buffer From: youtube.com 29

1Mb/s Playback buffers Server Cumula8ve Bytes 1Mb/s 1Mb/s Playback rate Variable delay Buffer Time

1Mb/s Playback buffers Server Playback buffer Video decoder Playback point Screen

If the buffer is too small 1Mb/s Server Cumula8ve Bytes 1Mb/s 1Mb/s Variable delay Buffer Time Make the buffer bigger! Rebuffering

Summary Real-8me applica8ons use playback buffers to absorb the varia8on in queuing delay. Playback buffer must be at least as large as data rate 8mes the queuing delay varia8on. 33

FIFO is a free for all B R 34

Outline 1. Strict priori8es 2. Rate guarantees 35

Single FIFO B R 36

Strict Priori8es High Low R 37

Weighted Priori8es Weight = 2 Weight = 1 R 38

Weighted Priori8es Weight = w 1 R Weight = w n 39

Weighted Fair Queueing Weight = w 1 R Weight = w n 40

Summary FIFO queues are a free for all: No priori8es and no guaranteed rates. Strict priori8es: High priority traffic sees a network with no low priority traffic. Useful if we have limited amounts of high priority traffic. Weighted Fair Queueing (WFQ) lets us give each flow a rate guarantee, by scheduling them in order of their bit-by-bit finishing 8mes. 41

From Rate to Delay 42

Delay guarantees: Intui8on A l 1, r 1 l 2, r 2 l 3, r 3 l 4, r 4 B Q 1 (t) Q 2 (t) Q 3 (t) End-to-end delay, τ = i! # " p r i + l i c +Q i t ( ) $ & % If we know the upper bound of Q 1 (t), Q 2 (t) and Q 3 (t), then we know the upper bound of the end-to-end delay. 43

So how can we control the delay of packets? What we already know how to control: 1. The rate at which a queue is served (WFQ). 2. The size of each queue. How do we make sure no packets are dropped?

Cumulative bytes R(f 1 ) A 1 (t) D 1 (t) Key idea: In general, we don t know the arrival process. So let s constrain it. time

The leaky bucket regulator Tokens at rate, ρ Token bucket size, σ Packets Packets Packet buffer Send packet if and only if enough tokens

Delay Guarantees If we know the size of a queue and the rate at which it is served, then we can bound the delay through it. We can pick the size of the queue, and WFQ lets us pick the rate at which it is served. Therefore, we just need a way to prevent packets being dropped along the way. For this, we use a leaky bucket regulator. We can therefore bound the end to end delay. 47

Switching 48

Generic Packet Switch Data H Lookup Address Update Header Queue Packet Des8na8on Address Egress link Forwarding Table Buffer Memory

Ethernet Switch 1. Examine the header of each arriving frame. 2. If the Ethernet DA is in the forwarding table, forward the frame to the correct output port(s). 3. If the Ethernet DA is not in the table, broadcast the frame to all ports (except the one through which the frame arrived). 4. Entries in the table are learned by examining the Ethernet SA of arriving packets. 50

Internet Router 1. If the Ethernet DA of the arriving frame belongs to the router, accept the frame. Else drop it. 2. Examine the IP version number and length of the datagram. 3. Decrement the TTL, update the IP header checksum. 4. Check to see if TTL == 0. 5. If the IP DA is in the forwarding table, forward to the correct egress port(s) for the next hop. 6. Find the Ethernet DA for the next hop router. 7. Create a new Ethernet frame and send it. 51

Basic Opera8ons 1. Lookup Address: How is the address looked up in the forwarding table? 2. Switching: How is the packet sent to the correct output port? 52

Lookup Address: Ethernet Ethernet addresses (in a switch) Match Ac;on Ethernet DA = 0xA8B72340E678 Forward to port 7 Ethernet DA = 0xB3D22571053B Forward to port 3 Methods - Store addresses in hash table (maybe 2-way hash) - Look for exact match in hash table 53

Lookup Address: IP IP addresses (in a router) Match Ac;on IP DA = 127.43.57.99 Forward to 56.99.32.16 IP DA = 123.66.44.X Forward to 22.45.21.126 IP DA = 76.9.X.X Forward to 56.99.32.16 Lookup is a longest prefix match, not an exact match 54

Inside the Stream IP address: 171.67.76.157 TCP port: 23946 IP address: 128.148.252.129 TCP port: 80 Client Routers Server 55

Inside Each Hop 6 5 4 1 2 3 dest link default 1 171.33.x.x 5 23.x.x.x 2 28.33.5.x 4 171.32.x.x 2 67.x.x.x 6 216.x.x.x 1 address: 216.239.47.186 56

Longest Prefix Match Algorithm IP routers use to chose matching entry from forwarding table dest link Forwarding table is a set of CIDR entries - An address might match mul8ple entries - E.g., 171.33.0.1 matches both entries on right Algorithm: use forwarding entry with the longest matching prefix - Longest prefix match will chose link 5 for 171.33.0.1 0.0.0.0/0 1 171.33.0.0/16 5 57

Inside Each Hop 6 5 4 1 2 3 dest link default 1 171.33.x.x 5 23.x.x.x 2 28.33.5.x 4 171.32.x.x 2 67.x.x.x 6 216.x.x.x 1 address: 216.239.47.186 58

Inside Each Hop (for real) 6 5 1 2 dest link default 1 171.33.x.x 5 23.x.x.x 2 28.33.5.x 4 171.32.x.x 2 67.x.x.x 6 216.x.x.x 1 dest link 4 3 address: 216.239.47.186 0.0.0.0/0 1 171.33.0.0/16 5 23.0.0.0/8 2 28.33.5.0/24 4 171.32.0.0/16 2 67.0.0.0/8 6 216.0.0.0/8 1 59