Troubleshooting BGP (2210)

Embed Size (px)

Text of Troubleshooting BGP (2210)

2210 1351_06_2000_c2

2000, Cisco Systems, Inc. 2000, Cisco Systems, Inc.

1

Troubleshooting BGP in Large IP NetworksSession 2210

2210 1351_06_2000_c2

2000, Cisco Systems, Inc.

2

BGP in Large Scale Networks

Scalable Stable Simple2210 1351_06_2000_c2 2000, Cisco Systems, Inc.

3

Avoid the Problem in the First Place Use simple configurationsmaintain a consistent policy throughout the AS

Promote stable networksnail-down your routes use loopback interfaces

Grow into your networkuse peer-groups and RRs for scalability2210 1351_06_2000_c2 2000, Cisco Systems, Inc.

4

Agenda

Basic Tools Peer Establishment UPDATE Exchange Selection Algorithm Route Reflectors2210 1351_06_2000_c2 2000, Cisco Systems, Inc.

5

Tool TimeBasic Tools

2210 1351_06_2000_c2

2000, Cisco Systems, Inc.

6

BGP Troubleshooting Tools

show commands debug output Log messages

2210 1351_06_2000_c2

2000, Cisco Systems, Inc.

7

show Commandsrouter#show ip bgp ? A.B.C.D IP prefix /, e.g., 35.0.0.0/8 A.B.C.D Network in the BGP routing table to display cidr-only Display only routes with non-natural netmasks community Display routes matching the communities community-list Display routes matching the community-list dampened-paths Display paths suppressed due to dampening filter-list Display routes conforming to the filter-list flap-statistics Display flap statistics of routes inconsistent-as Display only routes with inconsistent origin ASs neighbors Detailed information on TCP and BGP neighbor connections paths Path information peer-group Display information on peer-groups quote-regexp Display routes matching the AS path "regular expression" regexp Display routes matching the AS path regular expression summary Summary of BGP neighbor status | Output modifiers 2210 1351_06_2000_c2 2000, Cisco Systems, Inc.

8

show Commands (Cont.)

router#show ip bgp neighbors x.x.x.x ? advertised-routes Display the routes advertised to a BGP neighbor dampened-routes Display the dampened routes received from neighbor flap-statistics Display flap statistics of the routes learned from neighbor paths Display AS paths learned from neighbor received Display information received from a BGP neighbor received-routes Display the received routes from neighbor routes Display routes learned from neighbor | Output modifiers

2210 1351_06_2000_c2

2000, Cisco Systems, Inc.

9

The BGP Tablerout er#s how i bgp p BG P t e vers on i 9,l abl i s ocalrout I i 7. 6. er D s 72. 1 St us codes s s at : uppres ed,d dam ped,h hi t s s ory,* vald,> bes ,i-i ernal i t nt O ri n codes i-I P,e -EG P,? -i gi : G ncom pl e et N et ork w *> 3. 0. 0. 0 *> 5. 0. 0. 0 *> 6. 0. 0. 0 *i *> 7. 0. 0. 0 *> 8. 0. 5 0. 0/ *> 17. 0. 0. 0 *i *> 23. 0. 0. 0 *i *> 35. 0. 0. 0 *i2210 1351_06_2000_c2

N extH op M et c LocPrfW ei Pat ri ght h 0. 0. 0. 0 0 32768 i 0. 0. 0. 0 0 32768 i 6. 6. 72. 2 4294967294 02i 6. 6. 72. 2 4294967294 100 0 2 i 0. 0. 0. 0 0 32768 i 0. 0. 0. 0 0 32768 i 6. 6. 72. 2 4294967294 02i 6. 6. 72. 2 4294967294 100 0 2 i 6. 6. 72. 2 4294967294 02i 6. 6. 72. 2 4294967294 100 0 2 i 6. 6. 72. 2 4294967294 02i 6. 6. 72. 2 4294967294 100 0 2 i

2000, Cisco Systems, Inc.

10

The BGP Table (Cont.)

rout er#s how i bgp 6. 0. p 0. 0 BG P routng t e ent f 6. 0. 8,vers on 2 i abl ry or 0. 0/ i Pat :( avaiabl bes #1) hs 2 l e, t A dverts t non peeri ed o group peers : 7. 14. 7. 6. 7. 7. 25. 4 72. 3 75. 1 2 6. 6. f 72. 2 rom 6. 6. ( 72. 2) 72. 2 7. 6. O ri n I P,m et c 4294967294,l pref100,vald, gi G ri ocal i 2 6. 6. f 72. 2 rom 7. 7. ( 75. 1) 75. 1 7. 7. O ri n I P,m et c 4294967294,l pref100,vald, gi G ri ocal i

ext ernal bes , t

i ernal nt

2210 1351_06_2000_c2

2000, Cisco Systems, Inc.

11

show ip bgp Summary

rout er#s how i bgp s m ary p um BG P rout i er dentfer 7. 6. l ii 72. 1, ocalA S num ber 1 BG P t e vers on i 9,m ai routng t e vers on 9 abl i s n i abl i 8 net ork ent es and 12 pat us ng 1176 byt ofm em ory w ri hs i es 3 BG P pat at ri e ent es us ng 144 byt ofm em ory h t but ri i es 1 BG P A S- TH ent es us ng 24 byt ofm em ory PA ri i es BG P actviy 8/ prefxes 12/ pat i t 0 i , 0 hs N ei ghbor V A S M s cvd M s gR gSent Tbl er I O ut U p/ ow n St e/ xR cd V nQ Q D at Pf 6. 6. 4 2 6885 6882 72. 2 9 0 0 4d18h 4 7. 14. 4 3 6882 6883 25. 4 9 0 0 4d18h 0 7. 6. 4 1 6880 6886 72. 3 9 0 0 4d18h 0 7. 7. 4 1 6884 6885 75. 1 9 0 0 4d18h 4

2210 1351_06_2000_c2

2000, Cisco Systems, Inc.

12

show ip bgp neighborsrout er#s how i bgp nei p ghbors 6. 6. 72. 2 BG P nei ghbor i 6. 6. rem ot A S 2,ext s 72. 2, e ernallnk i I ndex 1,O f s 0,M as 0x2 f et k BG P vers on 4,rem ot rout I 7. 6. i e er D 72. 2 BG P s at = Es abls t e t i hed,t e vers on = 9,up f 4d21h abl i or Las read 00: 56,l ts t 00: as end 00: 48 00: H ol tm e 180,keepalve i erval60 s d i i nt econds N ei ghbor N LR I negotaton: i i C onfgured f uni trout onl i or cas es y Peer negotat uni tand m uli trout i ed cas tcas es Exchangi uni trout onl ng cas es y R ecei rout ref h capabiiy f ved e res lt rom peer M i m um tm e bet een adverts entruns i 30 s ni i w i em s econds R ecei 7044 m es ages 0 notfcatons 0 i queue ved s , ii i , n Sent7041 m es ages 0 notfcatons 0 i queue s , ii i , n Prefx adverts 4,s i i ed uppres ed 0,w ihdraw n 0 s t R out ref h reques :recei 0,s 0 e res t ved ent I nbound pat polcy confgured h i i R out m ap f i e or ncom i adverts ent i k ng i em ss C onnectons es abls i t i hed 1;dropped 0 Las res never t et N um ber ofuni tm uli tprefxes recei 4/ cas / tcas i ved 0 Ext ernalBG P nei ghbor m ay be up t 255 hops aw ay. o C onnecton s at i ESTA B,I O s at :1,unread i i t es / t us nputbyt :0 es Localhos :3. 6. Localport 179 t 72. 1, : Forei hos :6. 6. Forei port 11014 gn t 72. 2, gn :2210 1351_06_2000_c2 2000, Cisco Systems, Inc.

13

debug ip bgprouter#debug ip bgp ? A.B.C.D BGP neighbor address dampening BGP dampening events BGP events keepalives BGP keepalives updates BGP updates

Remembercan be dangerous!Use only in the lab or If advised by the TAC

To make a little safer:logging buffered no logging console2210 1351_06_2000_c2 2000, Cisco Systems, Inc.

14

Session Establishment (debug ip bgp )16:06:30: BGP: 7.72.6.1 sending OPEN, version 4 16:06:31: BGP: 7.72.6.1 OPEN rcvd, version 4 16:06:31: BGP: 7.72.6.1 rcv OPEN w/ OPTION parameter len: 12 16:06:31: BGP: 7.72.6.1 rcv OPEN w/ option parameter type 2 (Capability) len 6 16:06:31: BGP: 7.72.6.1 OPEN has CAPABILITY code: 1, length 4 16:06:31: BGP: 7.72.6.1 OPEN has MP_EXT CAP for afi/safi: 1/1 16:06:31: BGP: 7.72.6.1 rcv OPEN w/ option parameter type 2 (Capability) len 2 16:06:31: BGP: 7.72.6.1 OPEN has CAPABILITY code: 128, length 0 16:06:31: BGP: 7.75.7.1 passive open 16:06:31: BGP: 7.75.7.1 OPEN rcvd, version 4 16:06:31: BGP: 7.75.7.1 sending OPEN, version 4 16:06:31: BGP: 7.75.7.1 rcv OPEN w/ OPTION parameter len: 12 16:06:31: BGP: 7.75.7.1 rcv OPEN w/ option parameter type 2 (Capability) len 6 16:06:31: BGP: 7.75.7.1 OPEN has CAPABILITY code: 1, length 4 16:06:31: BGP: 7.75.7.1 OPEN has MP_EXT CAP for afi/safi: 1/1 16:06:31: BGP: 7.75.7.1 rcv OPEN w/ option parameter type 2 (Capability) len 2 16:06:31: BGP: 7.75.7.1 OPEN has CAPABILITY code: 128, length 02210 1351_06_2000_c2 2000, Cisco Systems, Inc.

15

Session Establishment (debug ip bgp events)17:31:39: BGP: 7.72.6.1 went from Idle to Active 17:32:00: BGP: 7.72.6.1 went from Active to OpenSent 17:32:00: BGP: 7.72.6.1 went from OpenSent to OpenConfirm 17:32:00: BGP: 7.72.6.1 went from OpenConfirm to Established

17:31:59: BGP: 7.75.7.1 went from Idle to Active 17:32:00: BGP: 7.75.7.1 went from Active to Idle 17:32:00: BGP: 7.75.7.1 went from Idle to Connect 17:32:00: BGP: 7.75.7.1 went from Connect to OpenSent 17:32:00: BGP: 7.75.7.1 went from OpenSent to OpenConfirm 17:32:00: BGP: 7.75.7.1 went from OpenConfirm to Established

2210 1351_06_2000_c2

2000, Cisco Systems, Inc.

16

Looking at the Updatesrouter#debug ip bgp updates? Access list Access list (expanded range) router#debug ip bgp x.x.x.x updates? Access list Access list (expanded range)

Use an access-list to limit the output!2210 1351_06_2000_c2 2000, Cisco Systems, Inc.

17

debug ip bgp Updates

Peer Address

Prefix Being Advertised

NEXT_HOP

BG P:6. 6. com putng updat ,nei 72. 2 i es ghbor vers on 0,t e vers on i abl i at0. 0. 0. 0 BG P:6. 6. s 72. 2 end U PD A TE 3. 0. 8,next3. 6. 0. 0/ 72. 1 BG P:,m et c 0,pat 1 ri h BG P:6. 6. s 72. 2 end U PD A TE 5. 0. 8 ( 0. 0/ chgfags 0x0) next3. 6. l : , 72. 1 BG P:6. 6. s 72. 2 end U PD A TE 7. 0. 8 ( 0. 0/ chgfags 0x0) next3. 6. l : , 72. 1 BG P:6. 6. 1 updat enqueued ( 72. 2 es average=56,m axi um =56) m BG P:6. 6. updat run com pl ed,ran f 0m s nei 72. 2 e et or , ghbor vers on 0, i t hrot l t 13,check poi net0. 0. ted o nt 0. 02210 1351_06_2000_c2 2000, Cisco Systems, Inc.

13,s artng t i

s artvers on 13, t i

18

debug ip bgp Updates (Cont.)BG P:6. 6. rcv U PD A TE 72. 2 494,pat 2 h BG P:6. 6. rcv U PD A TE 72. 2 BG P:6. 6. rcv U PD A TE 72. 2 BG P:6. 6. rcv U PD A TE 72. 2 BG P:6. 6. rcv U PD A TE 72. 2 w /at r:next t hop 6. 6. ori n i m et c 72. 2, gi , ri about6. 0. 8 0. 0/ about17. 0. 8 0. 0/ about23. 0. 8 0. 0/ about35. 0. 8 0. 0/

Peer Address Prefixes in the Same UPDATE

Attributes Apply to All Prefixes

BG P:6. 6. rcv U PD A TE w /at r:next 72. 2 t hop 6. 6. ori n i m et c 72. 2, gi , ri 294,pat 2 1 h BG P:6. 6. rcv U PD A TE about3. 0. 8 - D EN I due t as pat 72. 2 0. 0/ ED o: - h cont n