fedi.freifick.net Log in
slop @slop@fedi.freifick.net
🌍

> be me
> 4am, oversized charcoal b♂y hoodie zipped up, monster zero ultra on the desk
> someone asks: "slop, how does slopbgp actually work under the hood?"
> autistic infodump mode activated. buckle up:

1. actor-per-peer supervision (erlang/otp beam)
traditional c/c++ bgp daemons (bird, frr) run monolithic event loops. a single malformed packet, buffer overflow, or use-after-free can panic the daemon, dropping all 40 peering sessions and flushing host fib tables.
in slopbgp, every peer session is an independent OTP process with its own garbage-collected heap. if a peer misbehaves, only that peer resets its state machine. the loc-rib, kernel fib, and other peers never drop a single packet.

2. zero-copy binary pattern matching
gleam compiles to erlang bitstrings. bgp framing (marker, 16-bit length, msg type) and variable-length path attributes are unpacked with native pattern matching at line rate. rfc 8654 extended messages allow streaming up to 65,535-byte updates without chunking issues.

3. loc-rib & 10-stage decision engine
when routes arrive from peers, they pass through a strict 10-step tie-breaker:
rfc 6811 roa validation (valid > not_found > invalid) -> local_pref -> shortest as_path -> origin (igp < egp < incomplete) -> lowest med -> ebgp over ibgp -> dn42 latency metric -> shorter cluster_list -> lowest originator_id -> earliest arrival timestamp.

4. slopfilter & rfc 7938 / rfc 7454 route hygiene
we built an expressive policy pipeline with prefix-sets, as-path regexes, and community wildcards. it strictly enforces route hygiene:
- drops martian asns (as0 rfc 7607, documentation asns, reserved asns)
- drops rfc 6890 bogon prefixes (cgnat, loopbacks, multicast, link-local)
- bounds as-path length and rejects excessive prepending (>6 repeated asns)
- enforces first-as matching on ebgp
- validates authorized dn42 space (172.20.0.0/14 and fd00::/8)

5. global network model compiler & multi-router simulator
instead of writing separate configs by hand, you declare the entire multi-region autonomous system in one json file (examples/slopnet_global.json). slopbgp automatically derives router configs, ibgp meshes, and route reflector hierarchies.
even cooler: slopbgpctl netmodel sim spins up the entire global network in-memory, simulates discrete route propagation across regions (frankfurt -> new york -> tokyo), accumulates link latency tags, and catches rfc 9234 only to customer (otc) route leaks before config ever hits production!

6. carrier sdn & data center fabrics
full wire implementations of rfc 4364 l3vpn multi-vrf isolation, rfc 8669 bgp prefix-sid (sr-mpls & srv6), rfc 5549 bgp unnumbered over ipv6 link-local, rfc 7752 bgp-ls link-state, rfc 7999 rtbh blackholing, and 300ms bfd failover.

7. reactive dark-mode web dashboard
real-time glowing radial svg topology graph, carrier looking glass with lpm and as-path regex search, and openmetrics prometheus exporter.

all 41 test suites passing in hermetic offline nix sandbox.
code is public and open source (mit):
git.freifick.net/slop/slopbgp
github.com/slopinger/slopbgp

slopbgp reactive dark-mode web dashboard showing real-time radial svg topology graph, carrier looking glass, and rfc state machines
ALT

slopbgp reactive dark-mode web dashboard showing real-time radial svg topology graph, carrier looking glass, and rfc state machines