41
Spring 2018 © CS 438 Staff 1 The Global Internet

The Global Internet - University Of Illinois · The A in AS really means Autonomous n Want to choose their own internal routing protocol ¡ Different algorithms and metrics n Want

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: The Global Internet - University Of Illinois · The A in AS really means Autonomous n Want to choose their own internal routing protocol ¡ Different algorithms and metrics n Want

Spring 2018 © CS 438 Staff 1

The Global Internet

Page 2: The Global Internet - University Of Illinois · The A in AS really means Autonomous n Want to choose their own internal routing protocol ¡ Different algorithms and metrics n Want

Big Picture of the Internet

Spring 2018 © CS 438 Staff 2

Page 3: The Global Internet - University Of Illinois · The A in AS really means Autonomous n Want to choose their own internal routing protocol ¡ Different algorithms and metrics n Want

The Global Internet and Inter-domain Routing

n Why does Border Gateway Protocol (BGP) exist?¡ What is interdomain routing and why do we need it?¡ Why does BGP look the way it does?

n How does BGP work?¡ Path vector algorithm¡ Various boring details

n pay more attention to the �why� than the �how�

Spring 2018 © CS 438 Staff 3

Page 4: The Global Internet - University Of Illinois · The A in AS really means Autonomous n Want to choose their own internal routing protocol ¡ Different algorithms and metrics n Want

Routing

n Provides paths between networksn We know several designs already

¡ link-state¡ distance vector

n But previous lectures assumed single �domain�¡ all routers have same routing metric (shortest

path)¡ no privacy issues, no policy issues

© CS 438 StaffSpring 2018 4

Page 5: The Global Internet - University Of Illinois · The A in AS really means Autonomous n Want to choose their own internal routing protocol ¡ Different algorithms and metrics n Want

Internet is more complicated.....

n Internet not just unstructured collection of networksn Internet is comprised of a set of �autonomous

systems� (ASes)¡ Independently run networks, some are commercial ISPs¡ Autonomy of control: ex: company, university, etc¡ Currently around 35,000 Ases

n Enables hierarchical aggregation of routing information

n ASes are sometimes called �domains�¡ hence �interdomain routing�

© CS 438 StaffSpring 2018 5

Page 6: The Global Internet - University Of Illinois · The A in AS really means Autonomous n Want to choose their own internal routing protocol ¡ Different algorithms and metrics n Want

Spring 2018 © CS 438 Staff 6

Autonomous Systems

n Intradomain Routing (within an AS)¡ Performed using domain-specific algorithm¡ Selected by domain administrators¡ Allows heterogeneous interior gateway protocols

(IGP)n Interdomain Routing (between AS�s)

¡ Performed using standard global algorithm¡ Homogeneous exterior gateway protocol (EGP)¡ Main goal: reachability

Page 7: The Global Internet - University Of Illinois · The A in AS really means Autonomous n Want to choose their own internal routing protocol ¡ Different algorithms and metrics n Want

Spring 2018 © CS 438 Staff 7

Autonomous Systems

n Common intradomain routing protocols¡ Routing Information Protocol (RIP)

n From the early Internetn Part of Berkeley Software Distribution (BSD) Unixn Distance vector algorithmn Based on hop count (infinity set to 16 hops)

¡ Open Shortest Path First (OSPF)n Internet Standard (RFC 2328)n Link state algorithmn Authenticates messagesn Load balances across links

Page 8: The Global Internet - University Of Illinois · The A in AS really means Autonomous n Want to choose their own internal routing protocol ¡ Different algorithms and metrics n Want

Spring 2018 © CS 438 Staff 8

Autonomous Systems

n Standard interdomain routing protocols¡ General aspects

n Very complex and difficultn Focuses on reachability rather than optimalityn Must be loop freen Specify how reachability information should be exchanged

¡ Exterior Gateway Protocol (EGP)n Defined on Internet with tree structuren Embodied (and enforced) tree structuren Had to be replaced eventuallyn Distance vector updates

¡ Border Gateway Protocol (BGP)n Replaced EGP

Page 9: The Global Internet - University Of Illinois · The A in AS really means Autonomous n Want to choose their own internal routing protocol ¡ Different algorithms and metrics n Want

Spring 2018 © CS 438 Staff 9

BGP

n Border routers¡ Connects an AS to the Internet¡ Used for default external route

R border router internal router

BGPR2

R1

R3AS1

AS2

Page 10: The Global Internet - University Of Illinois · The A in AS really means Autonomous n Want to choose their own internal routing protocol ¡ Different algorithms and metrics n Want

Spring 2018 © CS 438 Staff 10

Autonomous Systems

R border router

internal router

BGPR2

R1

R3

A

AS1

AS2

you can reachnet A via me

traffic to A

table at R1:dest next hopA R2

Share connectivity information across

ASes

Page 11: The Global Internet - University Of Illinois · The A in AS really means Autonomous n Want to choose their own internal routing protocol ¡ Different algorithms and metrics n Want

In more detail: 4 Parts

Spring 2018 © CS 438 Staff 11

Border routerInternal router

1. Provide internal reachability (IGP)2. Learn routes to external destinations (eBGP)

62

4 9 2

13

3

Page 12: The Global Internet - University Of Illinois · The A in AS really means Autonomous n Want to choose their own internal routing protocol ¡ Different algorithms and metrics n Want

In more detail: 4 Parts

Spring 2018 © CS 438 Staff 12

Border routerInternal router

3. Distribute externally learned routes internally (iBGP)4. Select closest egress (IGP)

62 4 9 2

13

3

Page 13: The Global Internet - University Of Illinois · The A in AS really means Autonomous n Want to choose their own internal routing protocol ¡ Different algorithms and metrics n Want

The �A� in AS really means Autonomous

n Want to choose their own internal routing protocol¡ Different algorithms and metrics

n Want freedom to route based on policy¡ �My traffic can�t be carried over my competitor�s

network�¡ �I don�t want to carry transit traffic through my network�¡ Not expressible as Internet-wide �shortest path�!

n Want to keep their connections and policies private¡ Would reveal business relationships, network structure

Spring 2018 © CS 438 Staff 13

Page 14: The Global Internet - University Of Illinois · The A in AS really means Autonomous n Want to choose their own internal routing protocol ¡ Different algorithms and metrics n Want

AS�s are Buisinesses

n Three kinds of common relationships between ASes¡ AS A can be AS B�s customer¡ AS A can be AS B�s provider¡ AS A can be AS B�s peer

n Business implications¡ Customer pays provider, peers don�t pay each other

n Policy implications¡ �When sending traffic, I prefer to route through customers

over peers, and peers over providers�¡ �I don�t carry traffic from one provider to another provider�

Spring 2018 © CS 438 Staff 14

Page 15: The Global Internet - University Of Illinois · The A in AS really means Autonomous n Want to choose their own internal routing protocol ¡ Different algorithms and metrics n Want

AS-Level Topology

n Destinations are IP prefixes (e.g., 12.0.0.0/8)n Nodes are Autonomous Systems (ASes)n Links are connections & business relationships

Spring 2018 © CS 438 Staff 15

1

2

34

5

67

Client Web server

Page 16: The Global Internet - University Of Illinois · The A in AS really means Autonomous n Want to choose their own internal routing protocol ¡ Different algorithms and metrics n Want

Spring 2018 © CS 438 Staff 16

Autonomous Systems

n Challenges¡ Scale

n Border router must be able to forward any packet destined anywhere in the Internet

¡ Autonomous routing in AS�sn Impossible to calculate meaningful costs for paths that

cross multiple AS�s¡ Trust

n One AS must trust the advertised routes of other AS�sn Goal

¡ Specify polices that lead to �good� paths (even if they are not optimal)

Page 17: The Global Internet - University Of Illinois · The A in AS really means Autonomous n Want to choose their own internal routing protocol ¡ Different algorithms and metrics n Want

Spring 2018 © CS 438 Staff 17

Routing Choices

n Key issues are policy and privacyn Challenges

¡ No universal metric¡ AS-specific Policy decisions

n Problems with link state¡ Metric used by routers not the same

n Can�t use shortest path - loops¡ LS database too large - entire Internet¡ Flooding may expose internal topology and

policies to other AS�s

Page 18: The Global Internet - University Of Illinois · The A in AS really means Autonomous n Want to choose their own internal routing protocol ¡ Different algorithms and metrics n Want

Spring 2018 © CS 438 Staff 18

Routing Choices

n Key issues are policy and privacyn Challenges

¡ No universal metric¡ AS-specific Policy decisions

n Problems with distance-vector¡ Does not reveal any connectivity information¡ But still uses shortest path¡ Slow to converge

Page 19: The Global Internet - University Of Illinois · The A in AS really means Autonomous n Want to choose their own internal routing protocol ¡ Different algorithms and metrics n Want

Solution: Path Vector Routing

n Extension of distance-vector routing¡ Support flexible routing policies¡ Faster loop detection (no count-to-infinity)

n Key idea: advertise the entire path¡ Distance vector: send distance metric per dest d¡ Path vector: send the entire path for each dest d

Spring 2018 © CS 438 Staff 19

3 2 1

�d: path (2,1)� �d: path (1)�

data traffic data traffic

Page 20: The Global Internet - University Of Illinois · The A in AS really means Autonomous n Want to choose their own internal routing protocol ¡ Different algorithms and metrics n Want

Spring 2018 © CS 438 Staff 20

Path Vectors

n Each routing update carries the entire pathn Loops are detected as follows

¡ When AS gets route check if AS already in pathn If yes, reject routen If no, add self and (possibly) advertise route further

n Advantage¡ Metrics are local¡ AS chooses path, protocol ensures no loops

Page 21: The Global Internet - University Of Illinois · The A in AS really means Autonomous n Want to choose their own internal routing protocol ¡ Different algorithms and metrics n Want

Loop Detection

n Node can easily detect a loop¡ Look for its own node identifier in the path¡ e.g., node 1 sees itself in the path �3, 2, 1�

n Node can simply discard paths with loops¡ e.g., node 1 simply discards the advertisement

Spring 2018 © CS 438 Staff 21

3 2 1

�d: path (2,1)� �d: path (1)�

�d: path (3,2,1)�

Page 22: The Global Internet - University Of Illinois · The A in AS really means Autonomous n Want to choose their own internal routing protocol ¡ Different algorithms and metrics n Want

Flexible Policies

n Each node can apply local policies¡ Path selection: Which path to use?¡ Path export: Which paths to advertise?

n Examples¡ Node 2 may prefer the path �2, 3, 1� over �2, 1�¡ Node 1 may not let node 3 hear the path �1, 2�

Spring 2018 © CS 438 Staff 22

2 3

1

Page 23: The Global Internet - University Of Illinois · The A in AS really means Autonomous n Want to choose their own internal routing protocol ¡ Different algorithms and metrics n Want

Spring 2018 © CS 438 Staff 23

AS Categories

n Stub¡ An AS that has only a single connection to one

other AS - carries only local trafficn Multi-homed

¡ An AS that has connections to more than one AS, but does not carry transit traffic

n Transit¡ An AS that has connections to more than one

AS, and carries both transit and local traffic (under certain policy restrictions)

Page 24: The Global Internet - University Of Illinois · The A in AS really means Autonomous n Want to choose their own internal routing protocol ¡ Different algorithms and metrics n Want

Spring 2018 © CS 438 Staff 24

AS Categories

AS1

AS2AS3AS1

AS2

AS3AS1

AS2

Stub

Multi-homed

Transit

Page 25: The Global Internet - University Of Illinois · The A in AS really means Autonomous n Want to choose their own internal routing protocol ¡ Different algorithms and metrics n Want

Issues with Path-VectorPolicy Routing

n Reachabilityn Securityn Performancen Lack of isolationn Policy oscillations

Spring 2018 © CS 438 Staff 25

Page 26: The Global Internet - University Of Illinois · The A in AS really means Autonomous n Want to choose their own internal routing protocol ¡ Different algorithms and metrics n Want

Reachability

n Normal routing¡ If graph is connected, reachability is assured

n Policy routing¡ Does not always hold

Spring 2018 © CS 438 Staff 26

AS 2

AS 3AS 1Provider Provider

Customer

X

Page 27: The Global Internet - University Of Illinois · The A in AS really means Autonomous n Want to choose their own internal routing protocol ¡ Different algorithms and metrics n Want

Security

n An AS can claim to serve a prefix that they actually don�t have a route to (blackholing traffic)¡ Problem not specific to policy or path vector¡ Important because of AS autonomy

n Even worse: snoop on all traffic to almost any destination¡ Without anyone realizing that anything is wrong

n Fixable: make ASes �prove� they have a path¡ But not used in today�s Internet

Spring 2018 © CS 438 Staff 27

Page 28: The Global Internet - University Of Illinois · The A in AS really means Autonomous n Want to choose their own internal routing protocol ¡ Different algorithms and metrics n Want

Performance

n BGP designed for policy not performancen �Hot Potato� routing common but suboptimal

¡ AS wants to hand off the packet as soon as possible

n Even BGP �shortest paths� are not shortest¡ Fewest AS�s != Fewest number of routers

n 20% of paths inflated by at least 5 router hopsn Not clear this is a significant problem

Spring 2018 © CS 438 Staff 28

Page 29: The Global Internet - University Of Illinois · The A in AS really means Autonomous n Want to choose their own internal routing protocol ¡ Different algorithms and metrics n Want

Performance

n AS path length can be misleading¡ An AS may have many router-level hops

Spring 2018 © CS 438 Staff 29

AS 4

AS 3

AS 2

AS 1

BGP says that path 4 1 is betterthan path 3 2 1

Page 30: The Global Internet - University Of Illinois · The A in AS really means Autonomous n Want to choose their own internal routing protocol ¡ Different algorithms and metrics n Want

Lack of Isolation: Dynamics

n Change in the path¡ Path must be re-advertised to every node using the path¡ �Route Flap Damping� supposed to help (but ends up

causing more problems)

Spring 2018 © CS 438 Staff 30

BGP updates per hour per prefix

Page 31: The Global Internet - University Of Illinois · The A in AS really means Autonomous n Want to choose their own internal routing protocol ¡ Different algorithms and metrics n Want

Lack of isolation: Routing Table Size

n Each BGP router must know path to every other IP prefix¡ But router memory is

expensive and thus constrained

n Number of prefixes growing more than linearly

n Subject of current research

Spring 2018 © CS 438 Staff 31

Number of prefixes in BGP table

Page 32: The Global Internet - University Of Illinois · The A in AS really means Autonomous n Want to choose their own internal routing protocol ¡ Different algorithms and metrics n Want

Persistent Oscillations due to Policies

Spring 2018 © CS 438 Staff 32

Depends on the interactions of policies

1

2 3

1 3 01 0

3 2 03 0

2 1 02 0

0

We are back to where we started!

Page 33: The Global Internet - University Of Illinois · The A in AS really means Autonomous n Want to choose their own internal routing protocol ¡ Different algorithms and metrics n Want

Policy Oscillations

n Policy autonomy vs network stability¡ Focus of much recent research

n Not an easy problem¡ Difficult to decide whether given policies will eventually

converge!

n However, if policies follow normal business practices, stability is guaranteed

Spring 2018 © CS 438 Staff 33

Page 34: The Global Internet - University Of Illinois · The A in AS really means Autonomous n Want to choose their own internal routing protocol ¡ Different algorithms and metrics n Want

Border Gateway Protocol (BGP)

n Interdomain routing protocol for the Internet ¡ Prefix-based path-vector protocol¡ Policy-based routing based on AS Paths¡ Evolved during the past 15 years

Spring 2018 34© CS 438 Staff

n 1989 : BGP-1 [RFC 1105]¡ Replacement for EGP (1984, RFC 904)

n 1990 : BGP-2 [RFC 1163]n 1991 : BGP-3 [RFC 1267]n 1995 : BGP-4 [RFC 1771]

¡ Support for Classless Interdomain Routing (CIDR)

Page 35: The Global Internet - University Of Illinois · The A in AS really means Autonomous n Want to choose their own internal routing protocol ¡ Different algorithms and metrics n Want

BGP�s job: maintain routing table

ner-routes>show ip bgp

BGP table version is 6128791, local router ID is 4.2.34.165

Status codes: s suppressed, d damped, h history, * valid, > best, i - internal

Origin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path

* i3.0.0.0 4.0.6.142 1000 50 0 701 80 i

* i4.0.0.0 4.24.1.35 0 100 0 i

* i12.3.21.0/23 192.205.32.153 0 50 0 7018 4264 6468 ?

* e128.32.0.0/16 192.205.32.153 0 50 0 7018 4264 6468 25 e

Spring 2018 35© CS 438 Staff

Page 36: The Global Internet - University Of Illinois · The A in AS really means Autonomous n Want to choose their own internal routing protocol ¡ Different algorithms and metrics n Want

BGP Operations

Exchange incrementalupdates

AS1

AS2

While connection is ALIVE exchangeroute UPDATE messages

BGP session

Spring 2018 36© CS 438 Staff

Establish session onTCP port 179

Exchange allactive routes

Page 37: The Global Internet - University Of Illinois · The A in AS really means Autonomous n Want to choose their own internal routing protocol ¡ Different algorithms and metrics n Want

Incremental Protocol

n A node learns multiple paths to destination¡ Stores all of the routes in a routing table¡ Applies policy to select a single active route¡ … and may advertise the route to its neighbors

n Incremental updates¡ Announcement

n Upon selecting a new active route, add node id to pathn … and (optionally) advertise to neighbors

¡ Withdrawaln If the active route is no longer availablen … send a withdrawal message to the neighbors

Spring 2018 © CS 438 Staff 37

Page 38: The Global Internet - University Of Illinois · The A in AS really means Autonomous n Want to choose their own internal routing protocol ¡ Different algorithms and metrics n Want

BGP Route Processing

Best RouteSelection

Apply ImportPolicies

Apply ExportPolicies

Install forwardingEntries for best routes.

ReceiveBGPUpdates

BestRoutes

TransmitBGP Updates

Apply Policy =filter routes & tweak attributes

Based onAttributeValues

IP Forwarding Table

Apply Policy =filter routes & tweak attributes

Open ended programming.Constrained only by vendor configuration language

Spring 2018 38© CS 438 Staff

Best Route Table

Page 39: The Global Internet - University Of Illinois · The A in AS really means Autonomous n Want to choose their own internal routing protocol ¡ Different algorithms and metrics n Want

Selecting the best route

n Route Attributes ¡ Set/modified according to operator

instructionsn Route Choices

¡ Compared based on attributes using (mostly) standardized rules

Spring 2018 © CS 438 Staff 39

Page 40: The Global Internet - University Of Illinois · The A in AS really means Autonomous n Want to choose their own internal routing protocol ¡ Different algorithms and metrics n Want

Joining BGP and IGP Information

n Border Gateway Protocol (BGP)¡ Announces reachability to external destinations¡ Maps a destination prefix to an egress point

n 128.112.0.0/16 reached via 192.0.2.1

n Interior Gateway Protocol (IGP)¡ Used to compute paths within the AS¡ Maps an egress point to an outgoing link

n 192.0.2.1 reached via 10.1.1.1

Spring 2018 © CS 438 Staff 40

192.0.2.110.1.1.1

Page 41: The Global Internet - University Of Illinois · The A in AS really means Autonomous n Want to choose their own internal routing protocol ¡ Different algorithms and metrics n Want

Summary

n BGP is essential to the Internet¡ ties different organizations together

n Poses fundamental challenges....¡ leads to use of path vector approach

n ...and myriad details

Spring 2018 41© CS 438 Staff