Chapter 5: Network Layer Control Plane. understand principles behind network control plane : traditional routing algorithms

Similar documents
Network Layer: Control Plane 5-2

Network Layer: Routing

Chapter 4: Network Layer

Interplay between routing, forwarding

Computer Networks. Instructor: Niklas Carlsson

CMPE 150/L : Introduction to Computer Networks. Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 14

11/13/2017 Network Layer (SSL) Network-layer functions. Recall the two network-layer functions:

Chapter 4: Network Layer: Part II

Chapter IV: Network Layer

Chapter 4: Network Layer, partb

Initial motivation: 32-bit address space soon to be completely allocated. Additional motivation:

Chapter 4: outline. 4.5 routing algorithms link state distance vector hierarchical routing. 4.6 routing in the Internet RIP OSPF BGP

Last time. Transitioning to IPv6. Routing. Tunneling. Gateways. Graph abstraction. Link-state routing. Distance-vector routing. Dijkstra's Algorithm

Chapter 4: outline. Network Layer 4-1

Chapter 4: Network Layer. Lecture 12 Internet Routing Protocols. Chapter goals: understand principles behind network layer services:

Chapter IV: Network Layer

Network layer: Overview. Network layer functions Routing IP Forwarding

CS 3516: Advanced Computer Networks

Routing Algorithm Classification. A Link-State Routing Algorithm

Chapter 4 Network Layer

Chapter 4 Network Layer

Agenda. distance-vector (what you invented last Friday) hierarchical routing routing in the Internet. v DNS assignment Q&A v Routing Algorithms

Chapter 4: Network Layer

Internet rou)ng. V. Arun CS491G: Computer Networking Lab University of MassachuseFs Amherst

CSC 4900 Computer Networks: Routing Protocols

Chapter 4 Network Layer. Network Layer 4-1

Intra-AS Routing. Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley.

Hierarchical Routing. Our routing study thus far - idealization all routers identical network flat not true in practice

CS 3516: Advanced Computer Networks

Computer Networking. Rou1ng Algorithms. Rou1ng Algorithms. Interplay between rou1ng, forwarding. routing algorithm

Announcements. CS 5565 Network Architecture and Protocols. Project 2B. Project 2B. Project 2B: Under the hood. Routing Algorithms

DATA COMMUNICATOIN NETWORKING

EC441 Fall 2018 Introduction to Computer Networking Chapter 5: Network Layer Control Plane

Announcements. CS 5565 Network Architecture and Protocols. Project 2B. Project 2B. Project 2B: Under the hood. Routing Algorithms

Computer Networking Introduction

Chapter 5 Network Layer: The Control Plane

Lecture 19: Network Layer Routing in the Internet

Graph abstraction: costs. Graph abstraction 10/26/2018. Interplay between routing and forwarding

5.1 introduction 5.5 The SDN control 5.2 routing protocols plane. Control Message 5.3 intra-as routing in Protocol the Internet

Chapter 4: Network Layer. Chapter 4 Network Layer. Chapter 4: Network Layer. Network Layer. Chapter goals:

CSCI Topics: Internet Programming Fall 2008

Inter-AS routing and BGP. Network Layer 4-1

CS 43: Computer Networks Internet Routing. Kevin Webb Swarthmore College November 14, 2013

CSCE 463/612 Networks and Distributed Processing Spring 2018

Inter-AS routing. Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley

Internet Protocol: Routing Algorithms. Srinidhi Varadarajan

COMP211 Chapter 5 Network Layer: The Control Plane

CS 43: Computer Networks Internet Routing. Kevin Webb Swarthmore College November 16, 2017

Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley

CS 43: Computer Networks. 24: Internet Routing November 19, 2018

CSC 8560 Computer Networks: Control Plane

Network Routing. Packet Routing, Routing Algorithms, Routers, Router Architecture

CS555, Spring /5/2005. April 12, 2005 No classes attend Senior Design Projects conference. Chapter 4 roadmap. Internet AS Hierarchy

DATA COMMUNICATOIN NETWORKING

Announcements. CS 5565 Network Architecture and Protocols. Count-To-Infinity. Poisoned Reverse. Distance Vector: Link Cost Changes.

CSc 450/550 Computer Networks Internet Routing

Course on Computer Communication and Networks. Lecture 7 Network Layer, Chapter 4 (6/e) - Part B (7/e Ch5)

CSC 4900 Computer Networks: Routing Algorithms

CSC 401 Data and Computer Communications Networks

Chapter 5 Network Layer: The Control Plane

Initial motivation: 32-bit address space soon to be completely allocated. Additional motivation:

Chapter 4: Network Layer

CS118 Discussion 1A, Week 7. Zengwen Yuan Dodd Hall 78, Friday 10:00 11:50 a.m.

Chapter 4: outline. 4.5 routing algorithms link state distance vector hierarchical routing. 4.6 routing in the Internet RIP OSPF BGP

Network layer: Overview. Network layer functions Routing IP Forwarding

Chapter 4: Network Layer. TDTS06 Computer networks. Subnets. Subnets. Subnets. IP Addressing: introduction

Topics for This Week

Routing in the Internet

Module 3 Network Layer CS755! 3-1!

Network layer. Network Layer 4-1. application transport network data link physical. network data link physical. network data link physical

Chapter 5 Network Layer: The Control Plane

Master Course Computer Networks IN2097

Interplay tra routing e forwarding

CS 457 Networking and the Internet. Shortest-Path Problem. Dijkstra s Shortest-Path Algorithm 9/29/16. Fall 2016

Chapter 5 Network Layer: The Control Plane

Chapter 5 Network Layer: The Control Plane

Chapter 5 Network Layer: The Control Plane

Lecture 9. Network Layer (cont d) Network Layer 1-1

Protocoles et Interconnexions

CSCD 330 Network Programming Spring 2018

CMPE 150/L : Introduction to Computer Networks. Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 13

Lecture 4. The Network Layer (cont d)

CSCD 330 Network Programming Spring 2017

Network layer functions. Chapter 4 Network Layer. Network layer functions. Network layer functions

Department of Computer Science Southern Illinois University Carbondale

Master Course Computer Networks IN2097

Network Layer: Routing. Routing. Routing protocol. Graph abstraction for routing algorithms: graph nodes are routers graph edges are physical links

ELEC / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition

Chapter 4: Network Layer. Chapter 4 Network Layer. Chapter 4: Network Layer. Network layer. Chapter goals:

Chapter 4 Network Layer

Chapter 4: Network Layer. Chapter 4 Network Layer. Chapter 4: Network Layer. Network layer

CMPE 80N: Introduction to Networking and the Internet. Katia Obraczka Computer Engineering UCSC Baskin Engineering Lecture 20

Internet Technology. 08. Routing. Paul Krzyzanowski. Rutgers University. Spring CS Paul Krzyzanowski

4.5.2 The Distance-Vector (DV) Routing Algorithm

Routing. Outline. Algorithms Scalability

CS 204: BGP. Jiasi Chen Lectures: MWF 12:10-1pm Humanities and Social Sciences

Network Layer. CMPS 4750/6750: Computer Networks

Data Communications & Networks. Session 7 Main Theme Networks: Part II Circuit Switching, Packet Switching, The Network Layer

EE 122: Intra-domain routing

Routing Unicast routing protocols

Transcription:

Introduction to Computer Networking Gu Leduc Chapter 5 Network Laer: The Control Plane Computer Networking: A Top Down Approach, 7 th edition. Jim Kurose, Keith Ross Addison-Wesle, April 06. From Computer Networking, b Kurose&Ross Network Laer Control Plane 5- Chapter 5: Network Laer Control Plane Chapter goals: understand principles behind network control plane : traditional routing algorithms and their instantiation, implementation in the Internet: OSPF, BGP From Computer Networking, b Kurose&Ross Network Laer Control Plane 5-

Chapter 5: outline 5. Introduction 5. Routing algorithms Link state Distance Vector 5. Intra-domain routing in the Internet: OSPF 5.4 Inter-domain routing in the Internet: BGP 5.5. ICMP: The Internet Control Message Protocol From Computer Networking, b Kurose&Ross Network Laer Control Plane 5- Ke Network-Laer Functions forwarding: move packets from router s input to appropriate router output routing: determine route taken b packets from source to destination data plane control plane Two approaches to structuring network control plane:! per-router control (traditional)! logicall centralied control (software defined networking) (Onl the first one will be studied in this course) From Computer Networking, b Kurose&Ross Network Laer Control Plane 5-4

Per-router control plane Individual routing algorithm components in each and ever router interact in the control plane Routing Algorithm Local forwarding table header output control plane data plane 000 00 0 00 values in arriving packet header 0 From Computer Networking, b Kurose&Ross Network Laer: Data Plane 5-5 Chapter 5: outline 5. Introduction 5. Routing algorithms Link state Distance Vector 5. Intra-domain routing in the Internet: OSPF 5.4 Inter-domain routing in the Internet: BGP 5.5. ICMP: The Internet Control Message Protocol From Computer Networking, b Kurose&Ross Network Laer Control Plane 5-6

Routing protocols Routing protocol goal: determine good paths (equivalentl, routes), from sending hosts to receiving host, through network of routers " path: sequence of routers packets will traverse in going from given initial source host to given final destination host " good : least cost, fastest, least congested " routing: a top-0 networking challenge! From Computer Networking, b Kurose&Ross Network Laer Control Plane 5-7 Graph abstraction of the network 5 Graph: G = (N,E) u v w 5 N = set of routers = { u, v, w,,, } E = set of links ={ (u,v), (u,), (v,), (v,w), (,w), (,), (w,), (w,), (,) } aside: graph abstraction is useful in other network contets, e.g., PP, where N is set of peers and E is set of TCP connections From Computer Networking, b Kurose&Ross Network Laer Control Plane 5-8 4

Graph abstraction: costs u 5 v w 5 c(, ) = cost of link (, ) e.g., c(w,) = 5 cost could alwas be, or inversel related to bandwidth, or related to congestion Cost of path (,,,, p ) = c(, ) + c(, ) + + c( p-, p ) Question: What s the least-cost path between u and? Routing algorithm: algorithm that finds least-cost path From Computer Networking, b Kurose&Ross Network Laer Control Plane 5-9 How to set link costs? To achieve minimum hop routing Set all link costs to Will also minimie (average) link load (and node processing) See net slide Does not necessaril minimie dela, nor congestion! Changing link costs will surel change the least-cost paths! Link costs can be engineered to optimie the network to some etent But this usuall requires to know the traffic matri (TM) What is a TM? For ever pair of nodes (i,j), TM(i,j) is the amount of traffic entering the network at node i and eiting the network at node j From Computer Networking, b Kurose&Ross Network Laer Control Plane 5-0 5

Minimum hop routing minimises the average link load (for an TM) Score = Avg_ link _ load = i links load i Minimiing the average link load is equivalent to minimiing the sum of all the link loads. So, remove denominator N from the score. Routing a new flow of rate R along a given path P will increase the score: Therefore, minimiing the average link load is equivalent to setting the path P so as to minimie the number of hops So to achieve this, each link will simpl get the static metric = Does not depend on Traffic Matri From Computer Networking, b Kurose&Ross Network Laer Control Plane 5- Score _ increase = R = R nb_ hops(p) i P N InvCap routing minimises the average link utilisation (for an TM) Score = Avg_ link _ util = Equivalent to minimiing the sum of all the link utilisations Routing a new flow of rate R along a given path P will increase the score: i links util i Therefore, minimiing the average link utilisation is equivalent to setting the path P so as to minimie (for all P) N = load i capacit i i links Score _increase = R = R C i C i i P C i i P N So, to achieve this, each link will simpl get the static metric = /C i InvCap = metric is the inverse of the capacit Does not depend on Traffic Matri From Computer Networking, b Kurose&Ross Network Laer Control Plane 5- i P 6

Other possible metrics Link dela metric Minimies dela But dela has several components: Propagation dela Transmission dela (= packet_sie / link_capacit) Queuing dela (variable, depends on the load, difficult to take into account) Administrative link cost (weight) An link metric computed so as to optimise a given score For eample to better balance the load but traffic matri dependent! Basicall an summable quantit Summable = cost of a path is the sum of the costs of the links From Computer Networking, b Kurose&Ross Network Laer Control Plane 5- Optimalit principle If a router J is on the optimal path from router I to router K, then the optimal path from J to K also falls along the same route Consequence: the set of optimal routes from all sources to a destination form a tree rooted at the destination Similarl: the set of optimal routes from one source to all destinations form a tree rooted at the source A network B B A C A D E D G J G F I F H N H L L K K A sink tree for router B based on the hop count metric C E J I N M O M O From From Computer Computer Networks, Networking, b Tanenbaum b Kurose&Ross Prentice Hall Network Laer Control Plane 5-4 7

Routing Algorithm classification Q: global or decentralied information? Global: all routers have complete topolog, link cost info link state algorithms Decentralied: router knows phsicallconnected neighbors, link costs to neighbors iterative process of computation, echange of info with neighbors distance vector algorithms Q: Static or dnamic? Static: routes change slowl over time Dnamic: routes change more quickl periodic update in response to link cost changes From Computer Networking, b Kurose&Ross Network Laer Control Plane 5-5 Chapter 5: outline 5. Introduction 5. Routing algorithms Link state Distance Vector 5. Intra-domain routing in the Internet: OSPF 5.4 Inter-domain routing in the Internet: BGP 5.5. ICMP: The Internet Control Message Protocol From Computer Networking, b Kurose&Ross Network Laer Control Plane 5-6 8

A Link-State Routing Algorithm Principle link state broadcast See net slides So, all nodes have the same topological info Ever node computes least-cost paths to all other nodes It uses Dijkstra s algorithm (see later) This gives forwarding table for that node Network Laer Control Plane 5-7 Building link state packets Link State Packets are composed of the source node, a sequence number and an age (see later) a distance vector limited to the neighbours Source of packets Neighbours of the source From From Computer Computer Networks, Networking, b Tanenbaum b Kurose&Ross Prentice Hall Network Laer Control Plane 5-8 9

Distributing Link State Packets Packets are flooded selectivel Packets are not forwarded on the links the arrived on Duplicate (or older) packets are detected b the sequence number Packets are acknowledged A 4 5 B E 6 8 C Packet received from D via C and F F 7 D The packet buffer for router B Send flags ACK flags Source Seq. Age A C F A C F Data A 60 0 0 0 F 60 0 0 0 E 59 0 0 0 C 0 60 0 0 0 D 59 0 0 0 Clearl, routers do not forward the received packets immediatel but put them for a short while in the packet buffer (holding area) From From Computer Computer Networks, Networking, b Tanenbaum b Kurose&Ross Prentice Hall Network Laer Control Plane 5-9 Potential problems What if the sequence number wraps around? Solution: choose -bit sequence number Needs 7 ears to wrap around if one link state packet is sent ever second (in practice one packet per e.g. 0 seconds) What if a router crashes? It restarts with sequence number 0 and its packets are ignored until the sequence number reaches the previous value Solution: the age field is decremented b ever second and the entr removed when age hits 0 What if a sequence number is corrupted? Same consequence, same solution From From Computer Computer Networks, Networking, b Tanenbaum b Kurose&Ross Prentice Hall Network Laer Control Plane 5-0 0

A Link-State Routing Algorithm Dijkstra s algorithm net topolog, link costs known to all nodes accomplished via link state broadcast all nodes have same info computes least-cost paths from one node ( source ) to all other nodes gives forwarding table for that node iterative: after k iterations, know least-cost path to k destinations Notation: c(,): link cost from node to ; = if not direct neighbors D(v): current value of cost of path from source to destination v; = if v not reachable p(v): predecessor node along path from source to v N': set of nodes whose least-cost path definitivel known From Computer Networking, b Kurose&Ross Network Laer Control Plane 5- Dijkstra s Algorithm (as eecuted in node u) Initialiation: N' = {u} for all nodes v 4 if v adjacent to u 5 then D(v) = c(u,v) 6 else D(v) = 7 8 Loop 9 find w not in N' such that D(w) is a minimum 0 add w to N' update D(v) for all v adjacent to w and not in N' : D(v) = min( D(v), D(w) + c(w,v) ) /* new cost to v is either old cost to v or known 4 shortest path cost to w plus cost from w to v */ 5 until all nodes in N' From Computer Networking, b Kurose&Ross Network Laer Control Plane 5-

Dijkstra s algorithm: eample D(v) D(w) D() D() D() Step N' p(v) p(w) p() p() p() 0 u 7,u,u 5,u uw 6,w 5,u,w uw 6,w,w 4, uwv 0,v 4, 4 5 uwv uwv, notes: # construct shortest path tree b tracing predecessor nodes # ties can eist (can be broken arbitraril) From Computer Networking, b Kurose&Ross Network Laer Control Plane 5- u 5 w v 4 8 7 7 4 9 Dijkstra s algorithm: another eample Step 0 4 5 N' u u u uv uvw uvw D(v),p(v),u,u,u D(w),p(w) 5,u 4,,, D(),p(),u D(),p(), D(),p() 4, 4, 4, 5 u v w 5 From Computer Networking, b Kurose&Ross Network Laer Control Plane 5-4

Dijkstra s algorithm: eample () Resulting shortest-path tree from u: u v w Resulting forwarding table in u: destination v w link (u,v) (u,) (u,) (u,) (u,) From Computer Networking, b Kurose&Ross Network Laer Control Plane 5-5 Dijkstra s algorithm, discussion Algorithm compleit: n nodes each iteration: need to check all nodes, w, not in N n(n+)/ comparisons: O(n ) more efficient implementations possible: O(nlogn) Oscillations possible when link cost are traffic dependent: e.g., suppose link cost = amount of carried traffic D +ε A +ε 0 0 0 B C ε initiall ε A +ε 0 D 0 +ε C 0 B given these costs, find new routing. resulting in new costs D A 0 +ε 0 0 C +ε B given these costs, find new routing. resulting in new costs A +ε 0 D 0 +ε C 0 B given these costs, find new routing. resulting in new costs From Computer Networking, b Kurose&Ross Network Laer Control Plane 5-6

Chapter 5: outline 5. Introduction 5. Routing algorithms Link state Distance Vector 5. Intra-domain routing in the Internet: OSPF 5.4 Inter-domain routing in the Internet: BGP 5.5. ICMP: The Internet Control Message Protocol From Computer Networking, b Kurose&Ross Network Laer Control Plane 5-7 Distance vector algorithm Bellman-Ford equation (dnamic programming) let d () := cost of least-cost path from to then d () = min {c(,v) + d v () } v cost from neighbor v to destination cost to neighbor v min taken over all neighbors v of From Computer Networking, b Kurose&Ross Network Laer Control Plane 5-8 4

Bellman-Ford eample u 5 v w 5 Clearl, d v () = 5, d () =, d w () = B-F equation sas: d u () = min { c(u,v) + d v (), c(u,) + d (), c(u,w) + d w () } = min { + 5, +, 5 + } = 4 Node achieving minimum is net hop in shortest path, used in forwarding table From Computer Networking, b Kurose&Ross Network Laer Control Plane 5-9 Distance Vector Algorithm D () = estimate of least cost from to Node maintains its distance vector D = [D (): є N ] Node : knows cost to each neighbor v: c(,v) also maintains its neighbors distance vectors: for each neighbor v, maintains D v = [D v (): є N ] From Computer Networking, b Kurose&Ross Network Laer Control Plane 5-0 5

Distance vector algorithm Ke idea: From time-to-time, each node sends its own distance vector estimate to neighbors Asnchronous When node receives new DV estimate from neighbor, it updates its own DV using B-F equation: D () min v {c(,v) + D v ()} for each node N Under minor, natural conditions, the estimate D () converges to the actual least cost d () From Computer Networking, b Kurose&Ross Network Laer Control Plane 5- Distance Vector Algorithm Iterative, asnchronous: each local iteration caused b: local link cost change DV update message from neighbor Distributed: each node notifies neighbors onl when its DV changes neighbors then notif their neighbors if necessar Each node: wait for (change in local link cost or msg from neighbor) recompute estimates if DV to an dest has changed, notif neighbors From Computer Networking, b Kurose&Ross Network Laer Control Plane 5-6

node table from from node table D () = min{c(,) + D (), c(,) + D ()} = min{+0, 7+} = cost to 0 7 cost to 0 from cost to 0 0 7 0 D () = min{c(,) + D (), c(,) + D ()} = min{+, 7+0} = 7 node table 7 0 time From Computer Networking, b Kurose&Ross Network Laer Control Plane 5- from cost to node table from from node table cost to 0 7 node cost to cost to cost to table 0 7 0 0 0 7 0 0 0 time From Computer Networking, b Kurose&Ross Network Laer Control Plane 5-4 from D () = min{c(,) + D (), c(,) + D ()} = min{+0, 7+} = cost to 0 from from from cost to 0 0 7 0 cost to 0 7 0 7 0 from from from cost to 0 0 0 cost to 0 0 0 D () = min{c(,) + D (), c(,) + D ()} = min{+, 7+0} = 7 7

Distance Vector: link cost changes Link cost changes: node detects local link cost change updates routing info, recalculates distance vector if DV changes, notif neighbors 4 50 good news travels fast At time t 0, detects the link-cost change, updates its DV (D () ), and informs its neighbors At time t, receives the update from. It computes a new least cost to (D () ) and sends its neighbors its DV At time t, receives s update and updates its distance table. s least costs do not change and hence does not send an message to From Computer Networking, b Kurose&Ross Network Laer Control Plane 5-5 Distance Vector: link cost changes Link cost changes: good news travels fast bad news travels slow - count to infinit problem! Distance to A in nr. of hops Other eample (see book): 44 iterations before algorithm stabilies 60 4 Propagation of bad news (link A-B is down, c(b,a) = ) From Computer Networking, b Kurose&Ross Network Laer Control Plane 5-6 A 50 B 5 5 7 7! C 4 4 6 6 8! D 5 5 7 7! E 4 4 4 4 6 6 8! Initiall After echange After echanges After echanges After 4 echanges After 5 echanges After 6 echanges From Computer Networks, b Tanenbaum Prentice Hall D () = 4, 6, 8, 48, 50, 5 D () = 5, 7, 9, 49, 50 8

Poisoned reverse Also called split-horion If C routes through B to get to A : C tells B its (C s) distance to A is infinite (so B won t route to A via C) With poisoned reverse, we get (when link A-B goes down): A B C D E 4 4 4 4 Initiall After echange After echanges After echanges After 4 echanges Q: Will this completel solve count to infinit problem? From Computer Networking, b Kurose&Ross Network Laer Control Plane 5-7 Poisoned reverse is not a panacea A B Suppose link CD fails C Router Distance to D Net hop to reach D D Evolution of the routing tables in A, B and C for destination D: A B C (,C) (,C) (,D) Initiall (,C) (,C) (, ) After C s recomputation, C will notif A and B (,B) (,A) (, ) After A and B s recomputations (, ) (, ) (4,A) After echanges (, ) (5,C) (, ) After 4 echanges (6,B) (, ) (, ) After 5 echanges From From Computer Computer Networks, Networking, b Tanenbaum b Kurose&Ross Prentice Hall Network Laer Control Plane 5-8 9

RIP (Routing Information Protocol) included in BSD-UNIX distribution in 98 distance vector algorithm distance metric: # hops (ma = 5 hops), each link has cost DVs echanged with neighbors ever 0 sec in response message (aka advertisement) each advertisement: list of up to 5 destination subnets (in IP addressing sense) u A C B D v w From router A to destination subnets: subnet hops u v w From Computer Networking, b Kurose&Ross Network Laer Control Plane 5-9 RIP: eample w A D B C routing table in router D destination subnet net router # hops to dest w A B B 7 -... From Computer Networking, b Kurose&Ross Network Laer Control Plane 5-40 0

RIP: eample A-to-D advertisement dest net hops w - - Poisoned reverse : entr discarded b D D C 4... w A D B C routing table in router D destination subnet net router # hops to dest w A B A B 7 5 -... From Computer Networking, b Kurose&Ross Network Laer Control Plane 5-4 Comparison of LS and DV algorithms Message compleit LS: with n nodes, E links, O(nE) msgs sent DV: echange between neighbors onl convergence time varies Speed of Convergence LS: O(nlogn) algorithm requires O(nE) msgs ma have oscillations DV: convergence time varies ma be routing loops count-to-infinit problem Robustness: what happens if router malfunctions? LS: node can advertise incorrect link cost each node computes onl its own table DV: DV node can advertise incorrect path cost each node s table used b others error propagates through network From Computer Networking, b Kurose&Ross Network Laer Control Plane 5-4

Chapter 5: outline 5. Introduction 5. Routing algorithms Link state Distance Vector 5. Intra-domain routing in the Internet: OSPF 5.4 Inter-domain routing in the Internet: BGP 5.5. ICMP: The Internet Control Message Protocol From Computer Networking, b Kurose&Ross Network Laer Control Plane 5-4 Making routing scalable Our routing stud thus far - idealiation all routers identical network flat not true in practice scale: with billions of destinations: can t store all destinations in routing tables! routing table echange would swamp links! administrative autonom internet = network of networks each network admin ma want to control routing in its own network From Computer Networking, b Kurose&Ross Network Laer Control Plane 5-44

Internet approach to scalable routing aggregate routers into regions known as autonomous sstems (AS) (a.k.a. domains ) intra-as routing " routing among hosts, routers in same AS ( network ) " all routers in AS must run same intra-domain protocol " routers in different AS can run different intra-domain routing protocol " gatewa router: at edge of its own AS, has link(s) to router(s) in other AS es inter-as routing routing among AS es gatewas perform inter-domain routing (as well as intradomain routing) From Computer Networking, b Kurose&Ross Network Laer Control Plane 5-45 Interconnected ASes c a b AS a c d b Intra-AS Routing algorithm AS Forwarding table Inter-AS Routing algorithm From Computer Networking, b Kurose&Ross Network Laer Control Plane 5-46 a c b AS forwarding table configured b both intra- and inter-as routing algorithm intra-as sets entries for internal destinations inter-as and intra-as set entries for eternal destinations

Inter-AS tasks suppose router in AS receives datagram destined outside of AS router should forward packet to gatewa router, but which one? AS must:. learn which destinations reachable through AS, which through AS. propagate this reachabilit info to all routers in AS Job of inter-as routing! other networks c a b AS a AS c d b a AS c b other networks From Computer Networking, b Kurose&Ross Network Laer Control Plane 5-47 Intra-AS Routing Protocols also known as Interior Gatewa Protocols (IGP) most common Intra-AS routing protocols: OSPF: Open Shortest Path First Link State Protocol, recommended b IETF, deploed IS-IS: Intermediate Sstem to Intermediate Sstem Nearl identical to OSPF, standardied b ISO, deploed RIP: Routing Information Protocol Distance Vector Protocol, IETF IGRP: Interior Gatewa Routing Protocol Distance Vector Protocol, Cisco proprietar, improves RIP From Computer Networking, b Kurose&Ross Network Laer Control Plane 5-48 4

OSPF (Open Shortest Path First) open : publicl available uses Link State (LS) algorithm LS packet dissemination: router floods OSPF link-state advertisements to all other routers in entire AS topolog map at each node route computation using Dijkstra s algorithm OSPF messages carried directl over IP From Computer Networking, b Kurose&Ross Network Laer Control Plane 5-49 OSPF advanced features securit: all OSPF messages authenticated (to prevent malicious intrusion) multiple same-cost paths allowed ECMP = Equal Cost MultiPath For each link, multiple cost metrics for different ToS (e.g., satellite link cost set low for best effort ToS; high for real time ToS) integrated uni- and multicast support: Multicast OSPF (MOSPF) uses same topolog data base as OSPF hierarchical OSPF in large domains From Computer Networking, b Kurose&Ross Network Laer Control Plane 5-50 5

Hierarchical OSPF boundar router backbone router area border routers backbone area area area internal routers From Computer Networking, b Kurose&Ross Network Laer Control Plane 5-5 Hierarchical OSPF two-level hierarch: local area, backbone link-state advertisements onl in area each node has detailed area topolog; onl knows direction (shortest path) to nets in other areas area border routers: summarie distances to nets in own area, advertise to other Area Border routers backbone routers: run OSPF routing limited to backbone boundar routers: connect to other ASes From Computer Networking, b Kurose&Ross Network Laer Control Plane 5-5 6

Chapter 5: outline 5. Introduction 5. Routing algorithms Link state Distance Vector 5. Intra-domain routing in the Internet: OSPF 5.4 Inter-domain routing in the Internet: BGP 5.5. ICMP: The Internet Control Message Protocol From Computer Networking, b Kurose&Ross Network Laer Control Plane 5-5 Internet inter-as routing: BGP BGP (Border Gatewa Protocol): the de facto inter-domain routing protocol glue that holds the Internet together BGP provides each AS a means to: ebgp: obtain subnet reachabilit information from neighboring ASes ibgp: propagate reachabilit information to all ASinternal routers determine good routes to other networks based on reachabilit information and polic allows subnet to advertise its eistence to rest of Internet: I am here From Computer Networking, b Kurose&Ross Network Laer Control Plane 5-54 7

ebgp, ibgp connections b b a c b a c d a c d AS d AS ebgp connectivit ibgp connectivit AS c gatewa routers run both ebgp and ibgp protocols From Computer Networking, b Kurose&Ross Network Laer Control Plane 5-55 BGP basics! BGP session: two BGP routers ( peers ) echange BGP messages over semi-permanent TCP connection: advertising paths to different destination network prefies (BGP is a path vector protocol) Prefi = IP address prefi = range of IP addresses! when AS gatewa router a advertises path AS,X to AS gatewa router c: AS promises to AS it will forward datagrams towards X AS b AS b a d c AS a b c a d c BGP advertisement: AS, X X From Computer Networking, b Kurose&Ross d Network Laer Control Plane 5-56 8

Path attributes and BGP routes advertised prefi includes BGP attributes prefi + attributes = route two important attributes: AS-PATH: list of AS es through which prefi advertisement has passed, e.g, AS 67, AS 7 BGP is a path vector protocol (AS-PATH are propagated) In a DV protocol, onl the distance is propagated NEXT-HOP: indicates specific internal-as router to nethop AS Polic-based routing: gatewa receiving route advertisement uses import polic to accept/decline path (e.g., never route through AS Y). AS polic also determines whether to advertise path to other neighboring ASes From Computer Networking, b Kurose&Ross Network Laer Control Plane 5-57 BGP path advertisement AS b AS b a c d AS,AS,X AS a b c a AS,X d c X d! AS router c receives path advertisement AS,X (via ebgp) from AS router a! Based on AS polic, AS router c accepts path AS,X, propagates (via ibgp) to all AS routers! Based on AS polic, AS router a advertises (via ebgp) path AS, AS, X to AS router c From Computer Networking, b Kurose&Ross 5-58 Network Laer Control Plane 9

BGP path advertisement AS b AS,X AS b a c d AS,AS,X AS a b c a AS,X d c X d gatewa router ma learn about multiple paths to destination:! AS gatewa router c learns path AS,AS,X from a! AS gatewa router c learns path AS,X from a! Based on polic, AS gatewa router c chooses e.g. path AS,X, and advertises path within AS via ibgp From Computer Networking, b Kurose&Ross 5-59 Network Laer Control Plane BGP messages BGP messages echanged between peers overtcp connection BGP messages: OPEN: opens TCP connection to remote BGP peer and authenticates sending BGP peer UPDATE: advertises new path (or withdraws old) KEEPALIVE keeps connection alive in absence of UPDATES; also ACKs OPEN request NOTIFICATION: reports errors in previous msg; also used to close connection From Computer Networking, b Kurose&Ross Network Laer Control Plane 5-60 0

BGP, OSPF, forwarding table entries Q: how does router set forwarding table entr to distant prefi? AS a local link interfaces at a, d b AS,X c d AS,AS,X AS a b d AS,X AS a AS,X c b d c phsical link X dest interface X! recall: a, b, d learn about dest X via ibgp from c: path to X goes through c! d: OSPF intra-domain routing: to get to c, forward over outgoing local interface From Computer Networking, b Kurose&Ross Network Laer Control Plane 5-6 BGP, OSPF, forwarding table entries Q: how does router set forwarding table entr to distant prefi? AS a b d c AS a b c AS a b d c X d dest interface X From Computer Networking, b Kurose&Ross! recall: a, b, c learn about dest X via ibgp from c: path to X goes through c! d: OSPF intra-domain routing: to get to c, forward over outgoing local interface! a: OSPF intra-domain routing: to get to c, forward over outgoing local interface Network Laer Control Plane 5-6

BGP route selection router ma learn about more than one route to some destination prefi, selects route based on (in decreasing preference order):. Local preference value attribute: polic decision prefer Customer AS over Peer AS over Provider AS (economical viewpoint). Shortest AS-PATH. Closest NEXT-HOP router: hot potato routing 4. Additional criteria From Computer Networking, b Kurose&Ross Network Laer Control Plane 5-6 Hot Potato Routing AS b AS b a d c AS,AS,X AS b 5 a 0 6 c d a AS,X c d X OSPF link weights d learns (via ibgp) it can route to X via a or c hot potato routing: choose local gatewa that has least intra-domain cost (e.g., d chooses a, even though more AS hops to X): don t worr about interdomain cost! From Computer Networking, b Kurose&Ross Network Laer Control Plane 5-64

Path Vector protocols avoid routing loops If an AS sees itself in the AS-PATH advertised b a neighbor AS, it discards it, otherwise it would create a loop More powerful than poisoned reverse (used in DV) Made possible b the presence of the AS-PATH in the advertisements AS5 AS AS AS6 AS AS7 AS4 AS8 Information AS6 receives from its neighbor AS es to reach prefies in AS4 AS uses AS-AS-AS4 AS7 uses AS7-AS-AS4 AS9 uses AS9-AS6-AS7-AS-AS4 AS5 uses AS5-AS6-AS7-AS-AS4 AS9 AS0 Discarded b AS6, because these AS-PATHs use AS6 as an intermediate AS From From Computer Computer Networks, Networking, b Tanenbaum b Kurose&Ross Prentice Hall Network Laer Control Plane 5-65 BGP: achieving polic via advertisements Peering relationship W $ A = = B C = $ $ X legend: provider network customer network: $ Y Customer-provider relationship Suppose Figure an 4.5 ISP - BGPnew onl : wants a simple to BGP route scenario traffic to/from its customer networks (does not want to carr transit traffic between other ISPs) A,B,C are provider networks X,W,Y are customers (of provider networks) X is dual-homed: attached to two networks Polic to enforce: X does not want to route from B to C via X... so X will not advertise to B a route to C From Computer Networking, b Kurose&Ross Network Laer Control Plane 5-66

BGP routing polic () W $ A = = B C = $ $ X legend: provider network customer network: $ Y A advertises path AW to B and to C B advertises path BAW to X B chooses not to advertise path BAW to C: B gets no revenue for routing CBAW since none of W, C, A are B s customers C does not learn about CBAW C will route CAW (not using B) to get to W From Computer Networking, b Kurose&Ross Network Laer Control Plane 5-67 Wh different Intra- and Inter-AS routing? Polic: Inter-AS: admin wants control over how its traffic is routed, who routes through its net Intra-AS: single admin, so no polic decisions needed Scale: hierarchical routing saves table sie, reduced update traffic Performance: Intra-AS: can focus on performance Inter-AS: polic ma dominate over performance From Computer Networking, b Kurose&Ross Network Laer Control Plane 5-68 4

Chapter 5: outline 5. Introduction 5. Routing algorithms Link state Distance Vector 5. Intra-domain routing in the Internet: OSPF 5.4 Inter-domain routing in the Internet: BGP 5.5. ICMP: The Internet Control Message Protocol From Computer Networking, b Kurose&Ross Network Laer Control Plane 5-69 ICMP: Internet Control Message Protocol used b hosts & routers to communicate network-level information error reporting: unreachable host, network, port, protocol echo request/repl (used b ping) network-laer above IP: ICMP messages carried in IP datagrams ICMP message: tpe, code plus first 8 btes of IP datagram causing error Tpe Code description 0 0 echo repl (ping) 0 dest. network unreachable dest host unreachable dest protocol unreachable dest port unreachable 6 dest network unknown 7 dest host unknown 4 0 source quench (congestion control - not used) 8 0 echo request (ping) 9 0 route advertisement 0 0 router discover 0 TTL epired 0 bad IP header From Computer Networking, b Kurose&Ross Network Laer Control Plane 5-70 5

Traceroute and ICMP source sends series of UDP segments to dest first set has TTL= second set has TTL=, etc. unlikel port number when n th set of datagrams arrives to n th router: router discards datagrams and sends source ICMP messages (tpe, code 0) ICMP messages include name of router & IP address probes probes when ICMP messages arrive, source records RTTs stopping criterion: # UDP segment eventuall arrives at destination host # destination returns ICMP port unreachable message (tpe, code ) # source stops probes From Computer Networking, b Kurose&Ross Network Laer Control Plane 5-7 Chapter 5: Network Laer Control Plane Routing protocols: Intra-domain routing LS - Link State (OSPF) Send local knowledge to all Selective flooding Dijkstra DV - Distance Vector (RIP) Send global knowledge to neighbors Bellman-Ford Count to problem Poisoned reverse Inter-domain routing (BGP) Path Vector Protocol Policies ICMP For further stud: o Centralied control (SDN) o Traffic engineering o Network management " Net stop: link laer! From Computer Networking, b Kurose&Ross Network Laer Control Plane 5-7 6