Computer Networks Layering and Routing Dina Katabi

Slides:



Advertisements
Similar presentations
Cs/ee 143 Communication Networks Chapter 5 Routing Text: Walrand & Parakh, 2010 Steven Low CMS, EE, Caltech.
Advertisements

Outline  Recap Network components & basic mechanisms Routing Flow control  Continue Basic queueing analysis Construct routing table.
6.033: Intro to Computer Networks Layering & Routing Dina Katabi & Sam Madden Some slides are contributed by N. McKewon, J. Rexford, I. Stoica.
Network Layer: Internet-Wide Routing & BGP Dina Katabi & Sam Madden.
CS540/TE630 Computer Network Architecture Spring 2009 Tu/Th 10:30am-Noon Sue Moon.
Lecture 9 Overview. Hierarchical Routing scale – with 200 million destinations – can’t store all dests in routing tables! – routing table exchange would.
Path Vector Routing NETE0514 Presented by Dr.Apichan Kanjanavapastit.
© J. Liebeherr, All rights reserved 1 Border Gateway Protocol This lecture is largely based on a BGP tutorial by T. Griffin from AT&T Research.
Fundamentals of Computer Networks ECE 478/578 Lecture #18: Policy-Based Routing Instructor: Loukas Lazos Dept of Electrical and Computer Engineering University.
Courtesy: Nick McKeown, Stanford
1 Interdomain Routing Protocols. 2 Autonomous Systems An autonomous system (AS) is a region of the Internet that is administered by a single entity and.
Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet Protocol –Datagram format.
Dynamic routing Routing Algorithm (Dijkstra / Bellman-Ford) – idealization –All routers are identical –Network is flat. Not true in Practice Hierarchical.
1 Link Layer & Network Layer Some slides are from lectures by Nick Mckeown, Ion Stoica, Frans Kaashoek, Hari Balakrishnan, and Sam Madden Prof. Dina Katabi.
CS 164: Global Internet Slide Set In this set... More about subnets Classless Inter Domain Routing (CIDR) Border Gateway Protocol (BGP) Areas with.
Mini Introduction to BGP Michalis Faloutsos. What Is BGP?  Border Gateway Protocol BGP-4  The de-facto interdomain routing protocol  BGP enables policy.
Computer Networking Lecture 10: Inter-Domain Routing
14 – Inter/Intra-AS Routing
04/05/20011 ecs298k: Routing in General... lecture #2 Dr. S. Felix Wu Computer Science Department University of California, Davis
Routing Algorithms & Routing Protocols  Shortest Path Routing  Flooding  Distance Vector Routing  Link State Routing  Hierarchical Routing  Broadcast.
Interdomain Routing and the Border Gateway Protocol (BGP) Reading: Section COS 461: Computer Networks Spring 2011 Mike Freedman
14 – Inter/Intra-AS Routing Network Layer Hierarchical Routing scale: with > 200 million destinations: can’t store all dest’s in routing tables!
I-4 routing scalability Taekyoung Kwon Some slides are from Geoff Huston, Michalis Faloutsos, Paul Barford, Jim Kurose, Paul Francis, and Jennifer Rexford.
1 Computer Communication & Networks Lecture 22 Network Layer: Delivery, Forwarding, Routing (contd.)
Introduction to BGP.
Network Layer introduction 4.2 virtual circuit and datagram networks 4.3 what’s inside a router 4.4 IP: Internet Protocol  datagram format  IPv4.
1 Interdomain Routing (BGP) By Behzad Akbari Fall 2008 These slides are based on the slides of Ion Stoica (UCB) and Shivkumar (RPI)
CS 3700 Networks and Distributed Systems Inter Domain Routing (It’s all about the Money) Revised 8/20/15.
Routing protocols Basic Routing Routing Information Protocol (RIP) Open Shortest Path First (OSPF)
CS 3830 Day 29 Introduction 1-1. Announcements r Quiz 4 this Friday r Signup to demo prog4 (all group members must be present) r Written homework on chapter.
Jennifer Rexford Fall 2014 (TTh 3:00-4:20 in CS 105) COS 561: Advanced Computer Networks BGP.
Chapter 9. Implementing Scalability Features in Your Internetwork.
Chi-Cheng Lin, Winona State University CS 313 Introduction to Computer Networking & Telecommunication Chapter 5 Network Layer.
David Wetherall Professor of Computer Science & Engineering Introduction to Computer Networks Hierarchical Routing (§5.2.6)
Computer Networking Inter-Domain Routing BGP (Border Gateway Protocol)
More on Internet Routing A large portion of this lecture material comes from BGP tutorial given by Philip Smith from Cisco (ftp://ftp- eng.cisco.com/pfs/seminars/APRICOT2004.
T. S. Eugene Ngeugeneng at cs.rice.edu Rice University1 COMP/ELEC 429/556 Introduction to Computer Networks Inter-domain routing Some slides used with.
Network Layer4-1 Intra-AS Routing r Also known as Interior Gateway Protocols (IGP) r Most common Intra-AS routing protocols: m RIP: Routing Information.
TCOM 509 – Internet Protocols (TCP/IP) Lecture 06_a Routing Protocols: RIP, OSPF, BGP Instructor: Dr. Li-Chuan Chen Date: 10/06/2003 Based in part upon.
CS 4396 Computer Networks Lab BGP. Inter-AS routing in the Internet: (BGP)
ICS 156: Networking Lab Magda El Zarki Professor, ICS UC, Irvine.
Internet Protocols. ICMP ICMP – Internet Control Message Protocol Each ICMP message is encapsulated in an IP packet – Treated like any other datagram,
1 Version 3.1 Module 6 Routed & Routing Protocols.
4: Network Layer4b-1 OSPF (Open Shortest Path First) r “open”: publicly available r Uses Link State algorithm m LS packet dissemination m Topology map.
Transport Layer3-1 Network Layer Every man dies. Not every man really lives.
Routing Algorithms and IP Addressing Routing Algorithms must be ▪ Correctness ▪ Simplicity ▪ Robustness ▪ Stability ▪ Fairness ▪ Optimality.
CS 640: Introduction to Computer Networks Aditya Akella Lecture 11 - Inter-Domain Routing - BGP (Border Gateway Protocol)
1 Agenda for Today’s Lecture The rationale for BGP’s design –What is interdomain routing and why do we need it? –Why does BGP look the way it does? How.
Routing Protocols Brandon Wagner.
1 Chapter 4: Internetworking (IP Routing) Dr. Rocky K. C. Chang 16 March 2004.
Michael Schapira, Princeton University Fall 2010 (TTh 1:30-2:50 in COS 302) COS 561: Advanced Computer Networks
Inter-domain Routing Outline Border Gateway Protocol.
Border Gateway Protocol BGP-4 BGP environment How BGP works BGP information BGP administration.
Border Gateway Protocol. Intra-AS v.s. Inter-AS Intra-AS Inter-AS.
1 CS716 Advanced Computer Networks By Dr. Amir Qayyum.
Dynamic routing Routing Algorithm (Dijkstra / Bellman-Ford) – idealization All routers are identical Network is flat. Not true in Practice Hierarchical.
Border Gateway Protocol
ICMP ICMP – Internet Control Message Protocol
COMP 3270 Computer Networks
BGP supplement Abhigyan Sharma.
THE NETWORK LAYER.
Intra-Domain Routing Jacob Strauss September 14, 2006.
Dynamic routing Routing Algorithm (Dijkstra / Bellman-Ford) – idealization All routers are identical Network is flat. Not true in Practice Hierarchical.
COS 561: Advanced Computer Networks
COS 561: Advanced Computer Networks
COMP/ELEC 429/556 Introduction to Computer Networks
BGP Instability Jennifer Rexford
Computer Networks Protocols
Network Layer: Internet Inter-Domain Routing
Dynamic routing Routing Algorithm (Dijkstra / Bellman-Ford) – idealization All routers are identical Network is flat. Not true in Practice Hierarchical.
Presentation transcript:

Computer Networks Layering and Routing Dina Katabi

The Job of a Router A router has input links and output links A router sends an input packet on the output link leading toward the packet’s destination node A router does not care of who generated the packet Router Destination of black packets Destination of red packets Destination of green packets Router

Link 1, input Link 1, output Link 2, input Link 2, output Link 3, input Link 3, output A A B B C C Router D D How does the router know which output link leads to a packet destination? Packet header has the destination Router looks up the destination in its table to find output link Table is built using a routing protocol Forwarding Table Destination Out-link A out-link 1 B out-link 2 C out-link 3 D out-link 3 to B

Distance Vector Routing Initialize – Distance to self is zero and next hop is self – Distance to anyone else is infinity Announce: Every T seconds – Tell neighbors distances to all destinations Update route to dst. upon message from j – Distance via j = j’s distance + weight of link to j – If distance via j is shorter than current distance, update routing table to go via j

5 Example Objective: Determine the route from (R 1, …, R 7 ) to R 8 that minimizes the distance R5R5 R3R3 R7R7 R6R6 R4R4 R2R2 R1R R8R8

6 Solution is simple by inspection... (in this case) R3R3 R1R1 R5R5 R4R4 R8R8 R6R6 The shortest paths from all sources to a destination (e.g., R 8 ) is the spanning tree routed at that destination. R2R2 R7R

7 Distance Vector Routing R5R5 R3R3 R7R7 R8R8 R6R6 R4R4 R2R2 R1R1 Example Initial State: All routers except R8 set their route length to ∞. R8 sets its route length to 0. 0

8 R5R5 R3R3 R7R7 R8R8 R6R6 R4R4 R2R2 R1R R1R1 Inf R2R2 R3R3 4, R 8 R4R4 Inf R5R5 2, R 8 R6R6 R7R7 3, R  Every T seconds, Router i tells its neighbors about its current lowest-cost path to R8  Each router updates its distance as min(current distance, received distance + link weight) Note, routing tables have both the next-hop and the distance Distance Vector Routing Example

9 R5R5 R3R3 R7R7 R8R8 R6R6 R4R4 R2R2 R1R R1R1 6, R3 R2R2 4, R5 R3R3 4, R 8 R4R4 6, R7 R5R5 2, R 8 R6R6 R7R7 3, R Repeat until no distance change Distance Vector Routing Example

10 R5R5 R3R3 R7R7 R8R8 R6R6 R4R4 R2R2 R1R R1R1 6, R3 R2R2 4, R5 R3R3 4, R 8 R4R4 6, R7 R5R5 2, R 8 R6R6 R7R7 3, R R5R5 R3R3 R7R7 R8R8 R6R6 R4R4 R2R2 R1R R1R1 6, R3 R2R2 4, R5 R3R3 4, R 8 R4R4 5, R2 R5R5 2, R 8 R6R6 R7R7 3, R Solution Distance Vector Routing Example

Requirements of Internet-Wide Routing Scalability – Small routing tables: Cannot have an entry per machine  causes large look up delay – Small message overhead and fast convergence: A link going up or down should not cause routing messages to spread to the whole Internet Policy-compliant – Shortest path is not the only metric; Internet Service Providers (ISPs) want to maximize revenues! Distance Vector however cannot scale to the whole Internet

Scaling Routing to the Internet The Internet is a network of Domains of Autonomous Systems (ASs) – E.g., MIT, AT&T, Stanford, … Internally, each AS runs its own routing protocol (e.g., Distance Vector)  Autonomy Across ASs, we run a different routing protocol (called BGP) AT&T MIT Sprint Interior router Border router

Idea for Scaling Need less information with increasing distance to destination  Hierarchical Routing and Addressing

Hierarchical Addressing Each IP address is 4 bytes, e.g., The IP address space is divided into segments of contiguous chunk of addresses; each such segment is described by a prefix. A prefix is of the form x/y where x is the prefix of all addresses in the segment, and y is the length of the segment in bits e.g. the prefix 128.9/16 represents the segment containing addresses in the range: … / /19 18/

Hierarchical Address Allocation Addresses that start with same prefix are co-located – E.g., all addresses that start with prefix 18/8 are in MIT Entries in the routing/forwarding table are for IP prefixes  shorter routing tables

Hierarchical Addressing Forwarding tables in Berkeley can have one entry for all MIT’s machines. E.g., (18/8, output-link) Forwarding tables in Mechanical Engineering have one entry for all machines in EECS But, a switch on the 9 th floor subnet knows about all machines on its subnet MIT 18/8 EECS 18.26/16 Mechanical 18.17/16 Dorms 18.0/16 CSAIL /17 9 th Floor in CSAIL /24

Longest Prefix Match A Router forwards a packet according to the entry in the forwarding table that has the longest matching prefix Link 1, output Link 2, output Link 3, output Router Forwarding Table Destination Out-link 18/8 out-link /16 out-link /24 out-link 3 Dst = /16 out-link 2

Hierarchical addressing and routing give us scalability Still need to tackle policies

Inter-AS Relationship: Transit vs. Peering AS-3 AS-2 AS-1 Transit ($) Transit ($$$) Transit ($$) Peering (no money) Transit ($$) Transit ($$$) Transit relationship One AS is a customer of the other AS, who is the provider; customer pays provider both for sending and receiving packets Peering relationship Two ASs forward packets for each other without exchanging money

Policy-Based Routing Main Rule: – An AS does not accept transit traffic unless it makes money of it Rule translates into incoming and outgoing routing policies

Desirable Incoming Policies AS-3 AS-2 AS-1 Transit Peering Transit AS-2 likes AS-3 to use the peering link to exchange traffic between their customers  saves money because it bypasses AS-1 But, AS-2 does not want to forward traffic between AS-3 and AS-4 because this makes AS-2 pay AS-1 for traffic that does not benefit its own customers AS-4 Transit

How Does AS-2 Control Incoming Traffic? AS-3 AS-2 AS-1 Transit Peering Transit AS-2 advertises to AS-3 a route to its customer’s IP prefix AS-2 does not tell AS-3 that it has a route to AS-4, i.e., it does not tell AS-3 routes to non-customers IP-prefixes AS-4 Transit Know a route to “A” “A” Traffic to “A” Traffic to AS-4

Desirable Outgoing Policies AS-3 AS-2 AS-1 Transit Peering Transit AS-2 prefers to send traffic to “A” via its customer AS-5 rather than its provider or peer despite path being longer Transit “A” AS-5 Transit

How Does AS-2 Control Outgoing Traffic? AS-3 AS-2 AS-1 Transit Peering Transit AS-1, AS-3, and AS-4 advertise their routes to “A” to AS-2 But AS-2 uses only AS- 5’s route (i.e., it inserts AS-5’s route and the corresponding output link into its forwarding table) Transit “A” AS-5 Transit

BGP: Border Gateway Protocol 1.Advertize whole path – Loop detection  an AS checks for its own AS number in advertisement and rejects route if it has its own AS number 2.Incremental updates – AS sends routing updates only when its preferred route changes (Messages are reliably delivered using TCP) – Two types of update messages: advertisements, e.g., “P:{AS-20, AS-6}” and withdrawals “withdraw P” AS-20 AS-2 AS-6 P P:{AS-6}P:{AS-20, AS-6}

Enforcing Policies (i.e., making money) Using BGP Route Export: controls incoming traffic AS advertises its customers (and internal prefixes) to all neighbors AS advertises all routes it uses to its customers (and internally) Route Import: controls outgoing traffic For each dest. prefix, AS picks its preferred route from those in its routing table as follows: – Prefer route from Customer > Peer > Provider – Then, prefer route with shorter AS-Path

BGP Filter Imported routes, and update Routing table Pick Preferred Route for forwarding Advertise preferred route according to policy Update from neighbor AS Send Update to neighbors

BGP Update Message Processing When AS receives an advertisement, For each destination prefix, – Learn paths from neighbors – Ignore loopy paths and keep the rest in your routing table – Order paths according to AS preferences Customers > peers > providers Path with shorter AS hops are preferred to longer paths – Insert the most preferred path into your forwarding table – Advertise the most preferred path to a neighbor according to policies When AS receives a withdrawal  If withdrawn path not used/preferred, remove from routing table  If withdrawn path is used –i.e., preferred Remove the path from forwarding table and routing table insert the next preferred path from the routing table into forwarding table For each neighbor decide whether to tell him about the new path based on policies If yes, advertise the new path which implicitly withdraws the old path for the corresponding prefix If no, withdraw old path

Summary Hierarchical addressing and hierarchical routing improve scalability Inter-domain routing is policy-based not shortest path – An AS forwards transit traffic only if it makes money from it BGP is a path vector routing algorithm that implements policy-based routing