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.

Chapter 4: Routing <strong>Policy</strong> <strong>Configuration</strong><br />

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

• Example: Assigning Different Forwarding Next-Hop LSPs to Different Destination<br />

Prefixes on page 78<br />

• Example: Grouping Destination Prefixes on page 79<br />

• Example: Grouping Source Prefixes on page 80<br />

• Example: Grouping Source and Destination Prefixes in a Forwarding Class on page 81<br />

• Example: Accepting Routes with Specific Destination Prefixes on page 82<br />

• Example: Accepting Routes from BGP with a Specific Destination Prefix on page 82<br />

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

Accept BGP routes advertised by the peer 192.168.1.1. If a route matches, it is accepted,<br />

and no further evaluation is performed on that route. If a route does not match, the accept<br />

or reject action specified by the default policy is taken. (For more information about the<br />

default routing policies, see “Default Routing Policies and Actions” on page 20.) If you<br />

apply this routing policy to imported BGP routes, only the routes learned from the peer<br />

192.168.1.1 and BGP transit routes are accepted from BGP peers.<br />

[edit]<br />

policy-options {<br />

policy-statement bgp-to-isis {<br />

term term1 {<br />

from {<br />

neighbor 192.168.1.1;<br />

}<br />

then {<br />

accept;<br />

}<br />

}<br />

}<br />

}<br />

Example: Using Routing <strong>Policy</strong> to Set a Preference<br />

Define a routing policy which matches routes from specific next hops that are being<br />

advertised to specific neighbors and which sets a preference. If a route does not match<br />

the first term, it is evaluated by the second term. If it still does not match, the next routing<br />

policy, if configured, is evaluated; then the accept or reject action specified by the default<br />

policy is taken. (For more information about the default routing policies, see “Default<br />

Routing Policies and Actions” on page 20.)<br />

[edit]<br />

policy-options {<br />

policy-statement set-preference {<br />

term term1 {<br />

from {<br />

next-hop [ 10.0.0.1 10.0.0.2 ];<br />

}<br />

to {<br />

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

73

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

Saved successfully!

Ooh no, something went wrong!