Add modular gobgp-evpn EVPN test-route injector (roadmap E5)
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>
This commit is contained in:
parent
2d83d6c02e
commit
f7532b62ef
@ -450,6 +450,22 @@ services:
|
|||||||
- ./gobgp:/config
|
- ./gobgp:/config
|
||||||
command: ["gobgpd", "-f", "/config/gobgpd.conf", "-t", "toml"]
|
command: ["gobgpd", "-f", "/config/gobgpd.conf", "-t", "toml"]
|
||||||
|
|
||||||
|
# GoBGP -- modular EVPN test-route injector (roadmap E5). Profile-gated, so
|
||||||
|
# it is NOT part of the normal stack. Originates synthetic BGP EVPN routes
|
||||||
|
# and BMP-exports them so the EVPN pipeline can be exercised. Start only for
|
||||||
|
# testing: docker compose --profile evpn-test up -d gobgp-evpn
|
||||||
|
# then: bash gobgp-evpn/inject-evpn.sh
|
||||||
|
gobgp-evpn:
|
||||||
|
restart: unless-stopped
|
||||||
|
container_name: obmp-gobgp-evpn
|
||||||
|
profiles: ["evpn-test"]
|
||||||
|
image: jauderho/gobgp:v4.5.0
|
||||||
|
depends_on:
|
||||||
|
- collector
|
||||||
|
volumes:
|
||||||
|
- ./gobgp-evpn:/config
|
||||||
|
command: ["gobgpd", "-f", "/config/gobgpd.conf", "-t", "toml"]
|
||||||
|
|
||||||
whois:
|
whois:
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
container_name: obmp-whois
|
container_name: obmp-whois
|
||||||
|
|||||||
38
gobgp-evpn/README.md
Normal file
38
gobgp-evpn/README.md
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
# gobgp-evpn — modular EVPN test-route injector
|
||||||
|
|
||||||
|
A **profile-gated, non-production** GoBGP instance for exercising the EVPN
|
||||||
|
ingestion pipeline (roadmap E5). The CML IOS-XR lab cannot originate EVPN
|
||||||
|
routes, so this container synthesises them.
|
||||||
|
|
||||||
|
## What it does
|
||||||
|
|
||||||
|
`gobgp-evpn` runs GoBGP with no BGP peers, BMP-exporting its local RIB
|
||||||
|
(`route-monitoring-policy = local-rib`) to the OpenBMP collector. Routes
|
||||||
|
injected with `inject-evpn.sh` are parsed by the collector and published to
|
||||||
|
the `openbmp.parsed.evpn` Kafka topic, where the EVPN consumer picks them up
|
||||||
|
and writes the `evpn_rib` table.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
```sh
|
||||||
|
# start the injector (not started by a normal `docker compose up`)
|
||||||
|
docker compose --profile evpn-test up -d gobgp-evpn
|
||||||
|
|
||||||
|
# push synthetic type-2 / type-3 / type-5 EVPN routes
|
||||||
|
bash gobgp-evpn/inject-evpn.sh
|
||||||
|
|
||||||
|
# inspect what GoBGP holds
|
||||||
|
docker exec obmp-gobgp-evpn gobgp global rib -a evpn
|
||||||
|
|
||||||
|
# stop it when done testing
|
||||||
|
docker compose --profile evpn-test stop gobgp-evpn
|
||||||
|
```
|
||||||
|
|
||||||
|
## Notes
|
||||||
|
|
||||||
|
- Local AS 65010, router-id 10.40.40.251 — distinct from the production
|
||||||
|
`gobgp` global-table feed (AS 65001).
|
||||||
|
- It is *not* part of the default stack: the `evpn-test` Compose profile
|
||||||
|
keeps it out of production and lets it be started/stopped on demand.
|
||||||
|
- EVPN type-5 (IP-prefix) routes require a `gw <gateway>` argument in the
|
||||||
|
GoBGP CLI — see `inject-evpn.sh`.
|
||||||
29
gobgp-evpn/gobgpd.conf
Normal file
29
gobgp-evpn/gobgpd.conf
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
# GoBGP -- modular EVPN test-route injector (roadmap E5)
|
||||||
|
#
|
||||||
|
# A profile-gated, throwaway GoBGP instance whose only job is to originate
|
||||||
|
# synthetic BGP EVPN routes and BMP-export them to the OpenBMP collector, so
|
||||||
|
# the EVPN ingestion pipeline (collector -> Kafka openbmp.parsed.evpn ->
|
||||||
|
# evpn-consumer -> evpn_rib) can be exercised. NOT a production component --
|
||||||
|
# start it only when testing:
|
||||||
|
# docker compose --profile evpn-test up -d gobgp-evpn
|
||||||
|
# bash gobgp-evpn/inject-evpn.sh
|
||||||
|
#
|
||||||
|
# It has no BGP peers; routes are injected straight into the local RIB, so
|
||||||
|
# BMP export uses route-monitoring-policy = local-rib.
|
||||||
|
|
||||||
|
[global]
|
||||||
|
[global.config]
|
||||||
|
as = 65010
|
||||||
|
router-id = "10.40.40.251"
|
||||||
|
# No inbound BGP listener -- we only originate locally and BMP-export.
|
||||||
|
port = -1
|
||||||
|
|
||||||
|
# --- BMP export to the OpenBMP collector ------------------------------------
|
||||||
|
[[bmp-servers]]
|
||||||
|
[bmp-servers.config]
|
||||||
|
address = "10.40.40.202"
|
||||||
|
port = 5000
|
||||||
|
# local-rib: the injected EVPN routes live in the loc-rib (there are no
|
||||||
|
# BGP peers / no adj-rib-in), so export the local RIB.
|
||||||
|
route-monitoring-policy = "local-rib"
|
||||||
|
statistics-timeout = 3600
|
||||||
32
gobgp-evpn/inject-evpn.sh
Executable file
32
gobgp-evpn/inject-evpn.sh
Executable file
@ -0,0 +1,32 @@
|
|||||||
|
#!/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
|
||||||
Loading…
x
Reference in New Issue
Block a user