Intra-Domain Routing 6.829 Jacob Strauss September 14, 2006.

Slides:



Advertisements
Similar presentations
CSCI-1680 Network Layer: Intra-domain Routing Based partly on lecture notes by David Mazières, Phil Levis, John Jannotti Rodrigo Fonseca.
Advertisements

Cs/ee 143 Communication Networks Chapter 5 Routing Text: Walrand & Parakh, 2010 Steven Low CMS, EE, Caltech.
4/12/2015© 2009 Raymond P. Jefferis IIILect Internet Protocol - Continued.
CSE 561 – Bridging and Routing David Wetherall Spring 2000.
Outline  Recap Network components & basic mechanisms Routing Flow control  Continue Basic queueing analysis Construct routing table.
Courtesy: Nick McKeown, Stanford
Routing So how does the network layer do its business?
CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 22 Introduction to Computer Networks.
Chapter 4 Distance Vector Problems, and Link-State Routing Professor Rick Han University of Colorado at Boulder
1 Computer Networks Routing Algorithms. 2 IP Packet Delivery Two Processes are required to accomplish IP packet delivery: –Routing discovering and selecting.
CSE 461: Link State Routing. Link State Routing  Same assumptions/goals, but different idea than DV:  Tell all routers the topology and have each compute.
1 LAN switching and Bridges Relates to Lab 6. Covers interconnection devices (at different layers) and the difference between LAN switching (bridging)
Computer Networks Layering and Routing Dina Katabi
Routing Concepts Warren Toomey GCIT. Introduction Switches need to know the link address and location of every station. Doesn't scale well, e.g. to several.
1 Computer Communication & Networks Lecture 22 Network Layer: Delivery, Forwarding, Routing (contd.)
CS551: Unicast Routing Christos Papadopoulos (
Network Layer r Introduction r Datagram networks r IP: Internet Protocol m Datagram format m IPv4 addressing m ICMP r What’s inside a router r Routing.
Packet-Switching Networks Routing in Packet Networks.
Routing protocols Basic Routing Routing Information Protocol (RIP) Open Shortest Path First (OSPF)
Network and Communications Ju Wang Chapter 5 Routing Algorithm Adopted from Choi’s notes Virginia Commonwealth University.
Network Layer4-1 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.3 What’s inside a router r 4.4 IP: Internet.
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 11 Unicast Routing Protocols.
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.
Routing and Routing Protocols
1 Version 3.1 Module 6 Routed & Routing Protocols.
Routing protocols. 1.Introduction A routing protocol is the communication used between routers. A routing protocol allows routers to share information.
Routing Algorithms and IP Addressing Routing Algorithms must be ▪ Correctness ▪ Simplicity ▪ Robustness ▪ Stability ▪ Fairness ▪ Optimality.
Computer Networks22-1 Network Layer Delivery, Forwarding, and Routing.
Ch 22. Routing Direct and Indirect Delivery.
Spring 2000CS 4611 Routing Outline Algorithms Scalability.
1 Chapter 4: Internetworking (IP Routing) Dr. Rocky K. C. Chang 16 March 2004.
Spring Routing: Part I Section 4.2 Outline Algorithms Scalability.
CS 6401 Intra-domain Routing Outline Introduction to Routing Distance Vector Algorithm.
1 LAN switching and Bridges Relates to Lab Outline Interconnection devices Bridges/LAN switches vs. Routers Bridges Learning Bridges Transparent.
4. Interconnecting Networks: Routers. © Tallal Elshabrawy 2 Bridges Vs Routers BRIDGES DO WELL IN SMALL (FEW HUNDRED HOSTS) WHILE ROUTERS USED IN LARGE.
Chapter 7 Packet-Switching Networks Shortest Path Routing.
IP tutorial - #2 Routing KAIST Dept. of CS NC Lab.
Dynamic routing Routing Algorithm (Dijkstra / Bellman-Ford) – idealization All routers are identical Network is flat. Not true in Practice Hierarchical.
Network Layer Routing Networks: Routing.
The network layer: routing
CS 5565 Network Architecture and Protocols
Routing Jennifer Rexford.
Routing: Link State Algorithm
CSE390 – Advanced Computer Networks
COMP 3270 Computer Networks
Network Layer Introduction Datagram networks IP: Internet Protocol
Routing: Distance Vector Algorithm
Dynamic routing Routing Algorithm (Dijkstra / Bellman-Ford) – idealization All routers are identical Network is flat. Not true in Practice Hierarchical.
Routing.
Chapter 5: Dynamic Routing
Dan LI CS Department, Tsinghua University
Routing in Packet Networks Shortest Path Routing
CS 4700 / CS 5700 Network Fundamentals
Routing Protocols (RIP, OSPF, BGP).
CS 3700 Networks and Distributed Systems
Intradomain Routing Outline Introduction to Routing
CS 640: Introduction to Computer Networks
Chapter 7 Packet-Switching Networks
Communication Networks NETW 501
CS 3700 Networks and Distributed Systems
Network Layer Routing Networks: Routing.
Computer Networking Lecture 10: Intra-Domain Routing
Communication Networks
Network Layer (contd.) Routing
EE 122: Intra-domain routing: Distance Vector
Communication Networks
Routing.
CSE 461: Link State Routing
Dynamic routing Routing Algorithm (Dijkstra / Bellman-Ford) – idealization All routers are identical Network is flat. Not true in Practice Hierarchical.
Network Layer Routing.
Presentation transcript:

Intra-Domain Routing 6.829 Jacob Strauss September 14, 2006

Review: Learning Bridges (Switches) Bridge builds a forwarding table Destination -> Output port Learned from incoming packets Forwarding: For every packet, we need to look up the output port toward its destination If address not found or broadcast flood to all but input port Update forwarding table Loop Avoidance Elect a root Bridge Construct Spanning Tree to root B S2 S1 1 2 Switch C 3 G F Destination Port A 1 B 2 C 1 D 2 F 3 G 3

Learning Bridge Scaling Problems Forwarding entry per destination Large tables Floods for unknown destinations Cannot mix physical network types Inefficient Routes Concentrates traffic at a few switches Not shortest path Okay for short paths, not for long Cannot use redundancy B S2 S1 1 2 Switch C 3 G F Destination Port A 1 B 2 C 1 D 2 F 3 G 3

Bridge Scaling Problems Seattle Connect buildings in different cities with direct links: Boston Chicago San Francisco Suppose Chicago is the Root Switch: Which links are used? Atlanta

Bridge Scaling Problems All packets go through Chicago switch -- not shortest path Seattle Boston Chicago San Francisco Atlanta

Add a layer over Ethernet: IP & Routing Add a new protocol over physical layer No longer tied to Ethernet Hierarchal Addressing All addresses in Boston start with 18.1.x.x Chicago start with 18.2.x.x Forwarding tables stay small with fewer updates Separate Routing from Forwarding Routing is finding the path Forwarding is action of sending the packet to the next-hop toward its destination Each router has a forwarding table Forwarding tables are created by a routing protocol D G C B A E R2 R3 R1 Router Destination Next-hop Input ports A -- C R1 D R2 E R3 G R3

Picture of the Internet Interior router Border router AS-1 AS-3 AS-2 Internet: A collection of Autonomous Systems (AS) Defined by control, not geography Routing: Intra-Domain Routing (this lecture) Inter-Domain Routing (BGP: next lecture)

Factors Affecting Routing Routing algorithms view the network as a graph Intra-domain routing: nodes are routers Inter-domain routing: nodes are ASes Problem: find lowest cost path between two nodes (Shortest Path) Factors Semi-dynamic topology (deal with link failures) Dynamic load Policy Examples of link cost: Distance, load, price, congestion/delay, … A 6 1 3 2 F 1 E B 4 1 9 C D

Problem: Shortest Path Routing Objective: Determine the route from each router (R1, …, R7) to R8 that minimizes the cost. R5 R3 R7 R6 R4 R2 R1 1 4 2 3 R8

Solution is simple by inspection... (in this case) 1 1 4 R1 R2 R4 R6 3 2 2 2 R7 R5 2 3 4 R3 R8 The shortest paths from all sources to a destination (e.g., R8) is the spanning tree routed at that destination.

Two Main Approaches Distance Vector Protocols Link State Protocols E.g., RIP (Routing Information Protocol) Based on Distributed Bellman-Ford Algorithm Link State Protocols E.g., OSPF (Open Shortest Path First) Based on Dijkstra Algorithm

Technique1: Distributed Bellman-Ford Algorithm Example R1 1 1 4 R2 R4 R6 2 3 2 2 R7 3 R5 2 R3 4 R8 Each router keeps track of next hop to destination, cost to destination Initial State: All routers except R8 set their route cost to ∞. R8 sets its route cost to 0.

Technique1: Distributed Bellman-Ford Algorithm Example R1 Inf R2 R3 4, R8 R4 R5 2, R8 R6 R7 3, R8 2 R1 1 1 4 R2 R4 R6 2 3 2 3 2 2 R7 3 4 R5 2 R3 4 R8 Every T seconds, each Router tells its neighbors its route cost to R8 Each router updates its cost as min(current cost, received cost + link cost) Set next hop to the source of the lowest cost message Routing tables have both the next-hop and the cost

Technique1: Distributed Bellman-Ford Algorithm Example R1 6, R3 R2 4, R5 R3 4, R8 R4 6, R7 R5 2, R8 R6 R7 3, R8 6 6 4 2 R1 1 1 4 R2 R4 R6 2 3 2 3 2 2 R7 3 4 R5 2 R3 4 R8 Repeat until no costs change

Technique1: Distributed Bellman-Ford Algorithm Example R1 6, R3 R2 4, R5 R3 4, R8 R4 6, R7 R5 2, R8 R6 R7 3, R8 6 6 4 2 R1 1 1 4 R2 R4 R6 2 3 2 3 2 2 R7 3 4 R5 2 R3 4 R8 Solution R1 5, R2 R2 4, R5 R3 4, R8 R4 R5 2, R8 R6 R7 3, R8 6 5 4 2 1 R1 1 R2 R4 R6 2 3 2 2 R7 3 4 R5 2 R3 4 R8

Distributed Bellman-Ford Algorithm Questions: How long will the algorithm take to stabilize? How do we know that the algorithm always converges? What happens when link costs change, or when routers/links fail? N-1 (the max diameter). Because cost always decreases.

A Problem with Bellman-Ford “Bad news travels slowly” 1 1 1 R1 R2 R3 X R4 3,R2 2,R3 R3 -- R4 fails Consider the calculation of distances to R4: 1, R4 2,R3 3,R2 R3 R2 R1 Time 1 2 3 4

A Problem with Bellman-Ford “Bad news travels slowly” 1 1 R1 R2 R3 R4 3,R2 4,R3 Consider the calculation of distances to R4: 1, R4 2,R3 3,R2 R3 R2 R1 Time R3-R4 fails 1 3,R2 2,R3 3,R2 2 3 5,R2 4,R3 4 5,R2 6,R3 … “Counting to infinity” … …

How are These Loops Caused? 1 1 R1 R2 R3 R4 Observation 1: R3’s metric increases Observation 2: R2 picks R3 as next hop to R4 But, the implicit path from R2 to R4 includes itself

Solutions to Counting to Infinity Set infinity = “some small integer” (e.g. 16). Stop when count = 16. Split Horizon: Because R2 received lowest cost path from R3, it does not advertise cost to R3 Split-horizon with poison reverse: R2 advertises infinity to R3 1 1 R1 R2 R3 R4

Comments on Bellman-Ford Asynchronous Works when some costs (i.e., weights) are negative, as long as there is no negative cost cycle. Why? The graph may be directed (not in the distributed case) Small messages, small state at each router No router has a complete image of the graph

Two Main Approaches Distance Vector Protocols Link State Protocols E.g., RIP (Routing Information Protocol) Based on Distributed Bellman-Ford Algorithm Link State Protocols E.g., OSPF (Open Shortest Path First) Based on Dijkstra Algorithm

Link State Routing Start condition Phase 1 Phase 2 Each node assumed to know state of links to its neighbors Phase 1 Each node broadcasts its state to all other nodes Reliable flooding mechanism Phase 2 Each node locally computes shortest paths to all other nodes from global state Dijkstra’s shortest path tree (SPT) algorithm

Phase 1: Link State Packets (LSPs) Periodically, each node creates a link state packet containing: Node ID List of neighbors and link cost Sequence number Time to live (TTL) Node outputs LSP on all its links When a router receives a LSP from node Keep most recent packet from each source Forward to other routers All routers learn complete graph

Phase 2: Dijkstra’s Shortest Path First Algorithm Assumptions: Costs are positive Each router has the complete graph. Is it scalable? For each source, finds spanning tree routed on source router.

R5 R3 R7 R6 R4 R2 R1 1 4 2 3 R8 Dijkstra’s Key Idea: At each step, consider nodes with edges to nodes in set S; Pick the next closest node to destination and move it to S; update distances from destination Step 1: S = {R8}, C = {R3,R5,R7,R6} R8 Step 2: S = {R8 ,R5}, C = {R3, R7, R6, R2} R5 R8 Set S: nodes where shortest path to destination is already known Set C: all nodes with direct edges to any node in S

Step 3: S = {R8 ,R5 ,R6}, C = {R3, R7, R2 , R4} 1 4 2 3 R8 Dijkstra’s Key Idea: At each step, consider nodes with edges to nodes in set S; Pick the next closest node to destination and move it to S; update distances from destination Step 1: S = {R8}, C = {R3,R5,R7,R6} R8 R5 Step 2: S = {R8 ,R5}, C = {R3, R7, R6, R2} R8 R6 Step 3: S = {R8 ,R5 ,R6}, C = {R3, R7, R2 , R4} R5 R8

Step 3: S = {R8 ,R5 ,R6}, C = {R3, R7, R2 , R4} 1 4 2 3 R8 Dijkstra’s Key Idea: At each step, consider nodes with edges to nodes in set S; Pick the next closest node to destination and move it to S; update distances from destination Step 1: S = {R8}, C = {R3,R5,R7,R6} R8 R5 Step 2: S = {R8 ,R5}, C = {R3, R7, R6, R2} R8 R6 Step 3: S = {R8 ,R5 ,R6}, C = {R3, R7, R2 , R4} R5 R8 R6 Step 4: S = {R8, R5, R6, R7}, C = {R3, R2 , R4} R7 R5 R8 And so on…

Dijkstra’s SPF Algorithm 1 1 R1 R2 R4 R6 2 2 R7 3 R5 2 R8 R3 4

OSPF optimizations Don’t send updates to all other routers Areas Elect a root router, send updates there Root broadcasts link database to all routers Areas Run routing algorithm separately in each area Graph not propagated to other areas Reduce state needed on each router Operator needs to assign routers to areas

Summary: LS vs. DV Message size Convergence speed Space requirements Small in Link State (only state to neighbors) Large in Distance Vector (costs to all destinations) Convergence speed LS: faster – done once topology disseminated Space requirements LS maintains entire topology DV maintains only neighbor state Robustness: Can be made robust since sources are aware of alternate paths Incorrect calculation can spread to entire network

Summary: LS vs. DV Bottom line: no clear winner, Link State more prevalent in intra-domain routing Protocol details (inter-domain uses BGP which is based on DV)