Definition and Fundamentals of an Autonomous System (AS)

1. What is an Autonomous System (AS)?
An Autonomous System (AS) is a group of routers and networks managed by one organization. The routers inside the AS use an Interior Gateway Protocol (IGP), such as OSPF or EIGRP, to exchange routing information.
When the organization needs to exchange routing information with other Autonomous Systems, it commonly uses BGP (Border Gateway Protocol).
For example, an ISP may have many routers across different cities. If these routers are managed under the same routing administration, they can be part of the same AS.
2. Provider Aggregatable (PA) and Provider Independent (PI) Addresses
There are two common types of IP address allocation used in this context.
Provider Aggregatable (PA) Addresses
PA addresses are provided by an ISP. The ISP owns or controls the address allocation and usually decides the routing policy. If an organization uses only its ISP's addresses and does not need independent BGP routing, it generally does not need its own public ASN.
Provider Independent (PI) Addresses
PI addresses are allocated independently of a particular ISP. The organization can keep using the same address space when changing ISPs, subject to routing and allocation requirements. Organizations using PI addresses for multihoming commonly need their own public ASN and BGP connectivity.
3. ASN Ranges and Allocation
An Autonomous System Number (ASN) is a number used to identify an AS in BGP.
ASNs are coordinated globally by IANA and allocated through Regional Internet Registries (RIRs), such as APNIC, ARIN, RIPE NCC, LACNIC, and AFRINIC.
There are two main ASN sizes.
2-byte ASN: A 16-bit number.
4-byte ASN: A 32-bit number.
The commonly used ranges are:
Type | Range |
|---|---|
2-byte public ASN | 1–64,511 |
2-byte private ASN | 64,512–65,534 |
4-byte public ASN | 65,536–4,199,999,999 |
4-byte private ASN | 4,200,000,000–4,294,967,294 |
Some values are reserved for special purposes. The maximum unsigned 32-bit value is 4,294,967,295, but it is not an ordinary assignable ASN.
4. Four-Byte ASN Notation Formats
Four-byte ASNs can be displayed in different formats, depending on the router vendor and configuration.
asplain: Displays the ASN as one decimal number. For example, 65537.
asdot+: Divides the ASN into two numbers separated by a dot. For example, 1.1.
asdot: Uses decimal notation for two-byte ASNs and dotted notation for larger ASNs. For example, 200 and 1.1.
ascolon: Uses a colon instead of a dot in a similar two-part representation. This is uncommon and is not a standard Cisco IOS ASN notation.
5. Converting asplain to asdot+
To convert an asplain ASN into asdot+ format, divide the ASN by 65,536.
High-order value: The integer result of ASN divided by 65,536.
Low-order value: The remainder after dividing by 65,536.
Final format: High-order value . Low-order value.
Example: Convert ASN 7,431,925
Step 1: Divide 7,431,925 by 65,536.
The integer result is 113.
Step 2: Calculate the remainder.
7,431,925 − (113 × 65,536) = 26,357
Step 3: Combine the two values.
The final asdot+ format is 113.26357.
6. The AS_PATH Attribute and BGP Loop Prevention
In the previous section, we learned that an Autonomous System (AS) is a group of routers managed by one organization, and an ASN is used to identify that AS. In BGP, the AS_PATH attribute uses these ASNs to show which Autonomous Systems a route has passed through.
AS_PATH is a Well-Known Mandatory attribute. It helps routers understand a route's path and prevent routing loops.
eBGP: When advertising a route to another AS, the router adds its own ASN to the beginning of the AS_PATH.
iBGP: When advertising a route to another iBGP peer, the router normally does not add its ASN to the AS_PATH.
Locally Originated Routes: A route originated locally in BGP normally starts with an empty AS_PATH.
Loop Prevention: If a router receives a route containing its own ASN in the AS_PATH, it rejects that route to prevent a routing loop.
If AS 65001 later receives the same route with AS_PATH 65003 65002 65001, it detects its own ASN and rejects the route.
7. Ingress Traffic Engineering: AS_PATH Prepending
AS_PATH Prepending is directly related to the AS_PATH attribute explained above. It allows a network administrator to influence how external networks select paths toward their network.
The administrator adds the local ASN multiple times to the beginning of an outbound eBGP advertisement. This makes the advertised AS_PATH longer and may encourage remote networks to choose another path.
For example, if AS 65001 advertises a route normally, the path may appear as:
Normal advertisement: 65001
With prepending: 65001 65001 65001 65001
The additional ASN entries make the path appear longer. However, remote networks may still choose this path because BGP selection depends on other attributes and routing policies as well.
Cisco IOS Configuration Example
This configuration adds three extra instances of ASN 65001 to routes advertised to neighbor 192.0.2.2.
Key point: AS_PATH helps prevent routing loops, while AS_PATH Prepending uses the same attribute to influence incoming traffic. Prepending does not guarantee a particular incoming path.
Discussion
No comments yet. Start the discussion.