Welcome to our new support center! We are doing our best to integrate all of our documentation in a single place for your convenience. If you have any suggestions or ideas do not hesitate to contact us.

AnycastIP setup - BGP with BIRD

Creation date: 6/23/2026 7:57 AM    Updated: 6/23/2026 9:11 AM   anycast anycastip bird bird2 bpg setup

Tutorial based on Ubuntu 24.04 LTS

Please make sure that you have completed the AnycastIP setup - netplan and anycast IP addresses

To use the anycast addresses, you need to establish a BGP session. A specific node can be connected to one or more AnycastIP routers (for IPv4 and IPv6 sessions) at a given time, but only in the same location where it was registered. You can have multiple nodes per location - all our routers support ECMP.

Follow these steps to install and configure BIRD 2.0, a BGP routing daemon that advertises your anycast IP addresses.

Update the package list by running the following command.

sudo apt-get update

Install the BIRD package by running the following command.

sudo apt-get install bird2

Before creating the configuration, we need to gather some information. First, we need to get the nodes' internal IP addresses. They are available under the Nodes tab.

Nodes details

Next, we need the network configuration details, which are available on the Networks list.

Network details

The last information we need is the routers' IP addresses. The list of the locations is available at Anycast locations. Please note that you can establish BGP sessions only with the routers in the same location where you registered your node. For example, if you registered your node in London, UK, you can establish the BGP sessions only with routers there. Let's create the configuration by running.

sudo nano /etc/bird/bird.conf

You can use the config below for your convenience:

log syslog all;

# should be the private IPv4 address of your node
router id 172.30.34.1;

protocol device {
}

protocol direct {
    ipv4;
    ipv6;
    interface "dummy0";
}

protocol kernel {
    ipv4 {
        export all;
    };
}

protocol kernel {
    ipv6 {
        export all;
    };
}

protocol static {
    ipv4;
}

protocol static {
    ipv6;
}

# local as - your AS number from the network details
# neighbor - London's router addresses, as 198412
# password - your Password from the network details 

protocol bgp anycastip_ipv4_pri {
    local as 65034;
    source address 172.30.34.1;
    ipv4 {
        import none;
        export all;
    };
    graceful restart on;
    multihop 25;
    neighbor 172.31.255.123 as 198412;
    password "fc1a5e2dd6db2bc62f86975b049db2f8";
}

protocol bgp anycastip_ipv6_pri {
    local as 65034;
    source address fd00:dead:c0de:cafe::2201;
    ipv6 {
        import none;
        export all;
    };
    graceful restart on;
    multihop 25;
    neighbor fd00:dead:c0de:cafe:172:31:255:123 as 198412;
    password "fc1a5e2dd6db2bc62f86975b049db2f8";
}

protocol bgp anycastip_ipv4_sec {
    local as 65034;
    source address 172.30.34.1;
    ipv4 {
        import none;
        export all;
    };
    graceful restart on;
    multihop 25;
    neighbor 172.31.255.133 as 198412;
    password "fc1a5e2dd6db2bc62f86975b049db2f8";
}

protocol bgp anycastip_ipv6_sec {
    local as 65034;
    source address fd00:dead:c0de:cafe::2201;
    ipv6 {
        import none;
        export all;
    };
    graceful restart on;
    multihop 25;
    neighbor fd00:dead:c0de:cafe:172:31:255:133 as 198412;
    password "fc1a5e2dd6db2bc62f86975b049db2f8";
}

After saving the file, restart the BIRD by running:

sudo systemctl restart bird

Check the BGP session status by running:

sudo birdc show proto all anycastip_ipv4_pri

You should expect a similar output to the one below:

BIRD 2.14 ready.
Name       Proto      Table      State  Since         Info
anycastip_ipv4_pri BGP        ---        up     06:11:22.794  Established
  BGP state:          Established
    Neighbor address: 172.31.255.123

If all sessions show State: up and BGP state: Established, BIRD is successfully connected.

Similarly, check the session status for anycastip_ipv6_pri, anycastip_ipv4_sec, and anycastip_ipv6_sec.

Verify that BIRD is advertising the anycast IP routes.

sudo birdc show route

Your output should be similar to the one below:

BIRD 2.14 ready.
Table master4:
185.187.152.40/32    unicast [direct1 06:43:51.499] * (240)
        dev dummy0

Table master6:
2a05:b0c4:1::e/128   unicast [direct1 06:43:51.499] * (240)
        dev dummy0

This confirms that your anycast IPv4 and IPv6 addresses are bound to the dummy0 interface and advertised to the network.