routing with bgp
play

Routing with BGP Dr. Nils Kammenhuber Chair for Network - PowerPoint PPT Presentation

Chair for Network Architectures and Services Prof. Carle Department for Computer Science TU Mnchen Routing with BGP Dr. Nils Kammenhuber Chair for Network Architectures and Services Institut fr Informatik Technische Universitt


  1. Chair for Network Architectures and Services – Prof. Carle Department for Computer Science TU München Routing with BGP Dr. Nils Kammenhuber Chair for Network Architectures and Services Institut für Informatik Technische Universität München http://www.net.in.tum.de

  2. Overview  Routing algorithms  Link state  Distance Vector  Path Vector  Hierarchical routing  Internet routing protocols  OSPF  BGP  Business considerations  Policy routing  Traffic engineering Internet­Praktikum: Routing mit BGP, WS2011/2012 2 2 Network Security, WS 2008/09, Chapter 9

  3. Short note on pronunciation of the word “routing” ɪ ] r­oo­ting = British English  [‘ru:t ŋ ʊ ɪ ] r­ow­ding = American English  [‘ra d ŋ  Both are correct! Internet­Praktikum: Routing mit BGP, WS2011/2012 3 3 Network Security, WS 2008/09, Chapter 9

  4. Recall: Interplay between routing and forwarding routing algorithm Routing = signalling plane = local forwarding table offline header output link value 0100 3 0101 2 0111 2 1001 1 value in arriving packet’s header 1 0111 2 3 Forwarding = data plane = online Internet­Praktikum: Routing mit BGP, WS2011/2012 4 4 Network Security, WS 2008/09, Chapter 9

  5. Recall: Prefix notation  Separate IP address into  Network address part (the prefix)  Host address part  Prefix notation: 10.11.12.0/24  10.11.12 (i.e., the first 24 bits) is the network part  All following bits identify the host within that network  /24 is the prefix length. • Smaller number = more hosts = „larger“ (!) prefix  Prefixes may be aggregated into larger prefixes  Example: 10.11.12.0/25 and 10.11.12.128/25 into 10.11.12.0/24 Internet­Praktikum: Routing mit BGP, WS2011/2012 5 5 Network Security, WS 2008/09, Chapter 9

  6. Graph abstraction: costs • c(x,x’) =: cost of link (x,x’) e.g.: c(w,z) = 5 5 3 • cost could always be 1, v w 5 2 • or inversely related to u z 2 1 bandwidth, 3 1 2 • or inversely related to x y 1 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 ) Question: What’s the least­cost path between u and z ? Routing algorithm: algorithm that finds least­cost path Internet­Praktikum: Routing mit BGP, WS2011/2012 6 6 Network Security, WS 2008/09, Chapter 9

  7. Routing Algorithm classification Global or decentralized Static or dynamic? information? Global: Static:  All routers have complete  Routes change slowly topology and link cost info over time  link state algorithms (L­S) Decentralized: Dynamic:  Router only knows physically­  Routes change more connected neighbors and quickly link costs to neighbors  periodic update  Iterative process of computation  in response to link = exchange of info with cost changes neighbors  distance vector algorithms (D­V)  Variant: path vector algorithms Internet­Praktikum: Routing mit BGP, WS2011/2012 7 7 Network Security, WS 2008/09, Chapter 9

  8. A Link-State Routing Algorithm  Net topology and link costs made known to each node  Accomplished via link state broadcasts  All nodes have same info  Each node independently computes least­cost paths from one node (“source”) to all other nodes  Usually done using Dijkstra’s shortest­path algorithm • refer to any algorithms & data structures lecture/textbook ⇒ O( n ²) or O( n log n ) • n nodes in network  Gives forwarding table for that node  Result:  All nodes have the same information,  … thus calculate the same shortest paths,  … hence obtain consistent forwarding tables Internet­Praktikum: Routing mit BGP, WS2011/2012 8 8 Network Security, WS 2008/09, Chapter 9

  9. Distance Vector Algorithm (1)  No node knows entire topology  Nodes only communicate with neighbours (i.e., no broadcasts)  Nodes jointly calculate shortest paths  Iterative process  Algorithm == protocol  Distributed application of Bellman­Ford algorithm  Refer to any algorithms&data structures lecture/textbook Internet­Praktikum: Routing mit BGP, WS2011/2012 9 9 Network Security, WS 2008/09, Chapter 9

  10. Distance Vector Algorithm (2) Bellman­Ford Equation (dynamic programming) Let  c( x , y ) := cost of edge from x to y  d x ( y ) := cost of least­cost path from x to y Then d x ( y ) = min {c( x , v ) + d v ( y ) } where min is taken over all neighbours v of x Internet­Praktikum: Routing mit BGP, WS2011/2012 10 10 Network Security, WS 2008/09, Chapter 9

  11. Bellman-Ford example 5 Clearly, d v (z) = 5, d x (z) = 3, d w (z) = 3 3 v w 5 2 B­F equation says: u z 2 1 3 1 d u (z) = min { c(u,v) + d v (z), 2 x y 1 c(u,x) + d x (z), c(u,w) + d w (z) } = min {2 + 5, 1 + 3, 5 + 3} = 4 Node that achieves minimum is next hop in shortest path → forwarding table Internet­Praktikum: Routing mit BGP, WS2011/2012 11 11 Network Security, WS 2008/09, Chapter 9

  12. Distance Vector Algorithm (3)  Define D x ( y ) := estimate of least cost from x to y  Node x knows cost to each neighbour v : c( x , v )  Node x maintains distance vector D x = [ D x ( y ): y ∈ N ] ( N := set of nodes)  Node x also maintains its neighbours’ distance vectors:  For each neighbour v , x maintains D v = [ D v ( y ): y ∈ N ] Internet­Praktikum: Routing mit BGP, WS2011/2012 12 12 Network Security, WS 2008/09, Chapter 9

  13. Distance vector algorithm (4) Basic idea:  From time­to­time, each node sends its own distance vector estimate D to neighbors  Asynchronously  When a node x receives new DV estimate from neighbour, it updates its own DV using B­F equation: ← v {c( x , v ) + D v ( y )} for each node y ∈ N D x ( y ) min  Under minor, natural conditions, these estimates D x ( y ) converge to the actual least cost d x (y) Internet­Praktikum: Routing mit BGP, WS2011/2012 13 13 Network Security, WS 2008/09, Chapter 9

  14. Distance Vector Algorithm (5) Iterative, asynchronous: Each node: Each local iteration caused by: Forever:  local link cost change  DV update message from wait for (change in local link neighbour cost or message arriving from Distributed: neighbour}  Each node notifies neighbors recompute estimates only when its DV changes  neighbours then notify their neighbours if this caused their DV to change if (DV to any destination has  etc. changed) { notify neighbours } Internet­Praktikum: Routing mit BGP, WS2011/2012 14 14 Network Security, WS 2008/09, Chapter 9

  15. Distance Vector Algorithm (6) node x table D x (y) = min{c(x,y) + D y (y), c(x,z) + D z (y)} cost to cost to = min{2+0 , 7+1} = 2 x y z x y z x 0 2 7 x 0 2 3 from from D x (z) = min{ c(x,y) + y y 2 0 1 ∞ ∞ ∞ D y (z), c(x,z) + D z (z) } z z 7 1 0 ∞ ∞ ∞ = min{2+1 , 7+0} = 3 node y table cost to y x y z 2 1 x ∞ ∞ ∞ z x from y 7 2 0 1 z ∞ ∞ ∞ node z table cost to x y z x ∞ ∞ ∞ from y ∞ ∞ ∞ z 7 1 0 time Internet­Praktikum: Routing mit BGP, WS2011/2012 15 15 Network Security, WS 2008/09, Chapter 9

  16. D x (z) = min{ c(x,y) + D x (y) = min{c(x,y) + D y (y), c(x,z) + D z (y)} D y (z), c(x,z) + D z (z) } = min{2+0 , 7+1} = 2 = min{2+1 , 7+0} = 3 node x table cost to cost to cost to x y z x y z x y z x 0 2 7 x 0 2 3 x 0 2 3 from from from y y 2 0 1 ∞ ∞ ∞ y 2 0 1 z z 7 1 0 ∞ ∞ ∞ z 3 1 0 node y table cost to cost to cost to y x y z x y z x y z 2 1 x ∞ ∞ x 0 2 7 ∞ x 0 2 3 z x from from from y y 7 2 0 1 2 0 1 y 2 0 1 z z ∞ ∞ ∞ 7 1 0 z 3 1 0 node z table cost to cost to cost to x y z x y z x y z x 0 2 7 x 0 2 3 x ∞ ∞ ∞ from from from y y 2 0 1 y 2 0 1 ∞ ∞ ∞ z z z 3 1 0 3 1 0 7 1 0 time Internet­Praktikum: Routing mit BGP, WS2011/2012 16 16 Network Security, WS 2008/09, Chapter 9

  17. Distance Vector: link cost changes (1) Link cost changes: 1  node detects local link cost change y 4 1  updates routing info, recalculates x z 50 distance vector  if DV changes, notify neighbors At time t 0 , y detects the link­cost change, updates its “good DV, and informs its neighbors. news At time t 1 , z receives the update from y and updates its travels table. It computes a new least cost to x and sends its fast” neighbors its DV. At time t 2 , y receives z ’s update and updates its distance table. y ’s least costs do not change and hence y does not send any message to z . Internet­Praktikum: Routing mit BGP, WS2011/2012 17 17 Network Security, WS 2008/09, Chapter 9

  18. Distance Vector: link cost changes (2)  But: bad news travels slow — “count to infinity” problem!  In example: Many iterations before algorithm stabilizes! → : 1. Cost increase for y r r ∞  y consults DV, (i.e., link down) 1  y selects “cheaper” route via z (cost 2+1 = 3), y  4 1 Sends update to z and x x (cost to r now 3 instead of 1) z 50 2. z detects cost increase for path to r :  was 1+1, is now 3+1  Sends update to y and x (cost to r now 4 instead of 2) 3. y detects cost increase, sends update to z 4. z detects cost increase, sends update to y 5. …. Internet­Praktikum: Routing mit BGP, WS2011/2012 18 18 Network Security, WS 2008/09, Chapter 9

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend