15-744: Computer Networking L-4 Routers. L -4; 1-28-01© Srinivasan Seshan, 20022 Routing How do routers process IP packets Forwarding lookup algorithms.

Slides:



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

Router/Classifier/Firewall Tables Set of rules—(F,A)  F is a filter Source and destination addresses. Port number and protocol. Time of day.  A is an.
Internetworking II: MPLS, Security, and Traffic Engineering
Delivery and Forwarding of
Introduction to IPv6 Presented by: Minal Mishra. Agenda IP Network Addressing IP Network Addressing Classful IP addressing Classful IP addressing Techniques.
COS 461 Fall 1997 Routing COS 461 Fall 1997 Typical Structure.
Chapter 18 Introduction to Network Layer 18.# 1
NETWORK LAYER (1) T.Najah AlSubaie Kingdom of Saudi Arabia Prince Norah bint Abdul Rahman University College of Computer Since and Information System NET331.
Packet Switching COM1337/3501 Textbook: Computer Networks: A Systems Approach, L. Peterson, B. Davie, Morgan Kaufmann Chapter 3.
15-744: Computer Networking L-3 Addressing/Forwarding.
Spring 2002CS 4611 Router Construction Outline Switched Fabrics IP Routers Tag Switching.
Computer Networking Lecture 8 – IP Addressing and Forwarding.
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.
Oct 26, 2004CS573: Network Protocols and Standards1 IP: Routing and Subnetting Network Protocols and Standards Autumn
Chapter 4 Network Layer slides are modified from J. Kurose & K. Ross CPE 400 / 600 Computer Communication Networks Lecture 14.
10 - Network Layer. Network layer r transport segment from sending to receiving host r on sending side encapsulates segments into datagrams r on rcving.
CS 268: Lectures 13/14 (Route Lookup and Packet Classification) Ion Stoica April 1/3, 2002.
CSE5803 Advanced Internet Protocols and Applications (7) Introduction The IP addressing scheme discussed in Chapter 2 are classful and can be summarised.
CS 268: Route Lookup and Packet Classification Ion Stoica March 11, 2003.
Chapter 10 Introduction to Wide Area Networks Data Communications and Computer Networks: A Business User’s Approach.
Computer Networking Lecture 7 – Bridging, Addressing and Forwarding Copyright ©, Carnegie Mellon University.
CS 268: Route Lookup and Packet Classification
CS 268: Computer Networking L-8 Routers. 2 Forwarding and Routers Forwarding IP lookup High-speed router architecture Readings [McK97] A Fast Switched.
Chapter 19 Binding Protocol Addresses (ARP) Chapter 20 IP Datagrams and Datagram Forwarding.
1 Peter Steenkiste Departments of Computer Science and Electrical and Computer Engineering Networking, Spring 2008
15-744: Computer Networking
Chapter 9 Classification And Forwarding. Outline.
15-744: Computer Networking L-8 Routers. 2 Forwarding and Routers Forwarding IP lookup High-speed router architecture Readings [McK97] A Fast Switched.
Lecture 7 – IP Addressing and Forwarding
CS 6401 Efficient Addressing Outline Addressing Subnetting Supernetting.
Network Layer (3). Node lookup in p2p networks Section in the textbook. In a p2p network, each node may provide some kind of service for other.
Courtesy: Nick McKeown, Stanford More on IP and Packet Forwarding Tahir Azim.
End-to-end resource management in DiffServ Networks –DiffServ focuses on singal domain –Users want end-to-end services –No consensus at this time –Two.
1 IP Forwarding Relates to Lab 3. Covers the principles of end-to-end datagram delivery in IP networks.
Routing protocols Basic Routing Routing Information Protocol (RIP) Open Shortest Path First (OSPF)
Data Communications and Computer Networks Chapter 4 CS 3830 Lecture 18 Omar Meqdadi Department of Computer Science and Software Engineering University.
7-1 Last time □ Wireless link-layer ♦ Introduction Wireless hosts, base stations, wireless links ♦ Characteristics of wireless links Signal strength, interference,
Efficient Addressing Outline Addressing Subnetting Supernetting CS 640.
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.
Chapter 6 Delivery and Forwarding of IP Packets
Computer Networking Lecture 9 – IP Addressing and Forwarding.
CS 640: Introduction to Computer Networks Aditya Akella Lecture 7 - IP: Addressing and Forwarding.
CSC 600 Internetworking with TCP/IP Unit 7: IPv6 (ch. 33) Dr. Cheer-Sun Yang Spring 2001.
Computer Networking Lecture 8 – IP Addressing and Forwarding.
IP1 The Underlying Technologies. What is inside the Internet? Or What are the key underlying technologies that make it work so successfully? –Packet Switching.
High-Speed Policy-Based Packet Forwarding Using Efficient Multi-dimensional Range Matching Lakshman and Stiliadis ACM SIGCOMM 98.
CS 740: Advanced Computer Networks IP Lookup and classification Supplemental material 02/05/2007.
Univ. of TehranComputer Network1 Advanced topics in Computer Networks University of Tehran Dept. of EE and Computer Engineering By: Dr. Nasser Yazdani.
Packet Switch Architectures The following are (sometimes modified and rearranged slides) from an ACM Sigcomm 99 Tutorial by Nick McKeown and Balaji Prabhakar,
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 TehranComputer Network1 Computer Networks Computer Networks (Graduate level) University of Tehran Dept. of EE and Computer Engineering By: Dr.
Computer Networks 0110-IP Gergely Windisch
Routing and the IP v4 Address Space BSAD 141 Dave Novak Sources: Network+ Guide to Networks, Dean 2013.
Advanced Computer Networks
Behrouz A. Forouzan TCP/IP Protocol Suite, 3rd Ed.
Advanced Computer Networks
IP Routers – internal view
CS4470 Computer Networking Protocols
EEC-484/584 Computer Networks
Lecture 8 – Bridging, Addressing and Forwarding
15-744: Computer Networking
Advance Computer Networking
EEC-484/584 Computer Networks
Network Layer I have learned from life no matter how far you go
EEC-484/584 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.
Network Layer: Control/data plane, addressing, routers
Packet Switching Outline Store-and-Forward Switches
Presentation transcript:

15-744: Computer Networking L-4 Routers

L -4; © Srinivasan Seshan, Routing How do routers process IP packets Forwarding lookup algorithms Assigned reading [D+97] Small Forwarding Tables for Fast Routing Lookups

L -4; © Srinivasan Seshan, Forwarding vs. Routing Forwarding: the process of moving packets from input to output The forwarding table Information in the packet Routing: process by which the forwarding table is built and maintained One or more routing protocols Procedures (algorithms) to convert routing info to forwarding table.

L -4; © Srinivasan Seshan, Outline Alternative methods for packet forwarding IP packet routing Variable prefix match Packet classification

L -4; © Srinivasan Seshan, Techniques for Forwarding Packets Source routing Packet carries path Table of virtual circuits Connection routed through network to setup state Packets forwarded using connection state Table of global addresses (IP) Routers keep next hop for destination Packets carry destination address

L -4; © Srinivasan Seshan, Source Routing List entire path in packet Driving directions (north 3 hops, east, etc..) Router processing Examine first step in directions Strip first step from packet Forward to step just stripped off

L -4; © Srinivasan Seshan, Source Routing Example Receiver Packet 3,4,3 Sender R1 R2 R1 4,33 Typically address of next hop used Why is this better than interface #?

L -4; © Srinivasan Seshan, Source Routing Advantages Switches can be very simple and fast Disadvantages Variable (unbounded) header size Sources must know or discover topology (e.g., failures) Typical use Ad-hoc networks (DSR) Machine room networks (Myrinet)

L -4; © Srinivasan Seshan, Virtual Circuits/Tag Switching Connection setup phase Use other means to route setup request Each router allocates flow ID on local link Creates mapping of inbound flow ID/port to outbound flow ID/port Each packet carries connection ID Sent from source with 1 st hop connection ID Router processing Lookup flow ID – simple table lookup Replace flow ID with outgoing flow ID Forward to output port

L -4; © Srinivasan Seshan, Virtual Circuits Examples Receiver Packet 1,5  3,7 Sender ,7  4, ,2  3,6 R1 R2 R1 5726

L -4; © Srinivasan Seshan, Virtual Circuits Advantages More efficient lookup (simple table lookup) More flexible (different path for each flow) Can reserve bandwidth at connection setup Easier for hardware implementations Disadvantages Still need to route connection setup request More complex failure recovery – must recreate connection state Typical uses ATM – combined with fix sized cells MPLS – tag switching for IP networks

L -4; © Srinivasan Seshan, IP Datagrams on Virtual Circuits Challenge – when to setup connections At bootup time – permanent virtual circuits (PVC) Large number of circuits For every packet transmission Connection setup is expensive For every connection What is a connection? How to route connectionless traffic?

L -4; © Srinivasan Seshan, IP Datagrams on Virtual Circuits Traffic pattern Few long lived flows Flow – set of data packets from source to destination Large percentage of packet traffic Improving forwarding performance by using virtual circuits for these flows Other traffic uses normal IP forwarding

L -4; © Srinivasan Seshan, Global Addresses (IP) Each packet has destination address Each switch has forwarding table of destination  next hop At v and x: destination  east At w and y: destination  south At z: destination  north Distributed routing algorithm for calculating forwarding tables

L -4; © Srinivasan Seshan, Global Address Example Receiver Packet R Sender R1 R2 R1 RR R  3 R  4 R  3 R

L -4; © Srinivasan Seshan, Router Table Size One entry for every host on the Internet 100M entries,doubling every year One entry for every LAN Every host on LAN shares prefix Still too many, doubling every year One entry for every organization Every host in organization shares prefix Requires careful address allocation

L -4; © Srinivasan Seshan, Outline Alternative methods for packet forwarding IP packet routing Variable prefix match Packet classification

L -4; © Srinivasan Seshan, Original IP Route Lookup Address classes A: 0 | 7 bit network | 24 bit host (16M each) B: 10 | 14 bit network | 16 bit host (64K) C: 110 | 21 bit network | 8 bit host (255) Address would specify prefix for forwarding table Simple lookup

L -4; © Srinivasan Seshan, Original IP Route Lookup – Example address www.cmu.edu Class B address – class + network is Lookup in forwarding table Prefix – part of address that really matters for routing Forwarding table contains List of class+network entries A few fixed prefix lengths (8/16/24) Large tables 2 Million class C networks

L -4; © Srinivasan Seshan, CIDR Revisited Supernets Assign adjacent net addresses to same org Classless routing (CIDR) How does this help routing table? Combine routing table entries whenever all nodes with same prefix share same hop

L -4; © Srinivasan Seshan, CIDR Example Network provide is allocated 8 class C chunks, to Allocation uses 3 bits of class C space Remaining 21 bits are network number, written as /21 Replaces 8 class C routing entries with 1 combined entry Routing protocols carry prefix with destination network address Longest prefix match for forwarding

L -4; © Srinivasan Seshan, CIDR Illustration Provider is given / / / / /23 Provider

L -4; © Srinivasan Seshan, CIDR Shortcomings Multi-homing Customer selecting a new provider / / / / /23 or Provider 2 address Provider 1Provider 2

L -4; © Srinivasan Seshan, Routing to the Network H2 H3 H4 R / Provider 10.1/ / / /23 R H1 Packet to arrives Path is R2 – R1 – H1 – H2

L -4; © Srinivasan Seshan, Routing Within the Subnet Routing table at R2 H2 H3 H4 R / / / / /23 R H1 DestinationNext HopInterface lo0 Default or 0/0provider / / / Packet to Matches /

L -4; © Srinivasan Seshan, Routing Within the Subnet H2 H3 H4 R / / / / /23 R H1 Routing table at R1 DestinationNext HopInterface lo0 Default or 0/ / / / Packet to Matches /31 Longest prefix match /

L -4; © Srinivasan Seshan, Routing Within the Subnet H2 H3 H4 R / / / / /23 R H1 Routing table at H1 DestinationNext HopInterface lo0 Default or 0/ / / Packet to Direct route Longest prefix match

L -4; © Srinivasan Seshan, Global Addresses Advantages Stateless – simple error recovery Disadvantages Every switch knows about every destination Potentially large tables All packets to destination take same route

L -4; © Srinivasan Seshan, Comparison Source RoutingGlobal Addresses Header SizeWorstOK – Large address Router Table SizeNone Number of hosts (prefixes) Forward OverheadBestPrefix matching Virtual Circuits Best Number of circuits Pretty Good Setup OverheadNone Error RecoveryTell all hostsTell all routers Connection Setup Tell all routers and Tear down circuit and re-route

L -4; © Srinivasan Seshan, How do we set up Routing Tables? Graph theory to compute “shortest path” Switches = nodes Links = edges Delay, hops = cost Need to adapt to changes in topology

L -4; © Srinivasan Seshan, Outline Alternative methods for packet forwarding IP packet routing Variable prefix match Packet classification

L -4; © Srinivasan Seshan, How To Do Variable Prefix Match 128.2/ / / /24 default 0/0 0 Traditional method – Patricia Tree Arrange route entries into a series of bit tests Worst case = 32 bit tests Problem: memory speed is a bottleneck Bit to test – 0 = left child,1 = right child

L -4; © Srinivasan Seshan, Speeding up Prefix Match (P+98) Cut prefix tree at 16 bit depth 64K bit mask Bit = 1 if tree continues below cut (root head) Bit = 1 if leaf at depth 16 or less (genuine head) Bit = 0 if part of range covered by leaf

L -4; © Srinivasan Seshan, Prefix Tree Port 1Port 5Port 7 Port 3 Port 9 Port 5

L -4; © Srinivasan Seshan, Prefix Tree Subtree 1Subtree 2 Subtree 3

L -4; © Srinivasan Seshan, Speeding up Prefix Match (P+98) Each 1 corresponds to either a route or a subtree Keep array of routes/pointers to subtree Need index into array – how to count # of 1s Keep running count to 16bit word in base index + code word (6 bits) Need to count 1s in last 16bit word Clever tricks Subtrees are handled separately

L -4; © Srinivasan Seshan, Speeding up Prefix Match (P+98) Scaling issues How would it handle IPv6 Other possiblities Why were the cuts done at 16/24/32 bits? Improve data structure by shuffling bits

L -4; © Srinivasan Seshan, Speeding up Prefix Match - Alternatives Route caches Temporal locality Many packets to same destination Other algorithms Waldvogel – Sigcomm 97 Binary search on hash tables Works well for larger adresses Bremler-Barr – Sigcomm 99 Clue = prefix length matched at previous hop Why is this useful?

L -4; © Srinivasan Seshan, Speeding up Prefix Match - Alternatives Content addressable memory (CAM) Hardware based route lookup Input = tag, output = value associated with tag Requires exact match with tag Multiple cycles (1 per prefix searched) 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 in CAM

L -4; © Srinivasan Seshan, Outline Alternative methods for packet forwarding IP packet routing Variable prefix match Packet classification

L -4; © Srinivasan Seshan, Packet Classification Typical uses Identify flows for QoS Firewall filtering Requirements Match on multiple fields Strict priority among rules E.g 1. no traffic from * 2. ok traffic on port 80

L -4; © Srinivasan Seshan, Complexity N rules and k header fields for k > 2 O(log N k-1 ) time and O(N) space O(log N) time and O(N k ) space How many rules? Largest for firewalls & similar  1700 Diffserv/QoS  much larger  100k (?)

L -4; © Srinivasan Seshan, Bit Vectors RuleField1Field2 000* 1 01* 210*11* 3 10* Field 1

L -4; © Srinivasan Seshan, Bit Vectors RuleField1Field2 000* 1 01* 210*11* 3 10* Field 2

L -4; © Srinivasan Seshan, Observations [GM99] Common rule sets have important/useful characteristics Packets rarely match more than a few rules (rule intersection) E.g., max of 4 rules seen on common databases up to 1700 rules Special cases for k = 2  source and destination O(log N) time and O(N) space solutions exist

L -4; © Srinivasan Seshan, Aggregating Rules [BV01] Common case: very few 1’s in bit vector  aggregate bits OR together A bits at a time  N/A bit-long vector A typically chosen to match word-size Can be done hierarchically  aggregate the aggregates AND of aggregate bits indicates which groups of A rules have a possible match Hopefully only a few 1’s in AND’ed vector AND of aggregated bit vectors may have false positives Fetch and AND just bit vectors associated with positive entries

L -4; © Srinivasan Seshan, Rearranging Rules [BV01] Problem: false positives may be common Solution: reorder rules to minimize false positives What about the priority order of rules? How to rearrange? Heuristic  sort rules based on single field’s values First sort by prefix length then by value Moves similar rules close together  reduces false positives

L -4; © Srinivasan Seshan, Summary Global addressing matches design objectives of Internet Speed of forwarding lookup/classification of packets is a key challenge for routers Especially high-speed backbone routers CIDR provided more structured routing Good examples of using common case optimization Routing with a clue Classification with few matching rules

L -4; © Srinivasan Seshan, Next Lecture: Routers & Routing High-speed router architecture Intro to routing protocols Assigned reading [P+98] C. Partridge et al., A 50 Gb/s IP Router