JNCIP-SP: Juniper Networks Certified Professional – Service Provider (2021) — Question 17

You want to reject routes from any BGP peers that have prepended their AS path.
What is the correct as-path regex that would allow you to accomplish this task?

Answer options

Correct answer: D

Explanation

The correct answer is D, as it matches any AS path with zero or one length, effectively filtering out prepended AS paths. Option A is incorrect because it matches paths starting with 65001, while B matches paths with two or more segments, and C is not a valid regex for this purpose as it redundantly lists the same AS number.