TTR Networks

What is AS?

Autonomous System

An AS (Autonomous System) is a network, or group of networks, run by one organisation with a single routing policy towards the rest of the internet.

Every AS is identified by an autonomous system number (ASN), and that number is what BGP uses to describe where routes come from and how they travelled. When an AS announces a prefix such as 203.0.113.0/24, each AS that passes the route on adds its own number to the AS_PATH, so a path like 64500 64496 reads "via AS64500, originated by AS64496". Routers use that list to detect loops (a router rejects a route that already contains its own ASN) and as one of the tie-breakers when choosing a best path. ASNs were originally 16-bit numbers; they were extended to 32 bits (RFC 6793) when the 16-bit pool ran low. Public ASNs come from the Regional Internet Registries, and private ranges exist for networks that never appear on the public internet.

The word "autonomous" is about control, not size. An AS can be a global carrier with thousands of routers or a small business with two, as long as one party decides what it announces and accepts. Inside an AS, an IGP such as OSPF finds paths between the organisation's own routers, and iBGP spreads external routes between them. Between ASes, eBGP carries routes and policy. A common confusion is to think every customer of an ISP has its own AS: most don't. You need one when you connect to more than one provider with your own policy (multi-homing); a single-homed customer simply lives inside the provider's AS. The BGP Fundamentals lesson explains AS numbering, eBGP and iBGP, and builds sessions between ASes in a lab.

Lessons that use AS

  • BGP FundamentalsTeaches this term · Intermediate · 75 min

    How the Border Gateway Protocol glues the internet together: autonomous systems, sessions, path attributes, best-path selection, iBGP scaling and a hands-on eBGP lab with real FRR configuration.

  • RPKI and Route Origin ValidationIntermediate · 70 min

    Cryptographically signed routing origins: the RPKI trust chain, creating safe ROAs, Valid/Invalid/NotFound, validators and RTR, a real FRR + StayRTR lab, and what ROV can't stop (forged origins, leaks), plus where ASPA comes in.

  • Setting up VyOS with basic BGPIntermediate · 50 min

    Build a VyOS edge router from scratch: one upstream transit provider, one Internet Exchange route server, and the import and export policy that keeps both safe. Every command and output comes from a real VyOS lab.

  • Debugging BGP: every session state, reproducedIntermediate · 60 min

    Break a working BGP lab a dozen ways and learn to read each failure: Idle, Connect, Active and OpenSent, max-prefix, firewalls, wrong AS, TTL, hold timers, missing policy and unreachable next hops, all with real FRR output and packet captures.

  • BGP communities, prepending and RTBHIntermediate · 45 min

    Tag routes with large communities, steer inbound traffic with AS-path prepending (and see why providers' local preference limits it), and stop a DDoS at your provider's edge with remotely triggered blackholing. Built on VyOS with two transit providers, including the two RTBH mistakes the lab made first.

  • Edge and core: building out a VyOS networkIntermediate · 60 min

    Split one BGP router into edge routers that face the outside world and a core that carries traffic inside: loopbacks, OSPF for infrastructure, iBGP between loopbacks, next-hop-self, and what happens when a link fails. Built and broken on three real VyOS routers.

  • IRR, RPSL and AS-SETsIntermediate · 60 min

    How networks publish what they announce and how their neighbours turn it into filters: Internet Routing Registries, whois queries, RPSL objects and attributes, AS-SET expansion, bgpq4, and the pitfalls of unsigned routing data.

  • Route reflectors on VyOSIntermediate · 30 min

    Replace an iBGP full mesh with route reflectors: see iBGP refuse to pass routes on, turn on reflection, read ORIGINATOR_ID and CLUSTER_LIST, confirm the reflector stays out of the forwarding path, and survive taking one reflector down.

Related terms