Sei sulla pagina 1di 33

BGP Overview


 















 


Ranbir P arm ar
rp arm ar@ c is c o . c o m

Protocol Development
C ons i d era ti ons

B G P w as d e s ig ne d t o p e rf o rm

w e l l in

Interdomain Routing application


H uge inter-netw ork s w ith large routing tab les
E nv ironments th at req uire complex routing
policies

S o m e d e s ig n t rad e o f f s t h at w e re m ad e












www.cisco.com


 

T C P f or reliab le trans port - CPU


A ls o h eav y w eigh t on memory us e
is th e top priority - s l o w e r
c e








 
 


B G P us es
in te n s iv e .
S calab ility
c o n v e rg e n

Topics
B G P F u nd am e nt al s
B G P A t t ribu t e s

Ro u t e S e l e c t io n











 



www.cisco.com







 
 


B G P U s ag e S c e nario s

B G P - A u t on om ou s S y st e m

BB GG PP

R ange form 1 to 6 5 , 5 3 5
( p riv ate from 6 4 5 1 2 to 6 5 5 3 4 )












www.cisco.com

BB GG PP


 







 
 


AS
AS 3 3

AS
AS 2 2

O ne c ontigu ou s sy stem

AS
AS 11

A set of networks sharing


the sam e rou ting p ol ic y

Fundamentals
BGP session established on top of TCP port 179
( BGP neig hbors) .
TCP needs a rou ting lay er ( I GP) .
BGP u ses a database ( BGP table) .

D atabases are ex c hang ed after session set u p.











 



www.cisco.com







 
 


BGP session is m aintained w ith BGP k eepaliv es.

Fundamentals
IBGP v s E BGP
A BGP router has internal and/or external neig hb ors

E xternal neig hb ors b elong to dif f erent Autonom ous S y stem s.


I nternal neig hb ors b elong to the sam e Autonom ous S y stem .

E BGP is used to exc hang e N L R I b etw een Autonom ous S y stem s.











 



www.cisco.com







 
 


I BGP is used to c arry N L R I w ithin the Autonom ous sy stem .

B G P A ttr i b utes
Part of the BGP update packet.
I m pl em en ted as T L V ( T y peL en g th-V al ue) .











 



www.cisco.com







 
 


U s ed b y BGP s peakers for route


s el ecti on .

Origin

W ell-k no w n M andato r y
A ttr i b utes

Specifies the origin of a BGP route


IGP
E GP
U n k n o w n

A S _ P a t h

R o u t e o r i g i n a t e d i n a n IGP
R o u t e o r i g i n a t e d i n E GP
R o u t e w a s r e d i s t r i b u t e d i n t o B GP

Seq uence of A S num b ers through w hich the


netw ork is accessib l e

N e x t _ H o p











 



www.cisco.com







 
 


I P ad d ress of the nex t-hop router

W ell-k no w n D i sc r eti o nar y


A ttr i b utes

L o c a l p re f e re nc e

U sed for consistent routing pol icy w ithin A S

A t o m ic a ggre ga t e











 



www.cisco.com







 
 


I nform s the neighb or A S that the originating


router aggregated routes

O p ti o nal A ttr i b utes


N o n-t ra ns it iv e a t t rib u t e s
M ul ti_ E x it_ D isc

Used to discriminate between multiple entry


points to a sing le autonomous system

T ra ns it iv e a t t rib u t e s
A ggregator

S pecif ies I P address and A S number of th e router


th at perf ormed route ag g reg ation

C om m unities











 



www.cisco.com







 
 


Used f or route tag g ing

BGP in Action
B G P ro u t ing inf o rm a t io n e x c h a nge c o nt a ins
t h e f o l l o w ing s t e p s :
R eceiv ing BGP routing upd ates
Buil d ing BGP tab l e

BGP R oute sel ection

BGP R oute propagation

Buil d ing I P routing tab l e













 



www.cisco.com







 
 


A d v ertising l ocal netw ork s

BGP R ou te Se l e ction C r ite r ia









 









www.cisco.com



Exclude routes with inaccessible next-hop


Pref er hig hest weig ht ( local to router)
Pref er hig hest local-p ref erence ( g lobal within AS )
Pref er routes that the router orig inated
Pref er shorter AS p aths ( only leng th is com p ared)
Pref er lowest orig in code ( I G P < EG P < U nk nown)
Pref er lowest M ED
Pref er external ( EBG P) p aths ov er internal ( I BG P)
F or I BG P p aths, p ref er p ath throug h closest I G P neig hbor
F or EBG P p aths, p ref er oldest ( m ost stable) p ath
Pref er p aths f rom router with the lower BG P router ( orig inator) I D


 
 


T h e I nte r na l BGP p r ob l e m
690

AS-P a t h
B

1.
1. R R o o u u t t e e r r A A s s e e n n d d s s u u
141.253.10.0/24
141.253.10.0/24 w w

pp dd
iitt hh

aa tt ee
AA SS

ff oo rr
_ _ P P A A T T H H : : 1818 8 8 00

1 8 8 0
A

2.
2. R R o o u u t t e e r r B B s s e e n n d d s s u u p p d d a a t t e e
f f o o r r 141.253.10.0/24
141.253.10.0/24 w w i i t t h h
A A S S _ _ P P A A T T H H : : 6 6 9 9 00 1818 8 8 00






AA ww iillll dd ee tt ee cc tt iitt ss
nn uu mm bb ee rr aa nn dd ww iillll
tt hh ee uu pp dd aa tt ee




tt ee rr
AA SS
aa rr dd

uu
nn
cc



www.cisco.com

oo
ww
iiss


 

2 00

3.R
3.R o o u u t t e e r r C C s s e e n n d d s s u u p p d d a a t t e e
f f o o r r 141.253.10.0/24
141.253.10.0/24 w w i i t t h h
A A S S _ _ P P A A T T H H : : 200
200 6 6 9 9 00 1818 8 8 00

4.R
4.R
oo
dd







 
 


141.253.10.0/24

I nte r na l BGP p r ob l e m
3.R
3.R
oo
dd

B
AS 1

2.
2. R R o o u u t t e e r r C C w w o o u u l l d d s s
141.253.10.0/24
141.253.10.0/24 w w




141.253.10.0/24




www.cisco.com

A S 3





ff oo rr
H H : : 11 33

dd uu pp dd aa tt ee
AA SS __ PP AA TT


 






ee nn
iitt hh

BB ww oo uu lldd dd ee tt ee cc tt iitt ss
nn uu mm bb ee rr aa nn dd ww iillll
tt hh ee uu pp dd aa tt ee

IBGP can N O T b e h av e as E BGP



 
 


tt ee rr
AA SS
aa rr dd

C
1.
1. R R o o u u t t e e r r D D s s e e n n d d s s u u p p d d a a t t e e f f o o r r
141.253.10.0/24
141.253.10.0/24 w w i i t t h h A A S S _ _ P P A A T T H H : : 33

uu
nn
cc

3.R
3.R o o u u t t e e r r A A w w o o u u l l d d n n e e v v e e r r
rr ee cc ee iivv ee aa nn yy uu pp dd aa tt ee

oo
ww
iiss

I nte r na l BGP
IBGP speakers cannot detect routing
l oops.
IBGP is N E V E R
IBGP is N E V E R

propagated.

redistrib uted.

T h eref ore IBGP req uires a f ul l m esh .











 



www.cisco.com







 
 


T o av oid f ul l m esh in l arge IBGP


netw orks, use R R and conf ederations

C om m on BGP U s a g e s
Customer connected to one Internet
S erv i ce P rov i der ( ISP)

Customer connected v i a mul ti p l e l i nk s to


one Internet S erv i ce P rov i der











 



www.cisco.com







 
 


Customer connected v i a mul ti p l e l i nk s to


di f f erent Internet S erv i ce P rov i ders

Single-h o m ed C u s t o m er s
Using BGP

Large customer or small ISP connecting to


th e Internet
Internet

C u s to m er o r s m a l l
S erv i c e P ro v i d er

S erv i c e P ro v i d er
1 .2 .3 .4











 



www.cisco.com







 
 


AS 66

Customer Connected to One ISP


U sa g e G ui del i nes

Use BGP between the customer and the Service


Provider:
Customers multi-h omed to th e sa me S erv ic e
P rov id er

Customer th a t n eed s d y n a mic routin g p rotoc ol


w ith th e S erv ic e P rov id er to d etec t f a ilures

H in t: U se p riv a te A S n umb er f or th ese c ustomers


S ma ller I S P s th a t n eed to orig in a te th eir routes in
th e I n tern et

Use static routes in al l other cases












 



www.cisco.com








 


S ta tic routes a re a lw a y s simp ler th a n B G P

Customer Connected to One ISP


U sa g e G ui del i nes
T ak e the def aul t route 0 / 0 f rom the I SP
N o n eed f or f ull I n tern et routin g ta b le
I n b oun d route f ilter

O utbound p ref ix -l ist

O n ly a d v ertise leg a l a d d ress sp a c e

T y p ical l y no route-map s or as-p ath f il ters












 



www.cisco.com








 


N ot a tra n sit A S , N o I B G P n eig h b ors

Dual-h o m e d C us t o m e r s
Multiple links, same ISP

Large customer or small ISP connecting to


th e Internet
Internet

S erv i c e P ro v i d er
7 . 6. 5 . 4













www.cisco.com

AS 66


 








 


1 .2 .3 .4

C u s to m er o r s m a l l
S erv i c e P ro v i d er

Customer Connected to One ISP


w D ua l L i nk s

Take full routes or a default?

Routes should be the same throughout the ISP


A S
B G P w i ll load balan c e w hen routes are i den ti c al
( up to 6 )

I s th e route really av ai lab le?

W i th a def ault route, i n di v i dual desti n ati on s may


n ot be reac hable, but traf f i c i s sti ll sen t to the ISP














 



www.cisco.com








 


U se I S P address sp ac e an d p ri v ate A S n um b er

M ul ti -h omed Customers
Customer connecting to several servicep rovid ers ( multi-h omed customer)
Internet

S erv i c e P ro v i d er # 1

M u l ti -h o m ed
C u s to m er














 



www.cisco.com








 





S erv i c e P ro v i d er # 2

M ul ti -h omed Customer
U sa g e G ui del i nes

B G P is almost mand atory f or multi-h omed


customers

M ulti-h omed customers h ave to use p ub lic


A S numb ers












 



www.cisco.com








 


M ulti-h omed customers sh ould use


p rovid er-ind ep end ent ad d ress sp ace

M ul ti h omed Customer
Prob l em
Alternate Provider
M u ltih om ed
C u s tom er

192.1.1.0/24

192.1.1.0/24

R es t of th e I nternet
192.1.1.0/24

192.1.0.0/16

Prim ary Provider


( ag g reg ating )












 



www.cisco.com








 


Customer prefers Primary prov i d er usi n g A l t e rn at e on l y a s


b a c k up
Primary prov i d er a d v erti ses th e a g g reg a te, A l t e rn at e
prov i d er a d v erti ses i n d i v i d ua l n etw ork

M ul ti h omed Customer
Prob l em
Alternate Provider
M u ltih om ed
C u s tom er

192.1.1.0/24

192.1.1.0/24

R es t of th e I nternet
192.1.0.0/16
192.1.0.0/16
192.1.1.0/24

192.1.1.0/24

Prim ary Provider


( ag g reg ating )












 



www.cisco.com








 


R emote a uton omous sy stems prefer l on g est-ma tc h prefi x ,


tra ffi c tow a rd th e c ustomer fl ow s th roug h A l tern a te
prov i d er
S ol uti on : d on t use a g g reg a ti on

Transit Autonomous System


Using BGP to exchange routes is
m and atory f or transit autonom ous sy stem s
( p rov id er netw ork s carry ing custom er
traf f ic)
Internet
M u l ti -h o m ed
C u s to m er

BGP

A no th er S erv i c e
P ro v i d er

S i m p l e C u s to m er

BGP

BG
P

Static
R o u tin g












 



www.cisco.com








 


S erv i c e P ro v i d er
( T ra ns i t A S )

BGP Synchronization















 



www.cisco.com








 


BGP synchronization rule states that if an AS


p rov id es transit serv ice to another AS, BGP
should not ad v ertise a route until all of the
routers w ithin the AS hav e learned ab out the
route v ia an I GP.
I n other w ord s, I BGP p ath should b e in the
I GP in ord er for the BGP router to ad v ertise it
to:
EBGP peers
I BGP peers ( ro u t e ref l ec t o r)

BGP Synchronization
Synchronization can be turned off with
com m and: no synchronization ( if its not
trans it A S or al l the trans it routers in the
A S run B G P ) .












 



www.cisco.com








 


D is abl ing s ynchronization al l ows B G P


to conv erg e m ore q uick l y, but it m ig ht
res ul t in drop p ed trans it p ack ets .

BGP Lim itations


B G P and as s ociated tool s cannot
ex p res s al l routing p ol icies

You cannot influence the routing policies of


d ow nstream autonom ous sy stem s

www.cisco.com

a b le o n e A S to s e n d
in g th a t th e tr a ffic
a t ta k e n b y tr a ffic
S



e n
n d
th
r A



e s n o t
S in te
e fro m
ig h b o

d o
r A
u t
n e








G P
h b o
n t ro
th e


 

7 7 1 : B
to n e ig
d iffe r e
a tin g in








 


RFC 1
tr a ffic
ta k e a
o r ig in

R F C s C ov e ring Bas e l ine BGP4


1930

G u id e lin e s fo r c r e a tio n , s e le c tio n , a n d


r e g is tr a tio n o f a n A u to n o m o u s S y s te m

17 7 4

B G P -4 P r o t o c o l A n a l y s i s

17 7 3

E x p e r i e n c e w i t h t h e B G P -4 p r o t o c o l

17 7 1

A B o r d e r G a t e w a y P r o t o c o l 4 ( B G P -4)

17 7 2

A p p lic a tio n o f th e B G P in th e In te r n e t

17 45

B G P 4/ I D R P f o r I P ---O S P F i n t e r a c t i o n









 









www.cisco.com



B G P M IB



 


16 7 5

R F C s C ov e ring A d d itions to
BGP4

196 5

A u to n o m o u s S y s te m

1997

C o n fe d e r a tio n s fo r B G P

B G P C o m m u n itie s A ttr ib u te

1998

A n A p p lic a tio n o f th e B G P C o m m u n ity


A t t r i b u t e i n M u l t i -h o m e R o u t i n g

2 38 5

P r o te c tio n o f B G P s e s s io n s v ia th e T C P M D 5
S ig n a tu r e O p tio n

2 439 B G P R o u t e F l a p D a m p i n g









 









www.cisco.com



B G P R o u te R e fle c tio n A n a lte r n a tiv e to fu ll


m e s h IB G P



 


2 7 96

R F C s C ov e ring BGP
E x te ns ions

2 8 42

C a p a b i l i t i e s A d v e r t i s e m e n t w i t h B G P -4

2 918

R o u t e R e f r e s h C a p a b i l i t y f o r B G P -4









 









www.cisco.com



M u l t i p r o t o c o l e x t e n s i o n s f o r B G P -4



 


2 8 5 8











 




 




www.cisco.com

Potrebbero piacerti anche