100 BGP Questions Flashcards
(100 cards)
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.