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.

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

When BGP advertises prefixes to remote systems, it includes the AS_PATH attribute,<br />

which lists all the ASs along the path to the prefix. BGP routers use this information<br />

to determine the path to the route’s origin. As a route passes through each AS, the<br />

BGP router adds its AS number to the beginning of the AS path. In this way, each AS<br />

is a single hop in the path. The BGP specification prohibits removing information<br />

from the AS path attribute. However, if on your internal network you are using private<br />

AS numbers (numbers in the range from 64512 through 65534), you shouldn’t be<br />

passing these numbers to the Internet because they are reserved for private use only.<br />

If another network happens to be using the same private AS numbers, the two ASs<br />

will not be able communicate with each other because BGP will see the same AS<br />

numbers and conclude that there is a routing loop.<br />

Use the set remove-private command to remove private AS numbers when the local<br />

border router advertises its prefixes to remote border routers. One case when you<br />

might want to do this is if your customers are using private AS numbers within the<br />

networks and, as the ISP, you want to remove the private AS numbers from the path.<br />

You include this configuration in the EBGP group that faces the Internet or other<br />

EBGP peers.<br />

Looking in the routing table of the receiving router before the remove-private configuration,<br />

you see that the routes contain private AS numbers. The following route<br />

contains the private number 64555:<br />

aviva@Router3> show route advertising-protocol bgp 172.0.0.34<br />

inet.0: 164830 destinations, 164838 routes (164829 active, 0 holddown, 1 hidden)<br />

Prefix Nexthop MED Lclpref AS path<br />

* 172.0.0.0/24 Self 0 64555 65534 I<br />

172.0.0.0/24 *[BGP/170] 00:04:55, MED 0, localpref 100, from 172.0.0.127<br />

AS path: 64555 65534 I<br />

> to 172.0.0.11 via ge-1/3/0.2<br />

After the configuration is applied, BGP strips the private AS number from the AS<br />

path, and the receiving router no longer sees it in the routing table:<br />

aviva@Router3> show route advertising-protocol bgp 172.0.0.34<br />

inet.0: 164830 destinations, 164838 routes (164829 active, 0 holddown, 1 hidden)<br />

Prefix Nexthop MED Lclpref AS path<br />

* 172.0.0.0/24 Self 0 65534 I<br />

172.0.0.0/24 *[BGP/170] 00:04:55, MED 0, localpref 100, from 172.0.0.127<br />

AS path: 65534 I<br />

> to 172.0.0.11 via ge-1/3/0.2<br />

The remove-private statement removes only leading private AS numbers. If the path<br />

had been 3937 64555, the private AS would remain in the path. As another example,<br />

the path 64555 64555 64555 65300 64590 65534 would be sent as local-AS 65300 64590<br />

65534.<br />

442 | Chapter 13: BGP<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!