Refer to the exhibit. An engineer is reaching network 172.16.10.0/24 via the R1-R2-R4 path. Which configuration forces the traffic to take a path of R1-R3-R4?
A.
R1(config)#route-map RM_LOCAL_PREF permit 10 R1(config-route-map)#set local-preference 101 R1(config-route-map)#exit R1(config)#router bgp 100 R1(config-router)#neighbor 13.13.13.3 route-map RM_LOCAL_PREF in R1(config-router)#end R1#clear ip bgp 13.13.13.3 soft in
B.
R1(config)#route-map RM_AS_PATH_PREPEND R1(config-route-map)#set as-path prepend 200 200 R1(config-route-map)#exit R1(config)#router bgp 100 R1(config-router)#neighbor 12.12.12.2 route-map RM_AS_PATH_PREPEND in R1(config-router)#end R1#clear ip bgp 12.12.12.2 soft in
C.
R1(config)#router bgp 100 R1(config-router)#neighbor 13.13.13.3 weight 1 R1(config-router)#end
D.
R2(config)#route-map RM_MED permit 10 R2(config-route-map)#set metric 1 R2(config-route-map)#exit R2(config)#router bgp 200 R2(config-router)#neighbor 12.12.12.1 route-map RM_MED out R2(config-router)#end R2#clear ip bgp 12.12.12.1 soft out
This is the explanation why A is the ONLY Correct answer.
A: This will prefer both router to choose R1 - R3 - R4, as Local Preference is shared within the same AS.
B: AS-PREPEND is adding 200 200 - that's is NOT allowed as this is the neighbor AS and you can only prepend the local AS.
C: This will not work because Weight attribute requires a route map - The Router won't allow to set the weight directly like this - TESTED.
D. The MED attribute is only affecting how inbound traffic will reach us and NOT how we go out.
weight doesn't require a route-map, it can be configured per neighbor - a perfectly valid solution if you're not required to handle the asymetric routing. The problem with option C is that you need to clear the neighbor afterwards. Not sure how you tested this, but if you need reference: https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/iproute_bgp/command/irg-cr-book/bgp-m1.html#wp2222404444
I retract. I tested it again after reading your post. I don't know why I failed testing it last time. I reanalyze the question again and this is my thinking now.
Answer A: Will work as Local Preference is set to prefer route via R3.
Answer B: WRONG
Answer C: Missing the clear configuration. Not because weight is not allowed in this form.
Answer D: I think it will work too. I R3 set the MED out towards AS100, R1 will prefer to route via R3 as the default MED is 0 and lower is better.
But between MED and Local Preference, the second takes preference. Answer should be A.
regarding your post:
##### C: This will not work because Weight attribute requires a route map - The Router won't allow to set the weight directly like this - TESTED. #####
Not true, tested in GNS3 with IOS-XE Version 17.03.04a
R1(config-router)#neighbor 13.13.13.3 weight 1
R1(config-router)#do sh run | s r b
router bgp 100
bgp log-neighbor-changes
network 1.1.1.1 mask 255.255.255.255
neighbor 12.12.12.2 remote-as 200
neighbor 13.13.13.3 remote-as 200
neighbor 13.13.13.3 weight 1
R1(config-router)#
I guess C is wrong because the clear statement is missing.
A)WRONG. Local preference is valid only for I-BGP updates.
B)WRONG. The Rout-Map miss the "permit" (route-map RM_AS_PATH_PREPEND R1)
C) WRONG. It Misses the "R1#clear ip bgp
13.13.13.3 soft in". Without this command, the BGP table is not updated
D) Correct Answer
B is right,local preference and weight will be used mostly in locally and usr for set inbound traffic ,but AS-path can advertise to another AS, so R 1 to R2 advertise 2 times AS 200
So R1 to R3 has shorter AS 200 and traffic goes R1-R3-R4
Route selection in BGP priority goes to:
routes with higher weight (default is 0); with higher local preference (default is 100); with shorter AS path length (number of AS passed through to reach destination); and with less MED (metric, default is 0) value. Our objective is making R2's BGP routes more desirable to R1 than routes learned from R3.
Option A will set the local preference for BGP routes learned from R2 to 101, (R2 101 LP > R3 100 LP) making these routes more preferable.
Option B is incorrect, you can only prepend you local AS. Also, prepending AS path to routes advertised by R2 will make the path look longer and less desirable to take, when compared to R3.
Option C is incorrect, we need to assign a higher weigh to R2 (default weight is 0) not R3.
Option D is incorrect, we need to advertise routes with less MED value to make R2 more desirable to R1 than R3.
Correct answer is D. All others are wrong: A. Local preference can be used for iBGP only ( if the routers resided in the same AS ) B. AS_PATH can't use 200 to prepend AS_PATH C. Weight is lower than default D. Is correct
A and B would work according to this document: https://community.cisco.com/t5/networking-knowledge-base/understanding-bgp-best-path-selection-manipulation/ta-p/3150576
Just labbed this question on 4 routers in EVE-NG running I86BI_LINUX-ADVENTERPRISEK9-M 15.7(3) M2
A: WORKS. No more comments as it already is the Most Voted answer
B: WORKS. I see that there are some answers saying 'you can't prepend foreign/neighbor ASs to AS_PATH.' I couldn't find any Cisco documentation on such a limitation, so where did you get this info? The only relevant info I could find is that YOU SHOULDN'T DO IT as it might have unintended effects https://www.noction.com/blog/as-path-and-as-path-prepending but YOU CAN DO IT.
C: DOESN'T WORK: As others already pointed out, without " #clear ip bgp <neighbor> soft in ", the next hop via R2 stays as it is. However, not that this configuration also works, if "clear ip bgp" is also issued. For all the answers saying "you can't set the weight like this", you are wrong.
D: WORKS: R2 sets metric of 1 for the routes outbound towards R1, so R1 will choose the route from R3 as best path.
Continuing the previous comment:
However, taking into considerations the best practices from Cisco OCG and Kevin Wallace's courses, A is the correct answer because:
B: AS_PATH prepending technique is commonly used locally to influence which path will a remote AS use to reach the local AS (inbound path selection). Also take into consideration the link I provided which explains why prepending foreign AS numbers into the AS_PATH is a bad practice.
D: MED (metric) as configured here on R2 is correctly configured and follows the common practices: influencing inbound traffic flows from a different AS (R1). However, I doubt that in a real scenario, a network engineer would have access to configure remote ASs routers, so D, isn't the best choice here. Also it should be noted that it is a more common practice to use AS_PATH prepending to influence inbound traffic flows instead of configuring MED.
Another interesting one. Firs of all - B is wrong! One cannot prepend a foreign AS 200. Not to mention that prepanding ASes influences the traffic flow in the other way around it is required in this case.
i checked options A & D as they both made sense and... they actually did. Both of them wil do the trick as A is modyfing a local pref from 100 to 101 making the path via R3 more desirable while D is adding +1 to the MED which makes the route via R2 less desirable which is also fine.
IOU1#sh bgp ipv4 uni
* 172.16.10.0/24 12.12.12.12 1 0 200 300 i
*> 13.13.13.13 101 0 200 300 i
Since LP is the 2nd criteria and MED is lower I would go with A.
What is your opinion on this article?:
https://community.cisco.com/t5/networking-knowledge-base/understanding-bgp-best-path-selection-manipulation/ta-p/3150576
=>
A,B,D are all correct. C could be correct, too. Although "clear ip bgp..." is missing from C. Answer might need to be selected based on the order of the best path selection.
This question is based on this article:
https://community.cisco.com/t5/networking-knowledge-base/understanding-bgp-best-path-selection-manipulation/ta-p/3150576
The article lists all the solutions A, B, and D as appropriate. C is missing "clear ip bgp ...", so the attribute weight is out.
B is okay, too, because it is an as-path prepend inbound. You can set the neighbor's as or operator "last-as ..." for inbound updates. See:
https://blog.ipspace.net/2009/03/as-path-prepending-technical-details.html
It is not clear to me why answer A is better than the other answers, unless we consider the order of the best path selection. Local preference will be checked before the other possible solutions (as-path prepend and MED).
AS path prepend is only used in OUTGOING BGP updates, to influence incoming traffic.
Weght default value is 1 and could have been right, but clear soft session is not set. Weight has local meaning (scope just inside R1 router).
Local_pref is used to select an output path, a BGP AS scope (iBGP updates).
AS path prepend can be used inbound, please see:
https://community.cisco.com/t5/networking-knowledge-base/understanding-bgp-best-path-selection-manipulation/ta-p/3150576
https://ipwithease.com/bgp-as-prepend-inbound-configuration-example/
https://blog.ipspace.net/2009/03/as-path-prepending-technical-details.html
This section is not available anymore. Please use the main Exam Page.350-401 Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
dragonwise
Highly Voted 2 years, 1 month agox3rox
Highly Voted 2 years, 3 months agoCiscoTerminator
6 months, 2 weeks agoMerlinTheWizard
2 years, 3 months agox3rox
2 years, 2 months agox3rox
2 years, 2 months agox3rox
2 years, 2 months agobier132
1 year, 9 months agojmarko80
Most Recent 3 months, 1 week agokamyarkav
7 months agokamyarkav
5 months, 4 weeks agoAbdullahMohammad251
8 months agozbeugene7
8 months, 2 weeks agozbeugene7
7 months, 2 weeks ago[Removed]
11 months, 2 weeks agoteems5uk
1 year, 2 months agoClaudiu1
1 year, 2 months agoClaudiu1
1 year, 2 months agomsstanick
1 year, 11 months agonet_eng10021
1 year, 11 months agoDataset
2 years agoHamzaBadar
2 years, 1 month agoHamzaBadar
2 years, 1 month agoHungarianDish_111
2 years, 1 month agomgiuseppe86
1 year, 8 months agoHungarianDish_111
2 years, 1 month agobendarkel
2 years, 2 months agolandgar
2 years, 3 months agoMerlinTheWizard
2 years, 3 months agox3rox
2 years, 2 months agox3rox
2 years, 2 months agoHungarianDish_111
2 years, 1 month ago