Skip to content

Commit

Permalink
Add gRPC-base Routing Protocol (GRP) path type
Browse files Browse the repository at this point in the history
  This adds the first bits and pieces for a gRPC-based Routing Protocol (GRP).
  It will allow to leverage Bio-Routing as a proxy between classical routing
  protocols, such as BGP, IS-IS, and OSPF, and a user-defined gRPC service.

  This commit contains the new GRP path type definition, the integration into
  existing route and path structures, as well as a proto definition.

Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
  • Loading branch information
BarbarossaTM committed Jan 17, 2023
1 parent 0dd1474 commit ecd3fda
Show file tree
Hide file tree
Showing 13 changed files with 789 additions and 123 deletions.
1 change: 1 addition & 0 deletions Documentation/user/protocols/GRP/GRP Architecture.drawio
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<mxfile host="Electron" modified="2023-01-16T20:10:47.674Z" agent="5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/16.5.1 Chrome/96.0.4664.110 Electron/16.0.7 Safari/537.36" etag="zqbnScvjHw7Dq5aV_rcp" version="16.5.1" type="device"><diagram id="qTsozOltfgc4AzKQSObR" name="Page-1">7V1bd6M4Ev41OWfnIRxAXB/jpJPOTM92NsmZmexLDgbZVjcXL2DH6V+/EiCu4uYAbbttn9hQkiVR9VVJVZTIBbh2dne+sV796VnQvhB5a3cBbi5EUVAFDX8RyntC4YEcU5Y+shJaRnhCPyCtmFA3yIJBoWLoeXaI1kWi6bkuNMMCzfB9761YbeHZxV7XxhJWCE+mYVepfyMrXCVUQdGzgs8QLVdJ15qoxgWOQSsnVxKsDMt7y5HApwtw7XteGB85u2toE+5RvsS/u60pTQfmQzfs8gP7+e5Fc75JP35If/zx57/n33/frC5FJW5ma9ib5IrvHh8w4QFCPxl3+E6Z4Xsb14KkPeECzN5WKIRPa8MkpW9Y/pi2Ch07KbaNObRnhvl9Gf3s2rM9P2oG3EYvXGXhueGt4SCboOMztLcwRKaRFCRYEITkPNdA/KJ9PHgBCpHn4jIT8wKPG8y20CdN2V9KFUKPjNKw0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zl4pWcdmOYc3hpjAqeAQDGCH8MXZAKbLulYDSLXtQAxgm2kCPCcJSvpSpf0sYLOdFVWJkzWQvsTRbjjAF+tF/LwK7H+e/2v/Z/O76DyZzCn+nK84QJJEHftOLP3iyLMFz6mCH8gVe/AhXp+Mnj6zXjT1Qdo7pwz+DBj4cA3jO60DAaBuLA/kmVijowx3EjT0MiTOxLp+jgtndalNc788miplrJTLE5tee2jooBMp7leCpj7ne2vjecZkmErobpzRBfP8vj6dpUwbRxkkjuOO6QqHmLT2Y1S0bXOiia6LxR9HVCX5RPtiU78g57EoWuanTgngPVOBz9sPDko5P+z/MqDRYsj7Aj8/JHKQXjtreGFz372NQ7vqTeKE9UILyJhUOGyAyrSbIQ5SsUdWiqfQCJHZuPgcyTwcZAyzykF+X74c1oWx0dTPiAURVl7XZ7DUg6VgyU8SMr1mndqQzK8NlNY5lxnZOS9bD33Z+rFwxuzuYZKY7Hy5bjbiR7dp9oRA8BlZFnQfoRF47uhIWEWdvfptvQ0JB+kMhx5w2CA3BPWz6FBACJEDX21o+G7jjachcSAPjIMPeoXnOx8d0Hj3OM0MtfQnnaGUUzBJoz4D4eeDe/h7nQell0ee8NNuGNShJDkW9dARMkxy0X3TPaphjLcLd+HryltPZLzP2UV9cDDR8+gsuEXmCT2K7IQQ4Bj1mpnUtAccUQvgrqfpJrmwgVHuwNB4tYzQmAjoJxJJGeXZXTXbiY7jKV1y6bEDjEeMANZDJirPd99niw5zA0O/LToddm5Xd8vsvzOG8e8Gm3ZhHMi+GJnu06FP4N73Kf9y6aFuYLCn/OPT7F/gxtWz/yQMPv0f</diagram></mxfile>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions Documentation/user/protocols/GRP/GRP Architecture.drawio.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions Documentation/user/protocols/GRP/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# gRPC Routing Protocol (GRP)

This protocol is designed to allow leveraging Bio-Routing as a proxy between classic routing protocols like BGP, IS-IS, and OSPF and an gRPC based controller.
Bio-Routing can be used to learn routes via gRPC and export them into the desired protocols, learn routes from classic protocols and export them via gRPC, or both.

The gRPC Routing Protocol follows the design principle for BGP as much as is practical and borrows the concept of AdjRIBIn and AdjRIBOut including the possibility to define import and export filters.

To be most flexible the gRPC Routing Protocol allows learning and/or exporting routes for multiple VRFs over one gRPC connection.

Bio-Routing, at least for now, only implements a gRPC Routing Protocol client componenent, meaning that the user has to run a GRP server by themselves. An example can be found in the examples/grp/ folder inside this repository.

The following diagram shows the architectural overview:

![gRPC Routing Protocol architecural overview](GRP Architecture.drawio.svg)
179 changes: 179 additions & 0 deletions protocols/grp/api/grp.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions protocols/grp/api/grp.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
syntax = "proto3";

package bio.grtp;

import "net/api/net.proto";
import "route/api/route.proto";

option go_package = "github.com/bio-routing/bio-rd/protocols/grpcrp/api";

message GRPRoute {
string vrf = 1;
bio.route.Route route = 2;
bool announcement = 3;
}

service GRPService {
rpc RunSession(stream GRPRoute) returns (stream GRPRoute) {}
}
133 changes: 133 additions & 0 deletions protocols/grp/api/grp_grpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit ecd3fda

Please sign in to comment.