Top Banner
1 Information Network 1 Routing (1) Youki Kadobayashi NAIST ©2012 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.
44

Information Network 1 Routing (1) - NAIST

Mar 16, 2022

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Information Network 1 Routing (1) - NAIST

1

Information Network 1 Routing (1)

Youki Kadobayashi NAIST

©2012 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.

Page 2: Information Network 1 Routing (1) - NAIST

2

The Routing Problem

!   How do I get from source to destination? !   Which path is best? In terms of:

!   Number of hops !   Delay !   Bandwidth !   Policy constraints

!   Who will make decision? !   Router? !   Source?

!   How can we detect failures? !   How much will be the overhead?

S D

©2012 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.

Page 3: Information Network 1 Routing (1) - NAIST

3

The Routing Problem

!   How do I get from source to destination? !   Which path is best? In terms of:

!   Number of hops !   Delay !   Bandwidth !   Policy constraints, cost…

!   Who will make decision? !   Router? !   Source?

!   How can we detect failures? !   How much will be the overhead?

S D

Rogue nation

500ms 500ms

unreliable

©2012 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.

Page 4: Information Network 1 Routing (1) - NAIST

Solution design space for the routing problem

!   Represent network in: !   a graph, or !   a matrix

!   Collect information: !   across the network, or !   toward some routers, or !   only locally among neighbors

!   Compute route at: !   every router, or !   some routers

… solutions are instantiated in routing systems.

4 ©2012 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.

Page 5: Information Network 1 Routing (1) - NAIST

Characterization of routing systems

!  Static routing !   Compute route a priori

!  Dynamic routing !   Reflect dynamic state of network

!  Source-based routing !   Source node computes path to destination

!  Hop-by-hop routing !   Every node computes next hop

5

S D

©2012 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.

Page 6: Information Network 1 Routing (1) - NAIST

Focus of this lecture: dynamic, hop-by-hop routing

!  Static routing !   Compute route a priori

!  Dynamic routing !   Reflect dynamic state of network

!  Source-based routing !   Source node computes path to destination

!  Hop-by-hop routing !   Every node computes next hop

6 ©2012 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.

Page 7: Information Network 1 Routing (1) - NAIST

7

Routing system: its function

!   Provision of end-to-end reachability !   Automatic computation of best path !   Distribution of traffic !   Avoid failing links

!   Fault isolation

!   Reflect administrative policies

©2012 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.

Page 8: Information Network 1 Routing (1) - NAIST

Routing system characterization

!   Representation of network !   Network topology !   Attributes associated with each link

!   Exchange of information !   Communication overhead !   Propagation speed

!   Computation algorithm !   Computation overhead !   Convergence speed

!   Routing system: protocol + information + algorithm

8 ©2012 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.

Page 9: Information Network 1 Routing (1) - NAIST

On network topology

!  Topology: geometric configurations which are unaltered by elastic deformations

9

1

2

3

1

3

2

1 2 3

1 2 3

∞ 1 3 1 ∞ 2 3 2 ∞

Graph representation Matrix representation

©2012 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.

Page 10: Information Network 1 Routing (1) - NAIST

10

Routing system: its structure

!   Routing protocol !   discovers neighbor router;

!   exchanges topology information; !   exchanges link information

→ compute route (RIB: Routing Information Base)

!   Multiple routing protocols → Multiple RIBs !   Consolidate Multiple RIBs into single FIB

(FIB: Forwarding Information Base)

©2012 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.

Page 11: Information Network 1 Routing (1) - NAIST

11

Gateway Model

FIB

Input interfaces Output interfaces

Multiple RIBs

Routing software Topology info, Link status info

Topology info, Link status info

©2012 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.

Page 12: Information Network 1 Routing (1) - NAIST

12

Types of Routing Algorithm

!   Distance vector !   Link state !   Path vector

!   Key difference of these algorithms: !   Topology representation !   Propagation range / frequency / timing of link state !   Algorithm for computing shortest path

!   Design trade-offs: !   Scalability !   Convergence time !   Algorithm simplicity

©2012 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.

Page 13: Information Network 1 Routing (1) - NAIST

13

Questions?

©2012 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.

Page 14: Information Network 1 Routing (1) - NAIST

Distance Vector Routing

©2012 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved. 14

Page 15: Information Network 1 Routing (1) - NAIST

15

Distance vector routing w/ Bellman-Ford algorithm !   1. assign distance vector to myself 0; for others, assign ∞ !   2. send my distance vectors to all neighbor routers !   3. router calculates minimum distance vectors by 1) distance vectors

advertised by neighbor routers and 2) distance from myself to individual neighbor router

!   Initial condition !   bi

(0) ← ∞ (i ≠ D)

! bD(0) ← 0

!   Repetition !   bi

(m) ← minj ∈ Vi{bj(m-1) + dij}

!   Terminal condition !   bi

(m) = bi(m-1)

!   D: destination router, bi(m): distance between router “i” and “D” by m-times iterative calculation, Vi: neighbor routers of router “i”, dij: distance of link between router “i” and j

DN p.397

©2012 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.

Page 16: Information Network 1 Routing (1) - NAIST

16

Problems of distance vector routing

!   For the given number of routers N, !   Time complexity: O(N3) !   Traffic: O(N2)

!   Convergence speed is slow, since it sends distance vector periodically

•  In case of newly created route, or dismissed route

!   Slow convergence speed results in inconsistent and transitional state !   Counting to infinity problem

©2012 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.

Page 17: Information Network 1 Routing (1) - NAIST

17

Counting to infinity problem

A C B

Suppose link B-C went down. B thinks: (C, inf) A says: (C, 2) B thinks: (C, 3) via A B says: (C, 3) A thinks: (C, 4) via B …

1 1 → inf

©2012 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.

Page 18: Information Network 1 Routing (1) - NAIST

18

Split Horizon

A C B

Suppose link B-C went down. B thinks: (C, inf) A says: (C, 2) to everyone except B …

1 1 → inf

!  Workaround for counting to infinity !  Router doesn’t send learned information to

source router

©2012 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.

Page 19: Information Network 1 Routing (1) - NAIST

19

Limitation of split horizon

A C B

Suppose link B-C went down. B thinks: (C, inf) A says: (C, 2) to everyone except B D thinks: (C, 3) via A D says: (C, 3) B thinks: (C, 4) via D …

1 1 → inf

D

1 1

©2012 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.

Page 20: Information Network 1 Routing (1) - NAIST

20

RIP: Routing Information Protocol

!  Distance vector routing !  RIP-2 (IPv4), RIPng (IPv6) !  Used in relatively small network

•  Due to ease of implementation and operation

!  Only for historic interest !   Despite textbook omnipresence..

RFC 2453, RFC 2080

©2012 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.

Page 21: Information Network 1 Routing (1) - NAIST

21

Questions?

©2012 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.

Page 22: Information Network 1 Routing (1) - NAIST

Link-State Routing

©2012 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved. 22

Page 23: Information Network 1 Routing (1) - NAIST

23

Link-state routing

!  Collect router and link information •  Digraph: router as a node, link as an arc

!  Create link state database (LSDB) •  Network map that collects link state information

!  Based on LSDB, calculate the shortest path with the Dijkstra’s shortest path algorithm !   Time complexity: O(N2)

•  Can be further optimized by improved data structure

©2012 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.

Page 24: Information Network 1 Routing (1) - NAIST

24

Dijkstra Algorithm

!   Initially, !   ds ← 0 !   dj ← csj (for every j ∈ V – {s}) !   P ← {s}

!   Find the next closest node: !   di ← minj ∈ V – P {dj} !   P ← P ∪ {i}

!   Update labels: !   dk ← mink ∈ V – P {dk, di + cik}

!   Terminal condition: !   P = V

!   V: all routers, s: starting router, cik: link cost between “i” and “k”,dj: least cost between “s” to “j”, P: router with least cost determined

Try demo yourself: GIDEN

©2012 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.

Page 25: Information Network 1 Routing (1) - NAIST

25

Pros and Cons of Link-State Routing

!   Time complexity: lower than distance vector routing !   Traffic: increases in proportion to the number of links and

routers !   Storage complexity: increases in proportion to the

number of links and routers

!   Convergence time: must be short !   Counting to infinity doesn’t happen !   Flexible configuration of link cost is possible

©2012 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.

Page 26: Information Network 1 Routing (1) - NAIST

26

OSPF: Open Shortest Path First

!   Link state routing protocol for TCP/IP world !   OSPFv2 (IPv4), OSPFv3 (IPv6)

!   Functions !   Recognize neighbor router !   Exchange link state information and create LSDB !   Calculate shortest path tree (spanning tree) !   + Designated Router, Backup Designated Router !   + Hierarchical structure by area !   + Collaboration with EGP

RFC 2328, 5340

©2012 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.

Page 27: Information Network 1 Routing (1) - NAIST

27

OSPF Hello

!   Discover neighbor router on the same link •  send Hello packet to 224.0.0.5, ff02::5 (AllSPFRouters)

!   List of neighbor routers in Hello packet •  check bidirectional communication

!   (select designated router and backup designated router)

!   Send Hello packet periodically to detect link down

©2012 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.

Page 28: Information Network 1 Routing (1) - NAIST

28

Adjacency formation

!   Neighbor → Adjacent !   Routers don’t exchange routing

information unless they are adjacent

!   Formation process: !   Hello → Neighbor !   Synchronize each LSDB !   Synchronized → Adjacent

©2012 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.

Page 29: Information Network 1 Routing (1) - NAIST

29

Questions?

©2012 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.

Page 30: Information Network 1 Routing (1) - NAIST

30

Topology Representation in OSPF

!   LSA (Link State Advertisement) •  Type 1: Router LSA •  Type 2: Network LSA •  Type 3: Summary LSA (network) •  Type 4: Summary LSA (AS boundary) •  Type 5: AS External LSA

!   LSA common header •  Validity period and sequence number in LSA header •  Helps routers to tell if given LSA is fresh

©2012 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.

Page 31: Information Network 1 Routing (1) - NAIST

31

Topology Representation in OSPF (2)

Source: OSPF Version 2, RFC 1583 ©2012 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.

Page 32: Information Network 1 Routing (1) - NAIST

32

Link State Update

!  Flooding !   Forward received LSAs to other interfaces if given

LSAs are fresh

!   Update LSDB, compute shortest path tree again

©2012 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.

Page 33: Information Network 1 Routing (1) - NAIST

33

Questions?

©2012 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.

Page 34: Information Network 1 Routing (1) - NAIST

34

LSA to RIB

LSA

LSA

LSA

LSA

LSDB RIB Dijkstra

directed graph shortest path tree

fragments of directed graph

©2012 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.

Page 35: Information Network 1 Routing (1) - NAIST

35

LSA to RIB (2)

!  The following 3 slides: !   Example of OSPF network

!   Derived directed graph •  Subgraph represented by individual LSA

!   Shortest path tree; rooted at RT6 •  Generated by Dijkstra’s algorith

©2012 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.

Page 36: Information Network 1 Routing (1) - NAIST

36

Example of OSPF Network

©2012 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.

Page 37: Information Network 1 Routing (1) - NAIST

37

Digraph

©2012 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.

Page 38: Information Network 1 Routing (1) - NAIST

38

Shortest path tree; rooted at RT6

©2012 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.

Page 39: Information Network 1 Routing (1) - NAIST

39

OSPF area

!  Solution by divide and conquer algorithm !   Time complexity:

For intra-area link changes, the Dijkstra's Algorithm used in OSPF has a time complexity of O(s*log s), where s is the size of the Area. (X. Xiao et al., “Reducing Routing Table Computation Cost in OSPF”, INET’99)

!   Traffic volume (fault isolation)

!  The following 2 slides: !   Example of OSPF area !   Partitioned digraph

©2012 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.

Page 40: Information Network 1 Routing (1) - NAIST

40

Example of OSPF area

©2012 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.

Page 41: Information Network 1 Routing (1) - NAIST

41

Partitioned Digraph

©2012 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.

Page 42: Information Network 1 Routing (1) - NAIST

42

Gateway Model Revisited

FIB

Input interfaces Output interfaces

RIP

Multiple RIBs

OSPF

Routing software Topology info, Link status info

Topology info, Link status info

©2012 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.

Page 43: Information Network 1 Routing (1) - NAIST

43

Questions?

©2012 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.

Page 44: Information Network 1 Routing (1) - NAIST

44

Summary

!   Routing system: design space, characterization

!   Distance vector routing !   Bellman-Ford algorithm !   RIP protocol (historic)

!   Link state routing ! Dijkstra algorithm !   OSPF protocol

!   Coming in next lecture: !   IGP and EGP, hierarchical routing !   Path vector routing !   Implementation of routing policy

©2012 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.