Interview Questions Topic-Bgp
Interview Questions Topic-Bgp
TOPIC- BGP
BGP (Border Gateway Protocol)
▪ Next Hop- It lists the next-hop IP address used to reach a prefix. If next hop is reachable? If no route to
reach Next hop, the router cannot use this route.
▪ Weight- The Weight attribute is applied to inbound routes, dictating the best outbound path. It is a
Cisco-proprietary attribute, and is only locally significant (and thus, is never passed on to BGP
neighbours). The weight value can range from 0 – 65535, and the highest weight is preferred. By default,
a route originated on the local router will be assigned a weight of 32768. All other routes will be assigned
a weight of 0, by default.
▪ Local Preference- The Local Preference attribute is applied to inbound external routes, dictating the
best outbound path. Unlike the Weight attribute, Local Preference is passed on to iBGP peers when
sending updates. Local Preference informs iBGP routers how to exit the AS if multiple paths exist. Local
Preference is a 32-bit number and can range from 0 to 4294967295. The highest Local Preference is
preferred, and the default preference is 100.
▪ Locally injected routes- Locally injected routes (routes injected using network command) are better
than iBGP/eBGP learned.
▪ AS Path- The AS-Path attribute is applied to outbound routes, dictating the best inbound path. Two
things can be accomplished with the AS-Path attribute, prepend or filter. Smaller is preferred.
▪ Origin- The Origin attribute identifies the originating source of the route. The origin codes are as follows
(listed in order of preference for route selection):
• i (IGP) – Originated from an interior gateway protocol, such as OSPF. This usually indicates the route
was injected into BGP via the network command under the BGP process. An origin code of “i” is most
preferred.
• e (EGP) – Originated from an external gateway protocol.
• ? (incomplete) - Unknown origin. This usually indicates the route was redistributed into BGP (from
either connected, static, or IGP routes). An origin code of “?” is the least preferred.
▪ Multi-Exit Discriminator (MED)- The MED (MultiExit Discriminator) attribute is applied to outbound
routes, dictating the best inbound path into the AS (assuming multiple paths exist). The MED is identified
as the BGP metric when viewing the BGP routing table. A lower metric is preferred, and the default MED
value is 0. Smaller is preferred.
16. What does a next hop of 0.0.0.0 mean in the show ip bgp command output?
Answer:
A network in the BGP table with a next hop address of 0.0.0.0 means that the network is locally originated
via redistribution of Interior Gateway Protocol (IGP) into BGP, or via a network or aggregate command
in the BGP configuration.
17. What is synchronization, and how does it influence BGP routes installed in the IP
routing table?
Answer:
If your AS passes traffic from another AS to a third AS, BGP should not advertise a route before all routers
in your AS learn about the route via IGP. BGP waits until IGP propagates the route within the AS and then
advertises it to external peers. A BGP router with synchronization enabled does not install iBGP learned
routes into its routing table if it is not able to validate those routes in its IGP. Issue the no synchronization
command under router bgp in order to disable synchronization. This prevents BGP from validating iBGP
routes in IGP.
Answer:
The use of a loopback interface ensures that the neighbor stays up and is not affected by malfunctioning
hardware.
BGP uses the IP address configured on the physical interface directly connected to the BGP peer as the
source address when it establishes the BGP peering session, by default. Issue the neighbor <ip address>
update-source <interface> command in order to change this behavior and configure the BGP that speaks
to the router to establish peering with the use of a loopback address as the source address.
19. Define various types of communities and why they are used?
Answer:
Additionally, there are four well-knowncommunities that can be referenced by name:
No-export– prevents the route from being advertised outsidethe local AS to eBGP peers.
No-advertise– prevents the route from being advertised to either internal or external peers.
Internet – allows the route to be advertised outside the local AS.
Local-AS – prevents the route from being advertised outside the local AS to either eBGP orconfederate
peers.
20. What is the default BGP ConnectRetry timer, and is it possible to tune the BGP
ConnectRetry timer?
Answer:
The default BGP ConnectRetry timer is 120 seconds. Only after this time passes does the BGP process
check to see if the passive TCP session is established. If the passive TCP session is not established, then
the BGP process starts a new active TCP attempt to connect to the remote BGP speaker. During this idle
120 seconds of the ConnectRetry timer, the remote BGP peer can establish a BGP session to it. Presently,
the Cisco IOS ConnectRetry timer cannot be changed from its default of 120 seconds.
21. What additional command do you have to use to establish intraconfederation EBGP
sessions between loopback interfaces?
Answer:
To establish intraconfederation EBGP sessions between loopback interfaces, you must specify ebgp-
multihop on the intraconfederation EBGP neighbor.
22. What is the purpose of route dampening ?
Answer:
Route dampening minimizes the impact of route flaps in downstream autonomous systems upon local
and upstream autonomous systems.
24. How much memory should I have in my router to receive the complete BGP routing
table from my ISP?
Answer:
The amount of memory required to store BGP routes depends on many factors, such as the router, the
number of alternate paths available, route dampening, community, the number of maximum paths
configured, BGP attributes, and VPN configurations. Without knowledge of these parameters it is
difficult to calculate the amount of memory required to store a certain number of BGP routes. Cisco
typically recommends a minimum of 512 MB of RAM in the router to store a complete global BGP routing
table from one BGP peer. However, it is important to understand ways to reduce memory consumption
and achieve optimal routing without the need to receive the complete Internet routing table.