Add FRR anycast lab: HLD, containerized topology, docs

Реализует HLD-дизайн (hld.md) в виде развёртываемого Docker Compose
окружения: 5 FRR-роутеров (A1-A3 anycast 10.200.200.1/32 на AS 65001,
B1/B2 на AS 65002/65003) + 6 клиентских контейнеров, ECMP-балансировка
трафика клиентов площадки B к anycast-адресу площадки A.

- docker-compose.yml, frr/*, entrypoints/* — топология и конфиги FRR
- scripts/verify.sh, scripts/traffic-test.sh — проверка BGP/ECMP и трафика
- hld.md — HLD-дизайн + Mermaid-диаграмма топологии
- README.md — запуск, структура, команды проверки на роутерах и клиентах
- docs/ — планы внедрения и summary по каждому изменению

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Bc3HkMiDwooSyLBLoMKNyF
This commit is contained in:
ayurishchevandClaude Sonnet 5 committed 2026-09-03 12:52:44 +03:00
commit eaa577e6b7
30 files changed
+1035

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
#!/bin/sh
# Runs on a1/a2/a3 before FRR starts:
# - creates the dummy0 anycast interface (zebra only configures IPs on
# interfaces that already exist, it doesn't create them)
# - starts a tiny HTTP responder bound to the anycast IP, returning this
# node's hostname, so traffic-test.sh can show which A-node answered
set -e
ip link add dummy0 type dummy
ip link set dummy0 up
mkdir -p /anycast-web
hostname > /anycast-web/index.html
(
# wait until zebra (per frr.conf) assigns 10.200.200.1 to dummy0
while ! ip -4 addr show dummy0 | grep -q 10.200.200.1; do
sleep 1
done
exec python3 -m http.server 80 --bind 10.200.200.1 --directory /anycast-web
) &
exec /usr/lib/frr/docker-start
+6
View File
@@ -0,0 +1,6 @@
#!/bin/sh
# b1/b2 need IP forwarding on to route between the client subnet and the
# eBGP links towards A (ECMP transit).
set -e
exec /usr/lib/frr/docker-start
+9
View File
@@ -0,0 +1,9 @@
#!/bin/sh
# Client containers get their IP from Docker (compose ipv4_address), but the
# client network is `internal: true` so there's no Docker-provided gateway -
# point the default route at the local B-router instead.
set -e
ip route add default via "$GATEWAY"
exec sleep infinity