350-501 · Question #81
You are writing an RPL scnpt to accept routes only from certain autonomous systems Consider this code. RP/0/RP0/CPU0:router(config-rpl)# if as-path in (ios-regex '.*77$')…
The correct answer is B. allows routes from AS 7077. The provided Routing Policy Language (RPL) code uses a regular expression to match AS paths that end with '77' and allows those routes to pass.
Question
You are writing an RPL scnpt to accept routes only from certain autonomous systems Consider this code. RP/0/RP0/CPU0:router(config-rpl)# if as-path in (ios-regex ‘.*77$’) RP/0/RP0/CPU0:router(config-rpl-if)# pass RP/0/RP0/CPU0:router(config-rpl-if)# endif If you apply this code to BGP filters, which effect does the code have on your router?
Options
- Adenies routes from AS 7070
- Ballows routes from AS 7077
- Cdenies routes from AS 7007
- Dallows routes from AS 770
How the community answered
(20 responses)- A5% (1)
- B80% (16)
- C5% (1)
- D10% (2)
Why each option
The provided Routing Policy Language (RPL) code uses a regular expression to match AS paths that end with '77' and allows those routes to pass.
AS 7070 ends with '70', not '77', so this route would not match the regex and would be denied by default (no pass statement for it).
The regular expression '.*77$' matches any AS path that ends with the digits '77'. Therefore, routes from AS 7077 will match this condition, and the 'pass' action will allow them.
AS 7007 ends with '07', not '77', so this route would not match the regex and would be denied.
AS 770 ends with '70', not '77', so this route would not match the regex and would be denied.
Concept tested: BGP AS-path regular expressions
Source: https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/iproute_bgp/configuration/15-mt/irg-15-mt-book/irg-cfg-bgp-as-path-access-lists.html
Topics
Community Discussion
No community discussion yet for this question.