-
Notifications
You must be signed in to change notification settings - Fork 705
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Natively modify host route table #2615
base: master
Are you sure you want to change the base?
Natively modify host route table #2615
Conversation
Confirmed working with the gns3 lab - multiple AS hops, routes changing. Deletes on shutdown aren't working - might be a different event type at the end?
There was a race condition. Fixed with Context and WaitGroup
I like the idea of playing with the routing table in operating systems directly but I'm not sure about the needs for running GoBGP in Windows with this feature. It's very difficult to maintain a feature that few people need. |
That's a good point. In the documentation I've mentioned This is not supported by the core GoBGP team at all. Use at your own risk. Would it work if under that I added Additionally, the Windows implementation is not maintained by the core GoBGP team. Issues regarding the Windows implementation, and all modify-host-fib functionality will be closed. Then you won't have any additional maintenance burden. |
I would like to see more support for GoBGP doing native route table manipulation, since having to split configuration between GoBGP and Zebra was somewhat annoying. It would be great to be able to configure all of it in a single place, instead of juggling route maps in two different components. |
@fujita is there some reason why it have not been implemented but instead of GoBGP is relying for Zebra? As far I see, it is actually quite simple to create and remove local routes with https://github.com/vishvananda/netlink ( |
This pull request provides experimental functionality to inject learned routes into the routing table of the host running GoBGP. i.e. it provides a subset of something like Zebra's functionality without requiring the external dependency of Zebra.
The reference implementation provided is for Windows, but it's structured using the existing
<filename>_<platform>.go
pattern so it can be extended to other platforms. The implementation and flow mirrors the Zebra integration for consistency.Config is under a new top-level
experimental
level to emphasize to users this isn't mainline functionality. Documentation heavily emphasizes this too.Documentation is provided on usage, architecture/flow, and how to extend, in
docs/sources/modify-host-fib.md
.I've tested this on Windows 10 with adds, updates, deletes, cleanup-on-shutdown (not sure if the existing Zebra integration does this but I wanted it), and a reasonably sized BGP topology - all is working. I haven't added any tests to CI/CD as GitHub Actions doesn't work well (or at all) with Windows containers. If in the future someone adds Linux support, it would be easy to add tests for that using the existing test structure you have because each container will have a route table you can check.
For Windows route table support I've added a dependency on wireguard-go, which exposes Windows route table APIs in a clean way. Wireguard-go is a well known and trusted project.