Pcornel
Networking · Routing › BGP › BGP Fundamentals

Autonomous System

Cheat sheet · https://pcornel.dk/topic.php?topic=1132

Back to the Topic

Answer

An autonomous system (AS) is a network under one routing policy, identified by an AS number. In BGP, router bgp <asn> sets your own AS and neighbor x remote-as <asn> the peer's; same AS means iBGP, different means eBGP.

Remember

neighbor … remote-as must be the AS the peer really runs, otherwise the peer rejects the OPEN ("peer in wrong AS") and the session never establishes. Same AS as yours = iBGP, different = eBGP. Private ranges: 64512–65534 and 4200000000–4294967294. A router runs one BGP process with one AS number.

First checks

show ip bgp summary → local AS number in the header and the AS column per neighbour. show ip bgp neighbors <ip> | include remote AS → internal link or external link. show logging | include NOTIFICATION → peer in wrong AS.

Commands

router bgp <asn>
Start a BGP process for the local AS.
show ip bgp summary

Verify in this order

local AS (router bgp) → remote-as equals the peer's real AS on both sides → OPEN accepted → Established → link type internal/external → own AS prepended to AS_PATH on eBGP advertisements

Where it usually breaks

underlay/interface reachability → protocol adjacency/session → received/originated state → policy → best path/RIB → FIB/adjacency → traffic path

Autonomous System · routing reference

EvidenceMeaning
Local ASNLocal BGP policy domain
remote-asExpected peer ASN
AS_PATHAS sequence carried with route
Own ASN presentNormal loop-prevention concern

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=1132

Confirmation

Confirm action

Continue?