Automated validation tool for onboarding a new member AS (Autonomous System) onto an IXP (Internet Exchange Point) route-server fabric. It stands up a sandbox of BIRD route servers and fake-AS test VMs, configures the candidate peer, brings up its BGP sessions, and runs a series of checks before the AS is promoted to production.
The script (validateAS.php) is driven by a data.json file describing the
candidate member, then performs the following stages:
- Load & validate input — reads
data.json(ASN, name, peer IPs, announced prefix lists, test IPs) and validates every value (IP format, sanitized name, integer ASN) before it is interpolated into shell commands or BGP config. - Reset sandbox — restores every BIRD route server to its
bird.conf.templatebaseline and restarts thebirdservice; waits until all existing BGP sessions settle (up/Active). - Generate & deploy BGP config — builds the per-AS BIRD stanza (tables,
import/export filters with RPKI, AS-path, first-AS, next-hop hijack and prefix-
length checks, import limit of 10) for both IPv4 and IPv6 route servers, ships it
via
rsync, restarts BIRD, and clears the BGP log. - Wait for session establishment — polls
birdc show protocolsfor up to ~120s per route server until the newpb_0099_as<ASN>session isup. - Route accounting — reads
Import updates:counters and fails on any rejected / filtered / ignored route, or more than 10 accepted routes. - Route-leak detection — verifies every accepted route originates from the
expected
[AS<ASN>i]; any other AS in the table is reported as a leak. - Visibility & reachability from fake ASes — from each fake-AS test VM, checks the kernel routing table shows exactly the announced v4/v6 prefix ranges (no missing, no extra), then pings each declared test IP via the fake-AS source address.
- Traffic capture — runs
tcpdumpon every VM during the test; any non-BGP / non-ARP / out-of-prefix traffic (multicast, broadcast, leaks) fails the run. - Final check & teardown — re-verifies all BGP sessions are still healthy,
stops the captures, and either reports an error or prints
todo los preubas estan OK, contactar el admin para pasar a production.
{
"name": "NAME",
"asn": 132456,
"ipv4rangelist": [],
"ipv6rangelist": ["2000::/48"],
"ipv4list": [],
"ipv6list": [],
"peer4": "172.23.255.255",
"peer6": "2803:1920:0:1::ffff"
}| Field | Description |
|---|---|
name |
Member display name (sanitized, [A-Za-z0-9 ._-] only). |
asn |
Member ASN (cast to int). |
peer4/peer6 |
Member's BGP peering IPs on the IXP VLAN. |
ipv4rangelist / ipv6rangelist |
Announced prefix ranges to validate. |
ipv4list / ipv6list |
Individual test IPs to ping from the fake ASes. |
- PHP with
exec()/ SSH /rsyncaccess. - Password-less SSH (
root@) to every route server and fake-AS VM. - BIRD route servers exposing
/etc/bird/bird.conf.template. systemdservices:bird,tcpdump.
See LICENSE.
