iLab Dynamic Routing Florian Wohlfart wohlfart@in.tum.de Chair of - - PowerPoint PPT Presentation

ilab
SMART_READER_LITE
LIVE PREVIEW

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 17ss 1 / 40 Outline Recap Background: Internet Architecture


slide-1
SLIDE 1

iLab

Dynamic Routing Florian Wohlfart wohlfart@in.tum.de

Chair of Network Architectures and Services Department of Informatics Technical University of Munich

Lab 3 – 17ss

1 / 40

slide-2
SLIDE 2

Outline

Recap Background: Internet Architecture Autonomous Systems Routing between ASes Internet Exchange Points (IXPs) Theory: Routing Algorithms Problem Definition Link-State Routing Distance-Vector Routing Practice: Routing Prococols RIP OSPF BGP

2 / 40

slide-3
SLIDE 3

Outline

Recap Background: Internet Architecture Autonomous Systems Routing between ASes Internet Exchange Points (IXPs) Theory: Routing Algorithms Problem Definition Link-State Routing Distance-Vector Routing Practice: Routing Prococols RIP OSPF BGP

3 / 40

slide-4
SLIDE 4

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 / 40

slide-5
SLIDE 5

Outline

Recap Background: Internet Architecture Autonomous Systems Routing between ASes Internet Exchange Points (IXPs) Theory: Routing Algorithms Problem Definition Link-State Routing Distance-Vector Routing Practice: Routing Prococols RIP OSPF BGP

5 / 40

slide-6
SLIDE 6

Example: Internet Path from TUM I8 to de-cix.net

LRZ AS12816 DFN DE-CIX DE-CIX

◮ hops 1–4, Leibniz-Rechenzentrum (LRZ), AS12816 ◮ hops 5–6, Deutschen Forschungsnetz, AS680 ◮ hop 7, DE-CIX Management GmbH, AS31638 ◮ hops 8–9, DE-CIX Management GmbH, AS51531 6 / 40

slide-7
SLIDE 7

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 / 40

slide-8
SLIDE 8

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)

Network Operators

◮ backbone networks ◮ Internet service providers (“eyeball networks”) ◮ datacenters ◮ content delivery networks (CDN) ◮ universities, etc. 8 / 40

slide-9
SLIDE 9

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 / 40

slide-10
SLIDE 10

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

10 / 40

slide-11
SLIDE 11

Autonomous Systems (AS) cont’d

11 / 40

slide-12
SLIDE 12

Intra-AS ./ Inter-AS-Routing

Route selection

◮ intra-AS routing: focus best paths ◮ inter-AS routing: often follow political and business policies

⇒ different link metrics and filtering policies

Scalability

◮ LS routing does not scale for the Internet ◮ using hierarchy LS routing can serve large ASes ◮ BGP uses path-vector routing to support >500k routes 12 / 40

slide-13
SLIDE 13

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 13 / 40

slide-14
SLIDE 14

DE-CIX Frankfurt: Topology

Source: https://www.de-cix.net/about/topology/

14 / 40

slide-15
SLIDE 15

DE-CIX Frankfurt: Core Switch

Source: https://press.de-cix.net/graphics/

15 / 40

slide-16
SLIDE 16

DE-CIX Frankfurt: Throughput (2 days)

Source: https://www.de-cix.net/about/statistics/

16 / 40

slide-17
SLIDE 17

DE-CIX Frankfurt: Throughput (5 years)

Source: https://www.de-cix.net/about/statistics/

17 / 40

slide-18
SLIDE 18

Outline

Recap Background: Internet Architecture Autonomous Systems Routing between ASes Internet Exchange Points (IXPs) Theory: Routing Algorithms Problem Definition Link-State Routing Distance-Vector Routing Practice: Routing Prococols RIP OSPF BGP

18 / 40

slide-19
SLIDE 19

Static /. Dynamic Routing

Static Routing

manual construction of routing tables

19 / 40

slide-20
SLIDE 20

Static /. Dynamic Routing

Static Routing

manual construction of routing tables

◮ does not scale 19 / 40

slide-21
SLIDE 21

Static /. Dynamic Routing

Static Routing

manual construction of routing tables

◮ does not scale ◮ does not react to changes (e.g. link failure) 19 / 40

slide-22
SLIDE 22

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)

19 / 40

slide-23
SLIDE 23

Problem Definition

◮ find a path from the source to the destination host

D B C E F A

SRC DST

20 / 40

slide-24
SLIDE 24

Problem Definition cont’d

◮ each hop (=router) forwards a packet closer to its destination

based on the information in its FIB SRC DST

21 / 40

slide-25
SLIDE 25

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

22 / 40

slide-26
SLIDE 26

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

23 / 40

slide-27
SLIDE 27

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) 24 / 40

slide-28
SLIDE 28

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 25 / 40

slide-29
SLIDE 29

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

26 / 40

slide-30
SLIDE 30

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)

27 / 40

slide-31
SLIDE 31

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 ∞ ∞

27 / 40

slide-32
SLIDE 32

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 ∞

27 / 40

slide-33
SLIDE 33

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

27 / 40

slide-34
SLIDE 34

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

27 / 40

slide-35
SLIDE 35

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

27 / 40

slide-36
SLIDE 36

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

27 / 40

slide-37
SLIDE 37

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) 28 / 40

slide-38
SLIDE 38

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

29 / 40

slide-39
SLIDE 39

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

30 / 40

slide-40
SLIDE 40

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

30 / 40

slide-41
SLIDE 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

30 / 40

slide-42
SLIDE 42

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

30 / 40

slide-43
SLIDE 43

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

30 / 40

slide-44
SLIDE 44

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

30 / 40

slide-45
SLIDE 45

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)

31 / 40

slide-46
SLIDE 46

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

32 / 40

slide-47
SLIDE 47

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

32 / 40

slide-48
SLIDE 48

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

32 / 40

slide-49
SLIDE 49

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

32 / 40

slide-50
SLIDE 50

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"]) 33 / 40

slide-51
SLIDE 51

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

34 / 40

slide-52
SLIDE 52

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

34 / 40

slide-53
SLIDE 53

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

34 / 40

slide-54
SLIDE 54

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

35 / 40

slide-55
SLIDE 55

Outline

Recap Background: Internet Architecture Autonomous Systems Routing between ASes Internet Exchange Points (IXPs) Theory: Routing Algorithms Problem Definition Link-State Routing Distance-Vector Routing Practice: Routing Prococols RIP OSPF BGP

36 / 40

slide-56
SLIDE 56

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 37 / 40

slide-57
SLIDE 57

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 38 / 40

slide-58
SLIDE 58

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 39 / 40

slide-59
SLIDE 59

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 (ca. 550.000 IPv4 prefixes) ◮ 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

40 / 40