Home > BGP Questions 2

BGP Questions 2

May 4th, 2014 in ROUTE 642-902 Go to comments

Here you will find answers to BGP Questions – Part 2

Question 1

Study the configuration presented in the exhibit carefully. What is the objective of the route map named test?

router bgp 50001
network 10.0.0.0
network 172.16.0.0
neighbor 10.1.1.1 remote-as 5003
neighbor 10.1.1.1 route-map test out
!
access-list 1 permit 10.0.0.0
access-list 2 permit any
!
route-map test permit 10
match ip address 1
set metric 200
!
route-map test permit 20 match ip address 2

A. marks all prefixes received from the 10.1.1.1 neighbor with a MED of 200
B. marks the 10.0.0.0/8 prefix received from the 10.1.1.1 neighbor with a MED of 200
C. marks the 10.0.0.0/8 prefix advertised to the 10.1.1.1 neighbor with a MED of 200
D. marks all prefixes advertised to the 10.1.1.1 neighbor with a MED of 200

 

Answer: C

Explanation

From the command “neighbor 10.1.1.1 route-map test out” we learn the “test” route map is applied on the outbound direction to the neighbor 10.1.1.1. In the “test” route map, we see 3 statements:

“route-map test permit 10
match ip address 1
set metric 200″

They mean “if the access list 1 is matched, set the Multi Exit Discriminator (MED) of that route to 200”.

Question 2

What technique should be used on BGP edge routers to prevent a multi-homed autonomous system from becoming a transit system?

A. Advertise with a high MED value all networks that are discovered via external BGP.
B. Remove the AS-Path information on all routes in the BGP table prior to advertising externally.
C. Only advertise networks externally if they have been discovered via internal BGP.
D. Use an outgoing distribution list to filter all networks not originating from inside the autonomous system.
E. Set the no-export community attribute on all networks that are advertised externally.
F. Set the origin code to incomplete for all networks that are discovered via external BGP.

 

Answer: D

Explanation

A transit AS is an AS that routes traffic from one external AS to another external AS. Let’s see an example below:

BGP_transit_AS.jpg

Suppose your company has 2 internet links to 2 different ISPs. If one connection to the ISP goes down, your traffic can be sent through the other ISP. It is a good way to make sure your company can access the internet any time. But if your routers are not configured carefully, your company AS may become a transit AS. For example, AS 65002 learned the route 10.10.10.0/24 from ISP1. If R2 advertises that route to ISP2 then ISP2 may use it to send traffic to that network -> your company becomes a transit AS.

There are two popular ways to prevent a multi-homed autonomous system from becoming a transit system:

+ Use a distribute-list or filter-list to filter all networks not originating from inside the autonomous system.
+ Use the no-export community attribute on all networks not originating from inside the autonomous system.

Answer E seems to be correct but in fact it is not because “all networks that are advertised externally” include networks originating from inside and outside our AS. We should only filter networks originating from outside our AS. In some cases, the routers in our company may advertise some internal networks (for remote access, for example).

We create 2 GNS3 labs to explain them in more detail. You can read them here:

+ Use Distribute-list to filter Routing Updates in BGP
+ BGP next-hop-self, community no-export & send-community – GNS3 Lab

Question 3

Refer to the exhibit. By default, when RTB passes BGP advertisements from RTA about network 192.168.2.0 to RTC, what address will be listed as the next-hop address?

BGP_next_hop.jpg

A. 10.1.1.1
B. 10.1.1.2
C. 192.168.1.49
D. 192.168.1.50

 

Answer: D

Explanation

This is a rule for BGP advertisement:

“For EBGP, the next hop is always the IP address of the neighbor specified in the neighbor command. For IBGP, the protocol states that the next hop advertised by EBGP should be carried into IBGP“.

In this case, when RTA (in AS 65000, which is an EBGP for RTB) advertises a route to RTB, it specifies its interface (192.168.1.50) as the next-hop. But when RTB passes this advertisement to RTC, it specifies RTA interface (also 192.168.1.50) as the next-hop (IBGP). This can cause some routing failures because if RTC does not know a way to reach RTA interface via IGP (OSPF, EIGRP…), it will drop that packet. To fix this problem, add the “neighbor 10.1.1.2 next-hop-self” command under BGP mode in RTB. You can find out more about this problem in our BGP next-hop-self, community no-export & send-community – GNS3 Lab.

Question 4

What are the two reasons for the appearance of 0.0.0.0 as the next hop for a network in the show ip bgp command output? (Choose two)

A. The network was originated via redistribution of an interior gateway protocol into BGP.
B. The network was defined by a static route.
C. The network was originated via a network or aggregate command.
D. The network was learned via EBGP.
E. The network was learned via IBGP.

 

Answer: A C

Explanation

You can read my BGP Summary Route to see “the network was originated via a network or aggregate command” has the next hop of 0.0.0.0. In short, the router on which you use the “network” or “aggregate” command will set the next hop of 0.0.0.0 for that route.

About redistribution please refer to the Understanding Redistribution of OSPF Routes into BGP: http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a00800943c5.shtml you will see after the network 2.0.0.0 has been redistributed in BGP it has the next hop of 0.0.0.0.

Question 5

Which BGP attribute is used by BGP to prevent routing loops?

A. AS-path
B. next-hop
C. MED
D. weight
E. local preference
F. origin

 

Answer: A

Explanation

The AS-PATH attribute is used to prevent BGP routing loops. When receiving an BGP advertisement, the router checks the AS-PATH attribute, if it see it’s own AS number in the AS-Path then it is a routing loop so the router will not install this route in its BGP table.

Question 6

Refer to the exhibit. It is desired to set up a BGP neighbor relationship between routers R1 and R4. BGP packets between them could travel through R2 or R3. What is the simplest configuration that will allow for failover?

BGP_loopback_update_source.jpg

A. Configure BGP neighbor relationships between all interfaces on R1 and R4.
B. Install a direct connection between R1 and R4.
C. Configure loopback interfaces on R1 and R4 to provide the update source address for BGP packets.
D. Configure only one neighbor relationship between R1’s 192.168.1.2 interface and R4’s 172.16.10.2 interface.

 

Answer: C

Explanation

Assume R4 only uses this configuration:

R4(config)#router bgp 65000
R4(config-router)#neighbor 192.168.1.2 remote-as 65000

Then if R1 sends BGP packets to R4 via R3, the source IP address of the packets is 192.168.2.2. But R4 does not recognize this IP address because 192.168.2.2 is not configured in the “neighbor” command of R4. Therefore the IBGP session between R1 & R4 is not established -> these packets will be dropped.

The simplest configuration to allow R1 and R4 communicate via both R2 & R3 is to use a loopback interface address rather than a physical interface address as the source IP address for all BGP packets. To do this, use the command:

R4(config-router)#neighbor 1.1.1.1 update-source loopback0

(In which 1.1.1.1 is the loopback interface of R1). In practical, we should establish neighborship with the loopback interface rather than the physical interface because if the physical interface goes down, the neighborship would be lost while a loopback interface never goes down.

Also, when configuring “1.1.1.1” as the neighbor, you must configure on R1 the “neighbor 4.4.4.4 update-source loopback0” command so that the source IP address of packets sent from R1 (loopback0 – 1.1.1.1) will be matched with the neighbor command configured on R4.

Question 7

Refer to the exhibit. Network 10.0.0.0/8 is being advertised to autonomous system 65550 via both external links. Which statement about the preferred path to the 10.0.0.0/8 network is true?

bgp_higher_local_preference.jpg

A. Router R1 will be preferred because its neighbor has the higher autonomous system number.
B. Router R1 will be preferred because it has the lower neighbor IP address.
C. Router R1 will be preferred because it has a lower local preference.
D. Router R2 will be preferred because its neighbor has a lower autonomous system number.
E. Router R2 will be preferred because it has the higher neighbor IP address.
F. Router R2 will be preferred because it has a higher local preference.

 

Answer: F

Explanation

Local preference is an indication to the AS about which path has preference to exit the AS in order to reach a certain network. A path with a higher local preference is preferred more. The default value for local preference is 100.

Unlike the weight attribute, which is only relevant to the local router, local preference is an attribute that routers exchange in the same AS. The local preference is set with the “bgp default local-preference value” command.

In this case, both R1 & R2 learn about the network 10.0.0.0/8 but R2 has higher local-preference so R2 will be chosen as the preferred exit point from AS 65550.

(Reference: http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a00800c95bb.shtml#localpref)

Question 8

During BGP configuration on a router that has peered with other BGP speakers, the BGP command aggregate-address 172.32.0.0 255.255.252.0 is issued. However, the peers do not receive this aggregate network in BGP advertisements. Also, the router does not have this aggregate network in its BGP table. Which option indicates a possible reason this command did not cause the router to advertise the aggregate network to its peers?

A. Interface NULL 0 is likely shutdown.
B. The BGP command no synchronization is missing.
C. The BGP command no auto-summary is missing.
D. Subnets of 172.32.0.0/22 do not exist in the BGP table.
E. The IGP running on this router does not have network 172.32.0.0/22 installed.
F. The next hop IP address must be a loopback address.

 

Answer: D

Explanation

A rule of aggregation is “Aggregation applies only to routes that exist in the BGP routing table. An aggregated route is forwarded if at least one more specific route of the aggregation exists in the BGP routing table.

Question 9

Which two methods advertise internal networks to external ISPs via BGP? (Choose two)

A. using aggregate routes
B. disabling synchronization
C. forcing the next-hop address
D. defining routes via the network statement

 

Answer: A D

Question 10

Which BGP command provides the router ID, local preference, next hop, and BGP path in its output?

A. show ip route bgp
B. show ip bgp
C. show ip bgp neighbors
D. show ip bgp summary

 

Answer: B

Explanation

The “show ip bgp” command is used to display entries in the BGP routing table. An example of the “show ip bgp” output is shown below:

show_ip_bgp.jpg

In the output you can see the router ID, local preference, next hop, and BGP path.

Comments
  1. No comments yet.
  1. No trackbacks yet.