Router Design Nick Feamster CS 7260 January 24
- Slides: 46
Router Design Nick Feamster CS 7260 January 24, 2007
Today’s Lecture • The design of big, fast routers • Partridge et al. , A 50 Gb/s IP Router • Design constraints – Speed – Size – Power consumption • Components • Algorithms – Lookups and packet processing (classification, etc. ) – Packet queueing – Switch arbitration 2
What’s In A Router • Interfaces – Input/output of packets • Switching fabric – Moving packets from input to output • Software – – Routing Packet processing Scheduling Etc. 3
What a Router Chassis Looks Like Cisco CRS-1 Juniper M 320 19” 6 ft 17” Capacity: 1. 2 Tb/s Power: 10. 4 k. W Weight: 0. 5 Ton Cost: $500 k 3 ft 2 ft Capacity: 320 Gb/s Power: 3. 1 k. W 2 ft 4
What a Router Line Card Looks Like 1 -Port OC 48 (2. 5 Gb/s) (for Juniper M 40) 4 -Port 10 Gig. E (for Cisco CRS-1) 10 in 2 in Power: about 150 Watts 21 in 5
Big, Fast Routers: Why Bother? • Faster link bandwidths • Increasing demands • Larger network size (hosts, routers, users) 6
Summary of Routing Functionality • • • Router gets packet Looks at packet header for destination Looks up routing table for output interface Modifies header (ttl, IP header checksum) Passes packet to output interface 7
Generic Router Architecture Header Processing Data Hdr Lookup Update IP Address Header IP Address 1 M prefixes Off-chip DRAM Queue Packet Data Hdr Next Hop Address Table Buffer Memory Question: What is the difference between this architecture and that in today’s paper? 1 M packets Off-chip DRAM 8
Innovation #1: Each Line Card Has the Routing Tables • Prevents central table from becoming a bottleneck at high speeds • Complication: Must update forwarding tables on the fly. – How does the BBN router update tables without slowing the forwarding engines? 9
Generic Router Architecture Data Hdr Header Processing Lookup IP Address Buffer Manager Update Header Hdr Header Processing Lookup IP Address Hdr Interconnection Fabric Header Processing Lookup IP Address Table Buffer Manager Update Header Address Table Data Hdr Buffer Memory Address Table Data Update Header Buffer Data Memory. Hdr Buffer Manager Buffer Memory 10
First Generation Routers Off-chip Buffer Shared Bus CPU CP M Route Table Buffer Memory Li n U Inte e rfa ce em or y Line Interface MAC MAC Typically <0. 5 Gb/s aggregate capacity 11
Second Generation Routers CPU Route Table Buffer Memory Line Card Buffer Memory Fwding Cache MAC MAC Typically <5 Gb/s aggregate capacity 12
Third Generation Routers “Crossbar”: Switched Backplane Li CPInt ne Uerf ac e M em or y Line Card CPU Card Line Card Local Buffer Memory Routing Table Local Buffer Memory Fwding Table MAC Typically <50 Gb/s aggregate capacity 13
Innovation #2: Switched Backplane • Every input port has a connection to every output port • During each timeslot, each input connected to zero or one outputs • Advantage: Exploits parallelism • Disadvantage: Need scheduling algorithm 14
Other Goal: Utilization • “ 100% Throughput”: no packets experience head-of-line blocking • Does the previous scheme achieve 100% throughput? • What if the crossbar could have a “speedup”? Key result: Given a crossbar with 2 x speedup, any maximal matching can achieve 100% throughput. 15
Head-of-Line Blocking Problem: The packet at the front of the queue experiences contention for the output queue, blocking all packets behind it. Input 1 Output 1 Input 2 Output 2 Input 3 Output 3 Maximum throughput in such a switch: 2 – sqrt(2) 16
Combined Input-Output Queueing • Advantages – Easy to build • 100% can be achieved with limited speedup input interfaces output interfaces Crossbar • Disadvantages – Harder to design algorithms • Two congestion points • Flow control at destination 17
Solution: Virtual Output Queues • Maintain N virtual queues at each input – one per output Input 1 Input 2 Output 1 Output 2 Output 3 Input 3 18
Router Components and Functions • Route processor – Routing – Installing forwarding tables – Management • Line cards – Packet processing and classification – Packet forwarding • Switched bus (“Crossbar”) – Scheduling 19
Crossbar Switching • Conceptually: N inputs, N outputs – Actually, inputs are also outputs • In each timeslot, one-to-one mapping between inputs and outputs. • Goal: Maximal matching Traffic Demands Bipartite Match L 11(n) Maximum Weight Match LN 1(n) 20
Early Crossbar Scheduling Algorithm • Wavefront algorithm Problems: Fairness, speed, … 21
Alternatives to the Wavefront Scheduler • PIM: Parallel Iterative Matching – Request: Each input sends requests to all outputs for which it has packets – Grant: Output selects an input at random and grants – Accept: Input selects from its received grants • Problem: Matching may not be maximal • Solution: Run several times • Problem: Matching may not be “fair” • Solution: Grant/accept in round robin instead of random 22
Processing: Fast Path vs. Slow Path • Optimize for common case – BBN router: 85 instructions for fast-path code – Fits entirely in L 1 cache • Non-common cases handled on slow path – – – Route cache misses Errors (e. g. , ICMP time exceeded) IP options Fragmented packets Mullticast packets 23
Recent Trends: Programmability • Net. FPGA: 4 -port interface card, plugs into PCI bus (Stanford) – Customizable forwarding – Appearance of many virtual interfaces (with VLAN tags) • Programmability with Network processors (Washington U. ) PEs Switch Line Cards 24
Scheduling and Fairness • What is an appropriate definition of fairness? – One notion: Max-min fairness – Disadvantage: Compromises throughput • Max-min fairness gives priority to low data rates/small values • Is it guaranteed to exist? • Is it unique? 25
Max-Min Fairness • A flow rate x is max-min fair if any rate x cannot be increased without decreasing some y which is smaller than or equal to x. • How to share equally with different resource demands – small users will get all they want – large users will evenly split the rest • More formally, perform this procedure: – resource allocated to customers in order of increasing demand – no customer receives more than requested – customers with unsatisfied demands split the remaining resource 26
Example • Demands: 2, 2. 6, 4, 5; capacity: 10 – 10/4 = 2. 5 – Problem: 1 st user needs only 2; excess of 0. 5, • Distribute among 3, so 0. 5/3=0. 167 – now we have allocs of [2, 2. 67, 2. 67], – leaving an excess of 0. 07 for cust #2 – divide that in two, gets [2, 2. 6, 2. 7] • Maximizes the minimum share to each customer whose demand is not fully serviced 27
How to Achieve Max-Min Fairness • Take 1: Round-Robin – Problem: Packets may have different sizes • Take 2: Bit-by-Bit Round Robin – Problem: Feasibility • Take 3: Fair Queuing – Service packets according to soonest “finishing time” Adding Qo. S: Add weights to the queues… 28
Why Qo. S? • Internet currently provides one single class of “best-effort” service – No assurances about delivery • Existing applications are elastic – Tolerate delays and losses – Can adapt to congestion • Future “real-time” applications may be inelastic 29
IP Address Lookup Challenges: 1. Longest-prefix match (not exact). 2. Tables are large and growing. 3. Lookups must be fast. 30
IP Lookups find Longest Prefixes 128. 9. 176. 0/24 128. 9. 16. 0/21 128. 9. 172. 0/21 65. 0. 0. 0/8 0 128. 9. 0. 0/16 128. 9. 16. 14 142. 12. 0. 0/19 232 -1 Routing lookup: Find the longest matching prefix (aka the most specific route) among all prefixes that match the destination address. 31
IP Address Lookup Challenges: 1. Longest-prefix match (not exact). 2. Tables are large and growing. 3. Lookups must be fast. 32
Address Tables are Large 33
IP Address Lookup Challenges: 1. Longest-prefix match (not exact). 2. Tables are large and growing. 3. Lookups must be fast. 34
Lookups Must be Fast Year Line 40 B packets (Mpkt/s) 1997 622 Mb/s 1. 94 OC-12 1999 2. 5 Gb/s 7. 81 OC-48 2001 10 Gb/s 31. 25 OC-192 2003 40 Gb/s 125 OC-768 Cisco CRS-1 1 -Port OC-768 C (Line rate: 42. 1 Gb/s) Still pretty rare outside of research networks 35
IP Address Lookup: Binary Tries 0 1 f d e g h i abc Example Prefixes: a) 00001 b) 00010 c) 00011 d) 001 e) 0101 f) 011 g) 100 h) 1010 i) 1100 j) 11110000 j 36
IP Address Lookup: Patricia Trie 0 f d e abc 1 g h i Example Prefixes a) 00001 b) 00010 c) 00011 d) 001 e) 0101 j f) 011 Skip 5 g) 1000 h) 1010 i) 1100 j) 11110000 Problem: Lots of (slow) memory lookups 37
Address Lookup: Direct Trie 0000…… 0000 24 bits 0 1111…… 1111 224 -1 8 bits 0 28 -1 • When pipelined, one lookup per memory access • Inefficient use of memory 38
Faster LPM: Alternatives • Content addressable memory (CAM) – Hardware-based route lookup – Input = tag, output = value – Requires exact match with tag • Multiple cycles (1 per prefix) with single CAM • Multiple CAMs (1 per prefix) searched in parallel – Ternary CAM • (0, 1, don’t care) values in tag match • Priority (i. e. , longest prefix) by order of entries Historically, this approach has not been very economical. 39
Faster Lookup: Alternatives • Caching – Packet trains exhibit temporal locality – Many packets to same destination • Cisco Express Forwarding 40
IP Address Lookup: Summary • Lookup limited by memory bandwidth. • Lookup uses high-degree trie. • State of the art: 10 Gb/s line rate. • Scales to: 40 Gb/s line rate. 41
Fourth-Generation: Collapse the POP High Reliability and Scalability enable “vertical” POP simplification Reduces Cap. Ex, Operational cost Increases network stability 42
Fourth-Generation Routers Switch Limit today ~2. 5 Tb/s Ø Electronics Ø Scheduler scales <2 x every 18 months Ø Opto-electronic. Linecards conversion 43
Multi-rack routers Linecard WAN Switch fabric In Out WAN In Out 44
Future: 100 Tb/s Optical Router Optical Switch ic n o r ct rd #1 e l E eca n i L 60 - s 1 ion sing Gb/ t a in ces 320 rm o /s b G 0 16 e te et pr ring n i • L pack buffe • IP cket a • P Request 160 320 Gb/ s Ele c Lin tronic eca rd # 625 • Li n • IP e term • Pa packe inatio n t cke t bu proces ffer s ing Arbitration Grant 40 Gb/s (100 Tb/s = 625 * 160 Gb/s) Mc. Keown et al. , Scaling Internet Routers Using Optics, ACM SIGCOMM 2003 45
Challenges with Optical Switching • • Missequenced packets Pathological traffic patterns Rapidly configuring switch fabric Failing components 46
- Nick cates design
- He was born in salzburg austria on january 27 1756
- Zodiac for january 20
- January 4 1643
- January february march april may
- January february maruary
- January 2006 chemistry regents answers
- Nysedregents
- Nysedregents chemistry
- Life of a plant poem by risa jordan
- Ib history ia grade boundaries
- January character trait
- Paula hurlock birthday
- January 27 1756
- Mozart was born in 1756
- January february spelling
- What is the theme for the month of january
- 1995 january 23 nasa
- January 24, 1848
- 2003 new deal dbq
- 1995 january 23 nasa
- 25 january 1759
- An asset was purchased for $120 000 on january 1
- Meridel lesueur new masses january 1932
- 1st january 2018
- Elephant how many syllables
- Lipsume
- Blackberry devices working on january
- January comes before
- January 19, 1809
- When was edgar allan poe born
- January 10th 1776
- Spatial january
- Hello how are you peter weatherall
- I have a present
- December november october
- January 31 2006
- January march april may june july august
- Fac3704
- January 2012
- Mozart birth
- January 13 2006 calendar
- Arvod cannot find work as a mall santa in january.
- 15 janvier 1929
- King naci
- January 29 2015
- Sunday, tuesday, january, saturday