poison reverse example - computer science › classes › fa16 › cse123-a › ... · split...

41
If Z routes through Y to get to X: Z tells Y its (Z’s) distance to X is infinite (so Y won’t route to X via Z) X Z 1 4 50 Y 60 Poison Reverse Example 1

Upload: others

Post on 28-Jun-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Poison Reverse Example - Computer Science › classes › fa16 › cse123-a › ... · Split Horizon Limitations A#tellsB#&#C#that#D#isunreachable B computesnew#route#through#C Tells

If Z routes through Y to get to X:• Z tells Y its (Z’s) distance to X is infinite (so Y won’t route to X via Z) X Z

14

50

Y60

Poison Reverse Example

1

Page 2: Poison Reverse Example - Computer Science › classes › fa16 › cse123-a › ... · Split Horizon Limitations A#tellsB#&#C#that#D#isunreachable B computesnew#route#through#C Tells

Split Horizon Limitations A tells B & C that D is unreachable

B computes new route through C Tells C that D is unreachable(poison reverse)

Tells A it has path of cost 3(split horizon doesn’t apply)

A computes new route through B A tells C that D is now reachable

Etc…

2

1

A C

B

D

1

1

1

Page 3: Poison Reverse Example - Computer Science › classes › fa16 › cse123-a › ... · Split Horizon Limitations A#tellsB#&#C#that#D#isunreachable B computesnew#route#through#C Tells

RIP: Routing Information Protocol DV protocol with hop count as metric

» Infinity value is 16 hops;; limits network size» Includes split horizon with poison reverse

Routers send vectors every 30 seconds» With triggered updates for link failures» Time-­out in 180 seconds to detect failures

Rarely used today EIGRP: proprietary Cisco protocol

Ensures loop-­freedom (DUAL algorithm) Only communicates changes (no regular broadcast) Combine multiple metrics into a single metric (BW, delay, reliability, load)

In practice

Page 4: Poison Reverse Example - Computer Science › classes › fa16 › cse123-a › ... · Split Horizon Limitations A#tellsB#&#C#that#D#isunreachable B computesnew#route#through#C Tells

Distance Vector shortest-­path routing Each node sends list of its shortest distance to each destination to its neighbors

Neighbors update their lists;; iterate

Weak at adapting to changes out of the box Problems include loops and count to infinity

DV Summary

4

Page 5: Poison Reverse Example - Computer Science › classes › fa16 › cse123-a › ... · Split Horizon Limitations A#tellsB#&#C#that#D#isunreachable B computesnew#route#through#C Tells

Message complexity LS: with n nodes, E links, O(nE) messages sent

DV: exchange between neighbors only

Speed of Convergence LS: relatively fast DV: convergence time varies

May be routing loops Count-­to-­infinity problem

Robustness: what happens if router malfunctions?

LS: Node can advertise incorrect link cost

Each node computes only its own table

DV: Node can advertise incorrect path cost

Each node’s table used by others (error propagates)

Link-state vs. Distance-vector

5

Page 6: Poison Reverse Example - Computer Science › classes › fa16 › cse123-a › ... · Split Horizon Limitations A#tellsB#&#C#that#D#isunreachable B computesnew#route#through#C Tells

Shortest-­path routing Metric-­based, using link weights Routers share a common view of path “goodness”

As such, commonly used inside an organization EIGRP and OSPF are mostly used as intradomainprotocols

But the Internet is a “network of networks” How to stitch the many networks together? When networks may not have common goals … and may not want to share information

Routing so far…

6

Page 7: Poison Reverse Example - Computer Science › classes › fa16 › cse123-a › ... · Split Horizon Limitations A#tellsB#&#C#that#D#isunreachable B computesnew#route#through#C Tells

For next time…

Read Ch. 4.1 in P&D

Get moving on Project 2

Page 8: Poison Reverse Example - Computer Science › classes › fa16 › cse123-a › ... · Split Horizon Limitations A#tellsB#&#C#that#D#isunreachable B computesnew#route#through#C Tells

CSE 123: Computer NetworksStefan Savage

Lecture 16:Interdomain Routing

Page 9: Poison Reverse Example - Computer Science › classes › fa16 › cse123-a › ... · Split Horizon Limitations A#tellsB#&#C#that#D#isunreachable B computesnew#route#through#C Tells

Overview

Autonomous Systems Each network on the Internet has its own goals

Path-­vector Routing Allows scalable, informed route selection

Border Gateway Protocol How routing gets done on the Internet today

Page 10: Poison Reverse Example - Computer Science › classes › fa16 › cse123-a › ... · Split Horizon Limitations A#tellsB#&#C#that#D#isunreachable B computesnew#route#through#C Tells

Inter-­domain versus intra-­domain routing

Backbone service provider

Peeringpoint

Peeringpoint

Large corporation

Large corporation

Smallcorporation

“Consumer ” ISP

“Consumer”ISP

“Consumer” ISP

You at home

You at work

The Internet is Complicated

10

Page 11: Poison Reverse Example - Computer Science › classes › fa16 › cse123-a › ... · Split Horizon Limitations A#tellsB#&#C#that#D#isunreachable B computesnew#route#through#C Tells

Original ARPAnet had single routing protocol Dynamic DV scheme, replaced with static metric LS algorithm

New networks came on the scene NSFnet, CSnet, DDN, etc… The total number of nodes was growing exponentially With their own routing protocols (RIP, Hello, ISIS) And their own rules (e.g. NSF AUP)

New requirements Huge scale: millions of routers Varying routing metrics Need to express business realities (policies)

A Brief History

11

Page 12: Poison Reverse Example - Computer Science › classes › fa16 › cse123-a › ... · Split Horizon Limitations A#tellsB#&#C#that#D#isunreachable B computesnew#route#through#C Tells

All nodes need common notion of link costs Incompatible with commercial relationships

RegionalISP1Regional

ISP2Regional ISP3

Cust1Cust3 Cust2

NationalISP1

NationalISP2 YES

NO

Shortest Path Doesn’t Work

12

Page 13: Poison Reverse Example - Computer Science › classes › fa16 › cse123-a › ... · Split Horizon Limitations A#tellsB#&#C#that#D#isunreachable B computesnew#route#through#C Tells

Separate routing inside a domain from routing between domains Inside a domain use traditional interior gateway protocols (RIP, OSPF, etc)» You’ve seen these already

Between domains use Exterior Gateway Protocols (EGPs)» Only exchange reachability information (not specific metrics)» Decide what to do based on local policy

What is a domain?

A Technical Solution

13

Page 14: Poison Reverse Example - Computer Science › classes › fa16 › cse123-a › ... · Split Horizon Limitations A#tellsB#&#C#that#D#isunreachable B computesnew#route#through#C Tells

Internet is divided into Autonomous Systems Distinct regions of administrative control Routers/links managed by a single “institution” Service provider, company, university, …

Hierarchy of Autonomous Systems Large, “tier-­1” provider with a nationwide backbone Medium-­sized regional provider with smaller backbone Small network run by a single company or university

Interaction between Autonomous Systems Internal topology is not shared between ASes … but, neighboring ASes interact to coordinate routing

Autonomous Systems

14

Page 15: Poison Reverse Example - Computer Science › classes › fa16 › cse123-a › ... · Split Horizon Limitations A#tellsB#&#C#that#D#isunreachable B computesnew#route#through#C Tells

Border routers summarize and advertise their routes to external neighbors and vice-­versa

Border routers apply policy

Internal routers can use notion of default routes

Core is default-­free;; routers must have a route to all networks in the world

But what routing protocol?

R1

Autonomous system 1R2

R3

Autonomous system 2R4

R5 R6

AS1

AS2

Border router

Border router

Inter-domain Routing

15

Page 16: Poison Reverse Example - Computer Science › classes › fa16 › cse123-a › ... · Split Horizon Limitations A#tellsB#&#C#that#D#isunreachable B computesnew#route#through#C Tells

Topology information is flooded High bandwidth and storage overhead Forces nodes to divulge sensitive information

Entire path computed locally per node High processing overhead in a large network

Minimizes some notion of total distance Works only if policy is shared and uniform

Typically used only inside an AS E.g., OSPF and IS-­IS

Issues with Link-state

16

Page 17: Poison Reverse Example - Computer Science › classes › fa16 › cse123-a › ... · Split Horizon Limitations A#tellsB#&#C#that#D#isunreachable B computesnew#route#through#C Tells

Advantages Hides details of the network topology Nodes determine only “next hop” toward the destination

Disadvantages Minimizes some notion of total distance, which is difficult in an interdomain setting

Slow convergence due to the counting-­to-­infinity problem (“bad news travels slowly”)

Idea: extend the notion of a distance vector To make it easier to detect loops

Distance Vector almost there

17

Page 18: Poison Reverse Example - Computer Science › classes › fa16 › cse123-a › ... · Split Horizon Limitations A#tellsB#&#C#that#D#isunreachable B computesnew#route#through#C Tells

Extension of distance-­vector routing Support flexible routing policies Avoid count-­to-­infinity problem

Key idea: advertise the entire path Distance vector: send distance metric per destination Path vector: send the entire path for each destination

3 2 1

d

“d: path (2,1)” “d: path (1)”

data traffic data traffic

Path-vector Routing

18

Page 19: Poison Reverse Example - Computer Science › classes › fa16 › cse123-a › ... · Split Horizon Limitations A#tellsB#&#C#that#D#isunreachable B computesnew#route#through#C Tells

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”

Node can simply discard paths with loops E.g., node 1 simply discards the advertisement

3 2 1“d: path (2,1)” “d: path (1)”

“d: path (3,2,1)”

Loop Detection

19

Page 20: Poison Reverse Example - Computer Science › classes › fa16 › cse123-a › ... · Split Horizon Limitations A#tellsB#&#C#that#D#isunreachable B computesnew#route#through#C Tells

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

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”

2 3

1

2 3

1

Policy Support

20

Page 21: Poison Reverse Example - Computer Science › classes › fa16 › cse123-a › ... · Split Horizon Limitations A#tellsB#&#C#that#D#isunreachable B computesnew#route#through#C Tells

Interdomain routing protocol for the Internet Prefix-­based path-­vector protocol Policy-­based routing based on AS Paths Evolved during the past 27 years

• 1989 : BGP-­1 [RFC 1105], replacement for EGP• 1990 : BGP-­2 [RFC 1163]• 1991 : BGP-­3 [RFC 1267]• 1995 : BGP-­4 [RFC 1771], support for CIDR • 2006 : BGP-­4 [RFC 4271], update

Border Gateway Protocol

21

Page 22: Poison Reverse Example - Computer Science › classes › fa16 › cse123-a › ... · Split Horizon Limitations A#tellsB#&#C#that#D#isunreachable B computesnew#route#through#C Tells

AS1

AS2

Establish session

Exchange allactive routes

Exchange incrementalupdates

While connection is ALIVE exchangeroute UPDATE messages

BGP session

Basic BGP Operation

22

Page 23: Poison Reverse Example - Computer Science › classes › fa16 › cse123-a › ... · Split Horizon Limitations A#tellsB#&#C#that#D#isunreachable B computesnew#route#through#C Tells

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

Incremental updates Announcement

» Upon selecting a new active route, add own node id to path» … and (optionally) advertise to each neighbor

Withdrawal» If the active route is no longer available» … send a withdrawal message to the neighbors

Step-by-Step

23

Page 24: Poison Reverse Example - Computer Science › classes › fa16 › cse123-a › ... · Split Horizon Limitations A#tellsB#&#C#that#D#isunreachable B computesnew#route#through#C Tells

Destination prefix (e.g., 128.112.0.0/16) Route attributes, including

AS path (e.g., “7018 88”) Next-­hop IP address (e.g., 12.127.0.121)

24

AS 88Princeton

128.112.0.0/16AS path = 88Next Hop = 192.0.2.1

AS 7018AT&T

AS 11Harvard

192.0.2.1

128.112.0.0/16AS path = 7018 88Next Hop = 12.127.0.121

12.127.0.121

A Simple BGP Route

Page 25: Poison Reverse Example - Computer Science › classes › fa16 › cse123-a › ... · Split Horizon Limitations A#tellsB#&#C#that#D#isunreachable B computesnew#route#through#C Tells

Local pref: Statically configured ranking of routes within AS

AS path: ASs the announcement traversed Origin: Route came from IGP or EGP Multi Exit Discriminator: preference for where to exitnetwork

Community: opaque data used for inter-­ISP policy Next-­hop: where the route was heard from

BGP Attributes

25

Page 26: Poison Reverse Example - Computer Science › classes › fa16 › cse123-a › ... · Split Horizon Limitations A#tellsB#&#C#that#D#isunreachable B computesnew#route#through#C Tells

In conventional path vector routing, a node has oneranking function, which reflects its routing policy

Export Active Routes

26

Page 27: Poison Reverse Example - Computer Science › classes › fa16 › cse123-a › ... · Split Horizon Limitations A#tellsB#&#C#that#D#isunreachable B computesnew#route#through#C Tells

Default decision for route selection Highest local pref, shortest AS path, lowest MED, prefer eBGP over iBGP, lowest IGP cost, router id

Many policies built on default decision process, but… Possible to create arbitrary policies in principal

» Any criteria: BGP attributes, source address, prime number of bytes in message, …

» Can have separate policy for inbound routes, installed routes and outbound routes

Limited only by power of vendor-­specific routing language

BGP Decision Process

27

Page 28: Poison Reverse Example - Computer Science › classes › fa16 › cse123-a › ... · Split Horizon Limitations A#tellsB#&#C#that#D#isunreachable B computesnew#route#through#C Tells

AS 1AS 2

AS 4

AS 3

13.13.0.0/16

local pref = 80

local pref = 100

local pref = 90

Higher Localpreference valuesare more preferred

AS 5

Example: Local Pref

28

Page 29: Poison Reverse Example - Computer Science › classes › fa16 › cse123-a › ... · Split Horizon Limitations A#tellsB#&#C#that#D#isunreachable B computesnew#route#through#C Tells

AS701UUnet

AS73Univ of Wash

AS7018AT&T

AS1239Sprint

AS9CMU (128.2/16)128.2/16 9

128.2/169 701

128.2/169 7018 1239

Shorter AS Paths are more preferred

128.2/16 9

128.2/16 9 7018

Example: Short AS Path

29

Page 30: Poison Reverse Example - Computer Science › classes › fa16 › cse123-a › ... · Split Horizon Limitations A#tellsB#&#C#that#D#isunreachable B computesnew#route#through#C Tells

AS 4

AS 3

AS 2

AS 1

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

AS Paths vs. Router Paths

30

Page 31: Poison Reverse Example - Computer Science › classes › fa16 › cse123-a › ... · Split Horizon Limitations A#tellsB#&#C#that#D#isunreachable B computesnew#route#through#C Tells

Instability Route flapping (network x.y/z goes down… tell everyone) Long AS-­path decision criteria defaults to DV-­like behavior (bouncing)

Not guaranteed to converge, NP-­hard to tell if it does Scalability still a problem

>500,000 network prefixes in default-­free table today Tension: Want to manage traffic to very specific networks (eg. multihomed content providers) but also want to aggregate information.

Performance Non-­optimal, doesnt balance load across paths

BGP Has Lots of Problems

31

Page 32: Poison Reverse Example - Computer Science › classes › fa16 › cse123-a › ... · Split Horizon Limitations A#tellsB#&#C#that#D#isunreachable B computesnew#route#through#C Tells

The telephone world LECs (local exchange carriers) (e.g., pacbell, nynex) IXCs (inter-­exchange carriers) (e.g., sprint, at&t)

LECs MUST provide IXCs access to customers This is enforced by laws and regulation

When a call goes from one phone company to another: Call billed to the caller The money is split up among the phone systems – this is called “settlement”

A History of Settlement

32

Page 33: Poison Reverse Example - Computer Science › classes › fa16 › cse123-a › ... · Split Horizon Limitations A#tellsB#&#C#that#D#isunreachable B computesnew#route#through#C Tells

Neighboring ASes have business contracts How much traffic to carry Which destinations to reach How much money to pay

Common business relationships Customer-­provider

» E.g., Princeton is a customer of USLEC» E.g., MIT is a customer of Level3

Peer-­peer» E.g., UUNET is a peer of Sprint» E.g., Harvard is a peer of Harvard Business School

Business Relationships

33

Page 34: Poison Reverse Example - Computer Science › classes › fa16 › cse123-a › ... · Split Horizon Limitations A#tellsB#&#C#that#D#isunreachable B computesnew#route#through#C Tells

Customer needs to be reachable from everyone Provider tells all neighbors how to reach the customer

Customer does not want to provide transit service Customer does not let its providers route through it

d

d

provider

customer

customer

provider

Traffic to the customer Traffic from the customer

announcements

traffic

Customer/Provider

34

Page 35: Poison Reverse Example - Computer Science › classes › fa16 › cse123-a › ... · Split Horizon Limitations A#tellsB#&#C#that#D#isunreachable B computesnew#route#through#C Tells

Multi-Homing Customers may have more than one provider

Extra reliability, survive single ISP failure Financial leverage through competition Better performance by selecting better path Gaming the 95th-­percentile billing model

Provider 1 Provider 2

35

Page 36: Poison Reverse Example - Computer Science › classes › fa16 › cse123-a › ... · Split Horizon Limitations A#tellsB#&#C#that#D#isunreachable B computesnew#route#through#C Tells

Peers exchange traffic between customers AS exports only customer routes to a peer AS exports a peer’s routes only to its customers Often the relationship is settlement-­free (i.e., no $$$)

peerpeer

Traffic to/from the peer and its customers

d

announcements

traffic

Peer-to-Peer Relationship

36

Page 37: Poison Reverse Example - Computer Science › classes › fa16 › cse123-a › ... · Split Horizon Limitations A#tellsB#&#C#that#D#isunreachable B computesnew#route#through#C Tells

Make up the “core” of the Internet Has no upstream provider of its own Typically has a national or international backbone

Top of the Internet hierarchy of ~10-­20 ASes E.g., AT&T, Level3, NTT, Qwest, SAVVIS (formerly Cable & Wireless), Sprint, Verizon

Full peer-­peer connections between tier-­1 providers

Tier-1 Providers

37

Page 38: Poison Reverse Example - Computer Science › classes › fa16 › cse123-a › ... · Split Horizon Limitations A#tellsB#&#C#that#D#isunreachable B computesnew#route#through#C Tells

Traditional “Tiered Internet”

38graphics courtesy Craig Labovitz

Page 39: Poison Reverse Example - Computer Science › classes › fa16 › cse123-a › ... · Split Horizon Limitations A#tellsB#&#C#that#D#isunreachable B computesnew#route#through#C Tells

The New Reality

39

Page 15 - Labovitz SIGCOMM 2010

A New Internet Model

  Flatter and much more densely interconnected Internet   Disintermediation between content and “eyeball” networks   New commercial models between content, consumer and transit

Settlement Free

Pay for BW

Pay for access BW

Settlement free

Pay for BW

Pay for access BW

Page 40: Poison Reverse Example - Computer Science › classes › fa16 › cse123-a › ... · Split Horizon Limitations A#tellsB#&#C#that#D#isunreachable B computesnew#route#through#C Tells

Interdomain-­routing Exchange reachability information (plus hints) BGP is based on path vector routing Local policy to decide which path to follow

Traffic exchange policies are a big issue $$$ Complicated by lack of compelling economic model (who creates value?)

Can have significant impact on performance

BGP Summary

40

Page 41: Poison Reverse Example - Computer Science › classes › fa16 › cse123-a › ... · Split Horizon Limitations A#tellsB#&#C#that#D#isunreachable B computesnew#route#through#C Tells

For next time… Router architecture: how to forward pkts quickly

Read Ch 3.4 in P&D

Keep going on Project 2

41