Presentation is loading. Please wait.

Presentation is loading. Please wait.

Network Routing: Link State Routing and BGP 4/2/2008.

Similar presentations


Presentation on theme: "Network Routing: Link State Routing and BGP 4/2/2008."— Presentation transcript:

1 Network Routing: Link State Routing and BGP 4/2/2008

2 Admin. r Course feedback m two more written assignments m one programming assignment (not assigned yet, but already linked on the schedule page just in case you want to play with it; read Chapter 7) r Assignment 3

3 Recap: Distance Vector Routing r Implemented in RIP, IGRP, EIGRP r Many properties m Distributed m Asynchronous m Convergence in finite steps, independent of initial condition if network is connected m Good news propagate fast m Counting-to-infinity problem reverse poison/split horizon

4 Outline  Recap  Distance vector protocols o synchronous Bellman-Ford (SBF) o asynchronous Bellman-Ford (ABF)  destination-sequenced distance vector (DSDV)

5 Destination-Sequenced Distance Vector protocol (DSDV) r An extension of distance vector protocol to address the counting-to-infinity problem r Extension m DSDV tags each route with a sequence number m each destination node D periodically advertises monotonically increasing even-numbered sequence numbers m when a node realizes that its link to a destination is broken, it advertises the route to D with an infinite metric and a sequence number which is one greater than the previous route (i.e. an odd seq. number) the route is repaired by a later even-number advertisement from the destination

6 DSDV: More Detail r Let’s assume the destination node is D r There are optimizations but we present a simple version: m each node maintains only (S B, d B ), where S B is the sequence number at B for destination D and d B is the best distance using a neighbor from B to D r Both periodical and triggered updates m periodically: D increases its seq. by 2 and broadcasts with (S D, 0) m if B is using C as next hop to D and B discovers that C is no longer reachable B increases its sequence number S B by 1, sets d B to , and sends (S B, d B ) to all neighbors A B route update

7 DSDV: Update r Update after receiving a message m assume B sends to A its current state (S B, d B ) m when A receives (S B, d B ) –if S B > S A, then // always update if a higher seq# »S A = S B »if (d B ==  ) d A =  ; else d A = d B + d(A,B) –else if S A == S B, then »if d A > d B + d(A,B) // update for the same seq# only if better route d A = d B + d(A,B) and uses B as next hop A B route update

8 Example r When C discovers that C-D link is down, it increases its seq# and broadcasts its cost to be  1 1 1 1

9 Claim: DSDV Does Not Form Loop r what is a loop? m a loop is a global state (consisting of the nodes’ local states) at a global moment (observed by an oracle) such that there exist nodes A, B, C, … E such that A (locally) thinks B as down stream, B thinks C as down stream, … E thinks A as down stream r Initially no loop (no one has next hop so no loop) r Derive contradiction if a loop forms after a node processes an update, m e.g., when A receives the update from B, A decides to use B as next hop and forms a loop A B update

10 Background: Global Invariants r This is a very effective method in understanding distributed asynchronous protocols r Invariants are defined over the states of the distributed nodes r Consider any node B. r Let’s identify some invariants over the state of node B, i.e., (S B, d B ).

11 Invariants of a Single Node B r Some invariants about the state of a node m S B is non-decreasing m d B is non-increasing for the same sequence number time

12 Invariants of if A Considers B as Next Hop r Some invariants if A considers B as next hop m S A cannot be an odd number, d A is not  m S B  S A because A is having the seq# which B last sent to A; B’s seq# might be increased after B sent its state if S B == S A then d B < d A because d A is based on d B which B sent to A some time ago, d B < d A since all link costs are positive; d B might be decreased after B sent its state A B

13 Loop Freedom of DSDV r Consider a critical moment m A starts to consider B as next hop, and we have a loop  If any link in the loop (X considers Y as next hop) satisfies S Y > S X by transition along the loop S B > S B r If all nodes along the loop have the same sequence number by transition along the loop d B > d B A B X Y update

14 Summary: DSDV r DSDV uses sequence number to avoid routing loops m seq# partitions routing updates from different outside events m within same event, no loop so long each node only decreases its distance r EIGRP: a routing protocol by Cisco routers m Diffusive Update Algorithm (DUAL)

15 Discussion: Distance Vector Routing r What do you like about distance vector routing? r What do you not like about distance vector routing?

16 Churns of DV: One Example N+2 … … 123 N-1 N N+1 N+3 2N Initial Conditions +  All links have cost 1 Problematic Message sequences 1.Node 2 tells 3. Node 3 tells 4…Node N tells N+1. (N-1 messages) 2.Node N+1 tells N+2, N+2 tells N+3,…,2N. (N-1 messages) 3.Now node N-1 tells node N+1 4.Step 2 repeats 5.Now node N-2 tells node N+1 6.… A total of N 2 – 2 messages Question to think about: is this the worst case?

17 Outline  Recap  Distance vector protocols  Link state protocols

18 Link-State Routing r Net topology, link costs are distributed to all nodes m all nodes have same info m thus can compute any types of routes r Each node computes its shortest paths from itself to all other nodes m e.g., use Dijkstra’s algorithm (see backup slides) r Link state distribution accomplished via “link state broadcast”

19 Link State Broadcast r The hard part is link state broadcast m basic approach: forward a link state (link ID, link status) to all links except the incoming link r Question: what are the problems the link state broadcast needs to handle? m broadcast loop (a problem in exam 1) m ordering of events (link up and down) m network partitioning and then merge

20 Link State Broadcast r Each link update is given a sequence number: (initiator, seq#, link, status) m the initiator should increase the seq# for each new update r If the seq# of an update of a link is not higher than the highest seq# a router has seen, drop the update r Otherwise, forward it to all links except the incoming link (see backup slides for the real implementation using packet buffer) r Each seq# has an age field (why?) r Updates are sent periodically (why?)

21 OSPF (Open Shortest Path First) r “Open”: publicly available r Uses Link State algorithm m link state (LS) packet dissemination m topology map at each node m route computation using Dijkstra’s algorithm http://en.wikipedia.org/wiki/Open_Shortest_Path_First

22 OSPF “Advanced” Features (not in RIP) r Multiple same-cost paths allowed (only one path in RIP) r For each link, multiple cost metrics for different Type Of Service (eg, satellite link cost set “low” for best effort; high for real time) r Security: all OSPF messages authenticated (to prevent malicious intrusion); TCP connections used r Hierarchical OSPF

23 Hierarchical OSPF “summarize” distances to nets in own area, advertise to other Area Border routers. run OSPF routing limited to backbone. - Link-state advertisements only in area each nodes has detailed area topology; - only know direction (shortest path) to nets in other areas. Two-level hierarchy: local area, backbone.

24 r Information hiding (filtered) => reduce computation, bandwidth, storage Why Hierarchy? 

25 Discussion: Link State Routing r What do you like about link state routing? r What do you not like about link state routing? Question to think about: which routing protocol (DV or LS) should the Internet use?

26 Outline  Recap  Distance vector protocols  Link state protocols  Routing in the Internet  overview

27 Routing in the Internet r The Global Internet consists of Autonomous Systems (AS) interconnected with each other m An AS is identified by an AS Number (ASN), e.g. Yale ASN is 29 m try % whois -h whois.arin.net “a Yale“

28 Routing with AS r Intra-AS m Different AS’s may run different routing protocols m A protocol running insides an AS is called an Interior Gateway Protocol (IGP) RIP: Routing Information Protocol OSPF: Open Shortest Path First IS-IS: very similar to OSPF (or should we say OSPF is very similar to IS-IS?) E/IGRP: Interior Gateway Routing Protocol (Cisco) r Inter-AS m a protocol runs among AS’s is also called an Exterior Gateway Protocol (EGP) m for global connectivity, a single interdomain routing protocol

29 eBGP b a AS C (RIP intra routing) Routing in the Internet: Example b AS B (OSPF intra routing) AS A (OSPF intra routing) iBGP

30 inter-AS routing between A and B Intra-AS and Inter-AS Routing Host h2 a b b a a C A B d c A.a A.c C.b B.a c b Host h1 Intra-AS routing within AS A intra-AS routing within AS B border (exterior gateway) routers interior (gateway) routers

31 Many Routing Processes on a Single Router Forwarding Table OSPF domain RIP domain BGP OS kernel RIP process RIP routing table Forwarding Table Manager OSPF process OSPF Routing table BGP process BGP routing table

32 Why Partition into Intra- and Inter-AS Routing? r This partition allows ASes flexibility to choose their own intra-AS routing protocols m autonomy r By aggregating many destinations inside an AS into a single destination in interdomain routing, it improves scalability m the partition is a type of hierarchical routing m hierarchical routing improves scalability: only a small number of routers are involved with outside

33 Yale Internet Connectivity Yale Qwest default routes 0.0.0.0/0 pointing to provider. 132.130.0.0/16 128.36.0.0/16 AT&T Internet2

34 Hierarchical Routing May Pay a Price for Path Quality AS 4 AS 3 AS 2 AS 1

35 Outline  Recap  Distance vector protocols  Link state protocols  Routing in the Internet  BGP

36 BGP Setup

37 Internet Interdomain Routing: BGP r BGP (Border Gateway Protocol): the de facto standard r Path Vector protocol: m similar to Distance Vector protocol m a border gateway sends to a neighbor entire path (i.e., a sequence of ASes) to a destination, e.g., gateway X sends to neighbor N its path to dest. Z: path (X,Z) = X,Y1,Y2,Y3,…,Z m if N selects path(X, Z) advertised by X, then: path (N,Z) = N, path (X,Z) X N Z

38 BGP Operations (Simplified) Establish session on TCP port 179 Exchange all active routes Exchange incremental updates AS1 AS2 while (connection is ALIVE) exchange UPDATE message select best available route if route changes, export to neigh. BGP session

39 BGP Messages r Four types of messages m OPEN: opens TCP connection to peer and authenticates sender m UPDATE: advertises new path (or withdraws old) m KEEPALIVE keeps connection alive in absence of UPDATES; also ACKs OPEN request m NOTIFICATION: reports errors in previous msg; also used to close connection

40 Why Path Vector? r Path vector prevents counting-to-infinity problem r Path vector allows an AS to define local policies on the ASes of a given path

41 BGP Routing Decision Process routing cache select best path export path to neighbors route selection policy: rank paths export policy: which paths export to which neighbors

42 BGP Route Selection Policy r Typical (Cisco) route selection policy m Highest local pref m Shortest AS path length m Prefer eBGP over iBGP m … Yale Qwest default routes 0.0.0.0/0 pointing to provider. AT&T Internet2

43 Policy Interactions 2 0 3 1 2 1 0 2 0 1 3 0 1 0 3 2 0 3 0 4 3 preferred less preferred The BAD GADGET example: - 0 is the destination - the route selection policy of each AS is to prefer its counter clock-wise neighbor Policy interaction causes routing instability !

44 Backup Slides 44

45 45 Dijkstra’s Algorithm See schedule page for animation

46 46 Dijkstra’s Algorithm Notation:  c(i,j): link cost from node i to j; cost infinite if not direct neighbors  D(v): current value of cost of path from source to destination v  p(v): predecessor node along path from source to destination v  N: set of nodes whose least cost path definitively known

47 47 Dijkstra’s Algorithm 1 Initialization: 2 N = {A} 3 for all nodes v 4 if v adjacent to A 5 then D(v) = c(A,v) 6 else D(v) = infty 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

48 48 Dijkstra’s Algorithm: Example Step 0 1 2 3 4 5 start N A AD ADE ADEB ADEBC ADEBCF D(B),p(B) 2,A D(C),p(C) 5,A 4,D 3,E D(D),p(D) 1,A D(E),p(E) infinity 2,D D(F),p(F) infinity 4,E A E D CB F 2 2 1 3 1 1 2 5 3 5

49 Use Packet Buffer to Distribute Link States The right figure shows the packet buffer at router B A, C, F are its neighbors Add ACK for reliability Avoid multiple update packets from the same source at the same router When a router receives a link update from a source S from neighbor X if no state for S or seq# higher than current, add the state for S, set Ack for X, set Send for other neighbors; if has state for S and seq# of the received update is smaller, ignore; if received seq# equals to the current seq#, set Ack for X, clear Send to X Round-robin among the Ack and Send flags

50 BGP Route Selection Policy r Typical (Cisco) route selection policy m Highest local pref m Shortest AS path length m Prefer eBGP over iBGP m … 50 Yale Qwest default routes 0.0.0.0/0 pointing to provider. AT&T Internet2

51 51 The Gang of Four Link StateVectoring EGP IGP BGP RIP (IS-IS) OSPF


Download ppt "Network Routing: Link State Routing and BGP 4/2/2008."

Similar presentations


Ads by Google