Last Lecture: Network Layer

Similar documents
Switch and Router Design. Packet Processing Examples. Packet Processing Examples. Packet Processing Rate 12/14/2011

Master Course Computer Networks IN2097

Master Course Computer Networks IN2097

Network Layer: Control/data plane, addressing, routers

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

IP Forwarding. CSU CS557, Spring 2018 Instructor: Lorenzo De Carli

Lecture 5: Router Architecture. CS 598: Advanced Internetworking Matthew Caesar February 8, 2011

Data Structures for Packet Classification

Lecture 11: Packet forwarding

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

Generic Architecture. EECS 122: Introduction to Computer Networks Switch and Router Architectures. Shared Memory (1 st Generation) Today s Lecture

Introduction. Introduction. Router Architectures. Introduction. Recent advances in routing architecture including

Introduction. Router Architectures. Introduction. Introduction. Recent advances in routing architecture including

EECS 122: Introduction to Computer Networks Switch and Router Architectures. Today s Lecture

Routers: Forwarding EECS 122: Lecture 13

The iflow Address Processor Forwarding Table Lookups using Fast, Wide Embedded DRAM

Routers: Forwarding EECS 122: Lecture 13

Problem Statement. Algorithm MinDPQ (contd.) Algorithm MinDPQ. Summary of Algorithm MinDPQ. Algorithm MinDPQ: Experimental Results.

Lecture 3: Packet Forwarding

Multi-gigabit Switching and Routing

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

ECE697AA Lecture 20. Forwarding Tables

Growth of the Internet Network capacity: A scarce resource Good Service

Computer Networks CS 552

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

The Network Layer and Routers

CS244a: An Introduction to Computer Networks

Homework 1 Solutions:

PUSHING THE LIMITS, A PERSPECTIVE ON ROUTER ARCHITECTURE CHALLENGES

Professor Yashar Ganjali Department of Computer Science University of Toronto.

CSC 401 Data and Computer Communications Networks

Chapter 12 Digital Search Structures

LONGEST prefix matching (LPM) techniques have received

Forwarding and Routers : Computer Networking. Original IP Route Lookup. Outline

Message Switch. Processor(s) 0* 1 100* 6 1* 2 Forwarding Table

Network Layer Introduction

ECE697AA Lecture 21. Packet Classification

Dynamic Pipelining: Making IP- Lookup Truly Scalable

Last time. Network layer. Introduction. Virtual circuit vs. datagram details. IP: the Internet Protocol. forwarding vs. routing

Overview. Implementing Gigabit Routers with NetFPGA. Basic Architectural Components of an IP Router. Per-packet processing in an IP Router

CSE 3214: Computer Network Protocols and Applications Network Layer

Network Superhighway CSCD 330. Network Programming Winter Lecture 13 Network Layer. Reading: Chapter 4

Topic 4a Router Operation and Scheduling. Ch4: Network Layer: The Data Plane. Computer Networking: A Top Down Approach

L3 Addressing and data plane. Benjamin Baron

Lecture 17: Network Layer Addressing, Control Plane, and Routing

Routers. Session 12 INST 346 Technologies, Infrastructure and Architecture

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

CMSC 332 Computer Networks Network Layer

Computer Networks. Instructor: Niklas Carlsson

Users Guide: Fast IP Lookup (FIPL) in the FPX

Scalable Name-Based Packet Forwarding: From Millions to Billions. Tian Song, Beijing Institute of Technology

INF5050 Protocols and Routing in Internet (Friday ) Subject: IP-router architecture. Presented by Tor Skeie

Internet Protocols (chapter 18)

Network Processors. Nevin Heintze Agere Systems

Introduction to Computer Networking. Guy Leduc. Chapter 4 Network Layer: The Data Plane. Chapter 4: Network Layer Data Plane

A Hybrid Approach to CAM-Based Longest Prefix Matching for IP Route Lookup

Efficient IP-Address Lookup with a Shared Forwarding Table for Multiple Virtual Routers

Network Layer: Data Plane 4-2

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

internet technologies and standards

CSCE 463/612 Networks and Distributed Processing Spring 2018

Lecture 13. Quality of Service II CM0256

internet technologies and standards

Router Architectures

Lecture 16: Network Layer Overview, Internet Protocol

100 GBE AND BEYOND. Diagram courtesy of the CFP MSA Brocade Communications Systems, Inc. v /11/21

HIGH PERFORMANCE CACHE ARCHITECTURES FOR IP ROUTING: REPLACEMENT, COMPACTION AND SAMPLING SCHEMES RUIRUI GUO

CSCD 330 Network Programming

Chapter 4: network layer

Where we are in the Course

Network Layer PREPARED BY AHMED ABDEL-RAOUF

Chapter 4 Network Layer: The Data Plane

Chapter 4 Network Layer: The Data Plane

Lecture 11: IPv6. CSE 123: Computer Networks Alex C. Snoeren. HW 2 due NOW

EEC-484/584 Computer Networks

CS 268: Computer Networking

Last time. Wireless link-layer. Introduction. Characteristics of wireless links wireless LANs networking. Cellular Internet access

15-744: Computer Networking. Routers

Topics for Today. Network Layer. Readings. Introduction Addressing Address Resolution. Sections 5.1,

HW3 and Quiz. P14, P24, P26, P27, P28, P31, P37, P43, P46, P55, due at 3:00pm with both soft and hard copies, 11/11/2013 (Monday) TCP), 20 mins

CS 356: Computer Network Architectures. Lecture 14: Switching hardware, IP auxiliary functions, and midterm review. [PD] chapter 3.4.1, 3.2.

IP ROUTING LOOKUP: HARDWARE AND SOFTWARE APPROACH. A Thesis RAVIKUMAR V. CHAKARAVARTHY

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

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

Network Layer Enhancements

ITTC High-Performance Networking The University of Kansas EECS 881 Packet Switch I/O Processing

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

CS419: Computer Networks. Lecture 6: March 7, 2005 Fast Address Lookup:

Chapter 4 Network Layer

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

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

CS 268: Route Lookup and Packet Classification

IP Address Lookup in Hardware for High-Speed Routing

Novel Hardware Architecture for Fast Address Lookups

How to Choose the Best Router Switching Path for Your Network

CSCE 463/612 Networks and Distributed Processing Spring 2018

TOC: Switching & Forwarding

TOC: Switching & Forwarding

Routing Lookup Algorithm for IPv6 using Hash Tables

Computer Network Architectures and Multimedia. Guy Leduc. Chapter 2 MPLS networks. Chapter 2: MPLS

Transcription:

Last Lecture: Network Layer 1. Design goals and issues 2. Basic Routing Algorithms & Protocols 3. Addressing, Fragmentation and reassembly 4. Internet Routing Protocols and Inter-networking 5. Router design 1. Short History + Router Architectures 2. Switching fabrics 3. Address lookup problem 6. Congestion Control, Quality of Service 7. More on the Internet s Network Layer SUNY at Buffalo; CSE 489/589 Modern Networking Concepts; Fall 2010; Instructor: Hung Q. Ngo 1

Last Lecture: Network Layer 1. Design goals and issues 2. Basic Routing Algorithms & Protocols 3. Addressing, Fragmentation and reassembly 4. Internet Routing Protocols and Inter-networking 5. Router design 1. Short History + Router Architectures 2. Switching fabrics 3. Address lookup problem 6. Congestion Control, Quality of Service 7. More on the Internet s Network Layer SUNY at Buffalo; CSE 489/589 Modern Networking Concepts; Fall 2010; Instructor: Hung Q. Ngo 2

Reminder on Router Architecture Header Processing Data Hdr Data Hdr Lookup IP Address Update Header Queue Packet IP Address Next Hop ~1M prefixes Off-chip DRAM Address Table Buffer Memory ~1M packets Off-chip DRAM SUNY at Buffalo; CSE 489/589 Modern Networking Concepts; Fall 2010; Instructor: Hung Q. Ngo 3

Basic Requirements 1) Fast lookup and fast update 2) Scalable (speed & table size) 3) Inexpensive (fit in memory, e.g.) SUNY at Buffalo; CSE 489/589 Modern Networking Concepts; Fall 2010; Instructor: Hung Q. Ngo 4

Lookups Must Be Fast Year Aggregate Linerate 1997 622 Mb/s 1.56 1999 2.5 Gb/s 6.25 2001 10 Gb/s 25 2003 40 Gb/s 100 2006 80 Gb/s 200 Arriving rate of 40B POS packets (Million pkts/ sec) 1. Lookup mechanism must be simple and easy to implement 2. Memory access time is the bottleneck 200Mpps 2 lookups/pkt = 400 Mlookups/sec 2.5ns per lookup SUNY at Buffalo; CSE 489/589 Modern Networking Concepts; Fall 2010; Instructor: Hung Q. Ngo 5

Memory Technologies (2006) Technology Max single chip density $/chip ($/MByte) Access speed Watts/ chip Networking DRAM 64 MB $30-$50 ($0.50-$0.75) 40-80ns 0.5-2W SRAM 8 MB $50-$60 ($5-$8) TCAM 2 MB $200-$250 ($100-$125) 3-4ns 2-3W 4-8ns 15-30W Note: rough estimates only. Manufacturer & technology & market dependent SUNY at Buffalo; CSE 489/589 Modern Networking Concepts; Fall 2010; Instructor: Hung Q. Ngo 6

(Ternary) Content Addressable Memory SUNY at Buffalo; CSE 489/589 Modern Networking Concepts; Fall 2010; Instructor: Hung Q. Ngo 7

Lookup Problem: Protocol Dependent Networking Protocol MPLS, ATM (virtual circuits) Ethernet IPv4, IPv6 (datagram) Lookup Mechanism 1. Exact match search 2. Longestprefix match search Techniques we will study Direct lookup Associative lookup Hashing Binary/Multi-way Search Trie/ Tree - Radix trie and variants - Compressed trie - Binary search on prefix intervals SUNY at Buffalo; CSE 489/589 Modern Networking Concepts; Fall 2010; Instructor: Hung Q. Ngo 8

1. Exact Match Virtual Circuit Reminder VC number 12 1 2 3 22 32 Forwarding table in northwest router: interface number Incoming interface Incoming VC # Outgoing interface Outgoing VC # 1 12 3 22 2 63 1 18 3 7 2 17 1 97 3 87 SUNY at Buffalo; CSE 489/589 Modern Networking Concepts; Fall 2010; Instructor: Hung Q. Ngo 9

Data Address Exact Matches in ATM/MPLS Direct Memory Lookup VCI/MPLS-label Memory (Outgoing Port, new VCI/label) o VCI/Label space is 24 bits Maximum 16M addresses. With 64b data, this is 1Gb of memory. o VCI/Label space is private to one link o Therefore, table size can be negotiated o Alternately, use a level of indirection SUNY at Buffalo; CSE 489/589 Modern Networking Concepts; Fall 2010; Instructor: Hung Q. Ngo 10

Exact Matches in Ethernet Switches Layer-2 addresses are usually 48-bits long, The address is global, not just local to the link, The range/size of the address is not negotiable (like it is with ATM/MPLS) 2 48 262,144 Gig, too large, cannot hold all addresses in table and use direct lookup. SUNY at Buffalo; CSE 489/589 Modern Networking Concepts; Fall 2010; Instructor: Hung Q. Ngo 11

Data Address Address Data Ethernet Switches: Associative Lookups Associative memory (aka Content Addressable Memory, CAM) compares all entries in parallel against incoming data in one clock-cycle Associative Memory ( CAM ) Normal Memory Network address Location Port 48bits Match SUNY at Buffalo; CSE 489/589 Modern Networking Concepts; Fall 2010; Instructor: Hung Q. Ngo 12

Exact Matches: Hashing Memory Memory Network Address 48 Hashing Function Address 16, say Pointer Data Address List/Bucket Data List of network addresses in this bucket Use a pseudo-random hash function (relatively insensitive to actual function) Bucket linearly searched (or could be binary search, etc.) Leads to unpredictable number of memory references SUNY at Buffalo; CSE 489/589 Modern Networking Concepts; Fall 2010; Instructor: Hung Q. Ngo 13

Performance of Lookup With Hashing SUNY at Buffalo; CSE 489/589 Modern Networking Concepts; Fall 2010; Instructor: Hung Q. Ngo 14

Perfect Hash Function Network Address 48 Hashing Function Address 16, say Port Memory Data There always exists a perfect hash function (since # of hosts connected to the switch is 2 16 ) With a perfect hash function, memory lookup always takes O(1) memory references. Problem: - Finding perfect hash functions (particularly a minimal perfect hash) is complex. - Updates make such a hash function yet more complex - Advanced techniques: multiple hash functions, bloom filters SUNY at Buffalo; CSE 489/589 Modern Networking Concepts; Fall 2010; Instructor: Hung Q. Ngo 15

Hashing: Pretty Good Choice for Exact Match Advantages: Simple to implement Expected lookup time is small Updates are fast (except with perfect hash functions) Disadvantages Relatively inefficient use of memory Non-deterministic lookup time (in rare cases) Attractive for software-based switches. However, hardware platforms are moving to other techniques (but they can do well with a more sophisticated form of hashing) SUNY at Buffalo; CSE 489/589 Modern Networking Concepts; Fall 2010; Instructor: Hung Q. Ngo 16

Trees and Tries Binary Search Tree Binary Search Trie < > < > < > log 2 N 0 1 0 1 0 1 N entries 010 111 Lookup time dependent on table size, but independent of address length, storage is O(N), assuming comparisons can be done in O(1)-time Lookup time bounded and independent of table size, storage is O(NW) SUNY at Buffalo; CSE 489/589 Modern Networking Concepts; Fall 2010; Instructor: Hung Q. Ngo 17

Multiway Tries 16-ary Search Trie Ptr=0 means no children 0000, ptr 1111, ptr 0000, 0 1111, ptr 0000, 0 1111, ptr 000011110000 111111111111 Question: Why don t we just make it a 2 48 -ary trie? SUNY at Buffalo; CSE 489/589 Modern Networking Concepts; Fall 2010; Instructor: Hung Q. Ngo 18

Multiway Tries As degree increases, more and more pointers are 0 Table produced from 2 15 randomly generated 48-bit addresses SUNY at Buffalo; CSE 489/589 Modern Networking Concepts; Fall 2010; Instructor: Hung Q. Ngo 19

More on Tries Advantages: Bounded lookup time Simple to implement and update Disadvantages: Inefficient use of memory and/or requires large number of memory references More sophisticated algorithms compress sparse nodes. SUNY at Buffalo; CSE 489/589 Modern Networking Concepts; Fall 2010; Instructor: Hung Q. Ngo 20

2. Longest Prefix Match -- Reminder ISPs-R-Us has a more specific route to Organization 1 Organization 0 200.23.16.0/23 Organization 2 200.23.20.0/23 Organization 7. 200.23.30.0/23. Fly-By-Night-ISP Send me anything with addresses beginning 200.23.16.0/20 Internet Organization 1 200.23.18.0/23 ISPs-R-Us Send me anything with addresses beginning 199.31.0.0/16 or 200.23.18.0/23 Requires routers to do longest prefix match, per packet, every few nanosecond SUNY at Buffalo; CSE 489/589 Modern Networking Concepts; Fall 2010; Instructor: Hung Q. Ngo 21

Example address: 11001111 01011100 00000000 10000111 mask: 11111111 11111111 11111111 11111111" address: 11001111 01011100 00000000 00000000 mask: 11111111 11111111 00000000 00000000" address: 11001111 01011100 00000000 00000000 mask: 11111111 11111111 11100000 00000000" Packet s Destination Address: 11001111 01011100 00000000 10010111 SUNY at Buffalo; CSE 489/589 Modern Networking Concepts; Fall 2010; Instructor: Hung Q. Ngo 22

Longest Prefix Matching (LPM) Is Hard! Arriving packet does not carry network prefix Why? Hence, one needs to search among the space of all prefix lengths; as well as the space of all prefixes of a given length There are many proposed solutions, we ll only talk about a few SUNY at Buffalo; CSE 489/589 Modern Networking Concepts; Fall 2010; Instructor: Hung Q. Ngo 23

Use 32 Exact Matching Algorithms Exact match against prefixes of length 1 Network Address Exact match against prefixes of length 2 Priority Encode and pick Port Exact match against prefixes of length 32 SUNY at Buffalo; CSE 489/589 Modern Networking Concepts; Fall 2010; Instructor: Hung Q. Ngo 24

Objectives Speed (= number of memory accesses) Storage requirements (= amount of memory) Low update time (support >10K updates/s) Scalability With length of prefix: IPv4 unicast (32b), Ethernet (48b), IPv4 multicast (64b), IPv6 unicast (128b) With size of routing table: (sweetspot for today s designs = 1 million) Flexibility in implementation Low preprocessing time SUNY at Buffalo; CSE 489/589 Modern Networking Concepts; Fall 2010; Instructor: Hung Q. Ngo 25

Radix Trie (Recap) A 1 B Trie node next-hop-ptr (if prefix) left-ptr right-ptr P1 111* H1 P2 10* H2 P3 1010* H3 P4 10101 H4 P2 C G 1 0 D 1 1 E 0 0 P1 F Add P5=1110* P3 P5 I Lookup 10111 1 P4 H SUNY at Buffalo; CSE 489/589 Modern Networking Concepts; Fall 2010; Instructor: Hung Q. Ngo 26

Pros and Cons W-bit prefixes: O(W) lookup, O(NW) storage and O(W) update complexity Advantages Simplicity Extensible to wider fields Disadvantages Worst case lookup slow Wastage of storage space in chains SUNY at Buffalo; CSE 489/589 Modern Networking Concepts; Fall 2010; Instructor: Hung Q. Ngo 27

Patricia Tries: Compress the Un-branched A Lookup 10111 1,, 2 0 1 C B 10,P2,4 P1 0 D 1010,P3,5 1 E P4 Path-compressed tree node structure P1 111* H1 P2 10* H2 P3 1010* H3 P4 10101 H4 variable-length bitstring left-ptr next-hop (if prefix present) bit-position right-ptr PATRICIA: Practical Algorithm To Retrieve Information Coded as Alphanumeric SUNY at Buffalo; CSE 489/589 Modern Networking Concepts; Fall 2010; Instructor: Hung Q. Ngo 28

Binary Search on Prefix Intervals [Lampson98] Prefix Interval P1 /0 0000 1111 P2 00/2 0000 0011 P3 1/1 1000 1111 P4 1101/4 1101 1101 P5 001/3 0010 0011 P5 P4 P2 P3 P1 I 1 I 2 I 3 I 4 I 5 I 6 0000 0010 0100 0110 1000 1001 1010 1100 1110 1111 SUNY at Buffalo; CSE 489/589 Modern Networking Concepts; Fall 2010; Instructor: Hung Q. Ngo 29

Alphabetic Tree 0111 > 0001 > 1/2 1/4 0011 1101 > 1/8 I 3 1100 > 1/16 1/32 > I 6 1/32 I 1 I 2 I 4 I 5 P5 P4 P2 P3 P1 I 1 I 2 I 3 I 4 I 5 I 6 0000 0010 0100 0110 1000 1001 1010 1100 1110 1111 SUNY at Buffalo; CSE 489/589 Modern Networking Concepts; Fall 2010; Instructor: Hung Q. Ngo 30

Another Alphabetic Tree 0001 I 1 0011 1/2 I 2 1/4 I 3 1/8 0111 I 4 1/16 1100 I 5 1101 1/32 1/32 SUNY at Buffalo; CSE 489/589 Modern Networking Concepts; Fall 2010; Instructor: Hung Q. Ngo 31 I 6

Multiway Search on Intervals W-bit N prefixes: O(logN) lookup, O(N) storage Advantages Storage is linear Can be balanced Lookup time independent of W Disadvantages But, lookup time is dependent on N Incremental updates more complex than tries Each node is big in size: requires higher memory bandwidth SUNY at Buffalo; CSE 489/589 Modern Networking Concepts; Fall 2010; Instructor: Hung Q. Ngo 32

Rough Comparison Algorithm Build Search Memory (pure) Binary Search O(WN logn) O(Wlog N) O(NW) Trie O(NW) O(W) O(NW) Binary prefix search O(NlogW) O(logW) O(N logw) But, those are not the only practical concerns. Update time, e.g., is important! SUNY at Buffalo; CSE 489/589 Modern Networking Concepts; Fall 2010; Instructor: Hung Q. Ngo 33