H12-821_V1.0 · Question #415
The route-policy defined by a router is as shown in the figure. [HUAWEI]ip ip-prefix 1 permit 11.1.0.0 16 [HUAWEI]route-policy test-set cost permit node 10 [HUAWEI]route-policy if-match ip-prefix 1…
The correct answer is C. Route 11.1.0.0/16 can pass node 10, and its cost is set to 300. Option C is correct because route-policy nodes are processed sequentially, and when a route matches a permit node, the associated apply actions execute and processing immediately stops - it does not cascade to subsequent nodes. Route 11.1.0.0/16 matches the if-match ip-prefix 1…
Question
Options
- ARoute 11.1.0.0/16 will continue to match node 20 after passing node 10, and the final cost is set to
- BThe cost of the route will be set to 500
- CRoute 11.1.0.0/16 can pass node 10, and its cost is set to 300
- DAny routes that do not pass through node 10 will be rejected.
How the community answered
(51 responses)- A6% (3)
- B12% (6)
- C78% (40)
- D4% (2)
Explanation
Option C is correct because route-policy nodes are processed sequentially, and when a route matches a permit node, the associated apply actions execute and processing immediately stops - it does not cascade to subsequent nodes. Route 11.1.0.0/16 matches the if-match ip-prefix 1 condition in node 10 (since ip-prefix 1 permits exactly 11.1.0.0/16), so the apply cost 300 action is applied and the route exits the policy.
Why the distractors are wrong:
- A is wrong because after a route matches a
permitnode, processing halts - 11.1.0.0/16 never reaches node 20. - B (cost = 500) is wrong for the same reason; costs from node 10 and node 20 are not additive - only one node's actions apply.
- D is wrong because node 20 is a
permitnode with noif-matchcondition, so it acts as a catch-all - any route that misses node 10 will match node 20 and get cost 200, not be rejected.
Memory tip: Think of route-policy nodes like an if / else if chain - the first matching permit node wins and the rest are skipped; only a deny node or falling off the end of the policy causes rejection.
Topics
Community Discussion
No community discussion yet for this question.