Upload
lewis-obi
View
241
Download
3
Embed Size (px)
DESCRIPTION
BGP Overview
Citation preview
�� � � ��� ��� � � � � �� � �� ��� � ���
�� �� � �� �
BGP OverviewRanbir P arm ar
rp arm ar@ c is c o . c o m
BGP OverviewRanbir P arm ar
rp arm ar@ c is c o . c o m
�� � � �� ��� � � � � �� � �� ��� www.cisco.com � ���
� � �� � � �� �� � �
Protocol Development C ons i d era ti ons
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• B G P us es T C P f or reliab le trans port - CPU i n t e n s i v e . A ls o h eav y w eigh t on memory us e
• S calab ility is th e top priority - s l o w e r c o n v e r g e n c e
�� � � �� ��� � � � � �� � �� ��� www.cisco.com � ���
� � �� � � �� �� � �
• 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• B G P U s ag e S c e nario s
Topics
�� � � �� ��� � � � � �� � �� ��� www.cisco.com � ���
� � �� � � �� �� � �
AS 1AS 1
AS 3AS 3
AS 2AS 2
B G PB G P
B G PB G P
B G P - A u t on om ou s S y st e m
• A set of networks sharing the sam e rou ting p ol ic y
• O ne c ontigu ou s sy stem• 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 � ���
� � �� � � �� �� � �
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.• BGP session is m aintained w ith BGP k eepaliv es.
�� � � �� ��� � � � � �� � �� ��� www.cisco.com � ���
� � �� � � �� �� � �
Fundamentals
• 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.• I BGP is used to c arry N L R I w ithin the Autonom ous sy stem .
IBGP v s E BGP
�� � � �� ��� � � � � �� � �� ��� www.cisco.com � ���
� � �� � � �� �� � �
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 pe-L en g th-V al ue) .
• U s ed b y BGP s peakers for route s el ecti on .
�� � � �� ��� � � � � �� � �� ��� www.cisco.com � ���
� � �� � � �� �� � �
W ell-k no w n M andato r y A ttr i b utes
W ell-k no w n M andato r y A ttr i b utes
•Origin• Specifies the origin of a BGP routeIGP R o u t e o r i g i n a t e d i n a n IGPE GP R o u t e o r i g i n a t e d i n E GPU n k n o w n 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
• A S _ P a t h• 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• I P ad d ress of the nex t-hop router
�� � � �� ��� � � � � �� � �� ��� www.cisco.com � ���
� � �� � � �� �� � �
W ell-k no w n D i sc r eti o nar y A ttr i b utes
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• I nform s the neighb or A S that the originating router aggregated routes
�� � � �� ��� � � � � �� � �� ��� www.cisco.com � ���
�� �� � � �� �� � � �O p ti o nal A ttr i b utesO 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–Used f or route tag g ing
�� � � �� ��� � � � � �� � �� ��� www.cisco.com � ���
�� �� � � �� �� � � �BGP in ActionBGP 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• A d v ertising l ocal netw ork s
�� � � �� ��� � � � � �� � �� ��� www.cisco.com � ���
�� �� � � �� �� � ��BGP R ou te Se l e ction C r ite r iaBGP R ou te Se l e ction C r ite r ia
• 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
�� � � �� ��� � � � � �� � �� ��� www.cisco.com � ���
�� �� � � �� �� � � �
1 8 8 0
AS-P a t h
141.253.10.0/24
A
690 B
2 00C
1. R o u t e r A s e n d s u p d a t e f o r141.253.10.0/24 w i t h A S _ P A T H : 18 8 0
1. R o u t e r A s e n d s u p d a t e f o r141.253.10.0/24 w i t h A S _ P A T H : 18 8 0
2. R o u t e r B s e n d s u p d a t e f o r 141.253.10.0/24 w i t hA S _ P A T H : 6 9 0 18 8 0
2. R o u t e r B s e n d s u p d a t e f o r 141.253.10.0/24 w i t hA S _ P A T H : 6 9 0 18 8 0
3.R o u t e r C s e n d s u p d a t e f o r 141.253.10.0/24 w i t h A S _ P A T H : 200 6 9 0 18 8 0
3.R o u t e r C s e n d s u p d a t e f o r 141.253.10.0/24 w i t h A S _ P A T H : 200 6 9 0 18 8 0
4.R o u t e r A w i l l d e t e c t i t s o w n A S n u m b e r a n d w i l ld i s c a r d t h e u p d a t e
4.R o u t e r A w i l l d e t e c t i t s o w n A S n u m b e r a n d w i l ld i s c a r d t h e u p d a t e
T h e I nte r na l BGP p r ob l e m
�� � � �� ��� � � � � �� � �� ��� www.cisco.com � ���
�� �� � � �� �� � � �
I nte r na l BGP p r ob l e m
141.253.10.0/24A S 3
A
B
C
1. R o u t e r D s e n d s u p d a t e f o r141.253.10.0/24 w i t h A S _ P A T H : 3
1. R o u t e r D s e n d s u p d a t e f o r141.253.10.0/24 w i t h A S _ P A T H : 3 D
AS 1
2. R o u t e r C w o u l d s e n d u p d a t e f o r141.253.10.0/24 w i t h A S _ P A T H : 1 3
2. R o u t e r C w o u l d s e n d u p d a t e f o r141.253.10.0/24 w i t h A S _ P A T H : 1 3
3.R o u t e r B w o u l d d e t e c t i t s o w n A S n u m b e r a n d w i l ld i s c a r d t h e u p d a t e
3.R o u t e r B w o u l d d e t e c t i t s o w n A S n u m b e r a n d w i l ld i s c a r d t h e u p d a t e
3.R o u t e r A w o u l d n e v e rr e c e i v e a n y u p d a t e
3.R o u t e r A w o u l d n e v e rr e c e i v e a n y u p d a t e
• IBGP can N O T b e h av e as E BGP
�� � � �� ��� � � � � �� � �� ��� www.cisco.com � ���
�� �� � � �� �� � � �
I nte r na l BGP•IBGP speakers cannot detect routing l oops.•IBGP is N E V E R propagated.•IBGP is N E V E R redistrib uted.• T h eref ore IBGP req uires a f ul l m esh .• T o av oid f ul l m esh in l arge IBGP netw orks, use R R and conf ederations
�� � � �� ��� � � � � �� � �� ��� www.cisco.com � ���
�� �� � � �� �� � � �
C om m on BGP U s a g e sC 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
•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
�� � � �� ��� � � � � �� � �� ��� www.cisco.com � ���
�� �� � � �� �� � � �
Single-h o m ed C u s t o m er sSingle-h o m ed C u s t o m er s• Large customer or small ISP connecting to th e Internet
Internet
C u s to m er o r s m a l lS erv i c e P ro v i d er
S erv i c e P ro v i d er
Using BGP Using BGP
AS 66
1 . 2 . 3 . 4
�� � � ��� ��� � � � � �� � �� ��� www.cisco.com � ���
�� �� � � �� �� � �
Customer Connected to One ISPU sa g e G ui del i nes
Customer Connected to One ISPU 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• S ta tic routes a re a lw a y s simp ler th a n B G P
�� � � ��� ��� � � � � �� � �� ��� www.cisco.com � ���
�� �� � � �� �� � ��
Customer Connected to One ISPU sa g e G ui del i nes
Customer Connected to One ISPU 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• N ot a tra n sit A S , N o I B G P n eig h b ors
�� � � ��� ��� � � � � �� � �� ��� www.cisco.com � ���
�� �� � � �� �� � � �Dual-h o m e d C us t o m e r sDual-h o m e d C us t o m e r s
• Large customer or small ISP connecting to th e Internet
Internet
C u s to m er o r s m a l lS erv i c e P ro v i d er
S erv i c e P ro v i d er
Multiple links, same ISPMultiple links, same ISP
AS 661 . 2 . 3 . 4
7 . 6. 5 . 4
�� � � ��� ��� � � � � �� � �� ��� www.cisco.com � ���
�� �� � � �� �� � ��
Customer Connected to One ISPw D ua l L i nk s
Customer Connected to One ISPw 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
U se I S P address sp ac e an d p ri v ate A S n um b er
�� � � ��� ��� � � � � �� � �� ��� www.cisco.com � ���
�� �� � � �� �� � � �M ul ti -h omed CustomersM ul ti -h omed Customers
• Customer connecting to several service-p rovid ers ( multi-h omed customer)
Internet
M u l ti -h o m edC u s to m er
S erv i c e P ro v i d er # 2
��� �
S erv i c e P ro v i d er # 1
�� � � ��� ��� � � � � �� � �� ��� www.cisco.com � ���
�� �� � � �� �� � ��
M ul ti -h omed Customer U sa g e G ui del i nes
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
• M ulti-h omed customers sh ould use p rovid er-ind ep end ent ad d ress sp ace
�� � � ��� ��� � � � � �� � �� ��� www.cisco.com � ���
�� �� � � �� �� � � �
M ul ti h omed Customer Prob l em
M ul ti h omed Customer Prob l em
• 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
Alternate Provider
M u ltih om edC u s tom er
Prim ary Provider( ag g reg ating )
R es t of th e I nternet
192.1.1.0/24
192.1.1.0/24
192.1.1.0/24
192.1.0.0/16
�� � � ��� ��� � � � � �� � �� ��� www.cisco.com � ���
�� �� � � �� �� � � �
M ul ti h omed Customer Prob l em
M ul ti h omed Customer Prob l em
• 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
Alternate Provider
M u ltih om edC u s tom er
Prim ary Provider( ag g reg ating )
R es t of th e I nternet
192.1.1.0/24
192.1.1.0/24
192.1.1.0/24
192.1.0.0/16192.1.0.0/16192.1.1.0/24
�� � � ��� ��� � � � � �� � �� ��� www.cisco.com � ���
�� �� � � �� �� � � �
Transit Autonomous SystemTransit 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 edC u s to m er
S erv i c e P ro v i d er( T ra ns i t A S )
BGP
A no th er S erv i c eP ro v i d er
BGP
S i m p l e C u s to m er StaticR o u tin g
BGP
�� � � ��� ��� � � � � �� � �� ��� www.cisco.com � ���
�� �� � � �� �� � � �BGP Synchronization
•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)
�� � � ��� ��� � � � � �� � �� ��� www.cisco.com � ���
�� �� � � �� �� � � �
BGP Synchronization
•Synchronization can be turned off with com m and: no synchronization ( if it’s not trans it A S or al l the trans it routers in the A S run B G P ) .• 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 .
�� � � ��� ��� � � � � �� � �� ��� www.cisco.com � ���
�� �� � � �� �� � � �
BGP Lim itationsBGP 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
RFC 1 7 7 1 : “B G P d o e s n o t e n a b l e o n e A S t o s e n d t r a f f i c t o n e i g h b o r A S i n t e n d i n g t h a t t h e t r a f f i c t a k e a d i f f e r e n t r o u t e f r o m t h a t t a k e n b y t r a f f i c o r i g i n a t i n g i n t h e n e i g h b o r A S ”
�� � � ��� ��� � � � � �� � �� ��� www.cisco.com � ���
�� �� � � �� �� � � �R F C s C ov e ring Bas e l ine BGP4R F C s C ov e ring Bas e l ine BGP4
1930 G u i d e l i n e s f o r c r e a t i o n , s e l e c t i o n , a n d r e g i s t r a t i o n o f a n A u t o n o m o u s S y s t e m
17 7 4 B G P -4 P r o t o c o l A n a l y s i s17 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 l17 7 2 A p p l i c a t i o n o f t h e B G P i n t h e I n t e r n e t17 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 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 n16 7 5 B G P M I B
�� � � ��� ��� � � � � �� � �� ��� www.cisco.com � ���
�� �� � � �� �� � ��
R F C s C ov e ring A d d itions to BGP4
R F C s C ov e ring A d d itions to BGP4
196 5 A u t o n o m o u s S y s t e m C o n f e d e r a t i o n s f o r B G P1997 B G P C o m m u n i t i e s A t t r i b u t e1998 A n A p p l i c a t i o n o f t h e B G P C o m m u n i t y
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 g2 38 5 P r o t e c t i o n o f B G P s e s s i o n s v i a t h e T C P M D 5
S i g n a t u r e O p t i o n2 439 B G P R o u t e F l a p D a m p i n g2 7 96 B G P R o u t e R e f l e c t i o n A n a l t e r n a t i v e t o f u l l
m e s h I B G P
�� � � ��� ��� � � � � �� � �� ��� www.cisco.com � ���
�� �� � � �� �� � ��
R F C s C ov e ring BGP E x te ns ions
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 -42 8 5 8 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 -42 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