Routers Jennifer Rexford Advanced Computer Networks Tuesdays/Thursdays 1:30pm-2:50pm.

Slides:



Advertisements
Similar presentations
Routers Jennifer Rexford Advanced Computer Networks
Advertisements

IP Router Architectures. Outline Basic IP Router Functionalities IP Router Architectures.
CCNA3: Switching Basics and Intermediate Routing v3.0 CISCO NETWORKING ACADEMY PROGRAM Switching Concepts Introduction to Ethernet/802.3 LANs Introduction.
1 o Two issues in practice – Scale – Administrative autonomy o Autonomous system (AS) or region o Intra autonomous system routing protocol o Gateway routers.
1 ELEN 602 Lecture 18 Packet switches Traffic Management.
Router Architecture : Building high-performance routers Ian Pratt
What's inside a router? We have yet to consider the switching function of a router - the actual transfer of datagrams from a router's incoming links to.
Spring 2002CS 4611 Router Construction Outline Switched Fabrics IP Routers Tag Switching.
4-1 Network layer r transport segment from sending to receiving host r on sending side encapsulates segments into datagrams r on rcving side, delivers.
10 - Network Layer. Network layer r transport segment from sending to receiving host r on sending side encapsulates segments into datagrams r on rcving.
EE 122: Router Design Kevin Lai September 25, 2002.
048866: Packet Switch Architectures Dr. Isaac Keslassy Electrical Engineering, Technion Introduction.
Link-State Routing Reading: Sections 4.2 and COS 461: Computer Networks Spring 2010 (MW 3:00-4:20 in COS 105) Michael Freedman
Network Layer4-1 Router Architecture Overview Two key router functions: r run routing algorithms/protocol (RIP, OSPF, BGP) r switching datagrams from incoming.
Chapter 4 Network Layer slides are modified from J. Kurose & K. Ross CPE 400 / 600 Computer Communication Networks Lecture 15.
Router Architectures An overview of router architectures.
Router Architectures An overview of router architectures.
12-1 Last time □ BGP policy □ Broadcast / multicast routing ♦ Spanning trees Source-based, group-shared, center-based ♦ Reverse path forwarding, pruning.
Connecting LANs, Backbone Networks, and Virtual LANs
4: Network Layer4b-1 Router Architecture Overview Two key router functions: r run routing algorithms/protocol (RIP, OSPF, BGP) r switching datagrams from.
Chapter 4 Queuing, Datagrams, and Addressing
Computer Networks Switching Professor Hui Zhang
Jennifer Rexford Princeton University MW 11:00am-12:20pm Programmable Data Planes COS 597E: Software Defined Networking.
Chapter 4 Network Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 All material copyright
LECTURE 9 CT1303 LAN. LAN DEVICES Network: Nodes: Service units: PC Interface processing Modules: it doesn’t generate data, but just it process it and.
G64INC Introduction to Network Communications Ho Sooi Hock Internet Protocol.
1 IP Forwarding Relates to Lab 3. Covers the principles of end-to-end datagram delivery in IP networks.
ATM SWITCHING. SWITCHING A Switch is a network element that transfer packet from Input port to output port. A Switch is a network element that transfer.
CS 1652 The slides are adapted from the publisher’s material All material copyright J.F Kurose and K.W. Ross, All Rights Reserved Jack Lange.
1 John Magee 24 February 2014 CS 280: Network Layer: Virtual Circuits / Datagram Networks and What’s inside a Router? Most slides adapted from Kurose and.
Router Architecture Overview
Link Scheduling & Queuing COS 461: Computer Networks
Advance Computer Networking L-8 Routers Acknowledgments: Lecture slides are from the graduate level Computer Networks course thought by Srinivasan Seshan.
Jennifer Rexford Fall 2014 (TTh 3:00-4:20 in CS 105) COS 561: Advanced Computer Networks Data.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Connecting Devices CORPORATE INSTITUTE OF SCIENCE & TECHNOLOGY, BHOPAL Department of Electronics and.
Forwarding.
NETWORKING FUNDAMENTALS. Network+ Guide to Networks, 4e2.
High-Speed Policy-Based Packet Forwarding Using Efficient Multi-dimensional Range Matching Lakshman and Stiliadis ACM SIGCOMM 98.
Interconnect Networks Basics. Generic parallel/distributed system architecture On-chip interconnects (manycore processor) Off-chip interconnects (clusters.
Rehab AlFallaj.  Network:  Nodes: Service units: PC Interface processing Modules: it doesn’t generate data, but just it process it and do specific task.
1 A quick tutorial on IP Router design Optics and Routing Seminar October 10 th, 2000 Nick McKeown
18-WAN Technologies and Dynamic routing Dr. John P. Abraham Professor UTPA.
Computer Communication and Networking Lecture # 4 by Zainab Malik 1.
Queue Management Mike Freedman COS 461: Computer Networks Lectures: MW 10-10:50am in Architecture N101
Network Layer4-1 Chapter 4 Network Layer All material copyright J.F Kurose and K.W. Ross, All Rights Reserved Computer Networking: A Top Down.
Application Layer 2-1 Chapter 4 Network Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 A.
Network Processing Systems Design
Network layer (addendum) Slides adapted from material by Nick McKeown and Kevin Lai.
Graciela Perera Department of Computer Science and Information Systems Slide 1 of 18 INTRODUCTION NETWORKING CONCEPTS AND ADMINISTRATION CSIS 3723 Graciela.
Chapter 3 Part 3 Switching and Bridging
Chapter 4 Network Layer All material copyright
Instructor Materials Chapter 5: Ethernet
COS 561: Advanced Computer Networks
Queue Management Jennifer Rexford COS 461: Computer Networks
Addressing: Router Design
Chapter 4: Network Layer
Chapter 3 Part 3 Switching and Bridging
CS 1652 The slides are adapted from the publisher’s material
Chapter 4-1 Network layer
What’s “Inside” a Router?
CS 31006: Computer Networks – The Routers
Network Core and QoS.
COS 561: Advanced Computer Networks
EE 122: Lecture 7 Ion Stoica September 18, 2001.
Chapter 4 Network Layer Computer Networking: A Top Down Approach 5th edition. Jim Kurose, Keith Ross Addison-Wesley, April Network Layer.
Chapter 3 Part 3 Switching and Bridging
Data Plane Jennifer Rexford Fall 2018 (TTh 1:30-2:50 in Friend 006)
Programmable Software Switches
Chapter 4: Network Layer
Network Core and QoS.
Presentation transcript:

Routers Jennifer Rexford Advanced Computer Networks Tuesdays/Thursdays 1:30pm-2:50pm

Some Questions What is a router? Can a PC be a router? –How far can it scale? What is done in software vs. hardware? –Trade-offs in speed vs. flexibility What imposes limits on scaling? –Bit rate? Number of IP prefixes? # of line cards? Where should the memory go? –How much memory space should be available?

What is a Router? A computer with… –Multiple interfaces –Implementing routing protocols –Packet forwarding Wide range of variations of routers –Small Linksys device in a home network –Linux-based PC running router software –Million-dollar high-end routers with large chassis … and links –Serial line, Ethernet, WiFi, Packet-over-SONET, …

Fibers Coaxial Cable LinksLine cardsRouters/switches Ethernet card Wireless card Large router Telephone switch Network Components

Routers: Commercial Realities A router is sold as one big box –Cisco, Juniper, Redback, Avici, … –No standard interfaces between components –Cisco switch, Juniper cards, and Avici software? Vendors vs. service providers –Vendors: build the routers and obey standards –Providers: buy the routers and configure them Some movement now away from this –Open source routers on PCs (Quagga, Vyatta, …) –Hardware standards for components (e.g., ATCA) –IETF standards for some APIs (e.g., ForCES) –Vendors opening router platforms to third-party developers

Inside a High-End Router Switching Fabric Processor Line card

Switch Fabric Lookup IP Address Update Header Header Processing Address Table Address Table Lookup IP Address Update Header Header Processing Address Table Address Table Lookup IP Address Update Header Header Processing Address Table Address Table Queue Packet Buffer Memory Buffer Memory Queue Packet Buffer Memory Buffer Memory Queue Packet Buffer Memory Buffer Memory DataHdr DataHdr DataHdr 1 2 N 1 2 N N times line rate

Switch Fabric: Three Design Approaches

Switch Fabric: First Generation Routers Traditional computers with switching under direct control of the CPU Packet copied to the system’s memory Speed limited by the memory bandwidth (two bus crossings per packet) Input Port Output Port Memory System Bus

Switch Fabric: Switching Via a Bus Packet from input port memory to output port memory via a shared bus Bus contention: switching speed limited by bus bandwidth 1 Gbps bus, Cisco 1900: sufficient speed for access and enterprise routers (not regional or backbone)

Switch Fabric: Interconnection Network Banyan networks, other interconnection nets initially created for multiprocessors Advanced design: fragmenting packet into fixed length cells to send through the fabric Cisco 12000: switches Gbps through the interconnection network

Buffer Placement: Output Port Queuing Buffering when the aggregate arrival rate exceeds the output line speed Memory must operate at very high speed

Buffer Placement: Input Port Queuing Fabric slower than input ports combined –So, queuing may occur at input queues Head-of-the-Line (HOL) blocking –Queued packet at the front of the queue prevents others in queue from moving forward

Buffer Placement: Design Trade-offs Output queues –Pro: work-conserving, so maximizes throughput –Con: memory must operate at speed N*R Input queues –Pro: memory can operate at speed R –Con: head-of-line blocking for access to output Work-conserving: output line is always busy when there is a packet in the switch for it Head-of-line blocking: head packet in a FIFO cannot be transmitted, forcing others to wait

Buffer Placement: Virtual Output Queues Hybrid of input and output queuing –Queues located at the inputs –Dedicate FIFO for each output port Input port #1 Switching Fabric Output port #1 Output port #2 Output port #3 Output port #4

Line Cards Interfacing –Physical link –Switching fabric Packet handling –Packet forwarding (FIB) –Packet filtering (ACLs) –Buffer management –Link scheduling –Rate-limiting –Packet marking –Measurement to/from link to/from switch FIB Receive Transmit

Line Cards: Longest-Prefix Match Forwarding Forwarding Information Base in IP routers –Maps each IP prefix to next-hop link(s) Destination-based forwarding –Packet has a destination address –Router identifies longest-matching prefix –Pushing complexity into forwarding decisions / / / / / destination FIB Serial0/0.1 outgoing link

Line Cards: Simplest Algorithm is Too Slow Scan the forwarding table one entry at a time –See if the destination matches the entry –If so, check the size of the mask for the prefix –Keep track of entry with longest-matching prefix Overhead is linear in size of forwarding table –Today, that means ~300,000 entries! –And, the router may have just a few nanoseconds –… before the next packet is arriving Need to be able to keep up with line rate –Better algorithms –Hardware implementations

Line Cards: Patricia Tree Store the prefixes as a tree –One bit for each level of the tree –Some nodes correspond to valid prefixes –... which have next-hop interfaces in a table When a packet arrives –Traverse tree based on the destination address –Stop upon reaching the longest matching prefix * 0* 11*

Line Cards: Even Faster Lookups Patricia tree is faster than linear scan –Proportional to number of bits in the address Patricia tree can be made faster –Can make a k-ary tree E.g., 4-ary tree with four children (00, 01, 10, and 11) –Faster lookup, though requires more space Can use special hardware –Content Addressable Memories (CAMs) –Allows look-ups on a key rather than flat address Huge innovations in the mid-to-late 1990s –After CIDR was introduced (in 1994) –… and longest-prefix match was major bottleneck

Line Cards: Packet Forwarding Evolution Software on the router CPU –Central processor makes forwarding decision –Not scalable to large aggregate throughput Route cache on the line card –Maintain a small FIB cache on each line card –Store (destination, output link) mappings –Cache misses handled by the router CPU Full FIB on each line card –Store the entire FIB on each line card –Apply dedicated hardware for longest-prefix match

Line Cards: Packet Filtering With ACLs “Five tuple” for access control lists (ACLs) –Source and destination IP addresses –TCP/UDP source and destination ports –Protocol (e.g., UDP vs. TCP) Should arriving packet be allowed in? Departing packet let out?

Line Cards: ACL Examples Filter packets based on source address –Customer access link to the service provider –Source address should fall in customer prefix Filter packets based on port number –Block traffic for unwanted applications –Known security vulnerabilities, peer-to-peer, … Block pairs of hosts from communicating –Protect access to special servers –E.g., block the dorms from the grading server

Line Cards: FIFO Link Scheduler First-in first-out scheduling –Simple to implement –But, restrictive in providing predictable performance Example: two kinds of traffic –Audio conferencing needs low delay (e.g., sub 100 msec) – transfers are not that sensitive about delay FIFO mixes all the traffic together – traffic interferes with audio conference traffic

Line Cards: Strict Priority Schedulers Strict priority –Multiple levels of priority –Always transmit high-priority traffic, when present –.. and force the lower priority traffic to wait Isolation for the high-priority traffic –Almost like it has a dedicated link –Except for (small) delay for packet transmission

Line Cards: Weighted Link Schedulers Limitations of strict priority –Lower priority queues may starve for long periods –… even if high-priority traffic can afford to wait Weighted fair scheduling –Assign each queue a fraction of the link bandwidth –Rotate across the queues on a small time scale –Send extra traffic from one queue if others idle 50% red, 25% blue, 25% green

Line Cards: Link Scheduling Trade-Offs FIFO is easy –One queue, trivial scheduler Strict priority is a little harder –One queue per class of traffic, simple scheduler Weighted fair scheduling –One queue per class, and more complex scheduler How many classes? –Gold, silver, bronze traffic? –Per UDP or TCP flow?

Line Cards: Mapping Traffic to Classes Gold traffic –All traffic to/from Shirley Tilgman’s IP address –All traffic to/from the port number for DNS Silver traffic –All traffic to/from academic and administrative buildings Bronze traffic –All traffic on the public wireless network Then, schedule resources accordingly –50% for gold, 30% for silver, and 20% for bronze

Line Cards: Packet Marking Where to classify the packets? –Every hop? –Just at the edge? Division of labor –Edge: classify and mark the packets –Core: schedule packets based on markings Packet marking –Type-of-service bits in the IP packet header

Line Cards: Real Guarantees? It depends… –Must limit volume of traffic marked as gold –E.g., by marking traffic “bronze” by default –E.g., by policing traffic at the edge of the network QoS through network management –Configuring packet classifiers –Configuring policers –Configuring link schedulers Rather than through dynamic circuit set-up –Different approach than virtual circuit networks

Line Cards: Traffic Measurement Measurements are useful for many things –Billing the customer –Engineering the network –Detecting malicious behavior Collecting measurements at line speed –Byte and packet counts on the link –Byte and packet counts per prefix –Packet sampling –Statistics for each TDP or UDP flow More on this later in the course

Route Processor So-called “Loopback” interface –IP address of the CPU on the router Control-plane software –Implementation of the routing protocols –Creation of forwarding table for the line cards Interface to network administrators –Command-line interface for configuration –Transmission of measurement statistics Handling of special data packets –Packets with IP options enabled –Packets with expired Time-To-Live field

Data, Control, and Management Planes Data PlaneControl PlaneManagement Plane TimescalePacket (nsec)Event (10 msec to sec) Human (min to hours) TasksForwarding, buffering, filtering, scheduling Routing, signaling Analysis, configuration LocationLine-card hardware, switch fabric Software on the route processor Humans or scripts

Click Modular Router

Click Motivation Flexibility –Add new features –Enable experimentation Openness –Allow users/researchers to build and extend –(In contrast to most commercial routers) Modularity –Simplify the composition of existing features –Simplify the addition of new features Speed/efficiency –Operation (optionally) in the operating system –Without the user needing to grapple with OS internals

Router as a Graph of Elements Large number of small elements –Each performing a simple packet function –E.g., IP look-up, TTL decrement, buffering Connected together in a graph –Elements inputs/outputs snapped together –Beyond elements in series to a graph –E.g., packet duplication or classification Packet flow as main organizational primitive –Consistent with data-plane operations on a router –(Larger elements needed for, say, control planes)

Click Elements: Push vs. Pull Packet hand-off between elements –Directly inspired by properties of routers –Annotations on packets to carry temporary state Push processing –Initiated by the source end –E.g., when an unsolicited packet arrives (e.g., from a device) Pull processing –Initiated by the destination end –E.g., to control timing of packet processing (e.g., based on a timer or packet scheduler)

Click Language Declarations –Create elements Connections –Connect elements Compound elements –Combine multiple smaller elements, and treat as single, new element to use as a primitive class Language extensions through element classes –Configuration strings for individual elements –Rather than syntactic extensions to the language src :: FromDevice(eth0); ctr :: Counter; sink :: Discard; src -> ctr; ctr -> sink;

Handlers and Control Socket Access points for user interaction –Appear like files in a file system –Can have both read and write handlers Examples –Installing/removing forwarding-table entries –Reporting measurement statistics –Changing a maximum queue length Control socket –Allows other programs to call read/write handlers –Command sent as single line of text to the server –

Example: EtherSwitch Element Ethernet switch –Expects and produces Ethernet frames –Each input/output pair of ports is a LAN –Learning and forwarding switch among these LANs Element properties –Ports: any # of inputs, and same # of outputs –Processing: push Element handlers –Table (read-only): returns port association table –Timeout (read/write): returns/sets TIMEOUT

An Observation… Click is widely used –And the paper on Click is widely cited Click elements are created by others –Enabling an ecosystem of innovation Take-away lesson –Creating useful systems that others can use and extend has big impact in the research community –And brings tremendous professional value –Compensating amply for the time and energy