f-87: e2e: bordures bd1 et bd2 dans evpn-3hv, VNI 66001, gateway anycast #87
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
parent
8429dfd7e1
commit
811e69dac2
5 changed files with 74 additions and 0 deletions
|
|
@ -127,6 +127,18 @@ un subnet créé avec ``mode: bridge`` et ``iface_type: lan`` rattache son veth
|
||||||
subnets ``vxlan`` (``iface_type: vms``, clé absente) restent sur ``default_interface`` : le VTEP
|
subnets ``vxlan`` (``iface_type: vms``, clé absente) restent sur ``default_interface`` : le VTEP
|
||||||
ne change pas. Le bridge n'est créé qu'au premier démarrage, comme le reste du provisionnement.
|
ne change pas. Le bridge n'est créé qu'au premier démarrage, comme le reste du provisionnement.
|
||||||
|
|
||||||
|
**Bordures (``evpn-3hv``, #87).** ``bd1`` et ``bd2`` (``192.168.14.21`` et ``.22``) jouent les
|
||||||
|
routeurs de bordure du segment public. Ce sont des nœuds ``host`` sans agent : leur provision
|
||||||
|
(``test/e2e/topologies/provision/border.sh``) crée ``br-public``, y accroche ``vxlan-66001``
|
||||||
|
(VNI 66001, VTEP = adresse de l'underlay, ``nolearning``), et pose sur le bridge la **gateway
|
||||||
|
anycast** ``240.0.0.1/24`` avec la même MAC sur les deux, ``02:01:00:01:01:d1`` (la MAC anycast
|
||||||
|
de two pour le VNI 66001), ainsi qu'une destination de test ``240.255.0.1/32`` sur une interface
|
||||||
|
``dummy`` ``internet``. Leur ``frr.conf`` est celui d'un hyperviseur : iBGP AS 64600 vers les
|
||||||
|
deux route reflectors, ``advertise-all-vni``. Les adresses publiques du lab sont prises dans
|
||||||
|
``240.0.0.0/4``, réservée (RFC 1112, registre RFC 6890) et jamais routée sur Internet. Les bordures
|
||||||
|
sont déclarées après les hyperviseurs : les adresses et les taps de l'underlay ne changent pas,
|
||||||
|
ceux du segment ``lan`` sont renumérotés.
|
||||||
|
|
||||||
**Tester l'arbre courant plutôt que la release.** ``test/e2e/build.sh`` compile ``agent``,
|
**Tester l'arbre courant plutôt que la release.** ``test/e2e/build.sh`` compile ``agent``,
|
||||||
``dhcp`` et ``metadata`` pour linux/amd64 dans ``test/e2e/topologies/bin/`` (ignoré par git),
|
``dhcp`` et ``metadata`` pour linux/amd64 dans ``test/e2e/topologies/bin/`` (ignoré par git),
|
||||||
que les hyperviseurs reçoivent par ``files: {bin: bin}``. Après ``deploy.sh``,
|
que les hyperviseurs reçoivent par ``files: {bin: bin}``. Après ``deploy.sh``,
|
||||||
|
|
|
||||||
|
|
@ -48,3 +48,9 @@ nodes:
|
||||||
addresses: { underlay: 192.168.14.13 }, frr: frr/hv3.conf, provision: provision/hypervisor.sh,
|
addresses: { underlay: 192.168.14.13 }, frr: frr/hv3.conf, provision: provision/hypervisor.sh,
|
||||||
post_provision: provision/hypervisor-post.sh, files: { agent.yml: agent/dnsmasq.yml, bin: bin },
|
post_provision: provision/hypervisor-post.sh, files: { agent.yml: agent/dnsmasq.yml, bin: bin },
|
||||||
services: [agent.service] }
|
services: [agent.service] }
|
||||||
|
bd1:
|
||||||
|
{ role: host, image: debian12, cpus: 1, memory: 1024, segments: [underlay],
|
||||||
|
addresses: { underlay: 192.168.14.21 }, frr: frr/bd1.conf, provision: provision/border.sh }
|
||||||
|
bd2:
|
||||||
|
{ role: host, image: debian12, cpus: 1, memory: 1024, segments: [underlay],
|
||||||
|
addresses: { underlay: 192.168.14.22 }, frr: frr/bd2.conf, provision: provision/border.sh }
|
||||||
|
|
|
||||||
19
test/e2e/topologies/frr/bd1.conf
Normal file
19
test/e2e/topologies/frr/bd1.conf
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
frr defaults traditional
|
||||||
|
hostname bd1
|
||||||
|
log syslog informational
|
||||||
|
!
|
||||||
|
router bgp 64600
|
||||||
|
bgp router-id 192.168.14.21
|
||||||
|
no bgp default ipv4-unicast
|
||||||
|
neighbor fabric peer-group
|
||||||
|
neighbor fabric remote-as 64600
|
||||||
|
neighbor fabric capability extended-nexthop
|
||||||
|
neighbor 10.255.255.1 peer-group fabric
|
||||||
|
neighbor 10.255.255.2 peer-group fabric
|
||||||
|
!
|
||||||
|
address-family l2vpn evpn
|
||||||
|
neighbor fabric activate
|
||||||
|
advertise-all-vni
|
||||||
|
exit-address-family
|
||||||
|
exit
|
||||||
|
!
|
||||||
19
test/e2e/topologies/frr/bd2.conf
Normal file
19
test/e2e/topologies/frr/bd2.conf
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
frr defaults traditional
|
||||||
|
hostname bd2
|
||||||
|
log syslog informational
|
||||||
|
!
|
||||||
|
router bgp 64600
|
||||||
|
bgp router-id 192.168.14.22
|
||||||
|
no bgp default ipv4-unicast
|
||||||
|
neighbor fabric peer-group
|
||||||
|
neighbor fabric remote-as 64600
|
||||||
|
neighbor fabric capability extended-nexthop
|
||||||
|
neighbor 10.255.255.1 peer-group fabric
|
||||||
|
neighbor 10.255.255.2 peer-group fabric
|
||||||
|
!
|
||||||
|
address-family l2vpn evpn
|
||||||
|
neighbor fabric activate
|
||||||
|
advertise-all-vni
|
||||||
|
exit-address-family
|
||||||
|
exit
|
||||||
|
!
|
||||||
18
test/e2e/topologies/provision/border.sh
Executable file
18
test/e2e/topologies/provision/border.sh
Executable file
|
|
@ -0,0 +1,18 @@
|
||||||
|
#!/bin/sh
|
||||||
|
set -eu
|
||||||
|
VNI=66001
|
||||||
|
GATEWAY=240.0.0.1/24
|
||||||
|
GATEWAY_MAC=02:01:00:01:01:d1
|
||||||
|
DESTINATION=240.255.0.1/32
|
||||||
|
VTEP=$(ip -4 -o addr show dev "${LAB_UPLINK}" scope global | awk 'NR == 1 {sub("/.*", "", $4); print $4}')
|
||||||
|
[ -n "${VTEP}" ] || { echo "border: no IPv4 on ${LAB_UPLINK}" >&2; exit 1; }
|
||||||
|
ip link add br-public type bridge
|
||||||
|
ip link set br-public address "${GATEWAY_MAC}"
|
||||||
|
ip link add "vxlan-${VNI}" type vxlan id "${VNI}" local "${VTEP}" dstport 4789 nolearning
|
||||||
|
ip link set "vxlan-${VNI}" mtu 1500 master br-public
|
||||||
|
ip link set "vxlan-${VNI}" up
|
||||||
|
ip link set br-public up
|
||||||
|
ip addr add "${GATEWAY}" dev br-public
|
||||||
|
ip link add internet type dummy
|
||||||
|
ip addr add "${DESTINATION}" dev internet
|
||||||
|
ip link set internet up
|
||||||
Loading…
Add table
Add a link
Reference in a new issue