JN0-102 · Question #120
Referring to the exhibit, if the static route with prefix 10.1.1.0/24 is evaluated against the routing policy, which preference value will be set? policy-options { policy-statement example-pol {…
The correct answer is C. The preference will be 8. A static route of 10.1.1.0/24 will first be evaluated against each term in sequence, and it will match term 3 which sets a preference of 8.
Question
Referring to the exhibit, if the static route with prefix 10.1.1.0/24 is evaluated against the routing policy, which preference value will be set? policy-options { policy-statement example-pol { term 1 { from { protocol static; route-filter 10.1.0.0/16 exact; } then { preference 6; accept; } } term 2 { from { protocol static; route-filter 10.1.1.0/24 longer; } then { preference 7; accept; } } term 3 { from { protocol static; route-filter 10.1.0.0/16 upto /24; } then { preference 8; accept; } } term 4 { then accept; } } }
Options
- AThe preference will be 6.
- BThe preference will be 7.
- CThe preference will be 8.
- DThe preference will be the default for static routes.
How the community answered
(29 responses)- A21% (6)
- B10% (3)
- C62% (18)
- D7% (2)
Why each option
A static route of 10.1.1.0/24 will first be evaluated against each term in sequence, and it will match `term 3` which sets a preference of 8.
The static route 10.1.1.0/24 does not match `term 1` because `exact` requires an exact match to 10.1.0.0/16, which it is not.
The static route 10.1.1.0/24 does not match `term 2` because `longer` specifies prefixes with a length strictly greater than /24, not including /24 itself.
The static route 10.1.1.0/24 does not match `term 1` (exact /16) or `term 2` (longer than /24). It matches `term 3` because `10.1.0.0/16 upto /24` includes prefixes that are subnets of 10.1.0.0/16 with a length up to /24, and 10.1.1.0/24 fits this criterion. Once matched, the policy actions are executed, setting the preference to 8 and accepting the route, and no further terms are evaluated.
The route matches `term 3` and is explicitly accepted with a preference of 8, so the default preference for static routes (which is 5) will not be used.
Concept tested: Junos policy-statement route-filter matching
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.