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 />

first policy of a chain sets a route’s metric to 500, this route matches the criterion of<br />

metric 500 defined in the next policy.<br />

For information about how the policy framework software evaluates routing policies and<br />

policy chains, see “Evaluating a Routing <strong>Policy</strong>” on page 29.<br />

Effect of Omitting Ingress Match Conditions from Export Policies<br />

In export policies, omitting the from statement in a term might lead to unexpected results.<br />

By default, if you omit the from statement, all routes are considered to match. For example,<br />

static and direct routes are not exported by BGP by default. However, if you create a term<br />

with an empty from statement, these routes inadvertently could be exported because<br />

they matched the from statement. For example, the following routing policy is designed<br />

to reject a few route ranges and then export routes learned by BGP (which is the default<br />

export behavior):<br />

[edit]<br />

routing-options {<br />

autonomous-system 56;<br />

}<br />

protocols {<br />

bgp {<br />

group 4 {<br />

export statics-policy;<br />

type external;<br />

peer-as 47;<br />

neighbor 192.168.1.1;<br />

}<br />

}<br />

}<br />

policy-options {<br />

policy-statement statics-policy {<br />

term term1 {<br />

from {<br />

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

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

}<br />

then reject; # reject the prefixes in the route list<br />

}<br />

term term2 {<br />

then {<br />

accept; # accept all other routes, including static and direct routes<br />

}<br />

}<br />

}<br />

}<br />

However, this routing policy results in BGP advertising static and direct routes to its peers<br />

because:<br />

• term1 rejects the destination prefixes enumerated in the route list.<br />

• term2, because it has no from statement, matches all other routes, including static<br />

and direct routes, and accepts all these routes (with the accept statement).<br />

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