0% found this document useful (0 votes)
203 views

Interview Questions Topic-Bgp

BGP is a standardized exterior gateway protocol used to exchange routing information between autonomous systems on the Internet. It makes routing decisions based on paths, network policies, or rules configured by a network administrator. BGP can be used internally within an autonomous system (iBGP) or externally between autonomous systems (eBGP). BGP uses various attributes like AS path, next hop, local preference, and MED to determine the best path to destinations. It establishes neighbor relationships using TCP and exchanges routing information in messages like open, update, and notification. BGP utilizes states like idle, connect, and established during this process.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
203 views

Interview Questions Topic-Bgp

BGP is a standardized exterior gateway protocol used to exchange routing information between autonomous systems on the Internet. It makes routing decisions based on paths, network policies, or rules configured by a network administrator. BGP can be used internally within an autonomous system (iBGP) or externally between autonomous systems (eBGP). BGP uses various attributes like AS path, next hop, local preference, and MED to determine the best path to destinations. It establishes neighbor relationships using TCP and exchanges routing information in messages like open, update, and notification. BGP utilizes states like idle, connect, and established during this process.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

INTERVIEW QUESTIONS

TOPIC- BGP
BGP (Border Gateway Protocol)

1.Explain the Border Gateway Protocol (BGP)?


Answer:
▪ Border Gateway Protocol (BGP) is a standardized exterior gateway protocol designed to exchange
routing and reachability information among autonomous systems (AS) on the Internet. BGP is classified
as a path-vector routing protocol, and it makes routing decisions based on paths, network policies, or
rule-sets configured by a network administrator.
▪ BGP used for routing within an autonomous system is called Interior Border Gateway Protocol, Internal
BGP (iBGP). In contrast, the Internet application of the protocol is called Exterior Border Gateway
Protocol, External BGP (eBGP).

2. What are the BGP features?


Answer:
▪ Path vector protocol
▪ Open standard protocol.
▪ Classless routing protocol.
▪ Used the Path vector algorithm.
▪ Administrative distance for eBGP is 20,iBGP-200
▪ BGP exchange router information between autonomous system.
▪ Hello timer is 60 sec; hold on timer is 180 sec.
▪ BGP used TCP port number 179.

3.Can Router on different subnet become BGP Neighbors?


Answer:
Can does not require neighbours to be attached to the same subnet. Instead, BGP routers use a TCP
connection between the routers to pass BGP message allowing neighbouring routers to be on the same
or different subnet.

4.Different between eBGP & iBGP neighbors?


Answer:
▪ IBGP- neigborship is formed between routers within the same AS (autonomous system)
▪ EBGP-neighborship is formed between routers different AS (autonomous system)

5.Explain Loop prevention mechanism in BGP?


Answer:
BGP used two mechanisms to prevent loops: -
▪ When a router learns route from an iBGP peer, that router does not advertise the same routes to
another iBGP peer.
▪ By using AS_PATH- When advertising to an eBGP peer, a BGP router adds its own ASN to the AS_PATH.
If a BGP router receives an Update and the route advertisement lists an_AS_PATH with its own ASN, the
router ignores that route.
Note: - A BGP router does not add its ASN when advertising to an iBGP Peer.
6.What is different between the hard reset and soft rest in BGP?
Answer:
▪ Hard Reset-In case of hard reset the local router brings down the neighborship, brings down the
underlying TCP connection and all the BGP table entire learning from neighbour are removed #clear ip
bgp command used for hard reset.
▪ Soft Reset-In case of a soft reset the router does not bring down the BGP neighborship or the underlying
TCP connection.
▪ However, the local router resends outgoing Updates and reprocesses incoming Update adjusting the
BGP table base on the current configuration #clear ip bgp * soft command used for soft reset.

7.What are different BGP Message Types?


Answer:
▪ Open-It is Used to establish a neighbour relationship and exchange parameters, including autonomous
system number and authentication values.
▪ Keepalive- are sent periodically (every 60 seconds by default) to ensure that the remote peer is still
available. If a router does not receive a KEEPALIVE from a peer for a Hold-time period (by default, 180
seconds), the router declares that peer dead.
▪ Update- It exchange Path Attributes and the associated prefix/length (NLRI) that use those attributes.
▪ Notification- It is used to report BGP error. It results in a reset of neighbour relationship.

8.Explain various state of BGP?


Answer:
▪ Idle-the initial BGP state.
▪ Connect- The BGP process is waiting for the TCP Connection to be completed. If it is successful, it will
be continuing to the Open Sent State. In case it fails, it will be continuing to active state.
▪ Active -BGP will try another TCP three-way handshake to establish a connection with the remote BGP
neighbour. If it successful, it will be move to the Open Sent State.
▪ Open sent- BGP has both established the TCP connection and sent an OPEN Message and is awaiting a
reply OPEN Message. Once it receives a reply OPEN Message, the BGP peer will send a KEEPALIVE
message.
▪ Open confirm- BGP listens for a reply KEEPALIVE message
▪ Established- All neighbour parameters matched, the neighbour relationship has been established and
the peers can now exchange update message.
9.Explain BGP Path Attributes?
Answer:
BGP utilizes several attributes to determine the best path to a destination.

▪ 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.

▪ Neighbour type- eBGP is preferred over iBGP


▪ IGP metric- Route with nearest IGP neighbour (lowest IGP metric) is preferred.
▪ eBGP route- Oldest (longest known) route is preferred.
▪ Neighbour Router ID- Lowest is preferred.
▪ Neighbour IP Address- Lowest is preferred.
10.Explain BGP Local preference?
Answer:
The local preference BGP attribute is the second attribute and used to choose the exit path to an
autonomous system from a local perspective. It is not exchanged between routers; its default value is
100 and the path with the highest local preference is preferred.

11.Explain BGP MED?


Answer:
MED is an optional nontransitive attribute. MED is a hint to external neighbours about the preferred
path into an autonomous system (AS) that has multiple entry points. The MED is also known as the
external metric of a route. A lower MED value is preferred over a higher value.

12.Explain BGP local preference?


Answer:
The local preference BGP attribute is the second attribute and used to choose the exit path to an
autonomous system from a local perspective. It is not exchanged between routers, it's default value is
100 and the path with the highest local preference is preferred.

13.What is Recursive Lookup?


Answer:
A Recursive lookup refers to routes for which the router must look up the connected route to a next-hop
gateway to route the packet to its ultimate destination.

14.What is router reflector and why it is required?


Answer:
In BGP, route learned from an iBGP neighbour will not be advertised to another iBGP neighbour. To
overcome this situation route reflector is used. It is acts as a route reflector server and makes iBGP
neighbours as route reflector client enabling route advertisements between them.

15.What is the command to administratively disable BGP neighborship?


Answer:
#neighbor neighbor-ip shutdown # no neighbor neighbor-ip shutdown (to enable to again)

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.

18. How do I configure BGP with the use of a loopback address?

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.

23. In general which routes will affect by route dampening?


Answer:
Route dampening affects only EBGP routes.

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.

25. Do internal BGP (iBGP) sessions modify the next hop?


Answer:
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.

26. Can router on different subnet become BGP neighbor ?


Answer:
The answer is Yes. BGP router become neighbors on different subnets. Instead, BGP use a TCP connection
between the neighbor routers to pass BGP messages on the same or different subnet.

27. Which TCP port BGP use?


Answer:
Border Gateway Protocol uses TCP port number 179 for creating connection. (Most common BGP
interview questions.)

28. What is eBGP multihop?


Answer:
When eBGP peers or routers are not directly connected with each other. And there are one or more non
BGP peers to reach BGP router. You are required to configure eBGP multihop to enables the non BGP
routes to pass through the BGP neighbor relationship & exchange update-messages.
29. What is BGP TLL Security ?
Answer:
BGP TTL Security is a Security technique and Mechanism, which is used to implemented/enhance the
security of of the TCP connection between BGP peers. You can secure BGP connection by disconnecting
“faked TCP reset packets” from any other sources by using the BGP TTL Security.

30.What is BGP path selection criteria?


Answer:
If no path selection policies are configured for BGP on the Cisco router. Then router will go to each next
step only if the values match the previous one.
-The maximum weight value (local to the router).
-The maximum value of local preference (for the whole AS).
-Prefer the local route of the router (next hop = 0.0.0.0).
-The shortest path through autonomous systems. (shortest AS_PATH)
-The minimum value of the origin code (IGP <EGP <incomplete).
-The minimum value of MED (distributed between autonomous systems).
-The eBGP path is better than the iBGP path.
-Choose a path through the nearest IGP neighbor.
-Select the oldest route for the eBGP path.
-The neighbor with the lowest BGP router ID.
-In last the neighbor with the smallest IP address.
(This is a very important BGP interview Questions to remember. )

31. What is transit AS?


Answer:
With Transit AS you can transmitted traffic of other autonomous systems.

32. What is Split-horizon?


Answer:
Split horizon is a rule that a routing information will not be send back to router from which it is received.
Mean a routing information will not send back in a direction from which side he received. This is a very
important concept and used for preventing the routing loop in a network.
(Alternatively you may asked this question in BGP interview questions.)

33. What are Loop prevention mechanism in BGP?


Answer:
There are two mechanisms to prevent loops in BGP:
-When we are advertising to an eBGP router/peer, a BGP router adds its own A SN to the AS-PATH. If a
BGP router receives an update & route advertisement lists an AS-PATH with its own ASN, then the router
ignores that route.
-When a router learns routes from an iBGP peer, that router does not advertise the same routes to
another
iBGP peer.
13
14

You might also like