AS numbers are a limited resource, and not every network has a public one. This lesson covers what the ranges mean, how 4-byte numbers are written, and how a private AS is kept off the internet.
Advanced · 12 min read
You'll learn to identify private and documentation AS ranges, read asplain and asdot numbers, explain AS_TRANS, and use remove-private-as.
AS number ranges
An autonomous system number identifies a network that follows one routing policy. Numbers come in ranges with different uses.
AS number ranges
On small screens, swipe sideways or focus the diagram and use the arrow keys.
Not to scale. This course uses the documentation range, so remove-private-as does not change its example AS numbers.
AS number ranges
On small screens, swipe sideways or focus the diagram and use the arrow keys.
Each item on the left, with what it means on the right.
Writing 4-byte numbers
Two notations exist. Asplain writes the number as one decimal, such as 196613. Asdot writes high and low halves, 3.5, for the same value. Cisco IOS XE shows asplain by default; bgp asnotation dot switches the display. The value on the wire does not change.
Two ways to write a 4-byte AS
On small screens, swipe sideways or focus the diagram and use the arrow keys.
Check which notation a device expects before typing.
router bgp 4200000001
bgp router-id 1.1.1.1
A router using a 32-bit private AS in asplain form. Both neighbours must support the 4-byte capability, or the path shows AS_TRANS to old routers.
A private AS number removed at the edge
On small screens, swipe sideways or focus the diagram and use the arrow keys.
Private ranges are 64512 to 65534 and 4200000000 to 4294967294. remove-private-as is applied towards the public neighbour, on the outbound side.
Hiding a private AS from the internet
A customer may use a private AS toward its provider. The provider must not advertise that private number to the world. remove-private-as strips private numbers from the AS_PATH on routes sent to a neighbour.
remove-private-as: what the ISP sees in the AS_PATH
On small screens, swipe sideways or focus the diagram and use the arrow keys.
R1 removes the private AS number, then adds its own, so the ISP never sees a number it cannot verify.
Applied on the router that sends to the public peer. all removes every private AS in the path; replace-as puts the local AS in their place so the path length stays the same.
Illustrative Cisco IOS XE output written for this lesson, not a router capture
ISP#show ip bgp 198.51.100.0
BGP routing table entry for 198.51.100.0/24, version 3
Paths: (1 available, best #1, table default)
64501 64501
192.0.2.6 from 192.0.2.6 (12.12.12.12)
Origin IGP, metric 0, localpref 100, valid, external, best
The private AS is gone and replaced by the sender's own number, so remote networks see a normal public AS path. Without replace-as the path is shorter, which can change the route's preference.
Which AS number is a documentation value and not for real use?
Predict · scenario 2
An old router sees AS 23456 in a path. What is it?
Predict · scenario 3
What does replace-as add to remove-private-as all?
FAQ
Why did AS numbers grow to 32 bits?
The 16-bit space has 65,535 values and many are taken. RFC 6793 extended the AS number to 32 bits, about 4.29 billion values, and the BGP capability tells neighbours which routers understand it.
What is AS_TRANS?
AS 23456 is a placeholder. A router that cannot read 4-byte numbers sees AS_TRANS in its place, and the real numbers travel in the optional AS4_PATH attribute.
Are the lab AS numbers real?
No. Course AS numbers 64500 to 64511 are the documentation range, reserved for examples.