MCPcopy Index your code
hub / github.com/bio-routing/bio-rd

github.com/bio-routing/bio-rd @v0.1.10

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.1.10 ↗ · + Follow
3,065 symbols 9,474 edges 356 files 837 documented · 27% 1 cross-repo links updated 5d agov0.1.10 · 2025-05-29★ 31327 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Bio-Routing

A re-implementation of BGP, IS-IS and OSPF in go. We value respect and robustness!

GitHub Actions Codecov Go ReportCard Go Doc

Building

To build Bio-Routing binares and/or examples you need Go installed and in your $PATH. Currently the minimum supported Go version is v1.20.

To build all commands and examples, you can leverage the Makefile, if you have make installed, and run

make build

If you're only interested in one particular command/service or example, found in the cmd/ or examples/ sub-directories within this repository, enter the respective directory on a shell and run go build. You should get a binary named like the current directory, which you can run.

To build the BGP examples, this would look like

cd exmaples/bgp
go build

To build the bio-rd service binary, this would look like

cd cmd/bio-rd
go build

Run Tests

go test -v -cover ./...

Running bio-rd

bio-rd is the main binary which provides a configurable BGP speaker. It supports the following command-line parameters:

Usage of ./bio-rd:
  -bgp.listen-addr-ipv4 string
        BGP listen address for IPv4 AFI (default "0.0.0.0:179")
  -bgp.listen-addr-ipv6 string
        BGP listen address for IPv6 AFI (default "[::]:179")
  -config.file string
        bio-rd config file (default "bio-rd.yml")
  -grpc_keepalive_min_time uint
        Minimum time (seconds) for a client to wait between GRPC keepalive pings (default 1)
  -grpc_port uint
        GRPC API server port (default 5566)
  -metrics_port uint
        Metrics HTTP server port (default 55667)

You can find an example configuration file within in cmd/bio-rd directory.

As bio-rd needs to listen on the priviledged TCP port 179 for BGP connections, you either need to start the service as root or using sudo, e.g.

$ sudo ./bio-rd -config.file bio-rd.yml

Benchmarks

The benchmarks can be found in the bio-routing/bio-rd-benchmarks repository.

User documentation

Developer documentation

Extension points exported contracts — how you extend this code

RouteTableClient (Interface)
RouteTableClient is the interface that every route table client must implement [7 implementers]
routingtable/client_interface.go
Action (Interface)
Action performs actions on a `route.Path` [7 implementers]
routingtable/filter/actions/action.go
TLV (Interface)
TLV is an interface that all TLVs must fulfill [15 implementers]
protocols/isis/packet/tlv.go
Msg (Interface)
Msg is an interface that every BMP message must fulfill [7 implementers]
protocols/bmp/packet/decode.go
RIB (Interface)
(no doc) [12 implementers]
routingtable/rib_interface.go
ClientManagerMaster (Interface)
(no doc) [7 implementers]
routingtable/client_manager.go
RequestWithVRF (Interface)
(no doc) [5 implementers]
cmd/ris/risserver/server.go
Updater (Interface)
Updater is a device updater interface [3 implementers]
protocols/device/server.go

Core symbols most depended-on inside this repo

Ptr
called by 1209
net/ip.go
Errorf
called by 605
util/log/log.go
IPv4FromOctets
called by 511
net/ip.go
NewPfx
called by 395
net/prefix.go
Equal
called by 354
routingtable/filter/actions/action.go
NewRoute
called by 285
route/route.go
IPv4
called by 214
net/ip.go
Write
called by 125
net/tcp/tcp.go

Shape

Method 1,793
Function 854
Struct 343
Interface 52
TypeAlias 22
FuncType 1

Languages

Go100%

Modules by API surface

cmd/ris/api/ris.pb.go139 symbols
protocols/isis/api/isis.pb.go124 symbols
route/api/route.pb.go103 symbols
cmd/ris/api/ris_grpc.pb.go56 symbols
protocols/bgp/packet/path_attributes.go43 symbols
net/tcp/tcp.go43 symbols
protocols/bgp/api/bgp_grpc.pb.go41 symbols
net/ip.go39 symbols
protocols/bgp/api/session.pb.go37 symbols
protocols/bgp/packet/path_attributes_test.go36 symbols
protocols/bgp/api/bgp.pb.go36 symbols
protocols/bgp/server/update_sender.go35 symbols

Used by 1 indexed graphs manifest dependencies, hub-wide

For agents

$ claude mcp add bio-rd \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page