16.03.2014 Views

Policy Framework Configuration Guide - Juniper Networks

Policy Framework Configuration Guide - Juniper Networks

Policy Framework Configuration Guide - Juniper Networks

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Junos 10.4 <strong>Policy</strong> <strong>Framework</strong> <strong>Configuration</strong> <strong>Guide</strong><br />

}<br />

}<br />

Configuring a Final Action in Routing Policies<br />

Logging Matches to a Routing <strong>Policy</strong> Term<br />

In addition to specifying an action using the then statement in a named term, you can<br />

also specify an action using the then statement in an unnamed term, as follows:<br />

[edit]<br />

policy-options {<br />

policy-statement policy-name {<br />

term term-name {<br />

from {<br />

family family-name;<br />

match-conditions;<br />

policy subroutine-policy-name;<br />

prefix-list name;<br />

route-filter destination-prefix match-type ;<br />

source-address-filter source-prefix match-type ;<br />

}<br />

to {<br />

match-conditions;<br />

policy subroutine-policy-name;<br />

}<br />

then {<br />

actions;<br />

}<br />

}<br />

then action;<br />

}<br />

}<br />

If you specify the trace action, the match is logged to a trace file. To set up a trace file,<br />

you must specify the following elements in the global traceoptions statement:<br />

• Trace filename<br />

• policy option in the flag statement<br />

For more information about the global traceoptions statement, see the Junos OS Routing<br />

Protocols <strong>Configuration</strong> <strong>Guide</strong>.<br />

The following example uses the trace filename of policy-log:<br />

[edit]<br />

routing-options {<br />

traceoptions {<br />

file “policy-log";<br />

flag policy;<br />

}<br />

}<br />

This action does not affect the flow control during routing policy evaluation.<br />

56<br />

Copyright © 2010, <strong>Juniper</strong> <strong>Networks</strong>, Inc.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!