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

Similar documents
Chapter 4: Network Layer, partb

Chapter 4 Network Layer

Chapter 5 Network Layer: The Control Plane

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

Chapter IV: Network Layer

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 4: Network Layer

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

DATA COMMUNICATOIN NETWORKING

CSC 4900 Computer Networks: Routing Algorithms

DATA COMMUNICATOIN NETWORKING

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

Computer Networking Introduction

Network layer: Overview. Network layer functions Routing IP Forwarding

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

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

CSCE 463/612 Networks and Distributed Processing Spring 2018

CSC 8560 Computer Networks: Control Plane

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

CSC 401 Data and Computer Communications Networks

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

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

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

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

CSC 4900 Computer Networks: Routing Protocols

Internet Protocol: Routing Algorithms. Srinidhi Varadarajan

Lecture 4. The Network Layer (cont d)

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

CSCI Topics: Internet Programming Fall 2008

CSCD 330 Network Programming Spring 2018

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

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

CSCD 330 Network Programming Spring 2017

Network layer: Overview. Network layer functions Routing IP Forwarding

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

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

CSc 450/550 Computer Networks Internet Routing

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

Network Layer: Routing

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

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

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

Chapter 4 Network Layer. Network Layer 4-1

Routing in the Internet

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

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

Module 3 Network Layer CS755! 3-1!

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

Chapter 4: Network Layer

Interplay between routing, forwarding

Department of Computer Science Southern Illinois University Carbondale

Chapter 5 Network Layer: The Control Plane

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

Chapter 5 Network Layer: The Control Plane

Chapter 5 Network Layer: The Control Plane

Chapter 5 Network Layer: The Control Plane

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

Routing. Outline. Algorithms Scalability

Chapter 4: Network Layer: Part II

Computer Networks. Instructor: Niklas Carlsson

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

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

COMP211 Chapter 5 Network Layer: The Control Plane

Network Layer: Control Plane 5-2

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

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

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

Dynamic Routing. The Protocols

Network Layer. CMPS 4750/6750: Computer Networks

The Internet network layer

Topics for This Week

Chapter 4: Network Layer

COMP 3331/9331: Computer Networks and Applications

Lecture 19: Network Layer Routing in the Internet

Interplay Between Routing, Forwarding

Routing. Jens A Andersson Communication Systems

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

Routing Unicast routing protocols

Routing Algorithms : Fundamentals of Computer Networks Bill Nace

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

BGP. Daniel Zappala. CS 460 Computer Networking Brigham Young University

Chapter 4 Network Layer

Chapter 4: Network Layer

Telecomunicazioni. Docente: Andrea Baiocchi. DIET - Stanza 107, 1 piano palazzina P. Piga Via Eudossiana 18

Master Course Computer Networks IN2097

CSCE 463/612 Networks and Distributed Processing Spring 2017

Telecomunicazioni. Docente: Andrea Baiocchi DIET - Stanza 107, 1 piano palazzina P. Piga Via Eudossiana 18

Shortest Paths Algorithms and the Internet: The Distributed Bellman Ford Lecturer: Prof. Chiara Petrioli

PART III. Implementing Inter-Network Relationships with BGP

Announcement. Project 2 extended to 2/20 midnight Project 3 available this weekend Homework 3 available today, will put it online

Computer Networking. Intra-Domain Routing. RIP (Routing Information Protocol) & OSPF (Open Shortest Path First)

Routing Algorithm Classification. A Link-State Routing Algorithm

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

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

EE 122: Intra-domain routing

UNIT III THE NETWORK LAYER

Chapter 4 Network Layer

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

Transcription:

Internet rou)ng V. Arun CS491G: Computer Networking Lab University of MassachuseFs Amherst Slide material copyright 1996-2013 J.F Kurose and K.W. Ross, All Rights Reserved

Graph abstraction 5 graph: G = (N,E) u 1 2 v x 2 3 1 3 w y 1 5 2 z N = set of routers = { u, v, w, x, y, z } E = set of links ={ (u,v), (u,x), (v,x), (v,w), (x,w), (x,y), (w,y), (w,z), (y,z) } Network Layer 4-2

Graph abstraction: costs u 1 2 5 v 2 x 3 1 3 w y 1 5 2 z c(x,x ) = cost of link (x,x ) e.g., c(w,z) = 5 cost could always be 1, or inversely related to bandwidth, or related to congestion cost of path (x 1, x 2, x 3,, x p ) = c(x 1,x 2 ) + c(x 2,x 3 ) + + c(x p-1,x p ) key question: what is the least-cost path between u and z? routing algorithm: algorithm that finds that least cost path Network Layer 4-3

Routing algorithm classification Q: global or decentralized information? global: v all routers have complete topology, link cost info v link state algorithms decentralized: v router knows physicallyconnected neighbors, link costs to neighbors v iterative process of computation, exchange of info with neighbors v distance vector algorithms Q: static or dynamic? static: v routes change slowly over time dynamic: v routes change more quickly periodic update in response to link cost changes Network Layer 4-4

4. Internet Routing: Outline 4.5 routing algorithms link state distance vector hierarchical routing 4.6 routing in the Internet RIP OSPF BGP Network Layer 4-5

A Link-State Routing Algorithm Dijkstra s algorithm v net topology, link costs known to all nodes accomplished via link state broadcast all nodes have same info v computes least cost paths from one node ( source ) to all other nodes gives forwarding table for that node v iterative: after k iterations, know least cost path to k dest. s notation: v c(x,y): link cost from node x to y; = if not direct neighbors v D(v): current value of cost of path from source to dest. v v p(v): predecessor node along path from source to v v N': set of nodes whose least cost path definitively known Network Layer 4-6

Dijsktra s Algorithm 5 1 Initialization: 2 N' = {u} 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(u,v) 6 else D(v) = 7 8 Loop u 1 2 v 2 x 3 1 3 w y 1 5 2 z??? until all nodes in N' Network Layer 4-7

Dijsktra s Algorithm 5 1 Initialization: v 3 w 2 N' = {u} 2 3 for all nodes v u 2 1 3 4 if v adjacent to u 1 5 then D(v) = c(u,v) x y 1 6 else D(v) = 7 8 Loop 9 find w not in N' such that D(w) is a minimum 10 add w to N' 11 update D(v) for all v adjacent to w and not in N' : 12 D(v) = min( D(v), D(w) + c(w,v) ) 13 /* new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v */ 15 until all nodes in N' 5 2 z Network Layer 4-8

Dijkstra s algorithm: example D(v) p(v) D(w) p(w) D(x) p(x) D(y) p(y) D(z) p(z) Step N' 0 u 7,u 3,u 5,u 1 uw 6,w 5,u 11,w 2 uwx 6,w 11,w 14,x 3 uwxv 10,v 14,x 4 uwxvy 12,y 5 uwxvyz notes: v v construct shortest path tree by tracing predecessor nodes ties can exist (can be broken arbitrarily) u 5 3 x w v 4 8 7 3 7 4 9 y 2 z Network Layer 4-9

Network Layer 4-10 Dijkstra s algorithm: another example Step 0 1 2 3 4 5 N' u ux uxy uxyv uxyvw uxyvwz D(v),p(v) 2,u 2,u 2,u D(w),p(w) 5,u 4,x 3,y 3,y D(x),p(x) 1,u D(y),p(y) 2,x D(z),p(z) 4,y 4,y 4,y u y x w v z 2 2 1 3 1 1 2 5 3 5

Dijkstra s algorithm: example (2) resulting shortest-path tree from u: v w u z x y resulting forwarding table in u: destination v x y w z link (u,v) (u,x) (u,x) (u,x) (u,x) Network Layer 4-11

Dijkstra s algorithm, discussion algorithm complexity: n nodes v each iteration: need to check all nodes, w, not in N v n(n+1)/2 comparisons: O(n 2 ) v more efficient implementations possible: O(nlogn) oscillations possible: v e.g., support link cost equals amount of carried traffic: D A 1 1+e 0 0 0 e B C 1 1 A 2+e 0 D 0 1+e 1 C 0 B D A 0 2+e 1 0 0 C 1+e B A 2+e 0 D 0 1+e 1 C 0 B e initially given these costs, find new routing. resulting in new costs given these costs, find new routing. resulting in new costs given these costs, find new routing. resulting in new costs Network Layer 4-12

4. Internet Routing: Outline 4.5 routing algorithms link state distance vector hierarchical routing 4.6 routing in the Internet RIP OSPF BGP Network Layer 4-13

Distance vector algorithm Bellman-Ford equation (dynamic programming) let d x (y) := cost of least-cost path from x to y then d x (y) = min {c(x,v) + d v (y) } v cost from neighbor v to destination y cost to neighbor v min taken over all neighbors v of x Network Layer 4-14

Bellman-Ford example u 1 2 5 v x 2 3 1 3 w y 1 5 2 z clearly, d v (z) = 5, d x (z) = 3, d w (z) = 3 B-F equation says: d u (z) = min { c(u,v) + d v (z), c(u,x) + d x (z), c(u,w) + d w (z) } = min {2 + 5, 1 + 3, 5 + 3} = 4 node achieving minimum is next hop in shortest path, used in forwarding table Network Layer 4-15

Distance vector algorithm v D x (y) = estimate of least cost from x to y x maintains distance vector D x = [D x (y): y є N ] v node x: knows cost to each neighbor v: c(x,v) maintains its neighbors distance vectors. For each neighbor v, x maintains D v = [D v (y): y є N ] Network Layer 4-16

Distance vector algorithm key idea: v from time-to-time, each node sends its own distance vector estimate to neighbors v when x receives new DV estimate from neighbor, it updates its own DV using B-F equation: D x (y) min v {c(x,v) + D v (y)} for each node y N v under minor, natural conditions, the estimate D x (y) converge to the actual least cost d x (y) Network Layer 4-17

Distance vector algorithm iterative, asynchronous: each local iteration caused by: v local link cost change v DV update message from neighbor distributed: v each node notifies neighbors only when its DV changes neighbors then notify their neighbors if necessary each node: wait for (change in local link cost or msg from neighbor) recompute estimates if DV to any dest has changed, notify neighbors Network Layer 4-18

node x table from x y z cost to x y z 0 2 7 D x (y) = min{c(x,y) + D y (y), c(x,z) + D z (y)} = min{2+0, 7+1} = 2 from x y z x y z 0 cost to 2 3 2 0 1 7 1 0 D x (z) = min{c(x,y) + D y (z), c(x,z) + D z (z)} = min{2+1, 7+0} = 3 node y table from x y z cost to x y z 2 0 1 x 2 y 7 1 z node z table from cost to x y z x y z 7 1 0 time Network Layer 4-19

node x table from x y z node y table from x y z cost to x y z 0 2 7 x y z D x (y) = min{c(x,y) + D y (y), c(x,z) + D z (y)} = min{2+0, 7+1} = 2 cost to 2 0 1 from from x y z x y z x y z 0 cost to 2 cost to x y z 0 2 7 2 0 1 3 2 0 1 7 1 0 7 1 0 from from x y z x y z cost to x y z 0 2 3 2 0 1 3 1 0 cost to x y z 0 2 3 2 0 1 3 1 0 D x (z) = min{c(x,y) + D y (z), c(x,z) + D z (z)} = min{2+1, 7+0} = 3 x 2 y 7 1 z node z table from cost to x y z x y z 7 1 0 from x y z cost to x y z 0 2 7 2 0 1 3 1 0 from x y z cost to x y z 0 2 3 2 0 1 3 1 0 time Network Layer 4-20

Distance vector: link cost changes link cost changes: v node detects local link cost change v updates routing info, recalculates distance vector v if DV changes, notify neighbors x 1 4 y 50 1 z good news travels fast t 0 : y detects link-cost change, updates its DV, informs its neighbors. t 1 : z receives update from y, updates its table, computes new least cost to x, sends its neighbors its DV. t 2 : y receives z s update, updates its distance table. y s least costs do not change, so y does not send a message to z. Network Layer 4-21

Distance vector: link cost changes link cost changes: v node detects local link cost change v bad news travels slow - count to infinity problem! v 44 iterations before algorithm stabilizes! poisoned reverse: v If Z routes through Y to get to X : Z tells Y its (Z s) distance to X is infinite (so Y won t route to X via Z) v will this completely solve count to infinity problem? 60 x 4 y 50 1 z Network Layer 4-22

Comparison of LS and DV algorithms message complexity v v LS: with n nodes, E links, O(nE) msgs sent DV: exchange between neighbors only convergence time varies speed of convergence v v LS: O(n 2 ) algorithm requires O(nE) msgs may have oscillations DV: convergence time varies may be routing loops count-to-infinity problem robustness: what happens if router malfunctions? LS: node can advertise incorrect link cost each node computes only its own table DV: DV node can advertise incorrect path cost each node s table used by others error propagate thru network Network Layer 4-23

4. Internet Routing: Outline 4.5 routing algorithms link state distance vector hierarchical routing 4.6 routing in the Internet RIP OSPF BGP Network Layer 4-24

Hierarchical routing our routing study thus far - idealization v all routers identical v network flat not true in practice scale: with 600 million destinations: v can t store all dest s in routing tables! v routing table exchange would swamp links! administrative autonomy v internet = network of networks v each network admin may want to control routing in its own network Network Layer 4-25

Hierarchical routing v aggregate routers into regions, autonomous systems (AS) v routers in same AS run same routing protocol intra-as routing protocol routers in different AS can run different intra- AS routing protocol gateway router: v at edge of its own AS v has link to router in another AS Network Layer 4-26

Interconnected ASes 3c 3a 3b AS3 1a 1c 1d 1b Intra-AS Routing algorithm AS1 Forwarding table Inter-AS Routing algorithm 2a 2c AS2 2b v forwarding table configured by both intraand inter-as routing algorithm intra-as sets entries for internal dests inter-as & intra-as sets entries for external dests Network Layer 4-27

Inter-AS tasks v suppose router in AS1 receives datagram destined outside of AS1: router should forward packet to gateway router, but which one? AS1 must: 1. learn which dests are reachable through AS2, which through AS3 2. propagate this reachability info to all routers in AS1 job of inter-as routing! 3c other networks 3b 3a AS3 1a AS1 1c 1d 1b 2a AS2 2c 2b other networks Network Layer 4-28

Example: setting forwarding table in router 1d v suppose AS1 learns (via inter-as protocol) that subnet x reachable via AS3 (gateway 1c), but not via AS2 inter-as protocol propagates reachability info to all internal routers v router 1d determines from intra-as routing info that its interface I is on the least cost path to 1c installs forwarding table entry (x,i) other networks 3c 3a 3b AS3 1a AS1 1c 1d x 1b 2a AS2 2c 2b other networks Network Layer 4-29

Example: choosing among multiple ASes v now suppose AS1 learns from inter-as protocol that subnet x is reachable from AS3 and from AS2. v to configure forwarding table, router 1d must determine which gateway it should forward packets towards for dest x this is also job of inter-as routing protocol! 3c x other networks 3b 3a AS3 1a AS1 1c 1d? 1b 2a AS2 2c 2b other networks Network Layer 4-30

Example: choosing among multiple ASes v now suppose AS1 learns from inter-as protocol that subnet x is reachable from AS3 and from AS2. v to configure forwarding table, router 1d must determine towards which gateway it should forward packets for dest x this is also job of inter-as routing protocol! v hot potato routing: send packet towards closest of two routers. learn from inter-as protocol that subnet x is reachable via multiple gateways use routing info from intra-as protocol to determine costs of least-cost paths to each of the gateways hot potato routing: choose the gateway that has the smallest least cost determine from forwarding table the interface I that leads to least-cost gateway. Enter (x,i) in forwarding table Network Layer 4-31

4. Internet Routing: Outline 4.5 routing algorithms link state distance vector hierarchical routing 4.6 routing in the Internet RIP OSPF BGP Network Layer 4-32

Intra-AS Routing v also known as interior gateway protocols (IGP) v most common intra-as routing protocols: RIP: Routing Information Protocol OSPF: Open Shortest Path First IGRP: Interior Gateway Routing Protocol (Cisco proprietary) Network Layer 4-33

RIP ( Routing Information Protocol) v included in BSD-UNIX distribution in 1982 v distance vector algorithm distance metric: # hops (max = 15 hops), each link has cost 1 DVs exchanged with neighbors every 30 sec in response message (aka advertisement) each advertisement: list of up to 25 destination subnets (in IP addressing sense) from router A to destination subnets: z u A C B D v y w x subnet hops u 1 v 2 w 2 x 3 y 3 z 2 Network Layer 4-34

RIP: example w x y A D B z C routing table in router D destination subnet next router # hops to dest w A 2 y B 2 z B 7 x -- 1..... Network Layer 4-35

RIP: example A-to-D advertisement next hops dest w - 1 x - 1 z C 4.... w x y A D B z C routing table in router D destination subnet next router # hops to dest w A 2 y B 2 A z B 7 5 x -- 1..... Network Layer 4-36

RIP: link failure, recovery if no advertisement heard after 180 sec --> neighbor/ link declared dead routes via neighbor invalidated new advertisements sent to neighbors neighbors in turn send out new advertisements (if tables changed) link failure info quickly (?) propagates to entire net poison reverse used to prevent ping-pong loops (infinite distance = 16 hops) Network Layer 4-37

RIP table processing v RIP routing tables managed by application-level process called route-d (daemon) v advertisements sent in UDP packets, periodically repeated routed routed transport (UDP) transprt (UDP) network (IP) forwarding table forwarding table network (IP) link link physical physical Network Layer 4-38

EIGRP enhancements to the DV algorithm v Split-horizon In routing updates sent out interface X, do not include routing information about routes that refer to interface X as the outgoing interface v Route poisoning Advertize a failed route with a metric value of infinity. (16 in the case of RIP) v Poison reverse When learning of a failed route, suspend split-horizon rule for that route, and advertise a poisoned route. v Triggered update When a route fails, send an update immediately. v Holddown Process & Timer: 39

Example: Stable Network 40

Example: Route Poisoning Advertize a failed route with a metric value of infinity. (16 in the case of RIP) 41

Example: Count-to-infinity Continues until the advertised metric reach 16 42

Example: Split Horizon In routing updates sent out interface X, do not include routing information about routes that refer to interface X as the outgoing interface 43

Example: Poison Reverse & Triggered Update Poison Reverse: When learning of a failed route, suspend split-horizon rule for that route, and advertise a poisoned route. Triggered Updates: When a route fails, send an update immediately. Triggered Poison Reverse 44

OSPF (Open Shortest Path First) v open : publicly available v uses link state algorithm LS packet dissemination topology map at each node route computation using Dijkstra s algorithm v OSPF advertisement carries one entry per neighbor v advertisements flooded to entire AS carried in OSPF messages directly over IP (rather than TCP or UDP v IS-IS routing protocol: nearly identical to OSPF Network Layer 4-45

OSPF advanced features (not in RIP) v security: all OSPF messages authenticated (to prevent malicious intrusion) v multiple same-cost paths allowed (only one path in RIP) v 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) v integrated uni- and multicast support: Multicast OSPF (MOSPF) uses same topology data base as OSPF v hierarchical OSPF in large domains. Network Layer 4-46

Hierarchical OSPF boundary router backbone router area border routers backbone area 3 area 1 area 2 internal routers Network Layer 4-47

Hierarchical OSPF v two-level hierarchy: local area, backbone. link-state advertisements only in area each nodes has detailed area topology; only know direction (shortest path) to nets in other areas. v area border routers: summarize distances to nets in own area, advertise to other Area Border routers. v backbone routers: run OSPF routing limited to backbone. v boundary routers: connect to other AS s. Network Layer 4-48

Internet inter-as routing: BGP v BGP (Border Gateway Protocol): the de facto inter-domain routing protocol glue that holds the Internet together v BGP provides each AS a means to: ebgp: obtain subnet reachability information from neighboring ASs. ibgp: propagate reachability information to all ASinternal routers. determine good routes to other networks based on reachability information and policy. v allows subnet to advertise its existence to rest of Internet: I am here Network Layer 4-49

BGP basics v BGP session: two BGP routers ( peers ) exchange BGP messages: advertising paths to destination prefixes ( path vector protocol) exchanged over semi-permanent TCP connections v when AS3 advertises a prefix to AS1: AS3 promises it will forward datagrams towards that prefix AS3 can aggregate prefixes in its advertisement other networks 3b 3c AS3 3a 1a AS1 BGP message 1c 1d 1b 2a AS2 2c 2b other networks Network Layer 4-50

BGP basics: distributing path information v using ebgp session between 3a and 1c, AS3 sends prefix reachability info to AS1. 1c can then use ibgp do distribute new prefix info to all routers in AS1 1b can then re-advertise new reachability info to AS2 over 1bto-2a ebgp session v when router learns of new prefix, it creates entry for prefix in its forwarding table. other networks 3b 3a AS3 1a AS1 1c 1d ebgp session ibgp session 1b 2a AS2 2c 2b other networks Network Layer 4-51

Path attributes and BGP routes v advertised prefix includes BGP attributes prefix + attributes = route v two important attributes: AS-PATH: contains ASs through which prefix advertisement has passed: e.g., AS 67, AS 17 NEXT-HOP: indicates specific internal-as router to nexthop AS. (may be multiple links from current AS to nexthop-as) v gateway router receiving route advertisement uses import policy to accept/decline e.g., never route through AS x policy-based routing Network Layer 4-52

BGP route selection (import policy) v router may learn about more than 1 route to destination AS, selects route based on: 1. local preference value attribute: policy decision 2. shortest AS-PATH 3. closest NEXT-HOP router: hot potato routing 4. additional criteria Network Layer 4-53

BGP re-announce (export policy) v Routers commonly use valley-free routing export policy Never advertise peer or provider routes to another peer or provider. v Examples (arrows indicate $ flow or customer à provider relationship, else peering): Q: Which of the above routes are permitted by valley free export policy? Network Layer 4-54

BGP messages v BGP messages exchanged between peers over TCP connection v BGP messages: OPEN: opens TCP connection to peer and authenticates sender 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 Network Layer 4-55

BGP routing policy W A B C X legend: provider network customer network: Y v A,B,C are provider networks v X,W,Y are customer (of provider networks) v X is dual-homed: attached to two networks X does not want to route from B via X to C.. so X will not advertise to B a route to C Network Layer 4-56

BGP routing policy (2) W A B C X legend: provider network customer network: Y v A advertises path AW to B v B advertises path BAW to X v Should B advertise path BAW to C? No way! B gets no revenue for routing CBAW since neither W nor C are B s customers B wants to force C to route to w via A B wants to route only to/from its customers! Network Layer 4-57

Why different Intra-, Inter-AS routing? policy: v inter-as: admin wants control over how its traffic routed, who routes through its net. v intra-as: single admin, so no policy decisions needed scale: v hierarchical routing saves table size, reduced update traffic performance: v intra-as: can focus on performance v inter-as: policy may dominate over performance Network Layer 4-58