f-57: e2e: gateway calculée dans les scénarios, MAC anycast hors EVPN, scénario s11 de la fenêtre ARP #57

Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
GnomeZworc 2026-10-13 17:13:33 +02:00
commit 7ac57611bb
Signed by: nicolas.boufideline
GPG key ID: 4406BBBF8845D632
12 changed files with 153 additions and 49 deletions

View file

@ -1,7 +1,7 @@
on hv1 <<'NODE'
two_image || { echo "ÉCHOUÉ: image compatible two (hv1)"; exit 0; }
check "hv1 : VPC vp-s8, l3vni 2800" vpc_create vp-s8 10.242.0.0/16 2800
check "hv1 : subnet sn-s8s (VNI 2811)" subnet_create sn-s8s vp-s8 2811 10.242.1.1 10.242.1.0/24
check "hv1 : subnet sn-s8s (VNI 2811)" subnet_create sn-s8s vp-s8 2811 10.242.1.0/24
check "hv1 : VM s8-m1 10.242.1.50" vm_create s8-m1 sn-s8s 10.242.1.50
check "hv1 : s8-m1 répond depuis son netns" netns_ping_wait vp-s8 10.242.1.50
check "hv1 : /24 et /32 exportés par l'agent" sh -c "ip -4 route show vrf vrf-s8 | grep -q '^10.242.1.0/24 via 169.254.0.2' && ip -4 route show vrf vrf-s8 | grep -q '^10.242.1.50 via 169.254.0.2'"
@ -15,7 +15,7 @@ on hv3 <<'NODE'
two_image || { echo "ÉCHOUÉ: image compatible two (hv3)"; exit 0; }
KEY=$(vm_key)
check "hv3 : VPC vp-s8, l3vni 2800" vpc_create vp-s8 10.242.0.0/16 2800
check "hv3 : subnet sn-s8t (VNI 2812), seulement sur hv3" subnet_create sn-s8t vp-s8 2812 10.242.2.1 10.242.2.0/24
check "hv3 : subnet sn-s8t (VNI 2812), seulement sur hv3" subnet_create sn-s8t vp-s8 2812 10.242.2.0/24
check "hv3 : VM observatrice s8-o 10.242.2.10" vm_create s8-o sn-s8t 10.242.2.10 "${KEY}"
check "s8-o joignable" vm_wait vp-s8 10.242.2.10
check "hv3 : aucun VXLAN de sn-s8s sur l'observateur" sh -c "! ip link show vxlan-2811 >/dev/null 2>&1"
@ -33,7 +33,7 @@ check "hv3 : plus aucun /32 pour 10.242.1.50" wait_vrf_nexthops vp-s8 10.242.1.5
check "hv3 : le /24 de sn-s8s reste annoncé par hv1 (filet)" wait_vrf_nexthops vp-s8 10.242.1.0/24 192.168.14.11
NODE
on hv2 <<'NODE'
check "migration simple, 2 — sn-s8s créé sur hv2 (même VNI 2811)" subnet_create sn-s8s vp-s8 2811 10.242.1.1 10.242.1.0/24
check "migration simple, 2 — sn-s8s créé sur hv2 (même VNI 2811)" subnet_create sn-s8s vp-s8 2811 10.242.1.0/24
check "migration simple, 3 — VM s8-m2 10.242.1.50 sur hv2" vm_create s8-m2 sn-s8s 10.242.1.50
check "hv2 : s8-m2 répond depuis son netns" netns_ping_wait vp-s8 10.242.1.50
NODE
@ -52,10 +52,16 @@ check "orchestrée, 2 — VM s8-m3 10.242.1.50 sur hv1 pendant que s8-m2 tourne
check "hv1 : s8-m3 répond depuis son netns" netns_ping_wait vp-s8 10.242.1.50
NODE
on rr1 <<'NODE'
check "rr1 : MAC de gateway de sn-s8s propre à chaque hôte, hv1 (02:03:c0:a8:0e:0b) et hv2 (02:03:c0:a8:0e:0c)" sh -c "r=\$(vtysh -c 'show bgp l2vpn evpn route type macip'); echo \"\$r\" | grep -qi '02:03:c0:a8:0e:0b' && echo \"\$r\" | grep -qi '02:03:c0:a8:0e:0c'"
MAC=$(anycast_mac 2811)
R=$(vtysh -c 'show bgp l2vpn evpn route type macip')
check "rr1 : routes EVPN de type 2 reçues (témoin)" sh -c 'echo "$1" | grep -q "\[2\]:"' _ "${R}"
check "rr1 : aucune route de type 2 pour la MAC anycast de sn-s8s (${MAC}), présente sur hv1 et hv2" sh -c '! echo "$1" | grep -qi "$2"' _ "${R}" "${MAC}"
NODE
on hv1 <<'NODE'
MAC=$(anycast_mac 2811)
check "hv1 : aucune MAC en double sur la VNI 2811" sh -c "! vtysh -c 'show evpn mac vni 2811 duplicate' | grep -qiE '([0-9a-f]{2}:){5}[0-9a-f]{2}'"
check "hv1 : table EVPN de la VNI 2811 non vide (témoin)" sh -c "vtysh -c 'show evpn mac vni 2811' | grep -qiE '([0-9a-f]{2}:){5}[0-9a-f]{2}'"
check "hv1 : MAC anycast ${MAC} absente de la table EVPN de la VNI 2811" sh -c '! vtysh -c "show evpn mac vni 2811" | grep -qi "$1"' _ "${MAC}"
NODE
on hv3 <<'NODE'
for i in $(seq 1 30); do [ "$(bgp_paths vp-s8 10.242.1.50/32)" -ge 2 ] && break; sleep 2; done