100 BGP Questions Flashcards
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.
Which layer does BGP work on?
BGP is an application layer protocol and works upto Layer 7 of OSI model.
What is the difference between eBGP multihop and ttl security?
Which protocol and port number does BGP use for neighborship?
BPG uses TCP protocol and port number 179 for forming neighborship.
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
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.
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
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.
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.
What are the well-known communities of the BGP community attribute?
Below are well known BGP community attributes -
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.
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
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
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
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
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.
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
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.
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.
Do internal i.e. iBGP sessions modify the next hop?
ipwithease, ipwithease. BGP Top 100 Interview Questions and Answers (p. 9). Kindle Edition.
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.
ipwithease, ipwithease. BGP Top 100 Interview Questions and Answers (p. 9). Kindle Edition.
Do external BGP (eBGP) sessions modify the next hop?
ipwithease, ipwithease. BGP Top 100 Interview Questions and Answers (p. 9). Kindle Edition.
Yes, Routes advertised to eBGP peers will have Next-Hop attribute changed to eBGP routers IP address.
ipwithease, ipwithease. BGP Top 100 Interview Questions and Answers (p. 9). Kindle Edition.
Do external BGP (eBGP) sessions between confederations modify the next hop?
ipwithease, ipwithease. BGP Top 100 Interview Questions and Answers (p. 9). Kindle Edition.
No, eBGP sessions between confederation AS do not modify the next hop attribute.
ipwithease, ipwithease. BGP Top 100 Interview Questions and Answers (p. 9). Kindle Edition.
In external BGP (eBGP) sessions, which IP address is sent as the next hop?
ipwithease, ipwithease. BGP Top 100 Interview Questions and Answers (p. 10). Kindle Edition.
In eBGP peering, the next hop is the IP address of the neighbor that announces the route.
ipwithease, ipwithease. BGP Top 100 Interview Questions and Answers (p. 10). Kindle Edition.
Does the route reflector change the next hop attribute of a reflected prefix?
ipwithease, ipwithease. BGP Top 100 Interview Questions and Answers (p. 10). Kindle Edition.
By default, the next hop attribute is not changed when a prefix is reflected by route reflector.
ipwithease, ipwithease. BGP Top 100 Interview Questions and Answers (p. 10). Kindle Edition.
How can I announce a prefix conditionally to one ISP only when I lose the connection to my primary ISP?
ipwithease, ipwithease. BGP Top 100 Interview Questions and Answers (p. 10). Kindle Edition.
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.
ipwithease, ipwithease. BGP Top 100 Interview Questions and Answers (p. 10). Kindle Edition.
How can I configure BGP to provide load sharing and redundancy in my network?
ipwithease, ipwithease. BGP Top 100 Interview Questions and Answers (p. 10). Kindle Edition.
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
ipwithease, ipwithease. BGP Top 100 Interview Questions and Answers (pp. 10-11). Kindle Edition.
How much memory should I have in my router to receive the complete BGP routing table from my ISP?
ipwithease, ipwithease. BGP Top 100 Interview Questions and Answers (p. 11). Kindle Edition.
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.
ipwithease, ipwithease. BGP Top 100 Interview Questions and Answers (p. 11). Kindle Edition.
What are the benefits of configuring BGP peer groups?
ipwithease, ipwithease. BGP Top 100 Interview Questions and Answers (p. 11). Kindle Edition.
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
ipwithease, ipwithease. BGP Top 100 Interview Questions and Answers (p. 11). Kindle Edition.
Why do I see the same route twice from the same peer in BGP?
ipwithease, ipwithease. BGP Top 100 Interview Questions and Answers (p. 11). Kindle Edition.
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.
ipwithease, ipwithease. BGP Top 100 Interview Questions and Answers (p. 11). Kindle Edition.
What is synchronization, and how does it influence BGP routes installed in the IP routing table?
ipwithease, ipwithease. BGP Top 100 Interview Questions and Answers (p. 11). Kindle Edition.
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.
ipwithease, ipwithease. BGP Top 100 Interview Questions and Answers (pp. 11-12). Kindle Edition.
How do I know which Cisco IOS software release supports a particular BGP feature?
ipwithease, ipwithease. BGP Top 100 Interview Questions and Answers (p. 12). Kindle Edition.
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
ipwithease, ipwithease. BGP Top 100 Interview Questions and Answers (p. 12). Kindle Edition.
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?
ipwithease, ipwithease. BGP Top 100 Interview Questions and Answers (p. 12). Kindle Edition.
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.
ipwithease, ipwithease. BGP Top 100 Interview Questions and Answers (p. 12). Kindle Edition.
What is the default BGP ConnectRetry timer?
ipwithease, ipwithease. BGP Top 100 Interview Questions and Answers (p. 12). Kindle Edition.
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.
ipwithease, ipwithease. BGP Top 100 Interview Questions and Answers (p. 12). Kindle Edition.
ipwithease, ipwithease. BGP Top 100 Interview Questions and Answers (p. 12). Kindle Edition.
What does r RIB-Failure mean in the show ip bgp command output?
ipwithease, ipwithease. BGP Top 100 Interview Questions and Answers (p. 12). Kindle Edition.
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.
ipwithease, ipwithease. BGP Top 100 Interview Questions and Answers (pp. 12-13). Kindle Edition.
How can I redistribute internal BGP (iBGP) learned default-route (0.0.0.0/ 0) route into EIGRP/ OSPF/ IS-IS?
ipwithease, ipwithease. BGP Top 100 Interview Questions and Answers (p. 13). Kindle Edition.
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
ipwithease, ipwithease. BGP Top 100 Interview Questions and Answers (p. 13). Kindle Edition.
How can I filter all IP routes advertised to a BGP neighbor except the default route 0.0.0.0/ 0?
ipwithease, ipwithease. BGP Top 100 Interview Questions and Answers (p. 13). Kindle Edition.
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
ipwithease, ipwithease. BGP Top 100 Interview Questions and Answers (p. 13). Kindle Edition.
Is it possible to track an interface and change the route availability?
ipwithease, ipwithease. BGP Top 100 Interview Questions and Answers (p. 13). Kindle Edition.
Yes, it is possible to track the state change of an interface and route availability with the Enhanced Object tracking.
ipwithease, ipwithease. BGP Top 100 Interview Questions and Answers (p. 13). Kindle Edition.
How does IP RIB Update allocate memory?
ipwithease, ipwithease. BGP Top 100 Interview Questions and Answers (p. 13). Kindle Edition.
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.
ipwithease, ipwithease. BGP Top 100 Interview Questions and Answers (pp. 13-14). Kindle Edition.
ipwithease, ipwithease. BGP Top 100 Interview Questions and Answers (p. 13). Kindle Edition.
What is the command to see IPv6 BGP neighbors?
ipwithease, ipwithease. BGP Top 100 Interview Questions and Answers (p. 14). Kindle Edition.
The “show bgp ipv6 unicast summary” command is used to see the IPv6 BGP neighbors
ipwithease, ipwithease. BGP Top 100 Interview Questions and Answers (p. 14). Kindle Edition.
Why are there no statistic results when I use the debug bfd events and debug bfd packets commands?
ipwithease, ipwithease. BGP Top 100 Interview Questions and Answers (p. 14). Kindle Edition.
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.
ipwithease, ipwithease. BGP Top 100 Interview Questions and Answers (p. 14). Kindle Edition.
Can I run two BGP process on single router
ipwithease, ipwithease. BGP Top 100 Interview Questions and Answers (p. 14). Kindle Edition.
Only single BGP process can be run on single Router.
ipwithease, ipwithease. BGP Top 100 Interview Questions and Answers (p. 14). Kindle Edition.