nerdexam
Juniper

JN0-102 · Question #121

[edit policy-options] user@router# show policy-statement block-routes { term 1 { from { route-filter 172.27.0.0/24 longer; } then reject; } term 2 { then accept; } } You are asked to ensure that…

The correct answer is B. user@router# set term 1 from route-filter 172.27.0.0/24 orlonger. To reject the exact 172.27.0.0/24 route along with its longer subnets, the longer match type must be changed to orlonger in term 1.

Routing Policy and Firewall Filters

Question

[edit policy-options] user@router# show policy-statement block-routes { term 1 { from { route-filter 172.27.0.0/24 longer; } then reject; } term 2 { then accept; } } You are asked to ensure that your device does not accept any prefixes within the 172.27.0.0/24 network. You have applied the policy shown in the exhibit, but the 172.27.0.0/24 route is still present on your device. Which configuration will resolve this problem?

Options

  • A[edit policy-options policy-statement block-routes]
  • Buser@router# set term 1 from route-filter 172.27.0.0/24 orlonger
  • Cuser@router# set term 1 from route-filter 172.27.0.0/24 upto /30
  • Duser@router# set term 2 from route-filter 172.27.0.0/24 longer
  • Euser@router# set term 2 from route-filter 172.27.0.0/24 orlonger

How the community answered

(42 responses)
  • A
    5% (2)
  • B
    71% (30)
  • C
    14% (6)
  • D
    2% (1)
  • E
    7% (3)

Why each option

To reject the exact `172.27.0.0/24` route along with its longer subnets, the `longer` match type must be changed to `orlonger` in `term 1`.

A[edit policy-options policy-statement block-routes]

This is just the edit prompt and not a configuration change that resolves the problem.

Buser@router# set term 1 from route-filter 172.27.0.0/24 orlongerCorrect

The current `route-filter 172.27.0.0/24 longer` in `term 1` only matches prefixes that are *more specific* than 172.27.0.0/24 (e.g., /25, /26). It does not match the exact 172.27.0.0/24 route itself. To include the exact /24 route in the rejection, the `orlonger` match type is necessary, which matches the specified prefix and all its more specific subnets.

Cuser@router# set term 1 from route-filter 172.27.0.0/24 upto /30

The `upto /30` match type would match prefixes within the 172.27.0.0/24 range but with lengths up to /30, which is not the precise requirement to reject the exact /24 prefix and its longer subnets.

Duser@router# set term 2 from route-filter 172.27.0.0/24 longer

Modifying `term 2` to match the problematic routes would cause them to be accepted, not rejected, contrary to the problem statement.

Euser@router# set term 2 from route-filter 172.27.0.0/24 orlonger

Similar to D, changing `term 2` to match and accept the routes is contrary to the goal of blocking them.

Concept tested: Junos route-filter match types

Source: https://www.juniper.net/documentation/us/en/software/junos/routing-policy/topics/concept/policy-routing-filter-match-conditions-for-route-prefixes.html

Topics

#route-filters#routing policy#Junos CLI

Community Discussion

No community discussion yet for this question.

Full JN0-102 Practice