Making a wish ... errr ... *four* wishes! 😳
Gentlepeople (especially those from the BIRD development team) - being an avid BIRD user for some time now I always kept a small list of „it would be nice, if …“-things for BIRD 1.x, which I kept for myself, as I knew BIRD 2.x was in the works (and thus people were busy already…), but now I get the feeling, that 2.x is slowly stabilizing and I’d like to put them on the table for open discussion: Simple things, a.k.a. low hanging fruits: (Optional) unicast replies to IPv6 RS As one of my many uses for BIRD is in large wireless environments (i.e., IETF meetings) I am very interested in keeping the amount of multicast traffic as low as possible. The standards allow for a router to (immediately) respond with a unicast RA to an RS as an alternative to sending out a multicast RA „some (short, random) time“ after receiving an RS. Many others (Juniper, et.al.) have implemented this and I’d like to see this in BIRD too. The code changes are apparently very simple, so I almost did it myself, but then I didn’t want to interfere with ongoing 2.x developments. (lame excuse, I know …) Context dependent (global) „variables“ for functions/filters I (and probably others too) would really enjoy having more global variables defined for use inside filters & functions, depending on the context within which the respective filter/function is being called. The most obvious ones would be the peer’s (and our own) AS number (in the context of BGP protocols), the filtering direction, the protocol (type and name), the next hop’s address (where applicable), and so on. Yes, I know, most of these could be explicitly given (at least to a function) when calling it as the import/export filter for a protocol with a „where“ clause, but that would defeat the purpose of using templates (which I really do like and use a lot). The general concept of having „globals“ inside functions/filters is already there - just presently only in the context of the route that is being evaluated. I’d like to see this expanded into other contexts as described above. Discuss! 😉😜 More „controversial“ things: Maintain interface addresses (Linux et.al.) It would be nice, if BIRD could be „enhanced“ [sic] to take care of addresses assigned to interfaces, i.e. establish them in the first place and afterwards maintain them, i.e., re-install static, global IPv6 addresses on interfaces, which have suffered a link-state bounce. The latter is particularly interesting, since Linux -by design- removes global IPv6 addresses from an interface during a link-down state transition. Rationale: The various Linux distributions have all sorts of (different and sometimes „funky“) implementations of how to establish addresses to interfaces in the first place and then „deal with them“ during link-state state changes. I would like to have BIRD take care of this relatively simple task as well as the way more complicated task of maintaining millions of routes. If only to have a clean way to define „a router“ within one system (BIRD) as opposed to „get the addresses onto the interfaces with a bunch of iproute2 commands and then start BIRD to take care of the rest“-approach I’ll have to use now. A simple „boot the machine and fire up BIRD - done“ one-stop-shopping solution, if you may. 😉 This is particularly interesting to smaller, dedicated routers, like (former) OpenWRT platforms, Raspberry Pis - or (my application) Ubiquiti routers of all shapes and sizes, where I presently replace the built-in Quagga Version with BIRD. Speaking of Quagga: It takes care of interface addresses too, you know … ;-) An „ipset“ protocol for Linux It would be tremendously helpful to have a protocol, which would maintain given (named) „ipset <http://ipset.netfilter.org/>“ tables on Linux. This would allow for very easy interactions with iptables-based ACLs on Linux platforms. It should/could be treated like a Linux route-table, just with less/different attributes. So it should „sync“, could possibly „import“ items from the ipset, could be made „persistent“, etc. Applications are numerous: From fully automatic BCP38 handling at border interfaces to (again, fully automated) suppression of bogon traffic, to statistical analysis, to … whatever. It would be a single, well defined tool to interact with the whole world of capabilities the iptables/ipsets world offers. If there is any interest in discussing the latter two any further I’d be very happy to spec them out in more detail, of course. Looking forward to hear what people think about these … 😳 Clemens
On Wed, Jan 24, 2018 at 09:15:36AM +0100, Clemens Schrimpe wrote:
Gentlepeople (especially those from the BIRD development team) -
being an avid BIRD user for some time now I always kept a small list of „it would be nice, if …“-things for BIRD 1.x, which I kept for myself, as I knew BIRD 2.x was in the works (and thus people were busy already…), but now I get the feeling, that 2.x is slowly stabilizing and I’d like to put them on the table for open discussion:
Hello First, i am glad for such feedback and feature suggestions. It is nice to get more user feedback than just bugreports (although i do not want to downplay importance of bugreports ;-)).
Simple things, a.k.a. low hanging fruits:
(Optional) unicast replies to IPv6 RS
As one of my many uses for BIRD is in large wireless environments (i.e., IETF meetings) I am very interested in keeping the amount of multicast traffic as low as possible. The standards allow for a router to (immediately) respond with a unicast RA to an RS as an alternative to sending out a multicast RA „some (short, random) time“ after receiving an RS. Many others (Juniper, et.al.) have implemented this and I’d like to see this in BIRD too. The code changes are apparently very simple, so I almost did it myself, but then I didn’t want to interfere with ongoing 2.x developments. (lame excuse, I know …)
Seems simple and makes perfect sense. Will do.
Context dependent (global) „variables“ for functions/filters
I (and probably others too) would really enjoy having more global variables defined for use inside filters & functions, depending on the context within which the respective filter/function is being called. The most obvious ones would be the peer’s (and our own) AS number (in the context of BGP protocols), the filtering direction, the protocol (type and name), the next hop’s address (where applicable), and so on.
Yes, I know, most of these could be explicitly given (at least to a function) when calling it as the import/export filter for a protocol with a „where“ clause, but that would defeat the purpose of using templates (which I really do like and use a lot).
The general concept of having „globals“ inside functions/filters is already there - just presently only in the context of the route that is being evaluated. I’d like to see this expanded into other contexts as described above.
That is an interesting idea and also seems simple, although there are some caveats, e.g. filters using such context-dependent-constants would probably work for 'show route filter'. It may be useful if you could make a list of suggested constants.
More „controversial“ things:
Maintain interface addresses (Linux et.al.)
It would be nice, if BIRD could be „enhanced“ [sic] to take care of addresses assigned to interfaces, i.e. establish them in the first place and afterwards maintain them, i.e., re-install static, global IPv6 addresses on interfaces, which have suffered a link-state bounce. The latter is particularly interesting, since Linux -by design- removes global IPv6 addresses from an interface during a link-down state transition.
Rationale: The various Linux distributions have all sorts of (different and sometimes „funky“) implementations of how to establish addresses to interfaces in the first place and then „deal with them“ during link-state state changes. I would like to have BIRD take care of this relatively simple task as well as the way more complicated task of maintaining millions of routes. If only to have a clean way to define „a router“ within one system (BIRD) as opposed to „get the addresses onto the interfaces with a bunch of iproute2 commands and then start BIRD to take care of the rest“-approach I’ll have to use now. A simple „boot the machine and fire up BIRD - done“ one-stop-shopping solution, if you may.
This is particularly interesting to smaller, dedicated routers, like (former) OpenWRT platforms, Raspberry Pis - or (my application) Ubiquiti routers of all shapes and sizes, where I presently replace the built-in Quagga Version with BIRD. Speaking of Quagga: It takes care of interface addresses too, you know … ;-)
I have mixed feelings about that. On one hand, i would like such functionality, on the other hand, it is hard to defend a reason to integrate it to BIRD instead of being completely independent daemon, so it seems like creeping featurism. On the third hand, the same could be said for RAdv and it is still part of 'network management' domain. Also i would say that while it may seem like a relatively simple task compared to maintaining of kernel routing tables, the later one is more well-bounded, while the former may expand to more and more feature requests. It starts with setting the addressess to interfaces, continues with ifrename-like functionality and interface creation (as all these VLANs and bridges do not create themselves) and ends with DHCP/SLAAC clients and hooks for external commands. I though about this feature in the past and over time, i changed my optinion about it from 'probably no' to 'perhaps sometimes'.
An „ipset“ protocol for Linux
It would be tremendously helpful to have a protocol, which would maintain given (named) „ipset <http://ipset.netfilter.org/>“ tables on Linux. This would allow for very easy interactions with iptables-based ACLs on Linux platforms. It should/could be treated like a Linux route-table, just with less/different attributes. So it should „sync“, could possibly „import“ items from the ipset, could be made „persistent“, etc.
Applications are numerous: From fully automatic BCP38 handling at border interfaces to (again, fully automated) suppression of bogon traffic, to statistical analysis, to … whatever. It would be a single, well defined tool to interact with the whole world of capabilities the iptables/ipsets world offers.
That is something i would have but not yet managed to get to implement it. -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."
So, to follow up on this ... sorry for the long time it took for this response, but the "other life" called and demanded time. (hence the full inclusion of the original texts to allow for easier re-sync on the topics)
On 24. Jan 2018, at 14:51, Ondrej Zajicek <santiago@crfreenet.org> wrote:
On Wed, Jan 24, 2018 at 09:15:36AM +0100, Clemens Schrimpe wrote:
Gentlepeople (especially those from the BIRD development team) -
being an avid BIRD user for some time now I always kept a small list of „it would be nice, if …“-things for BIRD 1.x, which I kept for myself, as I knew BIRD 2.x was in the works (and thus people were busy already…), but now I get the feeling, that 2.x is slowly stabilizing and I’d like to put them on the table for open discussion:
Hello
First, i am glad for such feedback and feature suggestions. It is nice to get more user feedback than just bugreports (although i do not want to downplay importance of bugreports ;-)).
Oh. You shouldn't have said that. I have *tons* of wild ideas, but see below ;-)
Simple things, a.k.a. low hanging fruits:
(Optional) unicast replies to IPv6 RS
As one of my many uses for BIRD is in large wireless environments (i.e., IETF meetings) I am very interested in keeping the amount of multicast traffic as low as possible. The standards allow for a router to (immediately) respond with a unicast RA to an RS as an alternative to sending out a multicast RA „some (short, random) time“ after receiving an RS. Many others (Juniper, et.al.) have implemented this and I’d like to see this in BIRD too. The code changes are apparently very simple, so I almost did it myself, but then I didn’t want to interfere with ongoing 2.x developments. (lame excuse, I know …)
Seems simple and makes perfect sense. Will do.
Thank you. That was easy. (the next IETF meeting, where this could become be very useful, will be in mid-March ... :-) :-) :-)
Context dependent (global) „variables“ for functions/filters
I (and probably others too) would really enjoy having more global variables defined for use inside filters & functions, depending on the context within which the respective filter/function is being called. The most obvious ones would be the peer’s (and our own) AS number (in the context of BGP protocols), the filtering direction, the protocol (type and name), the next hop’s address (where applicable), and so on.
Yes, I know, most of these could be explicitly given (at least to a function) when calling it as the import/export filter for a protocol with a „where“ clause, but that would defeat the purpose of using templates (which I really do like and use a lot).
The general concept of having „globals“ inside functions/filters is already there - just presently only in the context of the route that is being evaluated. I’d like to see this expanded into other contexts as described above.
That is an interesting idea and also seems simple, although there are some caveats, e.g. filters using such context-dependent-constants would probably work for 'show route filter'.
Yes, I had forgotten about this (very useful) feature. However, the syntax for this could be easily amended to allow the definition of such variables via the command line, i.e., show route filter foo(a=1, b="bla", ...)
It may be useful if you could make a list of suggested constants.
Well ... here is what comes to mind easily: (NB: these are not the "names" of the variables I propose; we should come up with a good naming scheme once we settled on an initial list of variables) router id protocol name protocol type address family / channel-type local as remote as local interface name (outbound interface) local address (outbound interface) remote address external variables (see below) Variables, of course, only have values inside "useful" contexts, i.e, AS number inside BGP, etc. and are otherwise "undefined". I'l also like to propose the introduction of global variables (vs. existing constants), which can be set in the configuration file, via the command-line (i.e., "bird -D foo=42" and at runtime via birdc. Again, naming conventions have to be observed, etc. and the manual must emphasize on when exactly filters are evaluated and such. But this would allow to build a config, whose behavior could be altered at runtime, i.e., start-up in "test-mode" and then later be switched over to "production-mode" through birdc (or any other tool using the API), among many other possibilities. It would also be nice, if variables could hold lists, most notably prefix-lists of all sorts and AS/community lists. In this case the birdc interface would require add, remove, list functions in addition to set and delete. (yeah, I know ... way more things to specify here, like uniqueness, order, etc. -- I'll hold back until you promise not to shoot down this idea completely ;-) Also: Can filters/functions set,add,remove,delete variables too ... oh, my /o\ ...) - would be nice, so one could easily implement one's own status counters ...
More „controversial“ things:
Maintain interface addresses (Linux et.al.)
It would be nice, if BIRD could be „enhanced“ [sic] to take care of addresses assigned to interfaces, i.e. establish them in the first place and afterwards maintain them, i.e., re-install static, global IPv6 addresses on interfaces, which have suffered a link-state bounce. The latter is particularly interesting, since Linux -by design- removes global IPv6 addresses from an interface during a link-down state transition.
Rationale: The various Linux distributions have all sorts of (different and sometimes „funky“) implementations of how to establish addresses to interfaces in the first place and then „deal with them“ during link-state state changes. I would like to have BIRD take care of this relatively simple task as well as the way more complicated task of maintaining millions of routes. If only to have a clean way to define „a router“ within one system (BIRD) as opposed to „get the addresses onto the interfaces with a bunch of iproute2 commands and then start BIRD to take care of the rest“-approach I’ll have to use now. A simple „boot the machine and fire up BIRD - done“ one-stop-shopping solution, if you may.
This is particularly interesting to smaller, dedicated routers, like (former) OpenWRT platforms, Raspberry Pis - or (my application) Ubiquiti routers of all shapes and sizes, where I presently replace the built-in Quagga Version with BIRD. Speaking of Quagga: It takes care of interface addresses too, you know … ;-)
I have mixed feelings about that. On one hand, i would like such functionality, on the other hand, it is hard to defend a reason to integrate it to BIRD instead of being completely independent daemon, so it seems like creeping featurism. On the third hand, the same could be said for RAdv and it is still part of 'network management' domain.
You took one of my strongest arguments from me with the RAdv part. ;-)
Also i would say that while it may seem like a relatively simple task compared to maintaining of kernel routing tables, the later one is more well-bounded, while the former may expand to more and more feature requests. It starts with setting the addressess to interfaces, continues with ifrename-like functionality and interface creation (as all these VLANs and bridges do not create themselves) and ends with DHCP/SLAAC clients and hooks for external commands.
I have to admit, that this could indeed become a can of worms you may not want to open. Ok. One can draw a simple line (initially ...), though: Creation(!) of interfaces is left to other deities, like the kernel or VPN daemons, etc. - I was just worried about maintaining addresses, which are essential to making routing-protocols work in the first place. So some start-script would create the interfaces and/or add VLANs to them, build bridges, attach interfaces to them, bring up the zoo of daemons needed to create all sorts of virtual interfaces - and heck: Maybe even initially address them, but BIRD could(?) not only read those (as it already does), but by configuration maintain them too. Yes, it's a cludge, I agree - but I really have to jump through many (fiery) hoops to prevent my Linux interfaces loose their IPv6 addresses each time the link-state bounces (which Bird also already notices, btw.)
I though about this feature in the past and over time, i changed my optinion about it from 'probably no' to 'perhaps sometimes'.
Ok. Whew ...
An „ipset“ protocol for Linux
It would be tremendously helpful to have a protocol, which would maintain given (named) „ipset <http://ipset.netfilter.org/ <http://ipset.netfilter.org/>>“ tables on Linux. This would allow for very easy interactions with iptables-based ACLs on Linux platforms. It should/could be treated like a Linux route-table, just with less/different attributes. So it should „sync“, could possibly „import“ items from the ipset, could be made „persistent“, etc.
Applications are numerous: From fully automatic BCP38 handling at border interfaces to (again, fully automated) suppression of bogon traffic, to statistical analysis, to … whatever. It would be a single, well defined tool to interact with the whole world of capabilities the iptables/ipsets world offers.
That is something i would have but not yet managed to get to implement it.
As others commented, there are -of course- other existing means of maintaining tables with addresses/prefixes in various OS-types and kernels, so if you chose to go down this road, others will come and demand support for those too ... How about: Provide a simple(!) "API" or interface to have a general means of having Bird interact with "external" types of "tables" ... (geez, it really puts a strain on my "-key to tread so lightly and as generic as possible ... :-) What I mean is a socket-based interface to $script with a well-defined, yet simple protocol (ASCII/UTF8-based?) with the few primitives needed by Bird, like query/list/learn, set, add, delete, flush. Bird could connect to an existing daemon via Unix-Domain- or IP-Sockets or (cooler) spawn a sub-process with a given script/program and interact with it via STDIN and STDOUT (STDERR → logging) - similar to how "FCGI" used to work. This could become the Swiss-Army-Knife to interact with Bird in oh-so-many ways, among which to implement my initial idea with ipsets. All the basic ingredients are already contained within Bird: Opening sockets, re-trying, re-starting, sending "info" asynchronously into a potential blocking socket, waiting for input from the peer, parsing, error-handling, etc. I'll happily work an an initial specification for such an interface, if this would be of interest! Nuff for now - feedback very welcome! Clemens
On Sat, 10 Feb 2018 19:34:08 +0100 Clemens Schrimpe <clemens.schrimpe@gmail.com> wrote:
Yes, it's a cludge, I agree - but I really have to jump through many (fiery) hoops to prevent my Linux interfaces loose their IPv6 addresses each time the link-state bounces (which Bird also already notices, btw.)
Are you aware of the net.ipv6.conf.${IF}.keep_addr_on_down sysctl knob?
What I mean is a socket-based interface to $script with a well-defined, yet simple protocol (ASCII/UTF8-based?) with the few primitives needed by Bird, like query/list/learn, set, add, delete, flush. Bird could connect to an existing daemon via Unix-Domain- or IP-Sockets or (cooler) spawn a sub-process with a given script/program and interact with it via STDIN and STDOUT (STDERR → logging) - similar to how "FCGI" used to work. This could become the Swiss-Army-Knife to interact with Bird in oh-so-many ways, among which to implement my initial idea with ipsets.
Interesting idea! I'd prefer an external daemon over a child spawned by bird, though; in particular because it makes privilege separation and supervision much easier. Regards, Luis
… and yet another followup …
As one of my many uses for BIRD is in large wireless environments (i.e., IETF meetings) I am very interested in keeping the amount of multicast traffic as low as possible. The standards allow for a router to (immediately) respond with a unicast RA to an RS as an alternative to sending out a multicast RA „some (short, random) time“ after receiving an RS. Many others (Juniper, et.al.) have implemented this and I’d like to see this in BIRD too. The code changes are apparently very simple, so I almost did it myself, but then I didn’t want to interfere with ongoing 2.x developments. (lame excuse, I know …)
Seems simple and makes perfect sense. Will do.
Thank you. That was easy. (the next IETF meeting, where this could become be very useful, will be in mid-March … :-) :-) :-)
it didn’t make it into 2.0.2 and/or 1.6.4, though, right? (I’m sitting here in London still emitting lots of multicast RAs … 😩😩😩)
Context dependent (global) „variables“ for functions/filters
I (and probably others too) would really enjoy having more global variables defined for use inside filters & functions, depending on the context within which the respective filter/function is being called. The most obvious ones would be the peer’s (and our own) AS number (in the context of BGP protocols), the filtering direction, the protocol (type and name), the next hop’s address (where applicable), and so on.
Yes, I know, most of these could be explicitly given (at least to a function) when calling it as the import/export filter for a protocol with a „where“ clause, but that would defeat the purpose of using templates (which I really do like and use a lot).
The general concept of having „globals“ inside functions/filters is already there - just presently only in the context of the route that is being evaluated. I’d like to see this expanded into other contexts as described above.
That is an interesting idea and also seems simple, although there are some caveats, e.g. filters using such context-dependent-constants would probably work for 'show route filter'.
Yes, I had forgotten about this (very useful) feature. However, the syntax for this could be easily amended to allow the definition of such variables via the command line, i.e.,
show route filter foo(a=1, b="bla", ...)
It may be useful if you could make a list of suggested constants.
Well ... here is what comes to mind easily: (NB: these are not the "names" of the variables I propose; we should come up with a good naming scheme once we settled on an initial list of variables)
router id protocol name protocol type address family / channel-type local as remote as local interface name (outbound interface) local address (outbound interface) remote address external variables (see below)
Variables, of course, only have values inside "useful" contexts, i.e, AS number inside BGP, etc. and are otherwise "undefined".
I'l also like to propose the introduction of global variables (vs. existing constants), which can be set in the configuration file, via the command-line (i.e., "bird -D foo=42" and at runtime via birdc. Again, naming conventions have to be observed, etc. and the manual must emphasize on when exactly filters are evaluated and such.
But this would allow to build a config, whose behavior could be altered at runtime, i.e., start-up in "test-mode" and then later be switched over to "production-mode" through birdc (or any other tool using the API), among many other possibilities. It would also be nice, if variables could hold lists, most notably prefix-lists of all sorts and AS/community lists. In this case the birdc interface would require add, remove, list functions in addition to set and delete. (yeah, I know ... way more things to specify here, like uniqueness, order, etc. -- I'll hold back until you promise not to shoot down this idea completely ;-) Also: Can filters/functions set,add,remove,delete variables too ... oh, my /o\ ...) - would be nice, so one could easily implement one's own status counters ...
Anything I can do from my side to help this along? ;-) Aaaand, of course, here is another „thing“ I would like to see in future BIRD version: As the times where one would have proper link-state on circuits carrying up- or downstream BGP are clearly over these days, one would/should consider using BFD instead to determine reachability of one’s peer. However: Many ISPs („Carriers“) do not support thus due to lameness, stupidness or other means of inability. So: Can we have a very simple „ping“ functionality, which could fulfill BFD’s role in such cases? Like „ping every second, if three pings in a row went missing consider the link down!“. That would also be tremendously helpful for „simple“ (dumb) ISPs links who aren’t using any routing protocol at all („just point a default route at out router“) to „verify“ a static default route. If „ping“ gives you the creeps for one reason or another, can we use an „ARP state“ (for the peer’s address) instead? (at least for the „direct“ static routes) Thanks, Clemens (from the IETF-101 meeting in London)
On Wed, 24 Jan 2018 09:15:36 +0100 Clemens Schrimpe <clemens.schrimpe@gmail.com> wrote:
Context dependent (global) „variables“ for functions/filters
I'd love to see this feature, too! In particular, access to the local/peer ASN would be useful for me, and your other suggestions seem sensible, too.
An „ipset“ protocol for Linux
Interesting idea! Keep in mind there's nftables these days, too, which has its own set implementation. Ideally, both of them would be supported. :) In the absence of direct bird support for this feature, it can be emulated using policy routing, fwmarks and the 'fib' nftables match (or its iptables equivalent) but this is a hack with some unfortunate performance costs, so I agree it could be useful to have iptables/nftables set support in bird. Cheers, Luis
participants (3)
-
Clemens Schrimpe -
Luis Ressel -
Ondrej Zajicek