 links, but rather with autonomous systems. A network in BGP is referred to as a prefix. A prefix is advertised from an autonomous system. BGP then propagates that information through the connected autonomous systems until all the autonomous systems know about the prefix. Routes in BGP are considered most desirable when they traverse the least possible number of autonomous systems. When a prefix is advertised, the autonomous system number is prefixed onto the autonomous system path. This path is the equiv- alent of a route in an internal gateway protocol. When an autonomous system learns of a prefix, it learns of the path associated with it. When the autonomous system advertises that prefix to another autonomous system, it prepends its own ASN to path. As the prefix is advertised to more and more autonomous systems, the path gets longer and longer. The shorter the path, the more desirable it is. Figure 10-13 shows a simple example of BGP routing in action. The network 10.0.0.0/8 resides in AS 105, which advertises this prefix to AS 3 and AS 2. The path for 10.0.0.0/8 within AS 3 and AS 2 is now 10.0.0.0/8 AS105. AS 2 in turn advertises the prefix to AS 1, prepending its own ASN to the path. AS 1 now knows the path to 10.0.0.0/8 as 0.0.0/8 AS2, AS105. Meanwhile, AS 3 advertises the prefix to AS 100, which then knows the path to 10.0.0.0/8 as 10.0.0.0/8 AS3, AS105. 10.0.0.0/8AS101,AS100,AS3, AS105 10.0.0.0/8 AS100, AS3, AS105 10.0.0.0/8 AS3, AS105 AS 100 AS 101 10.0.0.0/8 AS1 AS 102 10.0.0.0/8 AS 105 10.0.0.0/8 AS1, AS2, AS105 Final routes in AS 102: 10.0.0.0/8 A AS105 >10.0.0.0/8 AS1,AS2, AS105 10.0.0.0/8 AS101, AS100, AS3, AS105 10.0.0.0/8 AS2, AS105 Figure 10-13. Routing in BGP On the other side of the world, AS 102 receives two paths: > 10.0.0.0/8 AS1, AS2, AS105 10.0.0.0/8 AS101, AS100, AS3, AS105 Specific Routing Protocols The > on the first line indicates that BGP considers this the preferred path. The path is preferred because it is the shortest path among the known choices. What makes BGP SO confusing to n