iLab Dynamic Routing Florian Wohlfart wohlfart@in.tum.de Chair of - - PowerPoint PPT Presentation
iLab Dynamic Routing Florian Wohlfart wohlfart@in.tum.de Chair of - - PowerPoint PPT Presentation
iLab Dynamic Routing Florian Wohlfart wohlfart@in.tum.de Chair of Network Architectures and Services Department of Informatics Technical University of Munich Lab 3 17ws 1 / 41 Outline Recap Background: Internet Architecture Internet
Outline
Recap Background: Internet Architecture Internet Exchange Points (IXPs) Autonomous Systems Routing between ASes Theory: Routing Algorithms Problem Definition Link-State Routing Distance-Vector Routing Practice: Routing Prococols RIP OSPF BGP
2 / 41
Outline
Recap Background: Internet Architecture Internet Exchange Points (IXPs) Autonomous Systems Routing between ASes Theory: Routing Algorithms Problem Definition Link-State Routing Distance-Vector Routing Practice: Routing Prococols RIP OSPF BGP
3 / 41
Recap: Network Layer
wireless LAN browser TCP IP HTTP server TCP IP Ethernet driver WLAN driver IP Ethernet driver WLAN driver
HTTP protocol TCP protocol IP protocol IP protocol Ethernet protocol WLAN protocol
Ethernet router
4 / 41
Outline
Recap Background: Internet Architecture Internet Exchange Points (IXPs) Autonomous Systems Routing between ASes Theory: Routing Algorithms Problem Definition Link-State Routing Distance-Vector Routing Practice: Routing Prococols RIP OSPF BGP
5 / 41
Example: Traceroute from TUM I8 to google.de
LRZ DFN Google
◮ hops 1–4, Leibniz-Rechenzentrum (LRZ), AS12816 ◮ hops 5–6, Deutsches Forschungsnetz (DFN), AS680
peering info: https://peeringdb.com/net/279
◮ hops 7–10, Google, AS15169
peering info: https://peering.google.com, https://peeringdb.com/net/433
6 / 41
Example: DFN Network L2 Topology and PoPs
BAY BIR POT TUB GSI DUI BRE HAN BRA HEI REG DRE/DRN ZIB ILM JEN HUB ADH KEH BAS MUE KAI DES DKR KIE ROS BON KAS PAD GIE MAR GOE DOR WUP FHM WUE EWE AWI GRE FFO ZEU HAM
X-WiN-Topologie: Glasfasern
ERL CHE HWS FRE DUS KIT STU FRB FJL FZJ AAC AAH AUG Glasfaser Bestand Glasfaser geplant Kernnetzknoten Bestand Kernnetzknoten geplant
Stand: September 2015
SAA BIE MAG MDS LAP/LEI BOC FRA GAR
Source: https://www.dfn.de/fileadmin/1Dienstleistungen/XWIN/GF-Topo-2015-10-12.pdf
7 / 41
Internet Architecture
Internet Topology
◮ the Internet is a decentralized network of networks ◮ many organizations operate their own network, which all need
to be interconnected
◮ glue: IP protocol, exchange of routing information (BGP)
Typical Network Operators
◮ content providers
◮ content delivery networks (CDN) support content providers
◮ Internet service providers (“eyeball networks”) ◮ transit providers 8 / 41
Internet Architecture cont’d
Source: C. Labovitz, S. Iekel-Johnson, D. McPherson, J. Oberheide, and F. Jahanian. Internet inter-domain traffic. In Proceedings of the ACM SIGCOMM 2010 conference (SIGCOMM ’10)
9 / 41
Top Content Providers
Source: B. Yeganeh, R. Rejaie, W. Willinger. A view from the edge: A stub-AS perspective of traffic localization and its implications. TMA 2017
10 / 41
Background: Internet Exchange Points (IXPs)
Definition
◮ an exchange point for traffic between network operators ◮ makes it easy to connect to many other networks (via peering) ◮ provides physical infrastructure
Largest IXPs
◮ DE-CIX (Frankfurt), 732 members, 5.6 Tbit/s peak traffic ◮ AMS-IX (Amsterdam), 807 members, 5.5 Tbit/s peak traffic ◮ LINX (London), 786 members, 3.5 Tbit/s peak traffic
Example fees (2016, DE-CIX Frankfurt)
◮ 1 Gbit/s costs 500 Euro/month ◮ 10 Gbit/s costs 1,550 Euro/month ◮ 100 Gbit/s costs 9,500 Euro/month 11 / 41
DE-CIX Frankfurt: Topology
Source: https://www.de-cix.net/about/topology/
12 / 41
DE-CIX Frankfurt: Core Switch
Source: https://press.de-cix.net/graphics/
13 / 41
DE-CIX Frankfurt: Throughput (2 days)
Source: https://www.de-cix.net/en/locations/germany/frankfurt/statistics
14 / 41
DE-CIX Frankfurt: Throughput (5 years)
Source: https://www.de-cix.net/en/locations/germany/frankfurt/statistics
15 / 41
Autonomous Systems (AS)
Definition
◮ networks under a common administrative organization
e.g. ISP network, campus network
◮ an AS is identified by a 32bit AS-number
(was extended from 16bit in 2007)
◮ each AS advertises the address space it is willing to accept
(belonging to the AS itself or as transit traffic)
Implications
◮ from the outside, ASes are viewed as a single entity with border
routers and a routed address space
◮ changes within an AS are not relevant for other ASes
e.g. internal topology, intra-AS routing
◮ all ASes must agree on a common way of exchanging routing
information, inter-AS routing
16 / 41
Autonomous Systems (AS) cont’d
17 / 41
Intra-AS ./ Inter-AS-Routing
Route selection
◮ intra-AS routing: focus on best paths ◮ inter-AS routing: also follow business policies
⇒ different link metrics and filtering policies
Scalability
border routers need to deal with a large number of routing table entries
◮ IPv4: >650k entries ◮ IPv6: 45k entries 18 / 41
Outline
Recap Background: Internet Architecture Internet Exchange Points (IXPs) Autonomous Systems Routing between ASes Theory: Routing Algorithms Problem Definition Link-State Routing Distance-Vector Routing Practice: Routing Prococols RIP OSPF BGP
19 / 41
Static /. Dynamic Routing
Static Routing
manual construction of routing tables
20 / 41
Static /. Dynamic Routing
Static Routing
manual construction of routing tables
◮ does not scale 20 / 41
Static /. Dynamic Routing
Static Routing
manual construction of routing tables
◮ does not scale ◮ does not react to changes (e.g. link failure) 20 / 41
Static /. Dynamic Routing
Static Routing
manual construction of routing tables
◮ does not scale ◮ does not react to changes (e.g. link failure)
Dynamic Routing
distributed algorithms automate the construction of routing tables
◮ scales depending on the algorithm ◮ automated routing table updates after topology changes (with
a certain delay)
20 / 41
Problem Definition
◮ find a path from the source to the destination host
D B C E F A
SRC DST
21 / 41
Problem Definition cont’d
◮ each hop (=router) forwards a packet closer to its destination
based on the information in its FIB SRC DST
22 / 41
Problem Definition cont’d
◮ link metrics attribute cost to links:
e.g. path length, reliability, delay, bandwidth, load, communication cost, or routing policies
D B C E F A
SRC DST
2 3 5 2 1 3 1 2 1
23 / 41
Problem Definition cont’d
routing can be reduced to a graph problem
◮ each node represents a router ◮ each edge represents a link ◮ each link comes with a certain cost, c(X,Y)
D B C E F A
2 3 5 2 1 3 1 2 1
24 / 41
Routing Protocols
Distributed routing algorithms perform the following steps
- 1. gather information about the network topology
- 2. create the local routing table based on the gathered information
Common Routing Protocols and Algorithms
◮ OSPF, IS-IS (Link-State Routing) ◮ RIP (Distance-Vector Routing) ◮ BGP (Path-Vector Routing) 25 / 41
Link-State Routing
Information propagation
◮ each router exchanges link-state updates with each other
router in the network (flooding)
◮ link-state updates contain list of adjacent routers and
networks including costs ⇒ each router knows the whole network topology (global view)
Information processing
◮ each router calculates the shortest paths to every other
destination, e.g. using Dijkstra’s algorithm
◮ derive routing table from shortest path tree
Implementations
◮ OSPF, IS-IS 26 / 41
Dijkstra’s Algorithm with Source Node u
I n i t i a l i z a t i o n : N’ = {u} # v i s i t e d nodes f o r a l l nodes v i f v i s neighbor
- f u then
D( v ) = c (u , v ) e l s e D( v ) = ∞ Loop f i n d w not in N’ such that D(w) i s minimum add w to N’ f o r each neighbor v
- f w
i f v not in N’ : D( v ) = min ( D( v ) , D(w) + c (w, v ) ) u n t i l N’ = N
27 / 41
Example: Dijkstra’s Algorithm for Router A
D B C E F A
2 3 5 2 1 3 1 2 1
N’ D(B), D(C), D(D), D(E), D(F), p(B) p(C) p(D) p(E) p(F)
28 / 41
Example: Dijkstra’s Algorithm for Router A
D B C E F A
2 3 5 2 1 3 1 2 1
N’ D(B), D(C), D(D), D(E), D(F), p(B) p(C) p(D) p(E) p(F) A 2,A ∞ 1,A ∞ ∞
28 / 41
Example: Dijkstra’s Algorithm for Router A
D B C E F A
2 3 5 2 1 3 1 2 1
N’ D(B), D(C), D(D), D(E), D(F), p(B) p(C) p(D) p(E) p(F) A 2,A ∞ 1,A ∞ ∞ A,D 2,A 4,D 2,D ∞
28 / 41
Example: Dijkstra’s Algorithm for Router A
D B C E F A
2 3 5 2 1 3 1 2 1
N’ D(B), D(C), D(D), D(E), D(F), p(B) p(C) p(D) p(E) p(F) A 2,A ∞ 1,A ∞ ∞ A,D 2,A 4,D 2,D ∞ A,D,E 2,A 3,E 4,E
28 / 41
Example: Dijkstra’s Algorithm for Router A
D B C E F A
2 3 5 2 1 3 1 2 1
N’ D(B), D(C), D(D), D(E), D(F), p(B) p(C) p(D) p(E) p(F) A 2,A ∞ 1,A ∞ ∞ A,D 2,A 4,D 2,D ∞ A,D,E 2,A 3,E 4,E A,D,E,B 3,E 4,E
28 / 41
Example: Dijkstra’s Algorithm for Router A
D B C E F A
2 3 5 2 1 3 1 2 1
N’ D(B), D(C), D(D), D(E), D(F), p(B) p(C) p(D) p(E) p(F) A 2,A ∞ 1,A ∞ ∞ A,D 2,A 4,D 2,D ∞ A,D,E 2,A 3,E 4,E A,D,E,B 3,E 4,E A,D,E,B,C 4,E
28 / 41
Example: Dijkstra’s Algorithm for Router A
D B C E F A
2 3 5 2 1 3 1 2 1
N’ D(B), D(C), D(D), D(E), D(F), p(B) p(C) p(D) p(E) p(F) A 2,A ∞ 1,A ∞ ∞ A,D 2,A 4,D 2,D ∞ A,D,E 2,A 3,E 4,E A,D,E,B 3,E 4,E A,D,E,B,C 4,E A,D,E,B,C,F
28 / 41
Distance-Vector Routing
Information propagation
◮ each router exchanges advertisements with its neighbors ◮ advertisements contain a snapshot of the current routing
table (as distance vectors) of the source router ⇒ the routers only have limited information about the network topology (local view)
Information processing
◮ each router keeps distance vectors to all other routers ◮ compute new distance vector on incoming advertisement ◮ derive routing table from distance vectors
Implementations
◮ RIP, BGP (path-vector) 29 / 41
Distance Vector Algorithm
Bellman-Ford equation:
Dx(y) = minv(c(x, v) + Dv(y)) minimum distance from x to y I n i t i a l i z a t i o n : f o r a l l nodes x , y in N Dx ( y ) = c ( x , y ) i f y i s neigbor
- f
x Dx ( y ) = ∞ e l s e Loop f o r e v e r : f o r a l l neighbors v
- f
x : Dx ( y ) = min v ( c ( x , v ) + Dv ( y )) i f Dx ( y ) changed : send Dx ( y ) to a l l neighbors
30 / 41
Example: Distance Vector Algorithm
X Y Z
7 2 1
node: X Y Z cost to: X Y Z X Y Z X Y Z from X: 2 7 ∞ ∞ ∞ ∞ ∞ ∞ from Y: ∞ ∞ ∞ 2 1 ∞ ∞ ∞ from Z: ∞ ∞ ∞ ∞ ∞ ∞ 7 1
31 / 41
Example: Distance Vector Algorithm
X Y Z
7 2 1
(0, 2, 7) (0, 2, 7)
node: X Y Z cost to: X Y Z X Y Z X Y Z from X: 2 7 2 7 2 7 from Y: ∞ ∞ ∞ 2 1 ∞ ∞ ∞ from Z: ∞ ∞ ∞ ∞ ∞ ∞ 7 1
31 / 41
Example: Distance Vector Algorithm
X Y Z
7 2 1
(2, 0, 1) (2, 0, 1)
node: X Y Z cost to: X Y Z X Y Z X Y Z from X: 2 3 2 7 2 7 from Y: 2 1 2 1 2 1 from Z: ∞ ∞ ∞ ∞ ∞ ∞ 3 1
31 / 41
Example: Distance Vector Algorithm
X Y Z
7 2 1
(3, 1, 0) (3, 1, 0)
node: X Y Z cost to: X Y Z X Y Z X Y Z from X: 2 3 2 7 2 7 from Y: 2 1 2 1 2 1 from Z: 3 1 3 1 3 1
31 / 41
Example: Distance Vector Algorithm
X Y Z
7 2 1
(0, 2, 3) (0, 2, 3)
node: X Y Z cost to: X Y Z X Y Z X Y Z from X: 2 3 2 3 2 3 from Y: 2 1 2 1 2 1 from Z: 3 1 3 1 3 1
31 / 41
Example: Distance Vector Algorithm
X Y Z
7 2 1
node: X Y Z cost to: X Y Z X Y Z X Y Z from X: 2 3 2 3 2 3 from Y: 2 1 2 1 2 1 from Z: 3 1 3 1 3 1
31 / 41
Example: Routing Table Computation
node: X Y Z cost to: X Y Z X Y Z X Y Z from X: 2 3 2 3 2 3 from Y: 2 1 2 1 2 1 from Z: 3 1 3 1 3 1 From which router was the best route learned? node: X Y Z cost to: X Y Z X Y Z X Y Z via X: 2 4 5 7 9 10 via Y: 4 2 3 3 1 2 via Z: 10 8 7 4 2 1 e.g. routing table of router X: networks announced by router Y: next hop Y (cost 2), networks announced by router Z: next hop Y (cost 3)
32 / 41
Example: Count-to-Infinity Problem
X Y Z
7 50 1
node: Y Z cost to: X Y Z X Y Z from X: 2 3 2 3 from Y: 4 1 2 1 from Z: 3 1 3 1
33 / 41
Example: Count-to-Infinity Problem
X Y Z
7 50 1
(4, 0, 1) (4, 0, 1)
node: Y Z cost to: X Y Z X Y Z from X: 2 3 2 3 from Y: 4 1 4 1 from Z: 3 1 5 1
33 / 41
Example: Count-to-Infinity Problem
X Y Z
7 50 1
(5, 1, 0) (5, 1, 0)
node: Y Z cost to: X Y Z X Y Z from X: 2 3 2 3 from Y: 6 1 4 1 from Z: 5 1 5 1
33 / 41
Example: Count-to-Infinity Problem
X Y Z
7 50 1
(6, 0, 1) (6, 0, 1)
node: Y Z cost to: X Y Z X Y Z from X: 2 3 2 3 from Y: 6 1 6 1 from Z: 5 1 7 1
33 / 41
Count-to-Infinity Countermeasures
Distance-Vector with Poisoned Reverse
◮ if the shortest path to a destination Y was learned from
neighbor Z, then set DX(Y ) = ∞ in updates to neighbor Z
Path-Vector Routing
◮ Update messages contain full path, this allows loop-detection ◮ e.g. ([0,B], [4,"D,E,A"], [1,"E,F"]) 34 / 41
Example: Poisoned Reverse
X Y Z
7 50 1
node: Y Z cost to: X Y Z X Y Z from X: 2 3 2 3 from Y: 4 1 2 1 from Z: 3 1 3 1
35 / 41
Example: Poisoned Reverse
X Y Z
7 50 1
(∞, 0, 1) (∞, 0, 1)
node: Y Z cost to: X Y Z X Y Z from X: 2 3 2 3 from Y: 4 1 7 1 from Z: 3 1 ∞ 1
35 / 41
Example: Poisoned Reverse
X Y Z
7 50 1
(7, 1, 0) (7, 1, 0)
node: Y Z cost to: X Y Z X Y Z from X: 2 3 2 3 from Y: 8 1 7 1 from Z: 7 1 ∞ 1
35 / 41
Distance-Vector (DV) ./ Link-State Routing (LS)
Scalibility
◮ LS floods the network ◮ DV nodes only talk to their neighbors
Speed of convergence
◮ LS converges fast ◮ DV can converge slowly, e.g. count-to-infinity problem
routing loops may occur temporarily
36 / 41
Outline
Recap Background: Internet Architecture Internet Exchange Points (IXPs) Autonomous Systems Routing between ASes Theory: Routing Algorithms Problem Definition Link-State Routing Distance-Vector Routing Practice: Routing Prococols RIP OSPF BGP
37 / 41
Routing Information Protocol (RIP)
◮ RIPv2, RIPng (supports IPv6)
Basics
◮ interior gateway protocol (IGP) ◮ distance-vector algorithm ◮ link metric: number of hops (link cost= 1, ∞ = 16) ◮ implements poisoned reverse
Routing updates
◮ UDP port 520 ◮ RIP response messages are sent periodically (every 30s) or on
changes
◮ link is declared unreachable after 180s without an update ◮ each advertisement contains routes to max. 25 destinations 38 / 41
Open Shortest Path First (OSPF)
◮ conceived as the successor to RIP, some advanced features ◮ OSPFv3 adds support for IPv6 (2008)
Basics
◮ interior gateway protocol (IGP) ◮ link-state algorithm ◮ multiple same-cost paths ◮ supports hierarchy through definition of areas ◮ messages can be authenticated
Routing updates
◮ IP datagrams with protocol number 89, multicast addressing ◮ can be authenticated 39 / 41
Border Gateway Protocol (BGP)
Background
◮ BGP is the de facto inter-AS routing protocol in the Internet ◮ BGPv4 was introduced in 1994 ◮ extensible to implement new functions ◮ built to scale ◮ implements policy-based routing
Basics
◮ path-vector algorithm (path is a sequece of AS numbers) ◮ uses periodic keepalives and incremental updates 40 / 41
Border Gateway Protocol (BGP) cont’d.
Routing updates
◮ TCP port 179 ◮ eBGP spreads inter-AS routing information between ASes ◮ iBGP spreads inter-AS routing information within an AS ◮ path is a sequence of AS numbers
Problems
◮ routing table growth (>650.000 IPv4 entries) ◮ load balancing in multihomed ASes ◮ security: BGP prefix hijacking
e.g. https://www.ripe.net/publications/news/industry-developments/youtube-hijacking-a-ripe-ncc-ris-case- study