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

Defining BGP Communities and Extended Communities for Use in Routing <strong>Policy</strong> Match<br />

Conditions<br />

To use a BGP community or extended community as a routing policy match condition,<br />

you define the community as described in the following sections:<br />

• Defining BGP Communities for Use in Routing <strong>Policy</strong> Match Conditions on page 104<br />

• Defining BGP Extended Communities for Use in Routing <strong>Policy</strong> Match<br />

Conditions on page 107<br />

• Inverting Community Matches on page 109<br />

Defining BGP Communities for Use in Routing <strong>Policy</strong> Match Conditions<br />

To create a named BGP community and define the community members, include the<br />

community statement:<br />

community name {<br />

invert-match;<br />

members [ community-ids ];<br />

}<br />

You can include this statement at the following hierarchy levels:<br />

• [edit policy-options]<br />

• [edit logical-systems logical-system-name policy-options]<br />

name identifies the community. It can contain letters, numbers, and hyphens (-) and can<br />

be up to 255 characters long. To include spaces in the name, enclose the entire name in<br />

quotation marks (“ ”).<br />

community-ids identifies one or more members of the community. Each community ID<br />

consists of two components, which you specify in the following format:<br />

as-number:community-value;<br />

• as-number—AS number of the community member. It can be a value from 0<br />

through 65,535. For more information about configuring AS numbers, see the Junos<br />

OS Routing Protocols <strong>Configuration</strong> <strong>Guide</strong>. You can use the following notation in<br />

specifying the AS number:<br />

• String of digits.<br />

• Asterisk (*)—A wildcard character that matches all AS numbers. (In the definition<br />

of the community attribute, the asterisk also functions as described in Table 17 on<br />

page 106.)<br />

• Period (.)—A wildcard character that matches any single digit in an AS number.<br />

• Group of AS numbers—A single AS number or a group of AS numbers enclosed in<br />

parentheses. Grouping the numbers in this way allows you to perform a common<br />

operation on the group as a whole and to give the group precedence. The grouped<br />

numbers can themselves include regular expression operators. For more information<br />

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