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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

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

user@host> test policy policy-name prefix<br />

For more information about test commands, see the Junos OS Routing Protocols and<br />

Policies Command Reference.<br />

Example: Testing a Routing <strong>Policy</strong><br />

Test the following policy, which looks for unwanted routes and rejects them:<br />

[edit policy-options]<br />

policy-statement reject-unwanted-routes {<br />

term drop-these-routes {<br />

from {<br />

route-filter 0/0 exact;<br />

route-filter 10/8 orlonger;<br />

route-filter 172.16/12 orlonger;<br />

route-filter 192.168/16 orlonger;<br />

route-filter 224/3 orlonger;<br />

}<br />

then reject;<br />

}<br />

}<br />

Test this policy against all routes in the routing table:<br />

user@host> test policy reject-unwanted-routes 0/0<br />

Test this policy against a specific set of routes:<br />

Routing <strong>Policy</strong> Examples<br />

user@host> test policy reject-unwanted-routes 10.49.0.0/16<br />

The following examples show how to configure routing policies for various purposes:<br />

• Example: Defining a Routing <strong>Policy</strong> from BGP to IS-IS on page 73<br />

• Example: Using Routing <strong>Policy</strong> to Set a Preference on page 73<br />

• Example: Importing and Exporting Access and Access-Internal Routes in a Routing<br />

<strong>Policy</strong> on page 74<br />

• Example: Exporting Routes to IS-IS on page 74<br />

• Example: Applying Export and Import Policies to BGP Peer Groups on page 75<br />

• Example: Defining a Routing <strong>Policy</strong> Based on the Number of BGP Communities on<br />

page 75<br />

• Example: Applying a Prefix to Routes Learned from a Peer on page 76<br />

• Example: Redistributing BGP Routes with a Specific Community Tag into IS-IS on<br />

page 76<br />

• Example: Redistributing OSPF Routes into BGP on page 76<br />

• Example: Exporting Direct Routes Into IS-IS on page 77<br />

• Example: Exporting Internal IS-IS Level 1 Routes to Level 2 on page 77<br />

72<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!