{"id":22499729,"url":"https://github.com/opiproject/opi-evpn-bridge","last_synced_at":"2025-08-21T04:31:12.338Z","repository":{"id":156422586,"uuid":"633020785","full_name":"opiproject/opi-evpn-bridge","owner":"opiproject","description":"OPI gRPC to EVPN GW FRR bridge","archived":false,"fork":false,"pushed_at":"2025-03-07T15:22:49.000Z","size":16599,"stargazers_count":16,"open_issues_count":54,"forks_count":14,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-08T03:37:58.260Z","etag":null,"topics":["bridge","evpn","frr","frrouting","grpc","opi","vtysh"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/opiproject.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-26T15:56:16.000Z","updated_at":"2025-03-29T12:13:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"3880614a-a530-4361-81fc-e3b1b2b79a4b","html_url":"https://github.com/opiproject/opi-evpn-bridge","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/opiproject/opi-evpn-bridge","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opiproject%2Fopi-evpn-bridge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opiproject%2Fopi-evpn-bridge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opiproject%2Fopi-evpn-bridge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opiproject%2Fopi-evpn-bridge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opiproject","download_url":"https://codeload.github.com/opiproject/opi-evpn-bridge/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opiproject%2Fopi-evpn-bridge/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271425056,"owners_count":24757399,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-21T02:00:08.990Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bridge","evpn","frr","frrouting","grpc","opi","vtysh"],"created_at":"2024-12-06T22:15:35.618Z","updated_at":"2025-08-21T04:31:11.244Z","avatar_url":"https://github.com/opiproject.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OPI gRPC to EVPN GW FRR bridge\n\n[![Linters](https://github.com/opiproject/opi-evpn-bridge/actions/workflows/linters.yml/badge.svg)](https://github.com/opiproject/opi-evpn-bridge/actions/workflows/linters.yml)\n[![CodeQL](https://github.com/opiproject/opi-evpn-bridge/actions/workflows/codeql.yml/badge.svg)](https://github.com/opiproject/opi-evpn-bridge/actions/workflows/codeql.yml)\n[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/opiproject/opi-evpn-bridge/badge)](https://securityscorecards.dev/viewer/?platform=github.com\u0026org=opiproject\u0026repo=opi-evpn-bridge)\n[![tests](https://github.com/opiproject/opi-evpn-bridge/actions/workflows/go.yml/badge.svg)](https://github.com/opiproject/opi-evpn-bridge/actions/workflows/go.yml)\n[![Docker](https://github.com/opiproject/opi-evpn-bridge/actions/workflows/docker-publish.yml/badge.svg)](https://github.com/opiproject/opi-evpn-bridge/actions/workflows/docker-publish.yml)\n[![License](https://img.shields.io/github/license/opiproject/opi-evpn-bridge?style=flat-square\u0026color=blue\u0026label=License)](https://github.com/opiproject/opi-evpn-bridge/blob/master/LICENSE)\n[![codecov](https://codecov.io/gh/opiproject/opi-evpn-bridge/branch/main/graph/badge.svg)](https://codecov.io/gh/opiproject/opi-evpn-bridge)\n[![Go Report Card](https://goreportcard.com/badge/github.com/opiproject/opi-evpn-bridge)](https://goreportcard.com/report/github.com/opiproject/opi-evpn-bridge)\n[![Go Doc](https://img.shields.io/badge/godoc-reference-blue.svg)](http://godoc.org/github.com/opiproject/opi-evpn-bridge)\n[![Pulls](https://img.shields.io/docker/pulls/opiproject/opi-evpn-bridge.svg?logo=docker\u0026style=flat\u0026label=Pulls)](https://hub.docker.com/r/opiproject/opi-evpn-bridge)\n[![Last Release](https://img.shields.io/github/v/release/opiproject/opi-evpn-bridge?label=Latest\u0026style=flat-square\u0026logo=go)](https://github.com/opiproject/opi-evpn-bridge/releases)\n[![GitHub stars](https://img.shields.io/github/stars/opiproject/opi-evpn-bridge.svg?style=flat-square\u0026label=github%20stars)](https://github.com/opiproject/opi-evpn-bridge)\n[![GitHub Contributors](https://img.shields.io/github/contributors/opiproject/opi-evpn-bridge.svg?style=flat-square)](https://github.com/opiproject/opi-evpn-bridge/graphs/contributors)\n\nThis repo includes OPI reference code for EVPN Gateway based on [FRR](https://www.frrouting.org/). The specification for these APIs can be found\n[here](https://github.com/opiproject/opi-api/pull/276).\n\n## I Want To Contribute\n\nThis project welcomes contributions and suggestions.  We are happy to have the Community involved via submission of **Issues and Pull Requests** (with substantive content or even just fixes). We are hoping for the documents, test framework, etc. to become a community process with active engagement.  PRs can be reviewed by by any number of people, and a maintainer may accept.\n\nSee [CONTRIBUTING](https://github.com/opiproject/opi/blob/main/CONTRIBUTING.md) and [GitHub Basic Process](https://github.com/opiproject/opi/blob/main/doc-github-rules.md) for more details.\n\n## Getting started\n\n:exclamation: `docker-compose` is deprecated. For details, see [Migrate to Compose V2](https://docs.docker.com/compose/migrate/).\n\nRun `docker-compose up -d` or `docker compose up -d`\n\n## Manual gRPC example\n\nusing [grpcurl](https://github.com/fullstorydev/grpcurl)\n\n```bash\n# create\ndocker-compose exec opi-evpn-bridge grpcurl -plaintext -d '{\"vrf\" : {\"spec\" : {\"vni\" : 1234, \"loopback_ip_prefix\" : {\"addr\": {\"af\": \"IP_AF_INET\", \"v4_addr\": 167772162} }, \"len\": 24}, \"vtep_ip_prefix\": {\"addr\": {\"af\": \"IP_AF_INET\", \"v4_addr\": 167772162} }, \"len\": 24} }}, \"vrf_id\" : \"testvrf\" }' localhost:50151 opi_api.network.evpn_gw.v1alpha1.VrfService.CreateVrf\"\ndocker-compose exec opi-evpn-bridge grpcurl -plaintext -d '{\"logical_bridge\" : {\"spec\" : {\"vni\": 10, \"vlan_id\": 10 } }, \"logical_bridge_id\" : \"testbridge\" }' localhost:50151 opi_api.network.evpn_gw.v1alpha1.LogicalBridgeService.CreateLogicalBridge\ndocker-compose exec opi-evpn-bridge grpcurl -plaintext -d '{\"bridge_port\" : {\"spec\" : {mac_address: \"qrvMAAAB\", \"ptype\": \"BRIDGE_PORT_TYPE_ACCESS\", \"logical_bridges\": [\"//network.opiproject.org/bridges/testbridge\"] }}, \"bridge_port_id\" : \"testport\"}' localhost:50151 opi_api.network.evpn_gw.v1alpha1.BridgePortService.CreateBridgePort\ndocker-compose exec opi-evpn-bridge grpcurl -plaintext -d '{\"svi\" : {\"spec\" : {\"vrf\": \"//network.opiproject.org/vrfs/testvrf\", \"logical_bridge\": \"//network.opiproject.org/bridges/testbridge\", mac_address: \"qrvMAAAB\", \"gw_ip_prefix\": [{\"addr\": {\"af\": \"IP_AF_INET\", \"v4_addr\": 167772162} }, \"len\": 24}] } }, \"svi_id\" : \"testsvi\" }' localhost:50151 opi_api.network.evpn_gw.v1alpha1.SviService.CreateSvi\n# get\ndocker-compose exec opi-evpn-bridge grpcurl -plaintext -d '{\"name\": \"//network.opiproject.org/ports/testinterface\"}' localhost:50151 opi_api.network.evpn_gw.v1alpha1.BridgePortService.GetBridgePort\ndocker-compose exec opi-evpn-bridge grpcurl -plaintext -d '{\"name\": \"//network.opiproject.org/bridges/testbridge\"}' localhost:50151 opi_api.network.evpn_gw.v1alpha1.LogicalBridgeService.GetLogicalBridge\ndocker-compose exec opi-evpn-bridge grpcurl -plaintext -d '{\"name\": \"//network.opiproject.org/svis/testsvi\"}' localhost:50151 opi_api.network.evpn_gw.v1alpha1.SviService.GetSvi\ndocker-compose exec opi-evpn-bridge grpcurl -plaintext -d '{\"name\": \"//network.opiproject.org/vrfs/testvrf\"}' localhost:50151 opi_api.network.evpn_gw.v1alpha1.VrfService.GetVrf\n#list\ndocker-compose exec opi-evpn-bridge grpcurl -plaintext localhost:50151 opi_api.network.evpn_gw.v1alpha1.BridgePortService.ListBridgePorts\ndocker-compose exec opi-evpn-bridge grpcurl -plaintext localhost:50151 opi_api.network.evpn_gw.v1alpha1.BridgePortService.ListLogicalBridges\ndocker-compose exec opi-evpn-bridge grpcurl -plaintext localhost:50151 opi_api.network.evpn_gw.v1alpha1.BridgePortService.ListSvis\ndocker-compose exec opi-evpn-bridge grpcurl -plaintext localhost:50151 opi_api.network.evpn_gw.v1alpha1.BridgePortService.ListVrfs\n# delete\ndocker-compose exec opi-evpn-bridge grpcurl -plaintext -d '{\"name\": \"//network.opiproject.org/ports/testinterface\"}' localhost:50151 opi_api.network.evpn_gw.v1alpha1.BridgePortService.DeleteBridgePort\ndocker-compose exec opi-evpn-bridge grpcurl -plaintext -d '{\"name\": \"//network.opiproject.org/bridges/testbridge\"}' localhost:50151 opi_api.network.evpn_gw.v1alpha1.LogicalBridgeService.DeleteLogicalBridge\ndocker-compose exec opi-evpn-bridge grpcurl -plaintext -d '{\"name\" : \"//network.opiproject.org/svis/testsvi\"}' localhost:50151 opi_api.network.evpn_gw.v1alpha1.SviService.DeleteSvi\ndocker-compose exec opi-evpn-bridge grpcurl -plaintext -d '{\"name\" : \"//network.opiproject.org/vrfs/testvrf\"}' localhost:50151 opi_api.network.evpn_gw.v1alpha1.VrfService.DeleteVrf\n```\n\nusing [grpc_cli](https://github.com/grpc/grpc/blob/master/doc/command_line_tool.md)\n\n```bash\n$ docker run --rm -it --network=container:opi-evpn-bridge-opi-evpn-bridge-1 docker.io/namely/grpc-cli ls localhost:50151\ngrpc.reflection.v1.ServerReflection\ngrpc.reflection.v1alpha.ServerReflection\nopi_api.network.evpn_gw.v1alpha1.BridgePortService\nopi_api.network.evpn_gw.v1alpha1.LogicalBridgeService\nopi_api.network.evpn_gw.v1alpha1.SviService\nopi_api.network.evpn_gw.v1alpha1.VrfService\n\n$ docker run --rm -it --network=container:opi-evpn-bridge-opi-evpn-bridge-1 docker.io/namely/grpc-cli call localhost:50151 VrfService.ListVrfs \"\"\nconnecting to localhost:50151\n...\nRpc succeeded with OK status\n```\n\nusing [godpu](https://github.com/opiproject/godpu)\n\n```bash\n$ docker run --rm -it --network=host docker.io/opiproject/godpu:main evpn --help\nTests DPU evpn functionality\n\nUsage:\n  godpu evpn [flags]\n  godpu evpn [command]\n\nAliases:\n  evpn, g\n\nAvailable Commands:\n  create-bp   Create a bridge port\n  create-lb   Create a logical bridge\n  create-svi  Create a SVI\n  create-vrf  Create a VRF\n  delete-bp   Delete a bridge port\n  delete-lb   Delete a logical bridge\n  delete-svi  Delete a SVI\n  delete-vrf  Delete a VRF\n  get-bp      Show details of a bridge port\n  get-lb      Show details of a logical bridge\n  get-svi     Show details of a SVI\n  get-vrf     Show details of a VRF\n  list-bps    Show details of all bridge ports\n  list-lbs    Show details of all logical bridges\n  list-svis   Show details of all SVIs\n  list-vrfs   Show details of all Vrfs\n  update-bp   Update the bridge port\n  update-lb   update the logical bridge\n  update-svi  update the SVI\n  update-vrf  update the VRF\n\nFlags:\n  -h, --help   help for evpn\n\nUse \"godpu evpn [command] --help\" for more information about a command.\n```\n\n## Manual HTTP example\n\nIn addition HTTP is supported via [grpc gateway](https://github.com/grpc-ecosystem/grpc-gateway), for example:\n\n```bash\ncurl -kL http://10.10.10.10:8082/v1/inventory/1/inventory/2\n```\n\n## Architecture Diagram\n\n![OPI EVPN Bridge Architcture Diagram](./docs/OPI-EVPN-GW-FRR-bridge.png)\n\n## Tests\n\nTest your APIs even if unmerged using your private fork like this:\n\n```bash\nchmod a+w go.*\ndocker run --rm -it -v `pwd`:/app -w /app golang:alpine go mod edit -replace github.com/opiproject/opi-api@main=github.com/YOURUSERNAME/opi-api@main\ndocker run --rm -it -v `pwd`:/app -w /app golang:alpine go get -u github.com/YOURUSERNAME/opi-api/network/evpn-gw/v1alpha1/gen/go@0e2810d\ndocker run --rm -it -v `pwd`:/app -w /app golang:alpine go mod tidy\n```\n\nGenerate mocks like this:\n\n```bash\ngo install github.com/vektra/mockery/v2@latest\nmake mock-generate\n\n# or using docker\ndocker run -v \"$PWD\":/src -w /src vektra/mockery --config=utils/mocks/.mockery.yaml --name=Netlink --dir pkg/utils --output pkg/utils/mocks --boilerplate-file pkg/utils/mocks/boilerplate.txt --with-expecter\n```\n\n## POC diagrams\n\n![OPI EVPN Bridge POC Diagram for CI/CD](./docs/OPI-EVPN-PoC.png)\n![OPI EVPN Bridge Diagram for L2VXLAN](./docs/OPI-EVPN-L2-VXLAN.png)\n![OPI EVPN Bridge Diagram for L3VXLAN Asymmetric IRB](./docs/OPI-EVPN-L3-Asymmetric-IRB.png)\n![OPI EVPN Bridge Diagram for L3VXLAN Symmetric IRB](./docs/OPI-EVPN-L3-Symmetric-IRB.png)\n![OPI EVPN Bridge Diagram for L2VXLAN in_Symmetric IRB](./docs/OPI-EVPN-L2-VXLAN-In-Symmetric-IRB-setup.png)\n![OPI EVPN Bridge Diagram for Leaf1_Detailed_View](./docs/OPI-EVPN-Leaf1-Detailed-View.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopiproject%2Fopi-evpn-bridge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopiproject%2Fopi-evpn-bridge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopiproject%2Fopi-evpn-bridge/lists"}