Skip to main content

FRRouting (FRR)

v0.1.7

Query the local FRRouting daemons via vtysh — BGP summary + neighbors, BFD peers, IP route summary, and interface state — plus one gated mutation: shut a BGP neighbor to drain a node from an anycast VIP and re-advertise to it afterwards. Reads are `show` commands; the drain is policy-gated (risk: high) and its reversal ships beside it.

6 allowed by default 1 need approval by default
Pack ID
frr
Vendor
emisar
OS
linux
Actions
7
Required binaries. Install these on the host before relying on the pack — an action that calls a missing one fails at run time.
vtysh

Install

emisar pack install fetches this pack, re-validates it, and verifies its content hash against the --hash below — the exact bytes this page was rendered against, so a tampered copy is rejected — before copying it into the runner's packs dir. The command reloads a running daemon itself; no manual restart.

on the runner host
sudo emisar pack install frr --hash sha256:1b0fc9e7832ae0edb69c06ee351dd257ffc7c8d6b4252129a5da27d68749c66f

Setup

Queries the local FRR daemons through vtysh — no credentials needed. vtysh needs root or membership in the frrvty group to reach the daemon vty sockets.

Host access

Run these commands yourself on the runner host. Emisar shows and copies setup recipes; it never runs them.

Reach FRR's VTY sockets. The operating-system boundary does not distinguish show from configuration commands.

frr.bgp_summaryfrr.bgp_neighborsfrr.bfd_peersfrr.route_summaryfrr.interfacesfrr.bgp_neighbor_shutdownfrr.bgp_neighbor_no_shutdown

Add the Emisar service user to frrvty

Grant access
sudo usermod -aG frrvty emisar
sudo systemctl restart emisar
Verify access
id -nG emisar | tr ' ' '\n' | grep -Fx frrvty
sudo -u emisar vtysh -c 'show version' >/dev/null

Impact: Every process running as emisar can use VTYSH configuration commands and change FRR's full running configuration, not only the mutation exposed by this pack.

Notes

  • The show actions are read-only; an unconfigured protocol (no BGP, no BFD) returns an empty / 'no process' result rather than failing. bgp_neighbor_shutdown is the drain — risk: high, policy-gated — and bgp_neighbor_no_shutdown reverses it.

Verify it works

Runs frr.bgp_summary, a low-risk read that confirms the pack can reach its target. Run it on the host once the pack is installed; pack install runs it for you.

on the runner host
sudo emisar pack verify frr

Install and configure a pack walks through the whole sequence on a host.

Actions 7 total

View on GitHub
  • frr.bfd_peers exec low Low — read-only or trivially reversible

    vtysh -c "show bfd peers"

    List BFD peer sessions — local/remote state (Up/Down), last diagnostic, and timers.

    View source on GitHub
  • frr.bgp_neighbor_no_shutdown exec medium Medium — changes state, easily reversible

    vtysh -c "router bgp <asn>" -c "no neighbor <peer> shutdown"

    Re-advertise to an administratively shut BGP neighbor via vtysh, bringing this node's prefixes back to that peer — the reverse of frr.bgp_neighbor_shutdown, and how a drained node rejoins an anycast VIP once it is healthy. The change is to the running config only (not persisted). Pair with frr.bgp_summary to confirm the session reaches Established and PfxSnt returns.

    View source on GitHub
  • frr.bgp_neighbor_shutdown exec high High — service-affecting

    vtysh -c "router bgp <asn>" -c "neighbor <peer> shutdown"

    Administratively shut a BGP neighbor session via vtysh, withdrawing every prefix this node advertises to that peer — the governed way to drain a node from an anycast VIP so the upstream ECMP routes around it within a BFD interval. Reversible: re-advertise with `no neighbor <peer> shutdown` once the node is healthy. The change is to the running config only (not persisted), so a daemon restart re-advertises. Pair with frr.bgp_summary to confirm PfxSnt drops to 0 after the drain.

    View source on GitHub
  • frr.bgp_neighbors exec low Low — read-only or trivially reversible

    vtysh -c "show bgp neighbors"

    Show detailed BGP neighbor state — capabilities, timers, and message + prefix counters per peer.

    View source on GitHub
  • frr.bgp_summary exec low Low — read-only or trivially reversible

    vtysh -c "show bgp summary"

    Show BGP neighbor summary — per-peer state/uptime and prefix counts (PfxRcd / PfxSnt). The quick "are my BGP sessions established and exchanging routes?" check.

    View source on GitHub
  • frr.interfaces exec low Low — read-only or trivially reversible

    vtysh -c "show interface brief"

    Show interface brief — admin/protocol status, addresses, and VRF per interface as FRR sees them.

    View source on GitHub
  • frr.route_summary exec low Low — read-only or trivially reversible

    vtysh -c "show ip route summary"

    Show IP route table summary — route and FIB counts grouped by source protocol.

    View source on GitHub