BGP AS numbers

BGP AS numbersPosted in May 30th, 2005 by sean in RoutingEvery BGP autonomous system (AS) is identified by a 16 bit unsigned integer. An AS originates route advertisements consisting of a prefix and various attributes. This article will look at the AS numbers, which will then lead in to path attributes.
Like IP address space, the issuing of AS numbers is controlled by a registry, in this case, the American Registry for Internet Numbers (ARIN). They have a series of policies governing the issuing of the numbers. There are also private AS numbers, from 64512 (0xFC00) to 65535 (0xFFFF). Your provider will have to strip these off, since they’re not allowed on the Internet.
In general, to get an AS number, you have to be multihomed. If not, you have to prove your routing policy is different then that of your peer.
Once you’ve filled out the application form and paid your fee, you get your number.
That’s the easy part. Now you have to use your AS number to advertise routes to your peers. These routes will be distributed over the Internet, and based on the path attributes, people will choose their preferred path. Take for example the following network:



AS1 advertises a network to both AS2 and AS3. AS2 and AS3 exchange routes, so they know they can go direct to AS1, or via the other guy. AS2 and AS3 announce to AS4 they know how to get to AS1 by their preferred route.
BGP is policy based. This means that in the situation above, AS2 can choose to send all traffic to AS1 via AS3, rather than direct. However, AS1 makes its own decision on how to return. AS2 can try to influence AS1, but has no absolute control.
Likewise, if both AS2 and AS3 advertise to AS4 that they know how to get to AS1, AS4 has the choice of which one it uses. There are not guarantees, however, that the path doesn’t go AS4->AS3->AS2->AS1.
This list of AS numbers that describe a path to the destination AS is known as the AS-Path attribute. As each AS advertises a prefix to its neighbour, it prepends its AS number to the list. For example, if AS1 were advertising 10/8, it would send the AS-Path of “1″ to AS 2 and 3. AS 2 would then send “2 1″ to AS3. AS3 would send “3 2 1″ to both 1 and 4. AS1 would see the 1 in the AS-Path and know that path would cause a routing loop, so it would discard the route. AS 4, however, would see “3 2 1″ from AS 3 and “2 1″ from AS 4, and likely choose the latter (more on this when we go through the BGP decision algorithm).
Next up, BGP Path attributes. I had intended to do that in this article but it was taking forever, so I’ll close this one up and start fresh.

AS1 advertises a network to both AS2 and AS3. AS2 and AS3 exchange routes, so they know they can go direct to AS1, or via the other guy. AS2 and AS3 announce to AS4 they know how to get to AS1 by their preferred route.
BGP is policy based. This means that in the situation above, AS2 can choose to send all traffic to AS1 via AS3, rather than direct. However, AS1 makes its own decision on how to return. AS2 can try to influence AS1, but has no absolute control.
Likewise, if both AS2 and AS3 advertise to AS4 that they know how to get to AS1, AS4 has the choice of which one it uses. There are not guarantees, however, that the path doesn’t go AS4->AS3->AS2->AS1.

TOP

This list of AS numbers that describe a path to the destination AS is known as the AS-Path attribute. As each AS advertises a prefix to its neighbour, it prepends its AS number to the list. For example, if AS1 were advertising 10/8, it would send the AS-Path of “1″ to AS 2 and 3. AS 2 would then send “2 1″ to AS3. AS3 would send “3 2 1″ to both 1 and 4. AS1 would see the 1 in the AS-Path and know that path would cause a routing loop, so it would discard the route. AS 4, however, would see “3 2 1″ from AS 3 and “2 1″ from AS 4, and likely choose the latter (more on this when we go through the BGP decision algorithm).
Next up, BGP Path attributes. I had intended to do that in this article but it was taking forever, so I’ll close this one up and start fresh.

TOP

AS1 advertises a network to both AS2 and AS3. AS2 and AS3 exchange routes, so they know they can go direct to AS1, or via the other guy. AS2 and AS3 announce to AS4 they know how to get to AS1 by their preferred route.
BGP is policy based. This means that in the situation above, AS2 can choose to send all traffic to AS1 via AS3, rather than direct. However, AS1 makes its own decision on how to return. AS2 can try to influence AS1, but has no absolute control.
Likewise, if both AS2 and AS3 advertise to AS4 that they know how to get to AS1, AS4 has the choice of which one it uses. There are not guarantees, however, that the path doesn’t go AS4->AS3->AS2->AS1.

TOP

Like IP address space, the issuing of AS numbers is controlled by a registry, in this case, the American Registry for Internet Numbers (ARIN). They have a series of policies governing the issuing of the numbers. There are also private AS numbers, from 64512 (0xFC00) to 65535 (0xFFFF). Your provider will have to strip these off, since they’re not allowed on the Internet.
In general, to get an AS number, you have to be multihomed. If not, you have to prove your routing policy is different then that of your peer.
Once you’ve filled out the application form and paid your fee, you get your number.

TOP

返回顶部
CopyRight © 2009 CCNA Live

Powered by Discuz! 7.2 © 2008 Comsenz Inc.

Contact Us - Clear Cookies - Stats - Archiver - WAP

GMT+8, 2018-4-23 04:06.