300-510 · Question #175
Refer to the exhibit. Company A established BGP sessions with several ISPs. A network engineer at the company must filter out all traffic except for routes that transit AS 152. The engineer configured
The correct answer is D. Change the filtering policy to ip as-path access-list 1 permit _152_.. The original regex 'permit _152$_(_[0-9])' is malformed and does not correctly match AS 152 as a transit AS in the BGP AS path. In Cisco BGP AS-path filtering, the underscore '_' is a special metacharacter that matches any AS path delimiter (space, comma, brace, start of string,
Question
Refer to the exhibit. Company A established BGP sessions with several ISPs. A network engineer at the company must filter out all traffic except for routes that transit AS 152. The engineer configured the filtering policy "permit 152$(_[0-9])" on R1, but after applying the configuration, the engineer notices that other routes are still visible. Which action resolves the issue?
Exhibit
Options
- AAdd a second filtering policy in the format ip access-list 1 permit ^152_([0-9]+).
- BAdd a second filtering policy in the format ip prefix-list 1 permit ^152^.
- CChange the filtering policy to ip explicit-path 1 permit $152^.
- DChange the filtering policy to ip as-path access-list 1 permit 152.
How the community answered
(39 responses)- A5% (2)
- B10% (4)
- C3% (1)
- D82% (32)
Explanation
The original regex 'permit 152$([0-9])' is malformed and does not correctly match AS 152 as a transit AS in the BGP AS path. In Cisco BGP AS-path filtering, the underscore '' is a special metacharacter that matches any AS path delimiter (space, comma, brace, start of string, or end of string). The correct regular expression '152' matches AS number 152 appearing anywhere in the AS path (surrounded by delimiters), which identifies it as a transit AS. The proper command syntax is 'ip as-path access-list 1 permit 152'. This correctly identifies and permits only routes whose AS path contains AS 152 as a transit entry, while an implicit deny blocks everything else.
Topics
Community Discussion
No community discussion yet for this question.
