external v.s. internal bgp

23
CS551 External v.s. Internal BGP Bill Cheng http://merlot.usc.edu/cs551-f12 1 Computer Communications - CSCI 551 Copyright © William C. Cheng

Upload: creainnova-consultores

Post on 02-Dec-2015

72 views

Category:

Documents


0 download

DESCRIPTION

CS551External v.s. Internal BGPBill Chenghttp://merlot.usc.edu/cs551-f12

TRANSCRIPT

Page 1: External v.s. Internal BGP

CS551External v.s. Internal BGP

Bill Cheng

http://merlot.usc.edu/cs551-f12

1

Computer Communications - CSCI 551

Copyright © William C. Cheng

Page 2: External v.s. Internal BGP

Exterior vs. Interior

2

EGP vs. IGP

Computer Communications - CSCI 551

Copyright © William C. Cheng

World vs. me

Little control vs. complete administrative control

BGP (and GGP, Hello, EGP) vs. (RIP, OSPF, IS-IS, IGRP,

EIGRP)

Page 3: External v.s. Internal BGP

R2

R1BGP

R3 R4

Option 2: Use I-BGP

BGP can be used by R3 and R4 to learn routes.

3

Learning Routes

Computer Communications - CSCI 551

Copyright © William C. Cheng

only works for small routing tables

How do R1 and R2 learn routes? (How does R3 pass on

the routes that is has learned to R1 and R2?)

Option 1: Inject routes in IGP (such as OSPF)

AS1 AS2

Page 4: External v.s. Internal BGP

I-BGP has mechanisms to forward BGP policy directives

across an AS

Often use I-BGP with some other IGP (such as OSPF) that

does internal routing

4

Why BGP as an IGP?

Computer Communications - CSCI 551

Copyright © William C. Cheng

Page 5: External v.s. Internal BGP

5

I-BGP

Computer Communications - CSCI 551

Copyright © William C. Cheng

AS 1

UpstreamProvider A

AS100

iBGP

eBGP

AS 2

UpstreamProvider B

AS200

iBGP

eBGP

eBGP

Page 6: External v.s. Internal BGP

E-BGP connects AS’s (external GP)

6

E-BGP vs. I-BGP

Computer Communications - CSCI 551

Copyright © William C. Cheng

I-BGP is intra-AS (internal GP)

Differences in operation

direct vs. indirect connections

different failure modes

special attributes for internal use

Page 7: External v.s. Internal BGP

prefix learned from E-BGP can be advertised to I-BGP

neighbor and vice-versa, but

Same message types, attribute types, and state machine

as E-BGP

7

Internal BGP (I-BGP)

Computer Communications - CSCI 551

Copyright © William C. Cheng

Different rules about re-advertising prefixes:

prefix learned from one I-BGP neighbor cannot be

advertised to another I-BGP neighbor

reason: no AS-PATH within the same AS and thus danger

of looping

Page 8: External v.s. Internal BGP

R2

R1

8

Internal BGP (I-BGP)

Computer Communications - CSCI 551

Copyright © William C. Cheng

R3 can tell R1 and R2 prefixes from R4

R3 can tell R4 prefixes from R1 and R2

R3 cannot tell R2 prefixes from R1

E-BGPR3 R4

I-BGP

Page 9: External v.s. Internal BGP

9

Computer Communications - CSCI 551

Copyright © William C. Cheng

Internal BGP (I-BGP)

R2 can only find these prefixes through a direct connection to R1

Result: I-BGP routers must be fully connected (via TCP)!

R2

R1

R3 can tell R1 and R2 prefixes from R4

contrast with E-BGP sessions that map to physical links

R3 can tell R4 prefixes from R1 and R2

R3 cannot tell R2 prefixes from R1

E-BGPR3 R4

I-BGP

Page 10: External v.s. Internal BGP

10

I-BGP

Computer Communications - CSCI 551

Copyright © William C. Cheng

AS 1

UpstreamProvider A

AS100

iBGP

eBGP

AS 2

UpstreamProvider B

AS200

iBGP

eBGP

eBGP

I-BGP mesh

Page 11: External v.s. Internal BGP

11

BGP Example

Computer Communications - CSCI 551

Copyright © William C. Cheng

AS1

E-BGPI-BGP

R1 advertises routes within AS1 to R2

R2 advertises routes within AS2 and AS3 to R1

R2 learns AS3 routes from I-BGP with R4

R4 learns AS3 routes from E-BGP with R6

R4 advertises routes within AS2 and AS1 to R6

R6

R2 R3

R4R5

R1

AS3

AS2E-BGP

Page 12: External v.s. Internal BGP

failure on an E-BGP link

Two types of link failures:

failure on an I-BGP Link

These failures are treated completely different in BGP

Why?

12

Link Failures

Computer Communications - CSCI 551

Copyright © William C. Cheng

Page 13: External v.s. Internal BGP

13

Failure on an E-BGP Link

Computer Communications - CSCI 551

Copyright © William C. Cheng

If the link R1-R2 goes down, then the TCP connection

breaks and so does the E-BGP connection; BGP routes

are removed

This is the desired behavior

AS1 R1 AS2R2E-BGP session

Physical link

138.39.1.1/30 138.39.1.2/30

Note that 138.39.1.1 and 138.39.1.2 are on the same network

Page 14: External v.s. Internal BGP

14

Failure on an I-BGP Link

Computer Communications - CSCI 551

Copyright © William C. Cheng

R1 and R2 should, in theory, still be able to exchange traffic,

i.e., the indirect path through R3 should be used

If physical link R1-R2 goes down, the 138.39.1.0/30 network

becomes unreachable, connection between R1 and R2 is lost

I-BGP session

Physical link

138.39.1.1/30

138.39.1.2/30

R3R1

R2

Note: I-BGP often does not go over a physical link

thus, E-BGP and I-BGP must use different conventions

with respect to TCP endpoints

given the above configuration, it would not work!

Page 15: External v.s. Internal BGP

Note that 138.39.128.1 and 138.39.128.5 are on different

networks here!

15

Virtual Interfaces (VIFs, a.k.a.Loop-back Interfaces)

Computer Communications - CSCI 551

Copyright © William C. Cheng

A VIF is not associated with a physical link or hardware

interface

How do routers learn of VIF addresses?

I-BGP session

Physical link

R1 R2vif vif

138.39.1.1/30 138.39.1.2/30

138.39.128.1/30 138.39.128.5/30

use IGP

Page 16: External v.s. Internal BGP

BGP confederations

Two methods:

16

Scaling the I-BGP Mesh

Computer Communications - CSCI 551

Copyright © William C. Cheng

Route reflectors

scale by adding hierarchy to AS (sub-AS)

scale by adding hierarchical IBGP route forwarding

Page 17: External v.s. Internal BGP

Subdivide a single AS into multiple, internal sub-AS’s

to reduce I-BGP mesh size

17

AS Confederation

Computer Communications - CSCI 551

Copyright © William C. Cheng

Still advertises a single AS to external peers

simple hierarchy

but only one level

internally use sub-AS’s

Page 18: External v.s. Internal BGP

13

1110

12

AS2

R2 does not see sub-AS 10-14, but sees AS1

18

An AS Confederation

Computer Communications - CSCI 551

Copyright © William C. Cheng

AS1

14

AS ConfederationSub-AS’s

R1

R2

Page 19: External v.s. Internal BGP

local-pref attribute remains meaningful within

confederation (E-BGP ignores it)

BGP sessions between sub-AS’s are like regular E-BGP but

with some changes:

19

Confederations

Computer Communications - CSCI 551

Copyright © William C. Cheng

next-hop attribute traverses sub-AS boundaries (assumes

single IGP running - everyone has same route to next-hop)

AS-PATH now includes AS-CONFED-SET and

AS-CONFED-SEQUENCE to avoid loops

Page 20: External v.s. Internal BGP

20

BGP Confederation

Computer Communications - CSCI 551

Copyright © William C. Cheng

AS300

AS10 AS20 AS30

Page 21: External v.s. Internal BGP

RRC runs normal I-BGP

Route Reflector (RR): router whose BGP implementation

allows re-advertisement of routes between I-BGP neighbors

21

Route Reflectors

Computer Communications - CSCI 551

Copyright © William C. Cheng

Route Reflector Client (RRC): router that depends on RR

to re-advertise its routes to entire AS. It also depends on

RR to learn routes from the rest of the network

RR runs modified I-BGP

Page 22: External v.s. Internal BGP

With RR there are 7

I-BGP sessions

instead of 21 (=7*6/2)

22

RR Example

Computer Communications - CSCI 551

Copyright © William C. Cheng

RR3

RR2RR1

I-BGP

RR-C3

RR-C4

RR-C1

RR-C2

AS1

E-BGPneighbor

AS2

128.4.0.0/16

138.39.0.0/16

E-BGP

modified I-BGP

Page 23: External v.s. Internal BGP

RR1 advertises 138.39.0.0/16 learned from RRC2 into I-BGP

Reflectors advertise routes learned from clients into the

I-BGP mesh

23

Rules for Route Reflectors

Computer Communications - CSCI 551

Copyright © William C. Cheng

RR1 will not re-advertise 128.4.0.0/16 learned from RR3 to

RR2

Reflectors do not re-advertise routes between non-clients