How to switch from bird1.6 to bird2 without dropping routes?
Hi; We've got a bunch of Ubuntu 22.04 machines around the world using BIRD1.6 to provide anycast for nginx, much like Google does for DNS at 8.8.8.8. Each machine is in a different data center, talking to an ISP's router, and each ISP is different. Now we want to switch to BIRD2, but we don't want to interrupt service by dropping routes if we can help it. One piece of advice we got was to run BIRD1.6 and BIRD2 side-by-side on the same machine, and establish a new BGP session with BIRD2 before turning off BIRD1.6. I found https://bird.network.cz/pipermail/bird-users/2024-May/017665.html, which sets them up in two different network namespaces, but I don't know why that is helpful or if there's more to do. This is what I've worked out so far: ------------------->8-----cut here----->8------------------ $ sudo -i # apt install bird # rm /var/lib/dpkg/info/bird.prerm # mv /run/bird/* /run # apt install bird2 # systemctl cat bird > /tmp/bird.service # systemctl edit --force --full bird2 ( load the contents of /tmp/bird.service ) # systemctl start bird2 # birdc -s /run/bird/bird.ctl show status | head -n1 BIRD 2.0.8 ready. # birdc -s /run/bird.ctl show status | head -n1 BIRD 1.6.8 ready. ------------------->8-----cut here----->8------------------ The remaining question is what do we have to do change in the new BIRD2 /etc/bird/bird.conf file to allow it to take over for the old BIRD1.6? That's in addition to the expected configuration file changes needed for BIRD2 compatibility (which we may or may not have done correctly). I suspect we'll have to change the router id at the very least; do we also have to bind to another ip address and set strict binding? Thank you! -- CH (ch-and-bird-users@ch.pkts.ca)
HI CH, I'd look into graceful restart. So you can shut down bird1 leaving the routes in the kernel's routing table. And then you start bird2 in graceful mode, it doesn't touch the kernel routes until it syncs its protocols. But for example for BGP graceful restarting should be supported from both sides. Remote side should also receive a message that you want it to keep your routes for some time, otherwise it will drop your routes when the session is dropped. And there is absolutely no option to migrate live BGP sessions between bird1 and bird2. Regards, Alexander On Fri, Sep 25, 2026 at 11:08 PM CH via Bird-users <bird-users@network.cz> wrote:
Hi;
We've got a bunch of Ubuntu 22.04 machines around the world using BIRD1.6 to provide anycast for nginx, much like Google does for DNS at 8.8.8.8.
Each machine is in a different data center, talking to an ISP's router, and each ISP is different.
Now we want to switch to BIRD2, but we don't want to interrupt service by dropping routes if we can help it.
One piece of advice we got was to run BIRD1.6 and BIRD2 side-by-side on the same machine, and establish a new BGP session with BIRD2 before turning off BIRD1.6.
I found https://bird.network.cz/pipermail/bird-users/2024-May/017665.html, which sets them up in two different network namespaces, but I don't know why that is helpful or if there's more to do.
This is what I've worked out so far:
------------------->8-----cut here----->8------------------
$ sudo -i # apt install bird # rm /var/lib/dpkg/info/bird.prerm # mv /run/bird/* /run # apt install bird2 # systemctl cat bird > /tmp/bird.service # systemctl edit --force --full bird2 ( load the contents of /tmp/bird.service ) # systemctl start bird2 # birdc -s /run/bird/bird.ctl show status | head -n1
BIRD 2.0.8 ready.
# birdc -s /run/bird.ctl show status | head -n1
BIRD 1.6.8 ready.
------------------->8-----cut here----->8------------------
The remaining question is what do we have to do change in the new BIRD2 /etc/bird/bird.conf file to allow it to take over for the old BIRD1.6?
That's in addition to the expected configuration file changes needed for BIRD2 compatibility (which we may or may not have done correctly).
I suspect we'll have to change the router id at the very least; do we also have to bind to another ip address and set strict binding?
Thank you!
--
CH (ch-and-bird-users@ch.pkts.ca)
Hello CH Bird 1.6 was at end-of-support for a long-long time ago. Bird 2 is not under end-of-anything, but if I'm not mistaken, the tendency is that in the future 2 stops receiving new features. If you are making an effort to change now, why not change directly to 3? Em sex., 25 de set. de 2026 às 18:35, CH via Bird-users < bird-users@network.cz> escreveu:
Hi;
We've got a bunch of Ubuntu 22.04 machines around the world using BIRD1.6 to provide anycast for nginx, much like Google does for DNS at 8.8.8.8.
Each machine is in a different data center, talking to an ISP's router, and each ISP is different.
Now we want to switch to BIRD2, but we don't want to interrupt service by dropping routes if we can help it.
One piece of advice we got was to run BIRD1.6 and BIRD2 side-by-side on the same machine, and establish a new BGP session with BIRD2 before turning off BIRD1.6.
I found https://bird.network.cz/pipermail/bird-users/2024-May/017665.html, which sets them up in two different network namespaces, but I don't know why that is helpful or if there's more to do.
This is what I've worked out so far:
------------------->8-----cut here----->8------------------
$ sudo -i # apt install bird # rm /var/lib/dpkg/info/bird.prerm # mv /run/bird/* /run # apt install bird2 # systemctl cat bird > /tmp/bird.service # systemctl edit --force --full bird2 ( load the contents of /tmp/bird.service ) # systemctl start bird2 # birdc -s /run/bird/bird.ctl show status | head -n1
BIRD 2.0.8 ready.
# birdc -s /run/bird.ctl show status | head -n1
BIRD 1.6.8 ready.
------------------->8-----cut here----->8------------------
The remaining question is what do we have to do change in the new BIRD2 /etc/bird/bird.conf file to allow it to take over for the old BIRD1.6?
That's in addition to the expected configuration file changes needed for BIRD2 compatibility (which we may or may not have done correctly).
I suspect we'll have to change the router id at the very least; do we also have to bind to another ip address and set strict binding?
Thank you!
--
*CH (ch-and-bird-users@ch.pkts.ca <ch-and-bird-users@ch.pkts.ca>)*
-- Douglas Fernando Fischer Engº de Controle e Automação
On 28.09.2026 at 12:08, Douglas Fischer wrote:
Bird 1.6 was at end-of-support for a long-long time ago. Bird 2 is not under end-of-anything, but if I'm not mistaken, the tendency is that in the future 2 stops receiving new features.
If you are making an effort to change now, why not change directly to 3?
The transition from BIRD 2 to BIRD 3 is fairly seamless. The configuration files are compatible, so both upgrading to BIRD 3 and reverting to BIRD 2, if necessary, are relatively straightforward. -- Marek Zarychta
Hi Alexander, I've looked at graceful restart, and it looks like a good option. One problem is that we didn't think of it before now and contacting a thousand ISPs and asking them to enable it seems like a big job. The second problem is that graceful mode is only (?) negotiated at the beginning of a BGP session, and we've already got sessions. If it can be turned on in the middle of a session, that'd be good to know. Instead of migrating a live BGP session between bird1 and bird2, I was wondering if I could start a new bird2 session in parallel with an existing bird1 session, wait for it to settle, then terminate the bird1 session. As shown above I've gotten both bird1 and bird2 to run with the factory-default config files, but that's not starting any sessions. I'm just a newbie, so I don't know what resources will conflict. I saw an earlier post about using network namespaces, but I don't know what that would achieve. Alternatively I could just accept that it's hopeless and end the first session then start the second session, set to run during a maintenance window. Out of curiosity, how fast can a route be re-established on average? Does it make a difference if bird1 is killed with `kill -9`, i.e. will it prevent a final "drop all routes" message from being sent, or does closing the TCP connection drop the routes? Regards, CH
Hi Charles, As I mentioned, it is not only about the routes on your routers, but both on your peer's too. Yes, graceful restart needs preparation and its not very practical with many uncontrolled peers. So in your case I believe the best shot is planning a maintenance window for the procedure. Regards, Alexander On Thu, Oct 1, 2026, 19:54 C H via Bird-users <bird-users@network.cz> wrote:
Hi Alexander,
I've looked at graceful restart, and it looks like a good option. One problem is that we didn't think of it before now and contacting a thousand ISPs and asking them to enable it seems like a big job. The second problem is that graceful mode is only (?) negotiated at the beginning of a BGP session, and we've already got sessions. If it can be turned on in the middle of a session, that'd be good to know.
Instead of migrating a live BGP session between bird1 and bird2, I was wondering if I could start a new bird2 session in parallel with an existing bird1 session, wait for it to settle, then terminate the bird1 session. As shown above I've gotten both bird1 and bird2 to run with the factory-default config files, but that's not starting any sessions. I'm just a newbie, so I don't know what resources will conflict. I saw an earlier post about using network namespaces, but I don't know what that would achieve.
Alternatively I could just accept that it's hopeless and end the first session then start the second session, set to run during a maintenance window. Out of curiosity, how fast can a route be re-established on average? Does it make a difference if bird1 is killed with `kill -9`, i.e. will it prevent a final "drop all routes" message from being sent, or does closing the TCP connection drop the routes?
Regards, CH
participants (5)
-
Alexander Zubkov -
C H -
CH -
Douglas Fischer -
Marek Zarychta