Skip to content
ajfPublic

About

The IA_PD for Arista that's Missing in Arista

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

26 Commits

Folders and files

Repository files navigation

miapd

miapd — the IA_PD that's Missing In Arista.

A DHCPv6 Prefix Delegation client daemon for Arista EOS. Point it at an upstream that delegates IPv6 prefixes and your switch renumbers itself: miapd acquires a delegation, hands out smaller allocations to your downstream interfaces, and keeps addressing and router advertisements in sync so hosts autoconfigure — even when the upstream delegation changes.

Design doc: docs/design.md.

Features

  • Acquires a delegated prefix via DHCPv6 (IA_PD) and keeps it renewed
  • Allocates a smaller prefix from the delegation to each configured downstream interface, addressing the switch itself on each
  • Drives EOS's native router advertisements so downstream hosts autoconfigure
  • Migrates gracefully when the delegation changes: new prefix installed first, old one deprecated through a drain window, then withdrawn
  • Survives restarts — resumes its persisted lease without re-soliciting
  • Reports live status in show daemon miapd: client state, delegated prefix, per-interface allocations, last renewal, last error
  • Applies config changes at runtime, no restart needed
  • Ships as a standard SWIX extension

Layout

crates/
  miapd/           binary crate — daemon entrypoint, config, wiring
  miapd-core/      domain types, PrefixPlanner, LeaseStore, EosControl trait
  miapd-dhcp/      DHCPv6 IA_PD client state machine (RFC 8415, dhcproto)
  miapd-eos/       real EosControl impl: SDK backend + eAPI backend
  miapd-eos-sys/   cxx bridge + C++ shim to the EOS SDK (feature-gated)

Requirements

Needed before the first build:

  • Rust >= 1.92.0
  • just for the build recipes
  • For SDK-enabled builds and SWIX packaging: podman, plus the EOS SDK headers and the switch's libeos — see crates/miapd-eos-sys/README.md for the build-container recipe

Known working hardware:

  • Arista DCS-7050SX3-48YC12-F, EOS 4.33.0F, EosSdk 2.23.1

Building

Local development (no EOS SDK required — builds miapd-eos-sys as a stub):

just build
just test
just clippy

Packaging

just package-swix   # → target/swix/miapd-<version>.x86_64.swix

package-swix builds the release binary in the build container, wraps it in an RPM installing /usr/bin/miapd, and produces the SWIX (a stored zip of manifest.txt + the RPM — the same layout the on-switch /usr/bin/swix create tool emits). Install it like any extension:

copy scp:.../miapd-0.1.0-1.x86_64.swix extension:
extension miapd-0.1.0-1.x86_64.swix
copy installed-extensions boot-extensions

Running on a switch

The daemon needs eAPI's local unix-socket endpoint enabled (no network listener required):

management api http-commands
   protocol unix-socket
   no shutdown

Then register it as an EOS daemon (the binary name must not contain dashes — EOS rejects them):

daemon miapd
   exec /usr/bin/miapd
   option upstream-interface value Vlan100
   option prefix-hint-length value 56
   option downstream value Ethernet1:0:1,Ethernet2:1:beef
   option max-drain-seconds value 60
   no shutdown

Don't configure static IPv6 addresses on managed downstream interfaces — they'd displace the delegated address.

License

GPLv3. See LICENSE. The EOS SDK (BSD-3-Clause) and bundled SQLite (public domain) are permissive dependencies compatible with GPLv3.

About

The IA_PD for Arista that's Missing in Arista

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages