TTR Networks

What is RPSL?

Routing Policy Specification Language

RPSL (Routing Policy Specification Language) is the plain-text format Internet Routing Registries use to describe routes, AS numbers and routing policy.

RPSL is defined in RFC 2622, with IPv6 support added by RFC 4012. Every record is an object: a block of attribute: value lines, one per line, separated from the next object by a blank line. The first attribute names the object's class and holds its primary key, so an object beginning route: 192.0.2.0/24 is a route object for that prefix. The most important classes for routing are:

  • route and route6: a prefix and the AS allowed to originate it, in the origin: attribute (for example origin: AS64496).
  • aut-num: an autonomous system, optionally describing its import and export policy.
  • as-set: a named group of ASNs and other sets, such as AS-EXAMPLE, used to describe a network and its customers.
  • mntner: the maintainer object that controls who may change other objects, referenced through mnt-by:.

Every object also records its source:, the registry it lives in. RIR databases use the same format for allocation objects such as inetnum.

Network engineers meet RPSL whenever they query an IRR with whois, register a new prefix before announcing it, or add a customer to their AS-SET. Tools such as bgpq4 read these objects and turn them into router filters. RPSL can express detailed policy in aut-num import and export lines, but in practice few networks keep those accurate, and most filters are built from route objects and as-sets alone. Remember that RPSL objects are just text in a database, not signed proof of anything; that is the gap RPKI addresses. The IRR, RPSL and AS-SETs lesson takes apart each object class with real whois queries.

Lessons that use RPSL

  • IRR, RPSL and AS-SETsTeaches this term · Intermediate · 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.

  • Linux Network ConnectivityBeginner · 80 min

    Find out why a Linux machine can't reach something, layer by layer: interfaces and addresses, routes and ip route get, ARP and the neighbour table, ping and traceroute, DNS, and listening sockets — with real output from a three-host lab.

Related terms