Upload
others
View
0
Download
0
Embed Size (px)
Citation preview
1
Information Network 1 Routing (1)�
Youki Kadobayashi NAIST
©2015 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.
Image: Part of the entire Internet topology based on CAIDA dataset, using NAIST Internet viewer�
2
The Routing Problem
! How do I get from source to destination?
S� D�
©2015 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.
163.221.10.10� 203.178.136.61�
3
The Routing Problem: add some realistic constraints…
! 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 the overhead will be?
S� D�
Rogue ISP�
500ms� 500ms�
unreliable�
©2015 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.
Routing problem can be solved in many ways�
! 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 ©2015 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.
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�
©2015 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.
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 ©2015 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.
7
Routing system has many functions�
! Provision end-to-end reachability ! Automatically compute best path ! Distribute traffic among multiple links� ! Avoid failing links
! Isolate faults
! Reflect administrative policies
… in one system. Isn’t it awesome.�
©2015 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.
Routing system can be characterized by…�
! 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 ©2015 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.
9
Routing system: its structure�
! Routing protocol�! discovers neighbor router;
! exchanges topology information; ! exchanges link information
! Routing algorithm ! computes route (result: RIB - Routing Information Base)
! Integrate information from multiple routing protocols ! Multiple routing protocols → Multiple RIBs ! Consolidate Multiple RIBs into single FIB*
(FIB: Forwarding Information Base) ©2015 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.
Typically, routing protocol discovers network topology�
! Topology: geometric configurations that are unaltered by elastic deformations
10
1�
2�
3�
1�
3�
2�
1 2 3�
1 2 3�
∞ 1 3 1 ∞ 2 3 2 ∞�
Graph representation� Matrix representation�
©2015 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.
11
Gateway Model: a conceptual model of routing system
FIB (forwarding information base)
Input interfaces Output interfaces
Multiple RIBs (routing information base)
Routing software Topology info, Link status info
Topology info, Link status info
©2015 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.
12
Types of Routing Algorithm�
1. Distance vector 2. Link state 3. 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
©2015 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.
13
Questions?
©2015 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.
Distance Vector Routing�
©2015 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved. 14
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
! ���������� ������! ��
���+�.�����0� ��
! � ���+��
! �����������! ��
����+������-���&������������'�
! ����������� ������! ��
�������������
! ���� !���!������"!������������� !�������!$������"!���(�)�����( )��%���!��� ��!���!�#��
����"��!��������������������"!�� ������"!���(�)��������� !���������������!$������"!���(�)�������
DN p.397
©2015 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.
16
RIP: Routing Information Protocol
! Distance vector routing ! RIP-2 (IPv4), RIPng (IPv6) ! Used in relatively small network
• Due to ease of implementation and operation
! Textbook classics
RFC 2453, RFC 2080
©2015 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.
Informal description of RIP�
! Each router sends a list of distance-vectors (route, cost) to each neighbor periodically
! Every router selects the route with smallest metric ! Metric: integer of 1..16, where 16 implies infinity
©2015 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved. 17
A� B� C�cost: 2�cost: 1�
Router� metric�
A� 3�
B� 2�
Router� metric�
A� 1�
C� 2�
Router� metric�
B� 1�
C� 3�
18
Problems of distance vector routing�
! Poor scalability. For the given number of routers N,�! Time complexity: O(N3) ! Traffic: O(N2)
! Slow convergence speed, as it sends distance vector periodically�
! Slow convergence induces inconsistent and transitional state�! => Counting to infinity problem
©2015 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.
19
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 ,�inf
©2015 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.
20
Split Horizon
A C B
Suppose link B-C went down. B thinks: (C, inf) A says: (C, 2) to everyone except B …
� 1 ,�inf
! Workaround for counting to infinity�! Router doesn’t send learned information to source
router
©2015 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.
21
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 ,�inf
D
��
©2015 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.
22
Questions?
! (Dumb questions welcomed while you’re a student)
! Extra hands-on if you are further motivated: ! Introduce link failure and observe counting-to-
infinity problem ! Add 4th router as in the last slide and observe that
split-horizon does not save us
©2015 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.
Lessons from RIP�
! Bellman-Ford: very simple ! But with many traps and pitfalls…
! Guiding principle for using RIP: avoid loops!
! Loops can be easily formed, however. ! Backup links ! Guiding principle can be easily forgotten
• OMG!
! A better alternative: link state routing.
©2015 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved. 23
Link-State Routing�
©2015 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved. 24
25
Link-state routing�
! Collect router and link information�→ Directed graph: router as a node, link as an arc�
! … then create link state database (LSDB)�• A 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�
©2015 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.
26
A high level view of link-state routing�
Router
Link
Router
Link
LSDB RIB Dijkstra
directed graph shortest path tree
fragments of directed graph
©2015 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.
27
Graph representation of routers and links�
Source: OSPF Version 2, RFC 1583�©2015 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.
28
A more complex network�
©2015 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.
29
and its directed graph representation�
©2015 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.
30
Shortest path tree; rooted at RT6�
©2015 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.
31
Questions?
©2015 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.
32
From directed graph to shortest-path trees: Dijkstra Algorithm ! ����������
! � �+��! ���+�� ��������#��%���-���–�& '��! ��+�& '��
! ��� �������������������� ���! ���+������-���–���&��'�! ��+���/�&�'�
! � ����������! ���+������-���–���&������������'�
! ����������� �������! ������
! ����������"!�� �� �� !��!������"!���������������� !���!$����(�)�����(�)�*������� !��� !���!$����( )�!��(�)�������"!���$�!����� !��� !���!��������
©2015 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.
Interconnections p.223�
33
Pros and Cons of Link-State Routing�
! Traffic increases in proportion to the number of links and routers
! Storage complexity increases in proportion to the number of links and routers
! Time complexity: lower than distance vector routing
! Convergence time: must be short, for transient loop issue ! Counting to infinity doesn’t happen
(read: fewer traps and pitfalls)�! Flexible configuration of link cost is possible
(no nonsense like 16 = infinity)
©2015 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.
34
OSPF: Open Shortest Path First
! The link state routing protocol for the Internet�! 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
©2015 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.
35
Discovering neighbor routers with 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�
! 2select designated router and backup designated router3�
! Send Hello packet periodically to detect link down ! keeps pinging, as in ICMP
©2015 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.
36
Information exchange among routers�
! Neighbor1→1Adjacent ! Routers don’t exchange routing
information unless they are adjacent
! Formation process:�! Hello ,�Neighbor�! Synchronize each LSDB�
! Synchronized → Adjacent�
©2015 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.
Hands on: say hello in OSPF!�
! (basic instruction to bring OSPF up and running)
! (establish OSPF adjacency)
! (add 1 or 2 routers)�
©2015 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved. 37
38
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
©2015 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.
39
Questions?
©2015 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.
Summary�
©2015 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved. 40
41
Gateway Model Revisited
FIB
Input interfaces Output interfaces
RIP
Multiple RIBs
OSPF
Routing software Topology info, Link status info
Topology info, Link status info
©2015 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.
42
Summary�
! Routing system: design space, characterization
! Distance vector routing ! Bellman-Ford algorithm ! RIP protocol, information model ! Traps and pitfalls�
! Link state routing ! Graph and its spanning trees ! Dijkstra algorithm�
! OSPF protocol, algorithm, information model
©2015 Suguru Yamaguchi and Youki Kadobayashi, All rights reserved.
43
Routing(2) – Inter-domain Routing
Information Network I Youki Kadobayashi
44
Outline
! Continued from previous lecture on: ! Distance vector routing
! Link state routing
! IGP and EGP • Interior gateway protocol,
Exterior gateway protocol
! Path vector routing ! BGP: Border Gateway Protocol ! Scaling tricks
45
Hierarchical Routing: a natural result of growth
! Routing domain ! Defines the boundary between domains ! Fault isolation, route aggregation
! Distinction between intra-domain routing protocol and inter-domain routing protocol
! IGP (Interior Gateway Protocol) ! EGP (Exterior Gateway Protocol)
IGP IGP IGP EGP
Hierarchical Routing: in reality it is two-tier routing
46
IGP
EGP
IGP
It’s like: train network plus airline network�
47
IGP and EGP has different goal
! IGP ! Focus on propagating the state of each link/
router as fast as possible ! RIP-2, RIPng: distance vector routing ! OSPF, IS-IS: link state routing
! EGP ! Focus on routing stability of the entire Internet ! BGP4, BGP4+: path vector routing
48
Path Vector Routing: a small trick for stable routing
S T1
T3
T2
T5
D
T4
Representing route from S to D • (D, { T1, T2 }, ...) • (D, { T3, T4, T5 }, ...)
! Derived from the Bellman-Ford algorithm ! Exchanged information:
! Attaches distance as well as path information to the route information → Embodies “routing without loops” This protocol prioritizes route that has the shortest path vector.
Distance Vector� (prefix, metric)�Path Vector� (prefix, path, attributes)�
Path Vector Routing: Background
S T1
T2 D
T3
! Multiple alternative routes ! Dense connections between ISPs ! Which route should we prioritize?
• constrained by cost, contract, load, etc. ! Routing policy
! Encodes the intention of the intermediate ISPs ! Route selection policies enable each domain to
select a particular route among multiple routes 1111Policy can’t be expressed by scalar cost.
! Cost of loops ! Convergence time from transient state � RTT
49
50
Loop Avoidance in Path Vector Routing
A C B
Path vectors from “A” to C (C, { B }) (C, { D, B })
• When B-C link fails, B is deleted from path vector.
• Rejects path vector that include itself • Loop avoidance
D
51
BGP: Border Gateway Protocol ! Algorithm
• Path vector ! Transport
• TCP • TCP provides retransmission and acknowledgement
! Adjacency: manually configured (i.e., no auto discovery)
! Routing information: (prefix, path, attributes)
! Topology: full mesh (internal), arbitrary (external)
RFC 4271, 4760�
52
Adjacency Relationship of BGP
! Adjacency relationship is defined by ISP operator ! Adjacency relationship must be explicitly
configured ! Why?
! c.f. OSPF : if parameters match, adjacency relationship is enabled ... ...
R4
R1 R2
R3
53
Representing Path Vector in BGP
! AS (Autonomous System) is represented as an AS number
• AS: routing domain that is operated by single policy
! BGP concisely encodes (prefix, AS-path, attributes)
• (AS-path, attributes, { prefix1, prefix2, ... } ) ! Reduction of traffic
54
Example of Path Vector in BGP Try it yourself w/
looking glass
55
Q&A
56
Reducing routing information
57
Route Reduction: Default route
Stub AS
Transit AS
R1
R2
“prefix ::0/0 next-hop R1”
! 0.0.0.0/0 (IPv4), ::0/0 (IPv6) ! Longest prefix match
→ matches in the end of route search ! Results in hiding of routes and reduction of the number of routes
58
When and where routes can’t be reduced?
! Default-free ! No default route
! Tier-1 ISPs, North American backbone
(source: old UUNet network maps, www.uu.net)
59
Aggregation
! 163.221.10.0/24 and 163.221.11.0/24 are aggregated into 163.221.10.0/23
163.221.0/18 163.221.128/18
163.221.64/18
163.221.192/18
60
Route Aggregation at Domain Edge
! Routes are aggregated at the edge of the routing domain.
163.221.10.0 163.221.52.0 163.221.56.0
OSPF area 1
R1
OSPF backbone
“163.221.0/18 via R1” (Summary LSA)
61
Hierarchical Aggregation of Routes
OSPF areas
“163.221.0/18 via R1” (Summary LSA)
OSPF backbone
OSPF backbone
BR
“163.221.0/16 via BR” (BGP advertisement)
163.221.10.0 163.221.52.0 163.221.56.0
R1
62
Challenges in Route Aggregation
! Route aggregation depends on address assignment • Planned address assignment is important for route aggregation
! Can we predict the extent of future growth of NAIST?
• Can we predict future growth of an ISP?
! → Prefix renumbering • Renumber to aggregatable addresses • Provide operational means to unanticipated changes • Technology under development
! Manual operation is necessary for route aggregation
• Internet full-route : 250,000 • BGP table growth trends - Telstra
63
Q&A
64
Summary
! Hierarchical routing concepts ! IGP, EGP
! Path Vector Routing ! Loop-free, policy-aware
! BGP ! State transition, route information and topology ! Limitation of policy-based routing
! Scaling trick: Route aggregation ! Aggregation concepts, challenges