Professional Documents
Culture Documents
Policy Components
• Terms:
• named structures in which match conditions and actions are defined
• one or more terms can be defined
• Match Conditions:
• criteria against which a route or packet is compared
• one or more criteria can be configured
• if all criteria match, one or more actions are applied
Policy Components
• Actions:
• what happens if all criteria match
• one or more actions can be configured
Policy Components
• Terms are basic building blocks of all Junos policies
• If all the match conditions specified in the from statement are true,
all the actions in the then statement are executed
Policy
Term 1
from then
match
Term 2
from then
match
Routing Policy Evaluation
• The route is evaluated against the first term. If it matches, the
specified action is taken
• If the action is to accept or reject the route, that action is taken and
evaluation of the route ends
Routing Policy Evaluation
• Evaluation continues to the next term if the route does not match,
or if no action is specified, or if the next term action is specified
Policy
Term 1
Accept or Reject
Term 2
Accept or Reject
Default
Action
policy-statement my-policy {
term accept-direct-routes {
from {
protocol direct;
interface ge-0/0/0;
}
then accept;
}
term reject-rip-routes {
from protocol rip;
then reject;
}
}
Routing Policy Match Conditions
• Each term in a routing policy can include two statements, from and
to, to define the conditions that a route must match for the policy
to apply
• If more than one criteria is matched, they must all match the route
for a match to occur
Routing Policy Match Conditions
• The from statement is optional
• All routes then take the configured actions of the policy term
Routing Policy Match Conditions
• In the to statement, you define the criteria that an outgoing route
must match
• If more than one criteria is matched, they must all match the route
for a match to occur