CS 3700 Networks and Distributed Systems Inter Domain Routing (Its - - PowerPoint PPT Presentation

cs 3700
SMART_READER_LITE
LIVE PREVIEW

CS 3700 Networks and Distributed Systems Inter Domain Routing (Its - - PowerPoint PPT Presentation

CS 3700 Networks and Distributed Systems Inter Domain Routing (Its all about the Money) Revised 10/03/19 Network Layer, Control Plane 2 Function: Set up routes between networks Data Plane Key challenges: Application


slide-1
SLIDE 1

CS 3700


Networks and Distributed Systems

Inter Domain Routing (It’s all about the Money)

Revised 10/03/19

slide-2
SLIDE 2

Network Layer, Control Plane

2

Function:

Set up routes between networks

Key challenges:

Implementing provider policies Creating stable paths

Application

Presentation

Session Transport Network Data Link Physical

BGP RIP OSPF Control Plane Data Plane

slide-3
SLIDE 3

ASs, Revisited

3

AS-1 AS-2 AS-3

Interior Routers BGP Routers

slide-4
SLIDE 4

AS Numbers

Each AS identified by an ASN number

Originally 16-bit values, expanded to 32 bits in 2006 1023 are reserved for local/private use, 3 reserved for special use

Currently, there are ~ 65539 advertised ASNs


http://www.potaroo.net/tools/asn32/

AT&T: 5074, 6341, 7018, … Sprint: 1239, 1240, 6211, 6242, … Northeastern: 156 North America ASs ftp://ftp.arin.net/info/asn.txt

4

slide-5
SLIDE 5

Inter-Domain Routing

5

Global connectivity is at stake!

Thus, all ASs must use the same protocol Contrast with intra-domain routing

slide-6
SLIDE 6

Inter-Domain Routing

5

Global connectivity is at stake!

Thus, all ASs must use the same protocol Contrast with intra-domain routing

What are the requirements?

Scalability Flexibility in choosing routes

■ Cost ■ Routing around failures

slide-7
SLIDE 7

Inter-Domain Routing

5

Global connectivity is at stake!

Thus, all ASs must use the same protocol Contrast with intra-domain routing

What are the requirements?

Scalability Flexibility in choosing routes

■ Cost ■ Routing around failures Question: link state or distance vector?

slide-8
SLIDE 8

Inter-Domain Routing

5

Global connectivity is at stake!

Thus, all ASs must use the same protocol Contrast with intra-domain routing

What are the requirements?

Scalability Flexibility in choosing routes

■ Cost ■ Routing around failures Question: link state or distance vector?

Trick question: BGP is a path vector protocol

slide-9
SLIDE 9

BGP

6

Border Gateway Protocol

De facto inter-domain protocol of the Internet Policy based routing protocol Uses a Bellman-Ford path vector protocol

slide-10
SLIDE 10

BGP

6

Border Gateway Protocol

De facto inter-domain protocol of the Internet Policy based routing protocol Uses a Bellman-Ford path vector protocol

Relatively simple protocol, but…

Complex, manual configuration

slide-11
SLIDE 11

BGP

6

Border Gateway Protocol

De facto inter-domain protocol of the Internet Policy based routing protocol Uses a Bellman-Ford path vector protocol

Relatively simple protocol, but…

Complex, manual configuration Entire world sees advertisements

■ Errors can screw up traffic globally

slide-12
SLIDE 12

BGP

6

Border Gateway Protocol

De facto inter-domain protocol of the Internet Policy based routing protocol Uses a Bellman-Ford path vector protocol

Relatively simple protocol, but…

Complex, manual configuration Entire world sees advertisements

■ Errors can screw up traffic globally

Policies driven by economics

■ How much $$$ does it cost to route along a given path? ■ Not by performance (e.g. shortest paths)

slide-13
SLIDE 13

BGP Relationships

7

slide-14
SLIDE 14

BGP Relationships

7

Customer Provider

Customer pays provider

slide-15
SLIDE 15

BGP Relationships

7

Customer Provider

Customer pays provider

slide-16
SLIDE 16

BGP Relationships

7

slide-17
SLIDE 17

BGP Relationships

7

Peer 1 Peer 2 Peer 3

Peers do not pay each other

slide-18
SLIDE 18

BGP Relationships

7

Peer 1 Peer 2 Peer 3

slide-19
SLIDE 19

BGP Relationships

7

Peer 1 Peer 2 Peer 3

slide-20
SLIDE 20

BGP Relationships

7

Peer 1 Peer 2 Peer 3

Peer 2 has no incentive to route 1 3

slide-21
SLIDE 21

BGP Relationships

7

Customer Customer Provider

slide-22
SLIDE 22

BGP Relationships

7

Customer Customer Provider

slide-23
SLIDE 23

Tier-1 ISP Peering

8

AT&T Centurylink Verizon Enterprise NTT Deutsche Telekom Sprint Orange

slide-24
SLIDE 24
slide-25
SLIDE 25

Peering Wars

Reduce upstream costs Improve end-to-end

performance

May be the only way to

connect to parts of the Internet

You would rather have

customers

Peers are often

competitors

Peering agreements

require periodic renegotiation

10

Peer Don’t Peer

slide-26
SLIDE 26

Peering Wars

Reduce upstream costs Improve end-to-end

performance

May be the only way to

connect to parts of the Internet

You would rather have

customers

Peers are often

competitors

Peering agreements

require periodic renegotiation

10

Peer Don’t Peer Peering struggles in the ISP world are extremely contentions, agreements are usually confidential

slide-27
SLIDE 27

Two Types of BGP Neighbors

11

slide-28
SLIDE 28

Two Types of BGP Neighbors

11

IGP Exterior routers also speak IGP

slide-29
SLIDE 29

Two Types of BGP Neighbors

11

eBGP eBGP

slide-30
SLIDE 30

Two Types of BGP Neighbors

11

eBGP eBGP iBGP iBGP

slide-31
SLIDE 31

Full iBGP Meshes

12

slide-32
SLIDE 32

Full iBGP Meshes

12

eBGP

iBGP

slide-33
SLIDE 33

Full iBGP Meshes

12

Question: why do we need

iBGP?

OSPF does not include BGP

policy info

Prevents routing loops within

the AS

eBGP

iBGP

slide-34
SLIDE 34

Full iBGP Meshes

12

Question: why do we need

iBGP?

OSPF does not include BGP

policy info

Prevents routing loops within

the AS

iBGP updates do not

trigger announcements

eBGP

iBGP

slide-35
SLIDE 35

Path Vector Protocol

AS-path: sequence of ASs a route traverses Similar to distance vector, but sends the entire path Used for loop detection and to apply policy If you see your own ID in an advertisement, discard it Default choice: route with fewest # of ASs

110.10.0.0/16

AS 1 AS 2

130.10.0.0/16

AS 3

120.10.0.0/16

AS 4 AS 5

13

120.10.0.0/16: AS 2 AS 3 AS 4 130.10.0.0/16: AS 2 AS 3 110.10.0.0/16: AS 2 AS 5

slide-36
SLIDE 36

BGP Operations (Simplified)

14

Establish session

  • n TCP port 179

Exchange active routes Exchange incremental updates AS-1 AS-2 BGP Session

slide-37
SLIDE 37

Four Types of BGP Messages

Open: Establish a peering session. Keep Alive: Handshake at regular intervals. Notification: Shuts down a peering session. Update: Announce new routes or withdraw previously

announced routes.

15

slide-38
SLIDE 38

Four Types of BGP Messages

Open: Establish a peering session. Keep Alive: Handshake at regular intervals. Notification: Shuts down a peering session. Update: Announce new routes or withdraw previously

announced routes.

announcement = IP prefix + attributes values

15

slide-39
SLIDE 39

BGP Attributes

Some attributes used to select “best” path

LocalPREF

■ Local preference policy to choose most preferred route ■ Overrides default fewest AS behavior

Multi-exit Discriminator (MED)

■ Chooses peering point for your network ■ Specifies path for external traffic destined for an internal network

16

slide-40
SLIDE 40

BGP Attributes

Some attributes used to select “best” path

LocalPREF

■ Local preference policy to choose most preferred route ■ Overrides default fewest AS behavior

Multi-exit Discriminator (MED)

■ Chooses peering point for your network ■ Specifies path for external traffic destined for an internal network Other attributes control how routes are shared with others

Import Rules

■ What route advertisements do I accept?

Export Rules

■ Which routes do I forward to whom?

16

slide-41
SLIDE 41

Route Selection Summary

17

17

slide-42
SLIDE 42

Route Selection Summary

17

Highest Local Preference Enforce relationships

17

slide-43
SLIDE 43

Route Selection Summary

17

Highest Local Preference Shortest AS Path Lowest MED Lowest IGP Cost to BGP Egress Traffic engineering Enforce relationships

17

slide-44
SLIDE 44

Route Selection Summary

17

Highest Local Preference Shortest AS Path Lowest MED Lowest IGP Cost to BGP Egress Lowest Router ID Traffic engineering Enforce relationships When all else fails, break ties

17

slide-45
SLIDE 45

Shortest AS Path != Shortest Path

18

Source Destination

slide-46
SLIDE 46

Shortest AS Path != Shortest Path

18

Source Destination ? ?

slide-47
SLIDE 47

Shortest AS Path != Shortest Path

18

Source Destination ? ?

4 hops 4 ASs

slide-48
SLIDE 48

Shortest AS Path != Shortest Path

18

Source Destination ? ?

4 hops 4 ASs 9 hops 2 ASs

slide-49
SLIDE 49

Shortest AS Path != Shortest Path

18

Source Destination ? ?

4 hops 4 ASs 9 hops 2 ASs

slide-50
SLIDE 50

Hot Potato Routing

19

Destination Source

slide-51
SLIDE 51

Hot Potato Routing

19

Destination Source ? ?

slide-52
SLIDE 52

Hot Potato Routing

19

Destination Source

3 hops total, 3 hops cost

? ?

slide-53
SLIDE 53

Hot Potato Routing

19

Destination Source

3 hops total, 3 hops cost

? ?

5 hops total, 2 hops cost

slide-54
SLIDE 54

Hot Potato Routing

19

Destination Source

3 hops total, 3 hops cost

? ?

5 hops total, 2 hops cost

slide-55
SLIDE 55

20

Importing Routes

slide-56
SLIDE 56

20

Importing Routes

ISP Routes

slide-57
SLIDE 57

20

Importing Routes

From Customer

ISP Routes

slide-58
SLIDE 58

20

Importing Routes

From Peer From Peer From Customer

ISP Routes

slide-59
SLIDE 59

20

Importing Routes

From Provider From Peer From Peer From Customer

ISP Routes

slide-60
SLIDE 60

21

Exporting Routes

slide-61
SLIDE 61

21

Exporting Routes

To Customer

Customers get all routes

slide-62
SLIDE 62

21

Exporting Routes

To Customer To Peer To Peer

Customers get all routes Customer and ISP routes only

slide-63
SLIDE 63

21

Exporting Routes

To Customer To Peer To Peer To Provider

Customers get all routes Customer and ISP routes only

slide-64
SLIDE 64

21

Exporting Routes

To Customer To Peer To Peer To Provider

Customers get all routes Customer and ISP routes only $$$ generating routes

slide-65
SLIDE 65

AS Relationships: It’s Complicated

22

Typical models of AS relationships are simple

Each AS pair has exactly one relationship Each relationship is the same for all prefixes

slide-66
SLIDE 66

AS Relationships: It’s Complicated

22

Typical models of AS relationships are simple

Each AS pair has exactly one relationship Each relationship is the same for all prefixes

Unfortunately, in practice it’s much more complicated

Rise of widespread peering Regional, per-prefix peerings Tier-1’s being shoved out by “hypergiant” content providers Internet Exchange Points (IXPs) dominating traffic volume

Also, BGP is 100% insecure

Totally possible to poison or steal routes :(