10 ms·
BGP Implemented in Go
- deleted 5y ago[deleted]
- kloch 5y agoReading through the documentation it looks like this emulates the legacy IOS model of announcing all BGP routes to neighbors by default unless there is a policy configured. This outdated model has caused countless route leaks over the years. Any new or updated BGP implementations should require an explicit allow policy for any route advertisement to take place (at least to eBGP neighbors). IOS-XR and JunOS require explicit policies. This is covered in RFC8212: https://datatracker.ietf.org/doc/html/rfc8212 https://datatracker.ietf.org/doc/html/rfc8212
- rayhaanj 5y agoI've been working on a BGP implementation in Rust over the last few years: https://github.com/net-control-plane/bgp/ https://github.com/net-control-plane/bgp/ It's still in a proof of concept stage and nowhere as complete as GoBGP though.
- ternaryoperator 5y agoThank you for having a front page that actually says what BGP is.
- zinekeller 5y agoI'm not sure if this will help explain the culture or not, but this is from the NTT (the Japanese telecommunications company), so probably they thought that everyone knew what BGP is (since that you probably won't encounter this otherwise). Also, they have a Rust version: https://github.com/osrg/rustybgp https://github.com/osrg/rustybgp
- kyrra 5y agoSearching around, I found someone that benchmarked gobgp, rustybgp, and some others, and gobgp didn't seem to do all that well compared to other implementations. https://elegantnetwork.github.io/posts/comparing-open-source-bgp-stacks/ https://elegantnetwork.github.io/posts/comparing-open-source...
- newman314 5y agorustybgp seems to do pretty well (see #5 post of blog series) and is created by the same author(s) of gobgp. Additionally, it looks like the configs are transferable between gobgp and rustybgp.
- deleted 5y ago[deleted]
- 0x20cowboy 5y agoI may have missed it, but I read the read me, looked at the main site, looked at the beginning of getting started… nowhere says what BGP stands for / is. I get it’s written in go, but I have no idea what BGP is. Big green pages, binary grepping pipes, boisterous gambling pachyderms? Jokes aside, y’all might want to give a brief about what this is for us uninitiated.
- betterunix2 5y agoBGP is the de facto routing protocol of the Internet. The basic problem that it solves is computing and distributing routes between independently operated networks. It is actually a pretty ramshackle protocol (among other things it usually uses TCP, which can create some interesting problems [1]) but it is the only widely deployed protocol that can handle the scale of the Internet. In theory BGP can be used within a single network, though it is not well-suited to such an application except in very large networks. Facebook is known to use BGP internally [2]. Usually an "interior gateway protocol" like OSPF or IS-IS is better for internal routes, with BGP then distributing those routes to the external networks from the gateway routers (i.e. those routers that interconnect the networks). BGP can also be used for other, more niche applications within a single network, like setting up VPNs (VPLS, VPNv4, etc.). [1] https://blog.benjojo.co.uk/post/bgp-stuck-routes-tcp-zero-window https://blog.benjojo.co.uk/post/bgp-stuck-routes-tcp-zero-wi... [2] https://research.facebook.com/publications/running-bgp-in-data-centers-at-scale/ https://research.facebook.com/publications/running-bgp-in-da...
- fragmede 5y agoIn this context, BGP stands for Border Gateway Protocol. I opened a PR to fix that. https://github.com/osrg/gobgp/pull/2535 https://github.com/osrg/gobgp/pull/2535
- charlieyu1 5y agoI am finding for a long time that what BGP is… The docs even linked Golang without linking BGP. I thought it was something about board games
- freedomben 5y agoMaybe a dumb question nowadays because I stopped using Go around the 1.6 days, but is there still a stop-the-world garbage collector, or any other potential blockers for high performance/real time? A previous company I worked with chose to build in C++ instead of Go because of that, as the performance requirements were very, very high. I would imagine a serious BGP usage would have very high requirements?
- mitchs 5y agoIt depends on the context. Not every bgp speaker needs the full internet table and frequent route changes. If you use the network to balance traffic across servers, you just need a bgp speaker on a server to inject a few routes for the ip addresses it will handle. In that case a good api outweighs performance.
- woah 5y agoBGP doesn't have very high performance requirements. It does not handle any internet traffic. All it does is configure the kernel routing tables. Even if there's some crazy 1 second GC pause it will not greatly affect the performance of the router.
- lima 5y agoSending or receiving an internet full table (and potentially applying filters/aggregations) is still quite performance intensive, since it needs to happen quickly. A one-second GC pause won't hurt you but managing the necessary data structures in memory can be challenging. Anecdotally, gobgp is quite a bit slower than hand-optimized C implementations like frr (not that it matters for most gobgp use cases).
- mike_d 5y ago> Sending or receiving an internet full table (and potentially applying filters/aggregations) is still quite performance intensive Nope. I am running 15 sessions with full transit tables, multiple exchanges, and private peers on a four core ARM CPU with 4 GB of RAM.
- kxrm 5y agoThis is great, I have been learning "bird" and finding information on the web about using bird is very challenging since adding bird to any search doesn't necessary make the results better. If this project can maintain and keep their documentation clear, I would totally consider switching to this instead.
- alaties 5y agoYeah... Bird configurations are a little rough to learn. The examples they have on the website are pretty lacking. Their mailing list is usually helpful though. Quagga is usually easier to find examples for since it's modeled after Cisco switch syntax for configuration (same basic syntax of arista switches). Both of these really suck to learn as a programmer since you're usually coming into these without much of a network engineering background. I remember struggling a lot with both of these config syntaxes until a network engineer took me under his wing and taught me basics, principles, the engineering challenges of packet switching at scale, etc.
- kisamoto 5y agoAs a BGP alternative (in Go) has anyone checked out SCION? https://github.com/scionproto/scion https://github.com/scionproto/scion
- wmf 5y agoI gave up when I saw new packet headers which means you might not be able to use existing ASICs.
- xyquadrat 5y agoSCION looks very promising, and by now it has also been deployed in Switzerland's financial network, so it seems ready for production: https://www.six-group.com/en/newsroom/media-releases/2021/20210715-ssfn-snb-six.html https://www.six-group.com/en/newsroom/media-releases/2021/20... (Actually, the original creator of SCION teaches my CompNet course, which is pretty cool. His rants on BGP are quite legendary.)
- bogomipz 5y ago>"His rants on BGP are quite legendary" I'm assuming the context of these is lectures? Are they online anywhere? If not could you share what specifically about the protocol they feel so strongly about?
- xyquadrat 5y agoIndeed, he talks about BGP and SCION in the lectures. Sadly I think the lectures aren't available to non-students. What is available though are explanatory videos by him (Adrian Perrig) on the SCION website, where he talks about the issues BGP has: https://scion-architecture.net/pages/videos/ https://scion-architecture.net/pages/videos/ The tl;dw is that today's internet has comparatively poor availability, packet paths can be hijacked and there's little transparency in routing. SCION sets out to solve these problems, and has a few nice things in store, such as guaranteed bandwith between two hosts making DDoS attacks much less effective (COLIBRI QoS), or an incredibly high throughput packet filter (LightningFilter).
- pmarreck 5y ago
- bradfitz 5y agoGood thing C doesn't run the world!
- pmarreck 5y agoC doesn't have exceptions?
- d110af5ccf 5y ago... no, it does not. Are you thinking of C++?
- pmarreck 5y agoErm, you can raise signals? And then catch them elsewhere? Or use setjmp and longjmp at least?
- d110af5ccf 5y agosetjmp and longjmp are jumps, not exceptions. But sure, you can use them as part of an error handling strategy that resembles exceptions. It's lower level though. Similarly, goto isn't the same thing as a function call but you can certainly use it to that end. Signals are similarly not exceptions, plus don't they vary significantly between POSIX and other platforms? I don't think Windows (for example) supports user space (ie non-cooperative) preemption. I recall that this caused issues for Go because the authors implement their own lightweight threads in user space.