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 FRR

Creation date: 6/23/2026 9:06 AM    Updated: 6/23/2026 9:24 AM   anycast anycastip bgp frrouting 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 FRR, 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 frr

Once installed, we need to enable BGP within FRR's configuration. Open the /etc/frr/daemons file and change the bgpd line to:

bgpd=yes

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/frr/frr.conf

You can use the config below for your convenience:

frr defaults traditional
log syslog informational
service integrated-vtysh-config
password changeme
!
router bgp 65034
 no bgp default ipv4-unicast
 neighbor anycastip-v4 peer-group
 neighbor anycastip-v4 remote-as 198412
 neighbor anycastip-v4 ebgp-multihop 25
 neighbor anycastip-v4 password fc1a5e2dd6db2bc62f86975b049db2f8
 neighbor anycastip-v6 peer-group
 neighbor anycastip-v6 remote-as 198412
 neighbor anycastip-v6 ebgp-multihop 25
 neighbor anycastip-v6 password fc1a5e2dd6db2bc62f86975b049db2f8
 neighbor 172.31.255.123 peer-group anycastip-v4
 neighbor 172.31.255.133 peer-group anycastip-v4
 neighbor fd00:dead:c0de:cafe:172:31:255:123 peer-group anycastip-v6
 neighbor fd00:dead:c0de:cafe:172:31:255:133 peer-group anycastip-v6
 !
 address-family ipv4 unicast
   redistribute connected
  neighbor anycastip-v4 activate
  neighbor anycastip-v4 route-map anycastip-in in
  neighbor anycastip-v4 route-map anycastip-out out
 exit-address-family
 !
address-family ipv6 unicast
  redistribute connected
  neighbor anycastip-v6 activate
  neighbor anycastip-v6 route-map anycastip-in in
  neighbor anycastip-v6 route-map anycastip-out out
 exit-address-family
 !
route-map anycastip-out deny 100
!
route-map anycastip-out permit 1
 match interface dummy0
!
route-map anycastip-in deny 1
!
line vty
!

After saving the file, restart the BIRD by running:

sudo systemctl restart frr

Check the BGP session status by running:

sudo vtysh -c "show bgp summary"

You should expect a similar output to the one below:

IPv4 Unicast Summary (VRF default):
BGP router identifier 185.187.152.40, local AS number 65034 vrf-id 0
BGP table version 3
RIB entries 5, using 960 bytes of memory
Peers 2, using 1448 KiB of memory
Peer groups 2, using 128 bytes of memory

Neighbor        V         AS   MsgRcvd   MsgSent   TblVer  InQ OutQ  Up/Down State/PfxRcd   PfxSnt Desc
172.31.255.123  4     198412         7         8        0    0    0 00:01:03            0        1 N/A
172.31.255.133  4     198412         7         8        0    0    0 00:01:03            0        1 N/A

Total number of neighbors 2

IPv6 Unicast Summary (VRF default):
BGP router identifier 185.187.152.40, local AS number 65034 vrf-id 0
BGP table version 3
RIB entries 5, using 960 bytes of memory
Peers 2, using 1448 KiB of memory
Peer groups 2, using 128 bytes of memory

Neighbor                           V         AS   MsgRcvd   MsgSent   TblVer  InQ OutQ  Up/Down State/PfxRcd   PfxSnt Desc
fd00:dead:c0de:cafe:172:31:255:123 4     198412         7         8        0    0    0 00:01:03            0        1 N/A
fd00:dead:c0de:cafe:172:31:255:133 4     198412         7         8        0    0    0 00:01:03            0        1 N/A

Total number of neighbors 2

Verify that FRR is advertising the anycast IP routes.

show bgp ipv4 neighbors 172.31.255.123 advertised-routes

Your output should be similar to the one below:

BGP table version is 3, local router ID is 185.187.152.40, vrf id 0
Default local pref 100, local AS 65034
Status codes:  s suppressed, d damped, h history, * valid, > best, = multipath,
               i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes:  i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

   Network          Next Hop            Metric LocPrf Weight Path
*> 185.187.152.40/32
                    0.0.0.0                  0         32768 ?

Total number of prefixes 1

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