Univ. of TehranComputer Network1 Advanced topics in Computer Networks University of Tehran Dept. of EE and Computer Engineering By: Dr. Nasser Yazdani.

Slides:



Advertisements
Similar presentations
IP Router Architectures. Outline Basic IP Router Functionalities IP Router Architectures.
Advertisements

COS 461 Fall 1997 Routing COS 461 Fall 1997 Typical Structure.
A 50-Gb/s IP Router ~2Gb/s per author Presenter: Ashutosh Dhekne PhD student, Computer Science, University of Illinois at Urbana Champaign
Router Architecture : Building high-performance routers Ian Pratt
Nick McKeown CS244 Lecture 6 Packet Switches. What you said The very premise of the paper was a bit of an eye- opener for me, for previously I had never.
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.
CS 268: Lecture 10 Router Design and Packet Lookup Ion Stoica Computer Science Division Department of Electrical Engineering and Computer Sciences University.
CS 268: Router Design Ion Stoica March 1, 2004.
10 - Network Layer. Network layer r transport segment from sending to receiving host r on sending side encapsulates segments into datagrams r on rcving.
15-744: Computer Networking L-5 Intra-Domain Routing.
EE 122: Router Design Kevin Lai September 25, 2002.
CS 268: Lecture 12 (Router Design) Ion Stoica March 18, 2002.
Router Design and Packet Scheduling
Katz, Stoica F04 EECS 122: Introduction to Computer Networks Switch and Router Architectures Computer Science Division Department of Electrical Engineering.
Data Center Networks and Basic Switching Technologies Hakim Weatherspoon Assistant Professor, Dept of Computer Science CS 5413: High Performance Systems.
15-744: Computer Networking
A 50-Gb/s IP Router Authors: Craig Partridge et al. IEEE/ACM TON June 1998 Presenter: Srinivas R. Avasarala CS Dept., Purdue University.
Chapter 9 Classification And Forwarding. Outline.
Router Architectures An overview of router architectures.
Router Architectures An overview of router architectures.
Pipelined Two Step Iterative Matching Algorithms for CIOQ Crossbar Switches Deng Pan and Yuanyuan Yang State University of New York, Stony Brook.
Chapter 4 Queuing, Datagrams, and Addressing
Computer Networks Switching Professor Hui Zhang
A Scalable, Cache-Based Queue Management Subsystem for Network Processors Sailesh Kumar, Patrick Crowley Dept. of Computer Science and Engineering.
Paper Review Building a Robust Software-based Router Using Network Processors.
A 50-Gb/s IP Router 참고논문 : Craig Partridge et al. [ IEEE/ACM ToN, June 1998 ]
TO p. 1 Spring 2006 EE 5304/EETS 7304 Internet Protocols Tom Oh Dept of Electrical Engineering Lecture 9 Routers, switches.
Router Architecture Overview
TELE202 Lecture 5 Packet switching in WAN 1 Lecturer Dr Z. Huang Overview ¥Last Lectures »C programming »Source: ¥This Lecture »Packet switching in Wide.
Advance Computer Networking L-8 Routers Acknowledgments: Lecture slides are from the graduate level Computer Networks course thought by Srinivasan Seshan.
Univ. of TehranAdv. topics in Computer Network1 Advanced topics in Computer Networks University of Tehran Dept. of EE and Computer Engineering By: Dr.
Internetworking Internet: A network among networks, or a network of networks Allows accommodation of multiple network technologies Universal Service Routers.
Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 1 ECSE-6600: Internet Protocols Informal Quiz #14 Shivkumar Kalyanaraman: GOOGLE: “Shiv RPI”
Stress Resistant Scheduling Algorithms for CIOQ Switches Prashanth Pappu Applied Research Laboratory Washington University in St Louis “Stress Resistant.
Univ. of TehranComputer Network1 Computer Networks Computer Networks (Graduate level) University of Tehran Dept. of EE and Computer Engineering By: Dr.
Final Chapter Packet-Switching and Circuit Switching 7.3. Statistical Multiplexing and Packet Switching: Datagrams and Virtual Circuits 4. 4 Time Division.
Efficient Cache Structures of IP Routers to Provide Policy-Based Services Graduate School of Engineering Osaka City University
Forwarding.
1 CSE 5346 Spring Network Simulator Project.
Switching and Router Design
Univ. of TehranComputer Network1 Advanced topics in Computer Networks University of Tehran Dept. of EE and Computer Engineering By: Dr. Nasser Yazdani.
Lecture Note on Switch Architectures. Function of Switch.
1 A quick tutorial on IP Router design Optics and Routing Seminar October 10 th, 2000 Nick McKeown
Data Communications and Computer Networks Chapter 4 CS 3830 Lecture 19 Omar Meqdadi Department of Computer Science and Software Engineering University.
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.
Univ. of TehranIntroduction to Computer Network1 An Introduction to Computer Networks University of Tehran Dept. of EE and Computer Engineering By: Dr.
Univ. of TehranComputer Network1 Computer Networks Computer Networks (Graduate level) University of Tehran Dept. of EE and Computer Engineering By: Dr.
Univ. of TehranComputer Network1 Computer Networks Computer Networks (Graduate level) University of Tehran Dept. of EE and Computer Engineering By: Dr.
Univ. of TehranIntroduction to Computer Network1 An Introduction to Computer Networks University of Tehran Dept. of EE and Computer Engineering By: Dr.
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 4 Network Layer All material copyright
EE 122: Lecture 19 (Asynchronous Transfer Mode - ATM)
CS 268: Lecture 10 Router Design and Packet Lookup
CS 268: Router Design Ion Stoica February 27, 2003.
CS4470 Computer Networking Protocols
Addressing: Router Design
Chapter 4: Network Layer
Chapter 3 Part 3 Switching and Bridging
What’s “Inside” a Router?
Advance Computer Networking
Network Core and QoS.
Data Communication 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
Project proposal: Questions to answer
Chapter 4: Network Layer
Network Core and QoS.
Multiprocessors and Multi-computers
Presentation transcript:

Univ. of TehranComputer Network1 Advanced topics in Computer Networks University of Tehran Dept. of EE and Computer Engineering By: Dr. Nasser Yazdani Lecture 5: Router Design

Univ. of TehranComputer Network2 Routers How do you build a router Assigned reading [P+98] A 50 Gb/s IP Router

Univ. of TehranComputer Network3 IP Router Router implements two main functionalities Forward packet to corresponding output interface, Forwarding engine Manage congestion......

Univ. of TehranComputer Network4 Generic Router Architecture Input and output interfaces are connected through a backplane A backplane can be implemented by Shared memory low capacity routers (e.g., PC-based routers) Shared bus Medium capacity routers Point-to-point (switched) bus High capacity routers input interfaceoutput interface Inter- connection Medium (Backplane)

Univ. of TehranComputer Network5 Speedup C – input/output link capacity R I – maximum rate at which an input interface can send data into backplane R O – maximum rate at which an output can read data from backplane B – maximum aggregate backplane transfer rate Back-plane speedup: B/C Input speedup: R I /C Output speedup: R O /C input interfaceoutput interface Inter- connection Medium (Backplane) C C RIRI RORO B

Univ. of TehranComputer Network6 Function division Line cards Network interface cards Input interfaces: Must perform packet forwarding – Output port May enqueue packets and perform scheduling Output interfaces: May enqueue packets and perform scheduling Forwarding engine Fast path routing (hardware vs. software) Backplane Switch or bus interconnect Network controller Handles routing protocols, error conditions

Univ. of TehranComputer Network7 Three Router Architectures Output queued Input queued Combined Input-Output queued It is the same as switch architecture

Univ. of TehranComputer Network8 Output Queued (OQ) Routers Only output interfaces store packets Advantages Easy to design algorithms: only one congestion point Disadvantages Requires an output speedup of N, where N is the number of interfaces  not feasible input interfaceoutput interface Backplane C RORO

Univ. of TehranComputer Network9 Input Queueing (IQ) Routers Only input interfaces store packets Advantages Easy to built Store packets at inputs if contention at outputs Relatively easy algorithm Only one congestion point, but not output… need to implement backpressure input interfaceoutput interface Backplane C RORO Disadvantages Hard to achieve utilization  1 (due to output contention, head-of-line blocking) However, theoretical and simulation results show that for realistic traffic an input/output speedup of 2 is enough to achieve utilizations close to 1

Univ. of TehranComputer Network10 Combined Input-Output Queueing (CIOQ) Routers Both input and output interfaces store packets Advantages Easy to built Utilization 1 can be achieved with limited input/output speedup (<= 2) Disadvantages Harder to design algorithms Two congestion points Need to design flow control Note: recent results show that with a input/output speedup of 2, a CIOQ can emulate any work- conserving OQ [G+98,SZ98] input interfaceoutput interface Backplane C RORO

Univ. of TehranComputer Network11 Generic Architecture of a High Speed Router Today Combined Input-Output Queued Architecture Input/output speedup <= 2 Input interface Perform packet forwarding (and classification) Output interface Perform packet (classification and) scheduling Backplane Point-to-point (switched) bus; speedup N Schedule packet transfer from input to output

Univ. of TehranComputer Network12 Backplane Point-to-point switch allows to simultaneously transfer a packet between any two disjoint pairs of input-output interfaces Goal: come-up with a schedule that Meet flow QoS requirements Maximize router throughput Challenges: Address head-of-line blocking at inputs Resolve input/output speedups contention Avoid packet dropping at output if possible Note: packets are fragmented in fix sized cells (why?) at inputs and reassembled at outputs In Partridge et al, a cell is 64 B (what are the trade-offs?)

Univ. of TehranComputer Network13 Head-of-line Blocking The cell at the head of an input queue cannot be transferred, thus blocking the following cells Cannot be transferred because output buffer overflow Cannot be transferred because is blocked by red cell Output 1 Output 2 Output 3 Input 1 Input 2 Input 3

Univ. of TehranComputer Network14 Solution to Avoid Head-of-line Blocking Maintain at each input N virtual queues, i.e., one per each output Output 1 Output 2 Output 3 Input 1 Input 2 Input 3

Univ. of TehranComputer Network15 Cell transfer Schedule: Ideally: find the maximum number of input-output pairs: Resolve input/output contentions Avoid packet drops at outputs Packets meet their time constraints (e.g., deadlines), if any Example Assign cell preferences at inputs, e.g., their position in the input queue Assign cell preferences at outputs, e.g., based on packet deadlines, or the order in which cells would depart in a OQ Match inputs and outputs based on their preferences Problem: Achieving a high quality matching complex, i.e., hard to do in constant time

Univ. of TehranComputer Network16 A Case Study [Partridge et al ’98] Goal: show that routers can keep pace with improvements of transmission link bandwidths Architecture A CIOQ router 15 (input/output) line cards: C = 2.4 Gbps Each input card can handle up to 16 (input/output) interfaces Separate forward engines (FEs) to perform routing Backplane: Point-to-point (switched) bus, capacity B = 50 Gbps (32 MPPS) B/C = 20, but 25% of B lost to overhead (control) traffic

Univ. of TehranComputer Network17 Router Architecture packet header

Univ. of TehranComputer Network18 Router Architecture input interfaceoutput interfaces Backplane forward engines Network processor Network processor Data in Data out Control data (e.g., routing) Update routing tables Set scheduling (QoS) state

Univ. of TehranComputer Network19 Data Plane Line cards Input processing: can handle input links up to 2.4 Gbps (3.3 Gbps including overhead) Output processing: use a 52 MHz FPGA; implements QoS Forward engine: 415-MHz DEC Alpha processor, three level cache to store recent routes Up to 12,000 routes in second level cache (96 kB); ~ 95% hit rate Entire routing table in tertiary cache (16 MB divided in two banks)

Univ. of TehranComputer Network20 Control Plane Network processor: 233-MHz Alpha running NetBSD 1.1 Update routing Manage link status Implement reservation Backplane Allocator: implemented by an FPGA Schedule transfers between input/output interfaces

Univ. of TehranComputer Network21 Checksum Takes too much time to verify checksum Requires 17 instructions with min of 14 cycles, Increases forwarding time by 21% Take an optimistic approach: just incrementally update it Safe operation: if checksum was correct it remain correct If checksum bad, it will be anyway caught by end- host Note: IPv6 does not include a header checksum anyway!

Univ. of TehranComputer Network22 Slow Path Processing 1. Headers whose destination misses in the cache 2. Headers with errors 3. Headers with IP options 4. Datagrams that require fragmentation 5. Multicast datagrams  Requires multicast routing which is based on source address and inbound link as well  Requires multiple copies of header to be sent to different line cards

Univ. of TehranComputer Network23 Backplane Allocator Time divided in epochs An epoch consists of 16 ticks of data clock (8 allocation clocks) Transfer unit: 64 B (8 data click ticks) During one epoch, up to 15 simultaneous transfers in an epoch One transfer: two transfer units (128 B of data auxiliary bits) Minimum of 4 epochs to schedule and complete a transfer but scheduling is pipelined. 1. Source card signals that it has data to send to the destination card 2. Switch allocator schedules transfer 3. Source and destination cards are notified and told to configure themselves 4. Transfer takes place Flow control through inhibit pins

Univ. of TehranComputer Network24 The Switch Allocator Card Takes connection requests from function cards Takes inhibit requests from destination cards Computes a transfer configuration for each epoch 15X15 = 225 possible pairings with 15! Patterns

Univ. of TehranComputer Network25 Allocator Algorithm

Univ. of TehranComputer Network26 The Switch Allocator Disadvantages of the simple allocator Unfair: there is a preference for low-numbered sources Requires evaluating 225 positions per epoch, which is too fast for an FPGA Solution to unfairness problem: Random shuffling of sources and destinations Solution to timing problem: Parallel evaluation of multiple locations Priority to requests from forwarding engines over line cards to avoid header contention on line cards

Univ. of TehranComputer Network27 But… Remember that if you want per flow processing the performance need to increase at a faster rate than the link capacity! If link capacity increases by n, two effects: The time to process a packet decreases by n The number of flows increase (by n?), thus the per packet processing also increases

Univ. of TehranComputer Network28 Challenges Build an optimal allocator that makes decisions in constant time Packet classification. Packet scheduling.

Univ. of TehranComputer Network29 Fast path of the code Stage 1: 1. Basic error checking to see if header is from a IP datagram 2. Confirm packet/header lengths are reasonable 3. Confirm that IP header has no options 4. Compute hash offset into route cache and load the route 5. Start loading of next header

Univ. of TehranComputer Network30 Fast path of the code Stage 2 1. Check if cached route matches destination of the datagram 2. If not then do an extended lookup in the route table in Bcache 3. Update TTL and CHECKSUM fields Stage 3 1. Put updated ttl, checksum and the route information into IP hdr along with link layer info from the forwarding table

Univ. of TehranComputer Network31 Some datagrams not handled in fast path 1. Headers whose destination misses in the cache 2. Headers with errors 3. Headers with IP options 4. Datagrams that require fragmentation 5. Multicast datagrams  Requires multicast routing which is based on source address and inbound link as well  Requires multiple copies of header to be sent to different line cards

Univ. of TehranComputer Network32 Instruction set 27% of them do bit, byte or word manipulation due to extraction of various fields from headers The above instructions can only be done in E0, resulting in contention (checksum verifying) Floating point instructions account for 12% but do not have any impact on performance as they only set SNMP values and can be interleaved There is a minimum of loads(6) and stores(4)

Univ. of TehranComputer Network33 Issues in forwarding design Why not use an ASIC in place of the engine ? Since IP protocol is stable, why not do it ? Answer depends on where the router will be deployed: corporate LAN or ISP’s backbone? How effective is a route cache ? A full route lookup is 5 times more expensive than a cache hit. So we need modest hit rates. And modest hit rates seem to be assured because of packet trains

Univ. of TehranComputer Network34 Abstract link layer header Designed to keep the forwarding engine and its code simple

Univ. of TehranComputer Network35 Typical Functions Performed by Input Interface on Data Path Packet forwarding: decide to which output interface to forward each packet based on the information in packet header xxx xxx.xx x 2 ……

Univ. of TehranComputer Network36 Typical Functions Performed by Output Interface Buffer management: decide when and which packet to drop Scheduler: decide when and which packet to transmit 1 2 Scheduler Buffer

Univ. of TehranComputer Network37 Typical Functions Performed by Output Interface Packet classification: map each packet to a predefined flow use to implement more sophisticated services (e.g., QoS) Flow: a subset of packets between any two endpoints in the network 1 2 Scheduler flow 1 flow 2 flow n Classifier Buffer management

Univ. of TehranComputer Network38 Forwarding Engine (P+88) General purpose processor + software 8KB L1 Icache Holds full forwarding code 96KB L2 cache Forwarding table cache 16MB L3 cache Full forwarding table x 2 - double buffered for updates

Univ. of TehranComputer Network39 Forwarding Engine (P+88) Checksum updated but not checked Options handled by network proc Fragmentation handed by network processor Multicast packets are copied on input line card Packet trains help route hit rate Packet train = sequence of packets for same/similar flows

Univ. of TehranComputer Network40 Network Processor Runs routing protocol and downloads forwarding table to forwarding engines Two forwarding tables per engine to allow easy switchover Performs “slow” path processing Handles ICMP error messages Handles IP option processing

Univ. of TehranComputer Network41 Switch Design Issues Have N inputs and M outputs Multiple packets for same output – output contention Switch contention – switch cannot support arbitrary set of transfers Crossbar Bus High clock/transfer rate needed for bus Banyan net Complex scheduling needed to avoid switch contention Solution – buffer packets where needed

Univ. of TehranComputer Network42 Switch Buffering Input buffering Which inputs are processed each slot – schedule? Head of line packets destined for busy output blocks other packets Output buffering Output may receive multiple packets per slot Need speedup proportional to # inputs Internal buffering Head of line blocking Amount of buffering needed

Univ. of TehranComputer Network43 Line Card Interconnect (P+88) Virtual output buffering Maintain per output buffer at input Solves head of line blocking problem Each of MxN input buffer places bid for output Crossbar connect Challenge: map of bids to schedule for crossbar

Univ. of TehranComputer Network44 Switch Scheduling (P+88) Schedule for 128 byte slots Greedy mapping of inputs to outputs Fairness Order of greedy matching permuted randomly Priority given to forwarding engine in schedule (why?) Parallelized Check independent paths simultaneously

Univ. of TehranComputer Network45 Summary: Design Decisions (Innovations) 1. Each FE has a complete set of the routing tables 2. A switched fabric is used instead of the traditional shared bus 3. FEs are on boards distinct from the line cards 4. Use of an abstract link layer header 5. Include QoS processing in the router

Univ. of TehranComputer Network46 Conclusions It is feasible to implement IP routers at very high speeds Today: Input link: 20 Gbps (x 8) Backplane: 1 Tbps (x 20)

Univ. of TehranComputer Network47 Next-lecture: Switch Design Design parameters Different design options Bus architecture Shared memory or output queuing Space division, crossbar Multicasting Reading Dr. Turner notes., Different switching books.