nerdexam
Juniper

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.

Routing Policy and Firewall Filters

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)
  • A
    8% (3)
  • B
    78% (29)
  • C
    3% (1)
  • D
    11% (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.

AAll routes are accepted.

The policy explicitly rejects certain routes and implicitly rejects all others due to the final default action, so not all routes are accepted.

BAll routes are rejected.Correct

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.

CA 172.27.0.0/24 route will be accepted.

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.

DA 172.27.0.0/16 route will be accepted.

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

#routing policy#route filters#longer match type#policy default action

Community Discussion

No community discussion yet for this question.

Full JN0-102 Practice