04.02.2014 Views

View - ADTRAN Support Community

View - ADTRAN Support Community

View - ADTRAN Support Community

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

Additional BGP Configuration<br />

Refer to Example 6 on page 46 for a detailed BGP configuration example featuring the<br />

use of route maps to filter routes according to network address.<br />

Filtering Routes According to AS Path<br />

Routes can also be filtered according to the hops listed in the AS_PATH field. For advertised routes,<br />

this type of filtering allows a degree of influence over which autonomous systems external neighbors<br />

can access. For example, service provider routers can filter routes with paths that include customer AS<br />

numbers to prevent themselves from advertising private customer routes to unauthorized peers. Private<br />

networks do not typically transmit traffic from AS to AS. Therefore, filtering advertised routes<br />

according to AS path is not usually necessary when configuring eBGP in a private network.<br />

A list of the AS paths to be filtered is created first. The AS path list is then referenced in a route map<br />

entry to define the paths to be filtered. Lastly, the route map is applied to a BGP neighbor (refer to<br />

Applying a Route Map Entry to a BGP Neighbor on page 30).<br />

Use the ip as-path-list command to create AS path lists for route map use:<br />

(config)#ip as-path-list <br />

Specifies the name of the AS path list.<br />

Next, specify the AS numbers to be filtered and specify whether the routes containing these AS<br />

numbers should be permitted or denied:<br />

(config-as-path-list)#[deny | permit] <br />

Specifies permitting or denying routes that contain this value in their AS_PATH attribute.<br />

This is a numeric value that can be an integer from 1 to 4294967295 or a string that follows the format<br />

of AS regular expressions to filter an AS path. Refer to AS Regular Expressions on page 83 for a<br />

detailed list of valid AS regular expressions.<br />

The AS path list is only compared against the AS_PATH attribute on a BGP prefix, which is also<br />

displayed in the output of the show ip bgp command.<br />

For example, a router can be permitted to advertise only routes that use both AS 200 and AS 400:<br />

(config-as-path-list)#permit (\b200\b.*400\b)|(\b400\b.*200\b)<br />

However, the statement above only permits routes that use both AS 200 and AS 400. Permit any routes<br />

that use either AS by entering separate statements:<br />

(config-as-path-list)#permit \b200\b<br />

(config-as-path-list)#permit \b400\b<br />

Permitting AS number 200 selects any routes that include that value, even if the AS field also includes<br />

other values. In other words, entering permit 200 permits routes containing AS 200, as well as AS 200<br />

and AS 400, while entering permit 200 400 only permits routes containing both AS 200 and AS 400.<br />

Therefore, it might be necessary to explicitly deny any values that should not be included in the field.<br />

Another example might be where the router is allowed to advertise routes that use AS 200 or AS 400,<br />

but not routes that force traffic to travel through both AS 200 and AS 400:<br />

(config-as-path-list)#deny (\b200\b.*400\b)|(\b400\b.*200\b)<br />

(config-as-path-list)#\b200\b<br />

26 Copyright © 2012 <strong>ADTRAN</strong>, Inc. 61200860L1-29.4E

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

Saved successfully!

Ooh no, something went wrong!