BGP Flashcards
AS numbers main purpose
To determine the best path to a prefix
To prevent routing loops between ASs
Private BGP AS number range
64512 to 65534
BGP peers communicate over which TCP Port
TCP port 179
BGP Session States
Idle: Tries to initiate a TCP session with its peer
Connect: Router with the highest ip address manages the connection state
Active: The router with the highest ip (The active router) initiates another TCP connection with the Passive router
OpenSent: Peers begin performing some BGP specific sanity checks
OpenConfirm: The peers wait to receive a keepalive message.
Established: After each peer receives a keepalive
Keepalive Message Time and Hold Time
60 seconds. Hold Time is 180 seconds
(*) Asterisk Indication in the BGP Table
Indicates the next-hop address is reachable. This means that the IP routing table has the route to reach the next hop.
The greater-than symbol (>)
Indicates the best path. BGP only advertises the best path to its peers.
Weight
Control which route is chosen as the best path. Locally significant. The default is 0 and 32,768 for self-generated routes. A higher weight is preferred.
Weight in show ip bgp
Local Preference
Influences the path traffic takes to prefixes outside an AS. The default value for local preference is 100. A higher local preference is preferred.
LocPrf in show ip bgp
Originate
Paths sourced locally are preferred.
AS Path Length
The number of autonomous systems in the AS_Path path attribute. Lower AS path lengths are preferred.
Path in show ip bgp
Origin Type
Indicates how BGP learned the route. Incomplete and a (?) means the source prefix was redistributed.
IGP (i) preferred over Incomplete (?)
Multi-Exit Discriminator (MED)
Reversal of the local preference. Influences how traffic ingresses an AS. A lower MED is preferred.
Metric in show ip bgp
Paths
eBGP routes take preference over iBGP routes. eBGP routes have an AD of 20, where iBGP routes have an AD of 200.
Oldest Route
BGP prefers the oldest installed route. It will hold onto the existing installed route as the best path
r for RIB failure
(r) indicates the BGP wasnt able to install the route in the routing table
BGP Redistribution
BGP in OSPF
R1(config)# router ospf 1
R1(config-router)# redistribute bgp 65001 subnets
BGP in EIGRP
R4(config)# router eigrp 100
R4(config-router)# redistribute bgp 65004 metric 100000 1 255 1 1500
Modifying Weight
ISP(config)# router bgp 65550
ISP(config-router)# neighbor 203.0.113.1 weight 100
The default weight is 0
Advertising Summary Routes
Use Route Aggregation
R1(config)# router bgp 65001
R1(config-router)# aggregate-address 10.0.0.0 255.255.0.0 summary-only
Component Routes
Marked with an (s) for suppressed. Component routes are suppressed. They still exist in the RIB and IP routing table but prefixes are not advertised.
Route-Map
Have a default deny behavior like ACLs. Use an ip prefix-list
ip prefix-list R4-summary permit 10.0.32.0/19
ip prefix-list R4-summary permit 10.0.23.0/29
ip prefix-list R4-summary deny 0.0.0.0/0 le 32
ISP(config)# route-map R4 deny 10
route-map R4 permit 20
ISP(config-route-map)# match ip address prefix-list R4-summary
ISP(config)# router bgp 65550
ISP(config-router)# neighbor 198.51.100.1 route-map in
set weight 101 gives routes in the route map a higher weight
BGP Neighbor Authentication
R1(config)#router bgp 65001
R1(config-router)#neighbor 198.51.100.1 password cisco123
Router ID
A tie-breaker, where the route received from a router with the lowest router ID is preferred.