JN0-102 · Question #119
Which statement is correct about the policy shown in the exhibit? [edit policy-options] user@router# show policy-statement my-policy { term 1 { from { route-filter 172.27.0.0/24 longer; } } then…
The correct answer is B. All routes are rejected. The policy shown contains a single term that rejects routes matching 172.27.0.0/24 or longer, and because there's no default accept action, all other routes are implicitly rejected by the policy's final implicit deny.
Question
Which statement is correct about the policy shown in the exhibit? [edit policy-options] user@router# show policy-statement my-policy { term 1 { from { route-filter 172.27.0.0/24 longer; } } then reject; }
Options
- AAll routes are accepted.
- BAll routes are rejected.
- CA 172.27.0.0/24 route will be accepted.
- DA 172.27.0.0/16 route will be accepted.
How the community answered
(37 responses)- A8% (3)
- B78% (29)
- C3% (1)
- D11% (4)
Why each option
The policy shown contains a single term that rejects routes matching 172.27.0.0/24 or longer, and because there's no default accept action, all other routes are implicitly rejected by the policy's final implicit deny.
The policy explicitly rejects certain routes and implicitly rejects all others due to the final default action, so not all routes are accepted.
The policy has only one term, `term 1`, which explicitly rejects routes that match `172.27.0.0/24 longer`. Any route that does not match this specific filter will fall through this term. Since there are no other terms and no explicit `then accept` at the end, the implicit default action of a Junos policy-statement is `reject`, meaning all routes will ultimately be rejected by this policy.
A `172.27.0.0/24` route would match the `route-filter 172.27.0.0/24 longer` because 'longer' includes the exact match when used with a prefix length, and would therefore be rejected.
A `172.27.0.0/16` route does not match `172.27.0.0/24 longer` (it's a shorter prefix) and would fall through `term 1`, being implicitly rejected by the policy's default action.
Concept tested: Junos policy-statement default action
Source: https://www.juniper.net/documentation/us/en/software/junos/routing-policy/topics/topic-map/routing-policy-and-firewall-filter-overview.html
Topics
Community Discussion
No community discussion yet for this question.