BGP notes
- BGP not working? Three things to look at:
- EBGP-MULTIHOP (both sides)
- UPDATE-SOURCE (loopback …)
- NEXT-HOP-SELF (sho ip bgp x.x.x.x look for inaccessible)
- NEXT-HOP-SELF is used in unmeshed networks (fr) where BGP neighbors do no have a direct access to all other neighbors on the same subnet.
- redistributing ospf into BPG: (by default only EBGP routes are redistributed)
- redistribute ospf 1 internal external route-map XX
- BGP Community attributes
- internet – advertise to everyone
- no export – advertise to no ebgp peer
- local as – advertise to the local as only = If you are using BGP confederations, local-as prevents the routes from traversing the sub ASes. No-export allows the routes to go between sub-ASes in the confederation, but not to any other ASes outside of the confederration.
- no advertise – advertise to no one
-
Community Description Local-AS Use in confederation scenarios to prevent sending packets outside the local autonomous system (AS). no-export Do not advertise to external BGP (eBGP) peers. Keep this route within an AS. no-advertise Do not advertise this route to any peer, internal or external. none Apply no community attribute when you want to clear the communities associated with a route. internet Advertise this route to the internet community, and any router that belongs to it.
- 200.0.0.1/32 = net 200.0.0.1 mask 255.255.255.255
- Use aggregate-address w/ summary-only to send a summary
- ^2004 = originated on AS200
- ^$ empty as path list
- Don’t see local info in sho ip bgp = typo
- When using loopbacks for peerings don’t forget ebgp-multihop and update-source
- troubleshooting: sh ip bpg , sho ip bgp XXX , sho ip bgp sum. Hop by hop.
Do internal BGP (iBGP) sessions modify the next hop?
A. iBGP sessions preserve the next hop attribute learned from eBGP peers. This is why it is important to have an internal route to the next hop. The BGP route is otherwise unreachable. In order to make sure you can reach the eBGP next hop, include the network that the next hop belongs to in the IGP or issue the next-hop-self neighbor command to force the router to advertise itself, rather than the external peer, as the next hop. Refer to the BGP Next Hop Attribute section of BGP Case Studies for a more detailed explanation.
This command is useful in unmeshed networks (such as Frame Relay or X.25) where BGP neighbors may not have direct access to all other neighbors on the same IP subnet.
More info on redistributing OSPF into BGP:
- router bgp 100
- redistribute ospf 1 match internal external 1 external 2
- !— This redistributes all OSPF routes into BGP.
- router bgp 100
- redistribute ospf 1
- !– This redistributes only OSPF intra- and inter-area routes into BGP.If you configure the redistribution of OSPF into BGP without keywords, by only OSPF intra-area and inter-area routes are redistributed into BGP, by default.
- redistribute ospf 1 match external 1 external 2
- !— This redistributes ONLY OSPF External routes,
- !— but both type-1 and type-2.
- redistribute ospf 1 match nssa-external 1 nssa-external 2
- !— This redistributes only OSPF NSSA-external routes
- !— Type-1 and Type-2 into BGP.