28.06.2014 Views

Discussion

Discussion

Discussion

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.

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

Action term<br />

external type metric<br />

local-preference value<br />

local-preference add number<br />

local-preference subtract number<br />

metric value<br />

metric2 value<br />

metric igp value<br />

metric minimum-igp value<br />

origin value<br />

preference value<br />

tag value<br />

tag2 value<br />

tag add number<br />

tag subtract number<br />

tag2 add number<br />

tag2 subtract number<br />

Description<br />

External metric for exported OSPF routes.<br />

Set the value of the BGP LOCAL_PREF attribute.<br />

Increment or decrement the BGP LOCAL_PREF value.<br />

Set the metric value. For BGP, metric is MED and metric2 is the IGP<br />

metric of the BGP next hop.<br />

Change the MED by the specified value for EBGP routes being exported.<br />

Set the BGP ORIGIN attribute.<br />

Set the preference value.<br />

Set the tag and tag2 values in OSPF external LSAs.<br />

Increment or decrement the OSPF tag or tag2 value.<br />

This recipe changes two attributes in a BGP route, the local preference and community.<br />

The first command in the then clause sets the LOCAL_PREF attribute to 300.<br />

The second command changes the community string in the route to 65500:12345.<br />

The policy affects all routes received from the BGP neighbor at 10.0.31.2/32 (configured<br />

with the set from neighbor command). The last command in the recipe applies<br />

the policy to the BGP group external.<br />

9.3 Filtering Routes by IP Address<br />

Problem<br />

You need to reject all routes to certain IP addresses because you don’t want to install<br />

them into the routing table.<br />

Solution<br />

Create a list of all the IP address prefixes:<br />

[edit policy-options]<br />

aviva@router1# set prefix-list PREFIX-LIST-1 10.0.0.1/24<br />

aviva@router1# set prefix-list PREFIX-LIST-1 10.10.0.0/16<br />

aviva@router1# show<br />

prefix-list PREFIX-LIST-1 {<br />

10.0.0.1/24;<br />

10.10.0.0/16;<br />

}<br />

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

Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.<br />

Filtering Routes by IP Address | 291

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

Saved successfully!

Ooh no, something went wrong!