100% found this document useful (1 vote)
773 views

BGP Questions and Answers Vol 1.0

BGP is the protocol used between autonomous systems to exchange routing and reachability information. It operates at layer 3 and uses TCP port 179. BGP uses the neighbor and remote-as commands to establish peering between routers. When selecting the best path, BGP considers attributes like LOCAL_PREF, AS_PATH length, origin code, MED, and router ID in a defined order. BGP configuration involves enabling the BGP process, establishing neighbors, and redistributing routes.

Uploaded by

Eduardo Aguilar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
773 views

BGP Questions and Answers Vol 1.0

BGP is the protocol used between autonomous systems to exchange routing and reachability information. It operates at layer 3 and uses TCP port 179. BGP uses the neighbor and remote-as commands to establish peering between routers. When selecting the best path, BGP considers attributes like LOCAL_PREF, AS_PATH length, origin code, MED, and router ID in a defined order. BGP configuration involves enabling the BGP process, establishing neighbors, and redistributing routes.

Uploaded by

Eduardo Aguilar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 25

BGP Interview Questions and Answers

Ques 1. Can router on different subnet become bgp neighbor?


Yes, BGP neighborship can be formed between Routers across different subnets. Unlike IGP
protocols, BGP requires TCP connection across Routers which may be on same subnet or
different subnets.

Ques 2. Which layer does BGP work on?


BGP is an application layer protocol and works upto Layer 7 of OSI model.

Ques 3. What is the difference between eBGP multihop and ttl security?
Below is the difference between eBGP Multihop and TTL Security -

Ques 4. Which protocol and port number does BGP use for neighborship?
BPG uses TCP protocol and port number 179 for forming neighborship.

Ques 5. How do I configure BGP?


The basic configuration of BGP requires below commands –
 router bgp <as-number>
 neighbor <ip-address> remote-as <remote-as-number>
Below is sample configuration –
R1(config)#router bgp 100
R1(config-router)#neighbor 10.0.0.2 remote-as 200
R2(config)#router bgp 200
R2(config-router)#neighbor 10.0.0.1 remote-as 100

Ques 6. What is the use of “BGP best-path as-path ignore” command?


As a default behavior of BGP path selection, BGP prefers the path with the shortest
AS_PATH. This step is skipped if we have configured the Cisco "bgp best-path as-path
ignore" command.

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

Below is the configuration configure BGP with the use of a loopback address -
R1 Configuration -
Interface Loopback0
ip address 1.1.1.1 255.255.255.255
!
Interface FastEthernet0
ip address 10.0.0.0.1 255.255.255.0
!
router bgp 100
neighbor 2.2.2.2 remote-as 200
neighbor 2.2.2.2 update-source Loopback0 >>>>>> this command specifies that the TCP
connection with BGP peer should be established using loopback interface.
!
ip route 2.2.2.2 255.255.255.255 10.0.0.2 >>>>>> Static Route for reachability to remote
BGP peer
End

R2 configuration -
Interface Loopback0
ip address 2.2.2.2 255.255.255.255
!
Interface FastEthernet0
ip address 10.0.0.0.2 255.255.255.0
!
router bgp 200
neighbor 1.1.1.1 remote-as 100
neighbor 1.1.1.1 update-source Loopback0 >>>>>> This command specifies that the TCP
connection with BGP peer should be established using loopback interface.
!
ip route 1.1.1.1 255.255.255.255 10.0.0.2 >>>>>> Static Route for reachability to remote
BGP peer
End

Ques 8. What is the order of preference of attributes when applied to one neighbor in BGP?
BGP works through these attributes in this specific order when choosing a path -
 Highest weight (This is a cisco proprietary value)
 Highest LOCAL_PREF
 Prefer a route that is locally sourced
 Shortest AS_PATH
 ORIGIN
 Lowest MED
 External BGP routes are preferred over internal BGP routes
 If no external route select path with the lowest IGP cost to the next hop router for
IBGP.
 The most recent route
 The lowest BGP router ID.

Ques 9. What does a next hop of 0.0.0.0 mean in the show ip bgp command output?
A network output in the BGP table with a next hop address of 0.0.0.0 means that either
network is locally originated via redistribution of Interior Gateway Protocol (IGP) into BGP,
or via a network or aggregate command in the BGP configuration.

Ques 10. What are the well-known communities of the BGP community attribute?
Below are well known BGP community attributes -

Ques 11. How does BGP behave differently with auto-summary enabled or disabled?
In the latest Cisco IOS releases, auto-summary is disabled by default. When auto-summary is
enabled, it summarizes the locally originated BGP networks to their classful boundaries.
Auto-summary is disabled, the routes introduced locally into the BGP table are not
summarized to their classful boundaries.

Ques 12. What formats can I use to configure the BGP community attribute?
In latest releases of Cisco IOS (12.0 onwards), we can configure communities in 3different
formats –
 Decimal format
 Hexadecimal format
 AA:NN format
By default, Cisco IOS uses the older decimal format. In order to configure in AA: NN, where
the first part is the AS number and the second part is a 2-byte number, issue the “ip bgp-
community new-format” in global configuration.

As an example, 3 formats of community 10:20 will be as under –


 655380
 0x0A0014
 10:20

Ques 13. How can I verify if a BGP router announces its BGP networks and propagates them
to the global BGP mesh?
Below are the commands to verify the IP blocks are announced to BGP neighbors ISP:
 “show ip bgp neighbors [address] advertised-routes” for sent networks
 “show ip bgp neighbors [address] routes” for received networks

Ques 14. When and how should I reset a BGP session?


Traditional approach was to tear down the BGP session with single neighbor/all
Neighbors/peer group -
R1#clear ip bgp {* | neighbor ip | peer-group}

Below Outbound Soft Reconfiguration Re-sends complete BGP Table -


R1#clear ip bgp {neighbor ip} soft out

Below Inbound Soft Reconfiguration Re-sends complete BGP Table -


R1#clear ip bgp {neighbor ip} soft in

Another option is to request a neighbor to resend routing information, without bringing a


session down -
R1#clear ip bgp {* | neighbor ip | peer-group} in

Ques 15. Is there any special configuration needed on PIX/ASA to allow BGP sessions through
it?
Below diagram will be referred to while showing the step by step configuration required on
ASA/PIX to allow BGP sessions through it -
Step 1 – (Configure access list to allow TCP port 179 / BGP as below –
access-list BGP-NEIGHBOR extended permit tcp host 192.168.10.1 host 192.168.20.1 eq 179
access-list BGP-NEIGHBOR extended permit tcp host 192.168.20.1 host 192.168.10.1 eq 179

Step 2 – (Allow TCP option 19 in TCP Map) –


tcp-map BGP
tcp-options range 19 19 allow

Step 3 – (Create a class map to match the BGP Traffic using the ACL above)
class-map BGP-CLASS
match access-list BGP-NEIGHBOR

Step 4 – (Use Global Policy to apply all the actions) -


Policy-map global_policy
class BGP-CLASS
set connection random-sequence-number disable
set connection advanced-options BGP

Ques 16. What is an autonomous system number (ASN)?


AS numbers are globally unique numbers that are used to identify ASes, and which enable
an AS to exchange exterior routing information between neighboring ASes. An AS is a
connected group of IP networks that adhere to a single and clearly defined routing policy.
There are a limited number of available AS numbers. Therefore, it is important to determine
which sites require unique AS numbers and which do not. Sites that do not require a unique
AS number should use one or more of the AS numbers reserved for private use, which are in
the range from 64512 to 65535.

Ques 17. What is the BGP path selection criteria?


BGP works through these attributes in this specific order when choosing a path -
 Highest weight (This is a cisco proprietary value)
 Highest LOCAL_PREF
 Prefer a route that is locally sourced
 Shortest AS_PATH
 ORIGIN
 Lowest MED
 External BGP routes are preferred over internal BGP routes
 If no external route select path with the lowest IGP cost to the next hop router for
IBGP.
 The most recent route
 The lowest BGP router ID

Ques 18. What is the difference between always-compare-med and deterministic-med?


BGP router subcommands affect and influence the MED-based BGP best path selection
process. Both commands are not enabled by default; and both commands are separate and
independent – enabling one does not automatically enable the other.

Below is a lab setup to illustrate difference between “always-compare-med” and


“deterministic-med” -

Entry #1 – AS_PATH 300 100, MED 150, external, NEXT_HOP 4.4.4.4, RID 4.4.4.4
Entry #2 – AS_PATH 200 100, MED 200, external, NEXT_HOP 2.2.2.2, RID 2.2.2.2
Entry #3 – AS_PATH 300 100, MED 100, internal, NEXT_HOP 3.3.3.3, RID 3.3.3.3

When “bgp deterministic-med” is enabled -


Entry #1 is the best of its group (Entry 1 and Entry 3)
Entry #2 is the best for its group (Entry 2 only)
Entry #1 and Entry #2 are compared eventually. Since the entries are from different ASes
and the bgp always-compare-med command is not enabled, the MED is not considered in
the comparison. Entry #1 is selected as the best path as it is an EBGP route.

When “bgp always-compare-med” is enabled -


Entry #1 and Entry #2 are compared first. These entries are from different neighboring ASes,
but the MED is used in the comparison as the bgp always-compare-med command is
enabled. Entry #1 is selected as it has a lower MED. Entry #1 and Entry #3 are compared
next.
The MED is used in the comparison again. Entry #3 is selected as the best path as it has a
lower MED.

Ques 19. Do internal i.e. iBGP sessions modify the next hop?
Internal BGP i.e. iBGP preserves the next hop attribute learned from eBGP peers.
This means we are required to enforce the iBGP router to advertise itself as next hop and
not the external BGP peer.
In order to make sure we can reach the eBGP next hop, following are the options –
 Include the network that the next hop belongs to in the IGP or
 Issue the next-hop-self neighbor command
The BGP route is otherwise unreachable.

Ques 20. Do external BGP (eBGP) sessions modify the next hop?
Yes, Routes advertised to eBGP peers will have Next-Hop attribute changed to eBGP routers
IP address.

Ques 21. Do external BGP (eBGP) sessions between confederations modify the next hop?
No, eBGP sessions between confederation AS do not modify the next hop attribute.

Ques 22. In external BGP (eBGP) sessions, which IP address is sent as the next hop?
In eBGP peering, the next hop is the IP address of the neighbor that announces the route.

Ques 23. Does the route reflector change the next hop attribute of a reflected prefix?
By default, the next hop attribute is not changed when a prefix is reflected by route
reflector.

Ques 24. How can I announce a prefix conditionally to one ISP only when I lose the connection
to my primary ISP?
BGP advertises routes from its BGP table to external peers by default. The BGP conditional
advertisement feature provides additional control of route advertisement depending on the
existence of other prefixes in the BGP table. Normally, routes are propagated regardless of
the existence of a different path. The BGP conditional advertisement feature uses the non-
exist-map and advertise-map configuration commands to track routes by the route prefix. If
a route prefix is not present in the non-exist-map command, the route specified by the
advertise-map command is announced.

Ques 25. How can I configure BGP to provide load sharing and redundancy in my network?
Below are the choices in BGP while load sharing in the network –
a) When equal cost multiple links between eBGP neighbors
- Using static routing for Loopback Address as a BGP Neighbor.
b) When Dual-Homed to One Internet Service Provider (ISP) Through a Single Local
Router
- Using maximum-paths command
c) Load Sharing When Dual-Homed to One ISP Through Multiple Local Routers
- Using as-path prepend
d) Load Sharing When Multihomed to Two ISPs Through a Single Local Router
- Using weight and selective prefix receive/advertisement
- Using Local preference and as-path prepend
Detailed usage of BGP attributes to perform Load Sharing and redundancy is shared in below
link -
https://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/13762-
40.html

Ques 26. How much memory should I have in my router to receive the complete BGP routing
table from my ISP?
Cisco recommendation is to have a minimum of 512 MB of RAM in the router to store a
complete global BGP routing table from one BGP peer.

Ques 27. What are the benefits of configuring BGP peer groups?
Below are the key benefits which can be reaped out from BGP peer groups –
 Reduction of the resource of BGP devices when it makes the updates to the BGP
neighbors.
 Reduction in amount of configuration which is requires to be done on BGP enabled
device.
 Configuration becomes simple and easy

Ques 28. Why do I see the same route twice from the same peer in BGP?
Two entries are seen due to soft-reconfiguration configured. Both the unmodified path and
the modified path, which depends on the inbound policy, if permitted, are stored in the path
table for the prefix.

Ques 29. What is synchronization, and how does it influence BGP routes installed in the IP
routing table?
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.
BGP synchronization rule - Do not advertise a route learned from IBGP to an external
neighbor unless a matching route is learned from an IGP. This was an old rule. However,
with newer Cisco IOS 12.2(8)T and later, this feature is off by default.

Ques 30. How do I know which Cisco IOS software release supports a particular BGP feature?
Use Software Research (registered customers only) in order to quickly find which Cisco IOS
software release supports your feature.
Link to “Software Research” is - https://software.cisco.com/selection/research.html
Ques 31. How can I set the Multi Exit Discriminator (MED) value on prefixes advertised to
external BGP (eBGP) neighbors to match the Interior Gateway Protocol (IGP) next hop metric?
The set metric-type internal route-map configuration command causes BGP to advertise a
MED that corresponds to the IGP metric associated with the next hop of the route.

Ques 32. What is the default BGP ConnectRetry timer?


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.

Ques 33. What does r RIB-Failure mean in the show ip bgp command output?
RIB-Faliure in “show ip bgp” command may be due to one of the below reasons -
 Route with better administrative distance already present in IGP. For example, if a
static route already exists in IP Routing table.
 Memory failure.
 The number of routes in VPN routing/forwarding (VRF) exceeds the route-limit
configured under the VRF instance.

Ques 34. How can I redistribute internal BGP (iBGP) learned default-route (0.0.0.0/0) route
into EIGRP/OSPF/IS-IS?
By default, iBGP redistribution into IGP is disabled. Issue the bgp redistribute-internal
command in order to enable redistribution of iBGP routes into IGP. A sample configuration
for redistributing a iBGP learned default route 0.0.0.0/0 into EIGRP is shown in this output.
Configurations for OSPF/IS-IS are similar.
router bgp 65200
bgp redistribute-internal
!
router eigrp 200
redistribute bgp 65200 route-map DEFAULT
!
ip prefix-list default-route seq 5 permit 0.0.0.0/0
!
route-map DEFAULT permit 10
match ip address prefix-list default-route

Ques 35. How can I filter all IP routes advertised to a BGP neighbor except the default route
0.0.0.0/0?
The specific routes can be filtered if you use inbound filter-list, distribute-list, prefix-list and
route-map all at the same time for the same bgp neighbor. This is the order of operation:
 Filter-list
 Router-map
 Distribute-list (or) prefix-list

Ques 36. Is it possible to track an interface and change the route availability?
Yes, it is possible to track the state change of an interface and route availability with the
Enhanced Object tracking.
Ques 37. How does IP RIB Update allocate memory?
IP RIB Update allocates the prefixes, and attributes are held in chunks. It is not possible to
free the entire chunk until every element in the chunk is freed. If more routes are learned,
then those free elements in the chunks are used.

Ques 38. What is the command to see IPv6 BGP neighbors?


The “show bgp ipv6 unicast summary” command is used to see the IPv6 BGP neighbors

Ques 39. Why are there no statistic results when I use the debug bfd events and debug bfd
packets commands?
It is the normal behaviour, as bfd hellos are sent in sub minimal seconds and in case you run
debugs for that, the router cannot handle. So the bfd messages are seen in debug only when
flaps happens.

Ques 40. Can I run two BGP process on single router


Only single BGP process can be run on single Router.

Ques 41. Difference between hard reset and soft reset in BGP?
Below table details on difference between hard reset and Soft reset in BGP –

Ques 42. What are different BGP message types


BGP has 4 message types -
 Open
 Keepalive
 Update
 Notification
All BGP message are unicast to the one neighbor over the TCP connection.

 OPEN Message -
Open messages are used to start a BGP session by requesting that a BGP session be opened over
an existing TCP/IP session. Once two BGP routers have completed a TCP 3-way handshake they
will attempt to establish a BGP session, this is done using open messages. In the open message
information about BGP router will be available. Routers use this message to identify itself and to
specify its BGP operational parameters. Open message is always send when the TCP session is
established between neighbors.

 KEEPALIVE Message -
If a router accepts the parameters specified in Open message, it responds Keepalive. By default
Cisco sends keepalive every 60 sec or a period equal to 1/3 the hold time.

 UPDATE Message -
Advertises feasible routes, withdrawn routes or both.

 NOTOFICATION Message -
This message is sent whenever something bad has happened, e.g. an error is detected and
causes the BGP connection to close.

Ques 43. What are various BGP states?


Below table simplifies all the BGP states -

IDLE State: verifying route to neighbor -


BGP refuses all incoming connections. No BGP resources are allocated in idle state, and no
incoming BGP connections are allowed.

Connect State:
BGP waits for a TCP connection to be completed. If successful, the BGP state machine moves into
OpenSent state after sending the OPEN message to the peer. Failure in this state could result in
either going into Active state or Connect state, or reverting back to idle state, depending on the
failure reasons.

Active State: (Attempting connectivity to neighbor)


In this state, a TCP connection is initiated to establish a BGP peer relationship. If successful, BGP
sends its OPEN message to the peer and moves to OpenSent state. Failure can result in going to
the Active or Idle states.

OpentSent State: (Open message sent to neighbor)


After sending an OPEN message to the peer, BGP waits in this state for the OPEN reply. If a
successful reply comes in, the BGP state moves to OpenConfirm and a keepalive is sent to the
peer. Failure can result in sending the BGP state back to Idle or Active.

OpenConfirm State: (Neighbor replied with open message)


The BGP state machine is one step away from reaching its final state (Established).BGP waits in
this state for keepalives from the peer. If successful, the state moves to Established; otherwise,
the state moves back to Idle based on the errors.

Established State: (Connection between neighbors established)


This is the state in which BGP can exchange information between the peers. The information can
be updates, keepalives, or notification.

Ques 44. Which command is used to disable BGP neighborship?


Neighbor <neighbor-ip> shutdown.

Ques 45. What are values of keepalive and Dead timers in BGP?
Keepalive - 60 seconds
Hold-down - 180 seconds (3 multiplied by Keepalive)

Ques 46. How many public and private AS numbers are there?
Public AS Numbers - Range from 1 to 64511
Private AS Numbers - Range from 64512 to 65535

Ques 47. BGP Route selection criteria?


BGP works through these attributes in this specific order when choosing a path -
 Highest weight (This is a cisco proprietary value)
 Highest LOCAL_PREF
 Prefer a route that is locally sourced
 Shortest AS_PATH
 ORIGIN
 Lowest MED
 External BGP routes are preferred over internal BGP routes
 If no external route select path with the lowest IGP cost to the next hop router for IBGP.
 The most recent route
 The lowest BGP router ID.

Ques 48. Does the router have to be restarted after a new BGP Neighbor Maximum Prefix is
configured?
If the new maximum number of Prefixes is larger that the current maximum, there is no need to
soft/hard clear the BGP session, and reload is not required.
Ques 49. Is there a command to check the advertised routes along with the prepend of the
AS-paths?
Below are the options to verify -
 Check the BGP AS PATH Attribute on Peering device. This is one of the easiest ways to
check whether the router performs AS PATH prepending or not.
 Run debug on BGP updates (in outbound direction) and then check for prepends. Use an
access-list while you debug BGP updates.
 Another option would be to take a packet capture on exit interface and see what update
is being sent on the wire.

Ques 50. How does neighbor soft-reconfiguration inbound command function?


The command “neighbor soft-reconfiguration inbound” causes the router to store all
inbound received routing policy updates, for example, a duplicate table is stored in the
memory for each peer. This method is memory-intensive and not recommended unless
absolutely necessary.

Ques 51. What does the %IPRT-3-ROUTEINSERTERROR: Error inserting routing entry error
message mean?
This error message indicates that there is not enough memory to accommodate BGP
prefixes, learnt from neighbors.

Ques 52. What is the difference between when a route is injected in BGP via redistribute
command or a network command?
When you use the redistribution of IGP into BGP to advertise the route, then there is no
need to specify the network statement for all the subnets individually. Also when the route
is obtained from any other routing protocols into BGP table by redistribution, the
 Origin attribute is Incomplete (?)
 When you specify the network command then it is Internal/IGP (i).

Ques 53. How do I verify Layer 4 forwarding summary information?


In order to view the summary information on Layer 4 forwarding, use the “show mls cef
summary” command.

Ques 54. What are differences between IGPs and EGPs?


Below is another diagram illustrating where IGP and EGPs are used -

Ques 55. What is between AS-OVERRIDE and ALLOWAS-IN in BGP?


As a standard behavior of BGP remote site (using same AS Number) prefix received by other
site of same customer will drop the route since it sees its own AS Number in the received
packet. The methodology to circumvent or mitigate default behavior of BGP is to use the
BGP features of “AS-Override” or else “Allowas-in”. While former is used by PE to modify
the AS Number in AS Path so that prefix is not dropped, latter is implemented in CE device to
introduce an exception in BGP AS path loop prevention mechanism.
The difference between both terms is shared in below table -
Ques 56. Name several path attributes of BGP?
Below table shares different BGP path attributes and their categorization -

Ques 57. Why is there a problem with iBGP in large networks? How can this problem be
solved?
There must be a full mesh of iBGP sessions, in other words: each BGP router within an AS
must have iBGP sessions with all other BGP routers in the AS. By requiring that all
information in iBGP is learned directly from the router that learned the information over
eBGP, there can't be any loops in iBGP. The full mesh requirement can be solved using either
route reflectors or confederations.

Route reflectors distribute iBGP information from one router to another, which is normally
not allowed in iBGP. Since the clients of the route reflector get all iBGP from the route
reflector they don't need to have iBGP sessions with all other BGP routers. Reflectors add
additional path attributes that allow them to detect and eliminate loops.

In Confederation, the AS is split into a number of sub-ASes, so the iBGP full mesh is done
within each sub-AS and a modified version of eBGP is used between sub-ASes. To the
outside, the confederation behaves like a single AS

Ques 58. Name BGP path attributes to control incoming and outgoing traffic
Inbound Traffic Flow can be influenced by manipulating the following attributes -
 AS-Path Prepending
 MED
Outbound Traffic Flow can be influenced by manipulating the following attributes -
 Weight
 Local Preference
Ques 59. My BGP is showing 0.0.0.0 as router-id; what could be the possible reason?
BGP Router-ID of 0.0.0.0 is set when below 3 conditions of assigning Router-ID fail -
 Use the address configured by the BGP router-id command
 Use the Loopback interface address with the highest IP address
 Use the highest IP address of the interface

Ques 60. If my BGP neighbor is stuck in idle or active state, what should I do?
The reason for BGP neighbor stuck in idle or active state are –
 Wrong AS Configured
 Misconfigured Local IP or Per IP address
 Authentication issues
 TCP port 179 allowed across the peers
 Multihop and peer TTL misconfigurations
Usually, there are configuration issues that stop the BGP connection from getting
established. It can be a wrong AS, misconfigured local IP / peer IP address, authentication
issues, and others.

Ques 61. Explain BGP site of origin (SoO).


SoO is a BGP extended community attribute and stands for Site of Origin. SoO uniquely
identifies the site that has originated the route.SoO is also useful to prevent routing
loops and sub-optimal routing, especially used to prevent routing loops on dual homed
sites.
SoO value needs to be defined in one of the below Naming Conventions –
 A 16-bit autonomous system number, a colon, and a 32-bit number, for example:
45000:3
 A 32-bit IP address, a colon, and a 16-bit number, for example: 192.168.10.2:51

SoO Rule of Operation: SoO is applied on updates coming to PE1 from CE router and when
these routes are advertised as VPNV4 route to PE router PE2, the PE2 router doesn’t
advertise the routes back to the CE router hence avoiding the routing loop.
Further, below link showcases scenario (1) SoO not applied (2) SoO applied

https://ipwithease.com/soo-site-of-origin-bgp-extended-community-attribute/
Ques 62. What do you understand by BGP split-horizon rule?
The BGP split-horizon rule governs the route advertisements between IBGP peers, which
specifies that routes learn via IBGP are never propagated to other IBGP peers.

The BGP split-horizon rule prevents R2 from propagating routes learned from R1 to RT3.
Similar to the split-horizon rule in the distance-vector routing protocols, BGP split-horizon is
necessary to ensure that routing loops are not started within an AS. As a result, full-mesh
IBGP peering is required within an AS for all the routers within the AS to learn about the BGP
routes.

Ques 63. Describe BGP communities. Name well-known communities.


The BGP community attribute is a numerical value that can be assigned to a specific prefix
and advertised to other neighbors. When the neighbor receives the prefix it will examine the
community value and take proper action whether it is filtering or modifying other attributes.
By default the community attribute is removed from the update before being sent to the
neighbor. To allow community values to be sent to a specific neighbor the command
neighbor x.x.x.x send-community must be applied.

BGP has default 4 well known communities that can be used to mark prefixes; listed as
follows:
 Internet: advertise these routes to all neighbors.
 Local-as: prevent sending routes outside the local AS within the confederation.
 No-Advertise: do not advertise this route to any peer, internal or external.
 No-Export: do not advertise this route to external BGP peers.

Ques 64. Can I use BGP instead of any IGP?


BGP can be used instead of ay IGP, however this would not be best recommended approach.
Below are some of drawbacks of using BGP (iBGP) instead of IGP inside a network –
1. Statically defined neighbor only with BGP and no dynamic neighbor discovery
2. BGP uses Complex Path Selection Process unlike IGPs which determine the best path
based on simple metrics.
3. Scalability issues like fully mesh network in iBGP is another challenge. Though route
reflectors/confederation resolves the problem to a scale, still route recursion causes
problems in iBGP.
4. BGP default Hello and hold timers are 60 and 180 seconds which are pretty higher
than IGPs (10 sec and 40 seconds respectively). This further delay convergence time
in BGP.

Ques 65. Types of BGP routing table?


In order for BGP to be able to perform its functions it stores this information is a special type of
database called the BGP Routing Information Base (RIB).
BGP Routing Information Base consists of three parts as explained below –
 Adj-RIBs-In – This BGP information refers to routing prefix received from neighbor
without applying any filtering or attribute manipulation. Attribute modifications or route
filtering is applied after Adj-RIB-In.
 Loc-RIB – BGP maintains its own master routing table called the Local Routing
Information Base (Loc-RIB).Best routes is selected after applying routing policies on the
routes available in Adj-RIBs-In. Whenever an Adj-RIB-In changes, the main BGP process
decides if any of the neighbor’s new routes are preferred to routes already in the Loc-
RIB and it replaces as required.
 Adj-RIBs-Out – This table refers to Routes/NLRI selected from Loc-RIB after applying
outbound routing/filtering policies. This table stores the routing information that was
selected by the local BGP router and the advertised to its peers through BGP update
messages.
Below diagram will help understand placement of 3 BGP table types for BGP routing flow
starting with Route learning till its advertisement to neighbors –
Ques 66. What is route reflector and why it is required?
While configuring iBGP neighborship between BGP speaking neighbors in same AS,
administrators need to be careful of iBGP rule (BGP Split Horizon) of preventing routing
Loops. The rule governs that “for Route advertisements between IBGP peers, routes learnt
via iBGP are never propagated to other IBGP peers. In order to address the Split Horizon rule
iBGP neighbors need to be configured in full mesh. The formula to compute the number of
sessions required for a full mesh is n * (n – 1)/2, where n is the number of BGP-enabled
devices. Because of the internal BGP (IBGP) full-mesh requirement, most networks use
Route Reflectors to simplify configuration.
A Route Reflector (RR) is an iBGP feature that eliminates the need for a BGP full-mesh
topology and allows iBGP to scale in large networks. The route reflector mechanism allows a
BGP speaker (an iBGP router) to act as a route reflector that advertises (reflects) the routes
it learns from one iBGP router to other iBGP peers within the AS.

Ques 67. What is no-synchronization?


The BGP synchronization rule states that if your AS passes traffic from another AS to a third
AS, BGP should not advertise a route until all of the routers within the AS have learned about
the route via an IGP.
The no synchronization command tells the iBGP routers that you don’t want them to
“synchronize” iBGP with your internal routing protocol.

Ques 68. Default BGP timers.


Keepalive - 60 seconds
Hold-down - 180 seconds (3 multiplied by Keepalive)

Ques 69. In Multihoming scenario if primary link gets fail, after how long traffic will be shifted
to secondary link.
By default, fast external failover is enabled for eBGP neighbor. So when the egress interface
fails, it immediately bring down the BGP session and next best path will be selected. If you
have it disabled, it will rely on the BGP hold timer.

Ques 70. Explain the term BGP Graceful Restart?


Initially, to control this un-stability, GR (Graceful Restart) principle was proposed, where on
router’s control plane switchover, router doesn’t report the switchover information
immediately to its own neighbor rather it wait for certain period of time (which is called
grace interval) .If the router’s control plane comes back up and re-establishes its peering
sessions before the grace period expires, as would be the case during a control plane
switchover, the temporarily broken peering sessions do not effect the network beyond the
neighbors.

Ques 71. Can we tune BGP timers to improve BGP convergence?


It is possible to tune the BGP keepalive timers to be as low as 1/3 seconds, but the risk of
peering session flapping become significant with such settings.
Hence, as a good practice, BGP timers of 5 and 15 seconds can be considered and has been
seen to work efficiently in customer environments.

Ques 72. What is difference between eBGP and iBGP?


Below table enumerates difference between eBGP and iBGP –
Ques 73. What is the advantage of using BGP AS Prepend?
The AS-Path comes pretty early in the BGP path selection process and hence preferred
attribute to use in BGP. The shorter the AS-PATH the more preferred a route becomes. AS-
PATH Prepending is used to make a route less desirable, along a specific path, by making the
AS-PATH longer.

Ques 74. What is cluster id in BGP?


Route Reflector Cluster ID is a four-byte BGP attribute, and, by default, it is taken from the
Route Reflector’s BGP router ID.If two routers share the same BGP cluster ID, they belong to
the same cluster.
Before reflecting a route, route reflectors append its cluster ID to the cluster list. If the route
is originated from the route reflector itself, then route reflector does not create a cluster list.
If the route is sent to EBGP peer, RR removes the cluster list information. If the route is
received from EBGP peer, RR does not create a cluster list attribute. Cluster list hence is used
for loop prevention by only the route reflectors. Route reflector clients do not use cluster list
attribute, so they do not know to which cluster they belong.

Ques 75. What is the meaning of update source loopback?


BGP Command “neighbor update-source” Configures the router to force BGP to use the IP
address of the loopback interface when talking to a neighbor.
Syntax:
[no] neighbor {ip-address | peer-group-name} update-source loopback identifier

Ques 76. Can we use local preference outside the autonomous system?
No, since Local preference has local significance. Further, Local preference is not attached to
eBGP updates, only to iBGP updates.

Ques 77. What is confederation?


BGP confederations allows us to divide a single AS into one or more ASs and assign the
whole group to a single AS. Each smaller AS will need to have a full mesh inside its own AS.
Even though these ASs will have EBGP peers to ASs within the confederation, they exchange
routing as if they were using IBGP; next hop, metric and local preference information are
preserved. To the outside world, the confederation (the group of ASs) will look as a single
AS.
Below is sample topology to configure the BGP confederation where AS100 has been divided
into two smaller AS 10 and 20 with two routers each.
Ques 78. Router R2 is getting following log message – “%BGP-3-NOTIFICATION: received
from neighbor 192.168.12.1 2/2 (peer in wrong AS) 2 bytes 0014”. Diagram below.

What could be the probable reason for this error log? What is mitigation approach?
Reason for error message – “On Router R2, BGP AS number 20 is configured instead of AS 2.”

Any of below 3 options may be used to address above shared problem -


Option 1 - Change the BGP configuration on R2 ie remove “Router BGP 20” and replace whole
configuration on “Router BGP 2”
Option 2 - On R1, configure neighbor command with “Remote-as” of R2 being 20 instead of 2
Option 3 - Configure “local-AS 2” on R2 to show to R1 that it belongs to AS 2 and not AS 20
Below link further elaborates the overall scenario and detailed configuration to resolve the
problem condition -
https://ipwithease.com/troubleshooting-scenario-on-incorrect-bgp-as-number/

Ques 79. What will the BGP first check to see if a prefix is accessible?
To see if a prefix is accessible, 1st check BGP does is whether Next Hop Router is reachable.
Ques 80. What are the two methods for reducing the number of IBGP connection in a
network?
2 methods of reducing number of iBGP connections are –
 Route Reflectors
 BGP Confederation

Ques 81. What makes a neighbor internal BGP (iBGP)?


When two BGP-enabled devices are in the same autonomous system (AS), the BGP session is
called an internal BGP session, or IBGP session

Ques 82. What the command "neighbor update-source" do?


BGP Command “neighbor update-source” Configures the router to force BGP to use the IP
address of the loopback interface when talking to a neighbor.
Syntax:
[no] neighbor {ip-address | peer-group-name} update-source loopback identifier

Ques 83. Explain the term RIB in BGP?


In order for BGP to be able to perform its functions it stores this information is a special type
of database called the BGP Routing Information Base (RIB).For BGP RIB to learn BGP routes
through its neighbors, store the best BGP routes and then advertise the best routes to
neighbors/peers, there is need for multiple BGP tables.

BGP Routing Information Base consists of three parts as explained below –


 Adj-RIBs-In – This BGP information refers to routing prefix received from neighbor
without applying any filtering or attribute manipulation. Attribute modifications or
route filtering is applied after Adj-RIB-In.
 Loc-RIB – BGP maintains its own master routing table called the Local Routing
Information Base (Loc-RIB).Best routes is selected after applying routing policies on
the routes available in Adj-RIBs-In. Whenever an Adj-RIB-In changes, the main BGP
process decides if any of the neighbour’s new routes are preferred to routes already
in the Loc-RIB and it replaces as required.
 Adj-RIBs-Out – This table refers to Routes/NLRI selected from Loc-RIB after applying
outbound routing/filtering policies. This table stores the routing information that
was selected by the local BGP router and the advertised to its peers through BGP
update messages.

Ques 84. Two BGP peers connected through a routed firewall are unable to establish a
peering relationship. What could be the most likely cause?
Primary reason is that EBGP multihop is not configured between the 2 BGP peers.

Ques 85. What is the order of preference of attributes (route-map, filter-list, prefix-list,
distribute-list ) when some or all are applied to one neighbor in BGP? Kindly share for inbound
updates ?
This is the order of operation:
 Route map
 Filter list
 IP prefix list
 Distribute list

Ques 86. What is the order of preference of attributes (route-map, filter-list ,prefix-list,
distribute-list ) when some or all are applied to one neighbor in BGP? Kindly share for outbound
updates?
This is the order of operation:
 Distribute list
 IP prefix list
 Filter list
 Route map

Ques 87. How can I verify if a BGP router announces its BGP networks and propagates them?
Use below commands in order to check if the IPprefix are announced to the directly
connected BGP neighbor -
 “show ip bgp neighbors [address] advertised-routes” command shows which
messages are being sent.
 “show ip bgp neighbors [address] routes” command shows which messages are
being received.

Ques 88. Does the route reflector change the next hop attribute of a reflected prefix?
By default, the next hop attribute is not changed when a prefix is reflected by route
reflector. However, you can issue the neighbor next-hop-self command in order to change
the attribute of the next hop for prefixes reflected from an eBGP peer to any route reflector
client.

Ques 89. How much of minimal RAM is required to learn complete BGP routing table from
one BGP peer?
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.

Ques 90. What are the benefits of configuring BGP peer groups?
Below are the key benefits which can be reaped out from BGP peer groups –
 Reduction of the resource of BGP devices when it makes the updates to the BGP
neighbors.
 Reduction in amount of configuration which is requires to be done on BGP enabled
device.
 Configuration becomes simple and easy

Ques 91. Is it possible to change BGP ConnectRetry timer?


Presently, the Cisco IOS ConnectRetry timer cannot be changed from its default of 120
seconds.

Ques 92. What is the version of BGP that first supported CIDR?
In the BGP the current versions i.e. BGP-4 version supports CIDR.
Ques 93. In the global routing table, can the same AS number show up more than once in a
path.
Yes, this is pretty much possible. This happens because some AS inject their AS number in the
path more than once. However, when AS Path Prepending is not used across AS, every AS
number will only show up once, since same AS can’t because BGP doesn't allow looping AS
paths.

Ques 94. Can I run two BGP process on single router?


No, we can't run multiple BGP processes on the single router.

Ques 95. What is the cost of external and internal BGP routes?
eBGP (External) = 20
iBGP (Internal) = 200

Ques 96. Which parameters and attributes have to be equal before MED is compared to
select the best path?
Below attributes need to be equal before MED is compared -
 WEIGHT
 LOCAL_PREF
 AS_PATH
 Origin

Ques 97. What is the purpose of route dampening?


Route Dampening is a way to suppress flapping routes so that they are "suppressed"
instead of being advertised. An unstable network can cause BGP routes to flap, which can
cause other BGP routers in the network to constantly reconverge. This wastes valuable CPU
cycles and can cause severe problems in the network. Henceforth, ISPs use route dampening
to mitigate these issues. Some of terms related to Route dampening include -
Penalty -
 Half life time
 Suppress limit
 Reuse limit
 Max suppress limit
 Suppressed route
 History entry

Ques 98. In general which routes will affect by route dampening? eBGP or iBGP?
The main functionality is to stop the rippling effect of route updates or withdraws. It only
applies to routes learn with eBGP.

Ques 99. What is the default value of MED?


Default value of MED is 0

Ques 100. How do I debug routes for a particular vrf in the Cisco IOS-XR environment?
Use the debug bgp keepalive [vrf [vrf-name | all]] vpnv4 unicast command in order to
debug routes for a given vrf in the Cisco IOS-XR environment.

You might also like