H12-821_V1.0 · Question #1005
The administrator received the following requirements to design ip as-path-filter. It needs to be realized that the company headquarters (AS 65001) can accept the route originating from the branch…
The correct answer is A. 1: [AR_CDE] ip as-path-filter 2 permit t.*; 2: [AR_CDE] ip as-path-filter 2 permit t deny ^65001; 3: [AR_CDE] ip as-path-filter 2 deny ^65002; 4: [AR_CDE] ip as-path-filter 2 permit t _65002_65108. Option A correctly sequences the AS-path filter rules to enforce both conditions: routes must originate from AS 65010 and transit through AS 65002 before reaching HQ (AS 65001). In Huawei BGP, AS-path filters are evaluated top-down by sequence number, so the order is critical…
Question
Options
- A1: [AR_CDE] ip as-path-filter 2 permit t.*; 2: [AR_CDE] ip as-path-filter 2 permit t deny ^65001; 3: [AR_CDE] ip as-path-filter 2 deny ^65002; 4: [AR_CDE] ip as-path-filter 2 permit t _65002_65108
- B
- C
- D
How the community answered
(27 responses)- A70% (19)
- B19% (5)
- C4% (1)
- D7% (2)
Explanation
Option A correctly sequences the AS-path filter rules to enforce both conditions: routes must originate from AS 65010 and transit through AS 65002 before reaching HQ (AS 65001). In Huawei BGP, AS-path filters are evaluated top-down by sequence number, so the order is critical - the deny for AS 65001 (sequence 2–3) must appear before the broad permit, preventing routing loops where HQ accidentally accepts its own originated routes reflected back. The key permit rule (_65002_65010) uses underscore as a delimiter matching the AS path segment, confirming AS 65002 appears as an intermediate hop and AS 65010 appears as the originator, which is exactly the required traffic pattern.
The other options (B, C, D) are not shown here but would be wrong by having rules in the incorrect sequence (e.g., a catch-all permit before the deny rules, which would make the deny statements unreachable), or by using incorrect regex patterns that either miss the AS 65002 transit requirement or fail to anchor AS 65010 as the originating AS.
Memory tip: Think of AS-path filters like a bouncer's list - deny the troublemakers first, then permit only the guests with the right stamps (origin = 65010, transit = 65002). In Huawei syntax, _AS_ means "AS number appears anywhere in the path," and sequence order determines which rule fires first.
Topics
Community Discussion
No community discussion yet for this question.