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.

9.2 Changing a Route’s Routing Information<br />

Problem<br />

You want to enforce your company’s BGP peering relationships and control the traffic<br />

you receive from BGP peers by modifying the BGP LOCAL_PREF attribute and<br />

associating a community with certain BGP routes.<br />

Solution<br />

Another function of routing policy is to modify the routing information associated<br />

with BGP routes. First, match the routes to be affected:<br />

[edit policy-options policy-statement from-my-customers term 1]<br />

aviva@router1# set from neighbor 10.0.31.2/32<br />

Use the then clause to modify the route’s routing information:<br />

[edit policy-options policy-statement from-my-customers term 1]<br />

aviva@router1# set then local-preference 300<br />

aviva@router1# set then community set 65500:12345<br />

aviva@router1# set then accept<br />

Finally, apply the policy to a BGP group:<br />

[edit protocols bgp]<br />

aviva@router1# set group external-group import from-my-customers<br />

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

For BGP routes, routing policy allows you to modify the BGP routing information<br />

associated with each route, including the BGP local preference, community, and origin<br />

attributes, and the AS paths in each route. You typically do this to manage customer<br />

traffic and peering arrangements with other ISPs. Table 9-4 lists the actions<br />

you can include in a policy to change a route’s routing information. Most of these<br />

actions are specific to BGP.<br />

Table 9-4. Actions that change routing information in matching routes<br />

Action term<br />

as-path-prepend path<br />

as-path-expand last-as count number<br />

community + names<br />

community add names<br />

community – names<br />

community delete names<br />

community = names<br />

community set names<br />

damping name<br />

Description<br />

Add AS numbers to the beginning of the BGP AS path.<br />

Add the last AS number to the BGP AS path the specified number of<br />

times before adding the local AS number.<br />

Add BGP community names.<br />

Delete BGP community names.<br />

Set the specific BGP community name.<br />

Configure BGP route flap damping.<br />

290 | Chapter 9: Routing Policy and Firewall Filters<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!