Реализует 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
24 lines
707 B
Bash
Executable File
24 lines
707 B
Bash
Executable File
#!/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
|