28.06.2014 Views

Discussion

Discussion

Discussion

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

then accept;<br />

}<br />

}<br />

}<br />

protocols {<br />

ospf {<br />

export send-statics;<br />

}<br />

}<br />

<strong>Discussion</strong><br />

From a structural point of view, this routing policy is very straightforward and illustrates<br />

the basic components of how to configure a policy. The JUNOS policy language<br />

is similar to standard programming languages or pseudocode, so you can read<br />

through the show output in this recipe to get the gist of the policy. If you are not a<br />

programmer, you can read the policy language as if it were a paragraph written in an<br />

outline format. Looking through the show output in this recipe, you see it creates a<br />

policy named send-statics that looks for static routes and accepts them. OSPF<br />

applies the policy to routes it advertises to its OSPF neighbors. Rephrased, this recipe<br />

allows OSPF to advertise static routes in addition to the default OSPF behavior,<br />

which is to advertise routes learned from OSPF.<br />

Before looking at the policy configuration, one question you might ask is why you<br />

need to create routing policies at all. What happens if you don’t configure any? By<br />

default, all routing protocols accept any routes they learn from their protocol neighbors<br />

or peers and place them into one of the routing tables (see Table 9-1). This<br />

means that without a routing policy, BGP accepts all routes from all its BGP neighbors,<br />

IS-IS accepts all routes from all its IS-IS neighbors, OSPF from all its OSPF<br />

neighbors, and so on. Routing policy is how you modify this behavior. In most cases,<br />

you use routing policy with BGP to enforce peering agreements and your company’s<br />

administrative policies because they provide explicit control over which routes are<br />

installed in the routing table. These routes are eligible to become active routes, which<br />

are used for forwarding traffic. Routing policy also provides explicit control over<br />

which routes are advertised to the router’s neighbors.<br />

Table 9-1. Default routing-policy actions<br />

Protocol Routing table Default import action Default export action<br />

BGP inet.0 Accept all BGP routes. Do not modify<br />

BGP route properties.<br />

Accept and export active BGP routes. Do<br />

not modify BGP route properties.<br />

DVMRP inet.1 Accept all DVMRP routes. Accept and export active DVMRP routes.<br />

IS-IS<br />

inet.0 and<br />

inet6.0<br />

Accept all IS-IS routes. Policy cannot be<br />

modified because IS-IS requires that all<br />

routers in an area have the same linkstate<br />

database to maintain a stable,<br />

loop-free network.<br />

Reject everything (IS-IS uses LSPs to<br />

advertise its routes).<br />

Creating a Simple Routing Policy | 285<br />

This is the Title of the Book, eMatter Edition<br />

Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.

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

Saved successfully!

Ooh no, something went wrong!