Skip to content

BIRD-Config nach Ansible (ffc-mash) auslagern - #9

Open
oliverlorenz wants to merge 1 commit into
feat/static-bird-country-routesfrom
feat/bird-config-to-ansible
Open

BIRD-Config nach Ansible (ffc-mash) auslagern#9
oliverlorenz wants to merge 1 commit into
feat/static-bird-country-routesfrom
feat/bird-config-to-ansible

Conversation

@oliverlorenz

@oliverlorenz oliverlorenz commented Sep 1, 2026

Copy link
Copy Markdown
Member

Baut auf #8 auf (Country-Routen statisch) und zieht den nächsten Schritt: die
komplette BIRD-/BIRD6-Konfiguration wandert von diesen Skripten ins Ansible-Playbook
ffc-mash (Rolle ffc_vpn_gateway) –
Gegenstück: FreifunkChemnitz/ffc-mash#70. Voraussetzung u. a. für ffc-mash#55
(Abkündigung routing-backend / api.chemnitz.freifunk.net).

Was sich ändert

lib/bird.sh / lib/bird6.sh rendern nicht mehr zur Laufzeit conf/*.local.conf per
sed und starten bird/bird6 nicht mehr von Hand. Stattdessen:

  • lib/bird.sh / lib/bird6.sh: nur noch Policy-Routing (ip rule → Tabelle 100)
    und NAT (iptables MASQUERADE). bird_start/bird_stop delegieren an systemctl.
    Entfernt: bird_add_peer, bird_add_route, bird_check_route,
    bird_render_country_routes (+ IPv6-Pendants) und das komplette sed-Templating.
  • lib/radvd.sh: die ::/0-Default-Route in BIRD6 kommt jetzt aus der Ansible-Rolle
    (ffc_vpn_gateway_bird_ipv6_uplink).
  • conf/: bird.conf, bird6.conf, bird-peers.conf, bird-routes.conf und
    conf/routes/ gelöscht; COUNTRY/WANGW aus general.conf; .gitignore aufgeräumt.
  • docs/ + README.md: Architektur, Backbone-Netzwerk, Betrieb, Komponenten,
    Sicherheitsmodell und IP-Adressplan auf die neue Aufteilung angepasst.

Die BIRD-Config selbst (Router-ID/ASN aus der öffentlichen IPv4, BGP-Peers aus der
Inventory-Gruppe routers, Mesh-Route, Länder-/Ausnahmerouten) wird von der Rolle nach
/etc/bird/ gerendert; bird/bird6 laufen als von Ansible verwaltete systemd-Dienste.

Deploy-Reihenfolge ⚠️

Die Rolle klont dieses Repo mit version: chemnitz. Dieser PR muss auf chemnitz
gemerged sein, bevor
die neue ffc_vpn_gateway-Rolle deployt wird – sonst kämpfen
altes bird_init/bird -c und die Ansible-bird.service um Kernel-Tabelle 100.

Test

  • Templates der Rolle gegen echtes Inventory gerendert (archimedes, hawking): Router-ID,
    ASN, alle BGP-Sessions, <WANIP>/32, Mesh-Route und _global.conf-Länderrouten stimmen
    zeilenweise mit dem bisherigen lib/bird.sh-Output überein.
  • bash -n lib/bird.sh lib/bird6.sh lib/radvd.sh ok.
  • Offen: bird -p / birdc show protocols auf einem echten Gateway nach dem Deploy.

🤖 Generated with Claude Code

Die BIRD-/BIRD6-Konfiguration wird nicht mehr zur Laufzeit von lib/bird.sh /
lib/bird6.sh aus conf/bird*.conf per sed gerendert, sondern vom Ansible-Playbook
ffc-mash (Rolle ffc_vpn_gateway) nach /etc/bird/ deployt; bird/bird6 laufen
jetzt als von Ansible verwaltete systemd-Dienste.

- lib/bird.sh / lib/bird6.sh: nur noch Policy-Routing (Tabelle 100) + NAT;
  bird_start/bird_stop delegieren an systemctl. Config-Rendering, BGP-Peer- und
  Routen-Funktionen sowie das Country-Route-Rendering entfernt.
- lib/radvd.sh: die ::/0-Default-Route in BIRD6 kommt jetzt aus der Rolle
  (ffc_vpn_gateway_bird_ipv6_uplink).
- conf/: bird.conf, bird6.conf, bird-peers.conf, bird-routes.conf und conf/routes/
  entfernt; COUNTRY/WANGW aus general.conf raus; .gitignore aufgeräumt.
- docs/: Architektur, Backbone, Betrieb, Komponenten, Sicherheitsmodell,
  IP-Adressplan und README auf die neue Aufteilung angepasst.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011ZtqGKZgfboGn2VEZzAhsY
@oliverlorenz oliverlorenz self-assigned this Sep 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant