A profile-gated GoBGP instance (Compose profile 'evpn-test', not part of the normal stack) that originates synthetic BGP EVPN routes and BMP-exports its local RIB to the collector. Verified end to end: the injected type-2/3/5 routes are parsed by the collector and land on the openbmp.parsed.evpn Kafka topic, ready for the EVPN consumer. inject-evpn.sh pushes type-2 (MAC/IP), type-3 (inclusive multicast) and type-5 (IP-prefix) routes. Start with: docker compose --profile evpn-test up -d gobgp-evpn Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
33 lines
1.5 KiB
Bash
Executable File
33 lines
1.5 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
#
|
|
# inject-evpn.sh -- push synthetic BGP EVPN routes into the gobgp-evpn
|
|
# instance so the EVPN ingestion pipeline can be tested end to end.
|
|
#
|
|
# Run from the docker host after starting the injector:
|
|
# docker compose --profile evpn-test up -d gobgp-evpn
|
|
# bash gobgp-evpn/inject-evpn.sh
|
|
#
|
|
# Routes land in gobgp-evpn's local RIB and are BMP-exported to the collector
|
|
# (route-monitoring-policy = local-rib), parsed onto the openbmp.parsed.evpn
|
|
# Kafka topic. Re-running is harmless (GoBGP de-dupes identical routes).
|
|
|
|
set -euo pipefail
|
|
G=(docker exec obmp-gobgp-evpn gobgp global rib add -a evpn)
|
|
|
|
echo "Injecting EVPN type-2 (MAC/IP advertisement) routes..."
|
|
"${G[@]}" macadv aa:bb:cc:00:00:01 10.200.10.1 etag 100 label 10100 rd 65010:100 rt 65010:100 encap vxlan
|
|
"${G[@]}" macadv aa:bb:cc:00:00:02 10.200.10.2 etag 100 label 10100 rd 65010:100 rt 65010:100 encap vxlan
|
|
"${G[@]}" macadv aa:bb:cc:00:00:03 10.200.20.1 etag 200 label 10200 rd 65010:200 rt 65010:200 encap vxlan
|
|
|
|
echo "Injecting EVPN type-3 (inclusive multicast) routes..."
|
|
"${G[@]}" multicast 10.40.40.251 etag 100 rd 65010:100 rt 65010:100
|
|
"${G[@]}" multicast 10.40.40.251 etag 200 rd 65010:200 rt 65010:200
|
|
|
|
echo "Injecting EVPN type-5 (IP prefix) routes..."
|
|
"${G[@]}" prefix 10.210.10.0/24 gw 10.40.40.251 etag 0 label 10210 rd 65010:210 rt 65010:210 encap vxlan
|
|
"${G[@]}" prefix 10.210.20.0/24 gw 10.40.40.251 etag 0 label 10220 rd 65010:220 rt 65010:220 encap vxlan
|
|
|
|
echo
|
|
echo "Current EVPN RIB on gobgp-evpn:"
|
|
docker exec obmp-gobgp-evpn gobgp global rib -a evpn
|