nerdexam
Cisco

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.

Networking

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)
  • A
    5% (1)
  • B
    80% (16)
  • C
    5% (1)
  • D
    10% (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.

Adenies routes from AS 7070

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).

Ballows routes from AS 7077Correct

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.

Cdenies routes from AS 7007

AS 7007 ends with '07', not '77', so this route would not match the regex and would be denied.

Dallows routes from AS 770

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

#RPL#BGP#AS-Path Filtering#Regex

Community Discussion

No community discussion yet for this question.

Full 350-501 Practice