Internet Lab (iLabX) Dynamic Routing Christian Lbben - - PowerPoint PPT Presentation

internet lab ilabx dynamic routing
SMART_READER_LITE
LIVE PREVIEW

Internet Lab (iLabX) Dynamic Routing Christian Lbben - - PowerPoint PPT Presentation

Chair of Network Architectures and Services Department of Informatics Technical University of Munich Internet Lab (iLabX) Dynamic Routing Christian Lbben ilabx@net.in.tum.de Chair of Network Architectures and Services Department of


slide-1
SLIDE 1

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

Internet Lab (iLabX) Dynamic Routing

Christian Lübben ilabx@net.in.tum.de

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

Lab 2 – WiSe 2019

slide-2
SLIDE 2

Outline

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

1/45

slide-3
SLIDE 3

Outline

Practice: Routing Prococols RIP OSPF BGP

2/45

slide-4
SLIDE 4

Outline

Meta Recap Background: Internet Architecture Theory: Routing Algorithms Practice: Routing Prococols

3/45

slide-5
SLIDE 5

Recordings

  • check that you can log in and access video recordings (media.net.in.tum.de)
  • slides are with the videos (media portal)
  • slides of previous term in prelab (e-learning system)
  • slides as-held after the lecture in ’Lecture Material’ (e-learning system)

4/45

slide-6
SLIDE 6

Lecture Schedule Update

  • dynamic routing, TCP/UDP

, DNS delayed by one week

  • lab schedule is up to date
  • TUMonline schedule is not yet up to date
  • oral attestations NOT delayed

5/45

slide-7
SLIDE 7

Outline

Meta Recap Background: Internet Architecture Theory: Routing Algorithms Practice: Routing Prococols

6/45

slide-8
SLIDE 8

Recap: Network Layer

7/45

slide-9
SLIDE 9

Outline

Meta Recap Background: Internet Architecture Internet Exchange Points (IXPs) Autonomous Systems Routing between ASes Theory: Routing Algorithms Practice: Routing Prococols

8/45

slide-10
SLIDE 10

Example: Traceroute from TUM I8 to google.de

  • hops 1–4, Leibniz-Rechenzentrum (LRZ), AS12816
  • hops 5–6, Deutsches Forschungsnetz (DFN), AS680
  • hops 7–10, Google, AS15169

9/45

slide-11
SLIDE 11

Example: DFN Network L2 Topology and PoPs

Glasfasertopologie des X-WiN 1

X-WiN-Topologie: Glasfasern

Glasfaser Bestand Kernnetzknoten Bestand

Stand: Oktober 2018

Source: https://www.dfn.de/fileadmin/1Dienstleistungen/XWIN/Topologie.pdf

10/45

slide-12
SLIDE 12

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
  • access providers (“eyeball networks”), content consumption
  • transit providers

11/45

slide-13
SLIDE 13

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)

12/45

slide-14
SLIDE 14

Example: Top Content Providers in Oregon Univ. Network

Source: B. Yeganeh, R. Rejaie, W. Willinger. A view from the edge: A stub-AS perspective of traffic localization and its implications. TMA 2017

13/45

slide-15
SLIDE 15

Example: The Google Edge Network

Source: https://peering.google.com/#/infrastructure

14/45

slide-16
SLIDE 16

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), see https://peeringdb.com/ix/31
  • AMS-IX (Amsterdam), see https://peeringdb.com/ix/26
  • LINX (London), see https://peeringdb.com/ix/18

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

15/45

slide-17
SLIDE 17

DE-CIX Frankfurt: Topology

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

16/45

slide-18
SLIDE 18

DE-CIX Frankfurt: Core Switch

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

17/45

slide-19
SLIDE 19

DE-CIX Frankfurt: Throughput (2 days)

Source: https://www.de-cix.net/en/locations/germany/frankfurt/statistics

18/45

slide-20
SLIDE 20

DE-CIX Frankfurt: Throughput (5 years)

Source: https://www.de-cix.net/en/locations/germany/frankfurt/statistics

19/45

slide-21
SLIDE 21

Connecting Autonomous Systems Definition: Autonomous System (AS)

  • 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

20/45

slide-22
SLIDE 22

Terminology: Autonomous Systems

21/45

slide-23
SLIDE 23

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: 800k entries
  • IPv6: 60k entries

22/45

slide-24
SLIDE 24

Outline

Meta Recap Background: Internet Architecture Theory: Routing Algorithms Problem Definition Link-State Routing Distance-Vector Routing Practice: Routing Prococols

23/45

slide-25
SLIDE 25

Static /. Dynamic Routing Static Routing

manual construction of routing tables

24/45

slide-26
SLIDE 26

Static /. Dynamic Routing Static Routing

manual construction of routing tables

  • does not scale

24/45

slide-27
SLIDE 27

Static /. Dynamic Routing Static Routing

manual construction of routing tables

  • does not scale
  • does not react to changes (e.g. link failure)

24/45

slide-28
SLIDE 28

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)

24/45

slide-29
SLIDE 29

Problem Definition

  • find a path from the source to the destination host

D B C E F A

SRC DST

25/45

slide-30
SLIDE 30

Problem Definition cont’d

  • each hop (i.e. router or AS) forwards a packet closer to its

destination based on the information in its FIB

SRC DST

26/45

slide-31
SLIDE 31

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

27/45

slide-32
SLIDE 32

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

28/45

slide-33
SLIDE 33

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)

29/45

slide-34
SLIDE 34

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

30/45

slide-35
SLIDE 35

Dijkstra’s Algorithm with Source Node u

Initialization : N' = {u} # visited nodes for all nodes v if v is neighbor of u then D(v) = c(u,v) else D(v) = ∞ Loop find w not in N' such that D(w) is minimum add w to N' for each neighbor v of w if v not in N': D(v) = min( D(v), D(w) + c(w,v) ) until N' = N

31/45

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)

32/45

slide-37
SLIDE 37

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

32/45

slide-38
SLIDE 38

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 ∞

32/45

slide-39
SLIDE 39

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

32/45

slide-40
SLIDE 40

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

32/45

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

32/45

slide-42
SLIDE 42

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

32/45

slide-43
SLIDE 43

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)

33/45

slide-44
SLIDE 44

Distance Vector Algorithm Bellman-Ford equation:

Dx(y) = minv(c(x, v) + Dv(y)) minimum distance from x to y Initialization : for all nodes x,y in N Dx(y) = c(x,y) if y is neigbor of x Dx(y) = ∞ else Loop forever: for all neighbors v of x: Dx(y) = minv(c(x,v) + Dv(y)) if Dx(y) changed: send Dx(y) to all neighbors

34/45

slide-45
SLIDE 45

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

35/45

slide-46
SLIDE 46

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

35/45

slide-47
SLIDE 47

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

35/45

slide-48
SLIDE 48

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

35/45

slide-49
SLIDE 49

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

35/45

slide-50
SLIDE 50

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

35/45

slide-51
SLIDE 51

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)

36/45

slide-52
SLIDE 52

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

37/45

slide-53
SLIDE 53

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

37/45

slide-54
SLIDE 54

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

37/45

slide-55
SLIDE 55

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

37/45

slide-56
SLIDE 56

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"])

38/45

slide-57
SLIDE 57

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

39/45

slide-58
SLIDE 58

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

39/45

slide-59
SLIDE 59

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

39/45

slide-60
SLIDE 60

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

40/45

slide-61
SLIDE 61

Outline

Meta Recap Background: Internet Architecture Theory: Routing Algorithms Practice: Routing Prococols RIP OSPF BGP

41/45

slide-62
SLIDE 62

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

42/45

slide-63
SLIDE 63

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

43/45

slide-64
SLIDE 64

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

44/45

slide-65
SLIDE 65

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 (>800.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

45/45