I mean via the bird config not via bgp/ospf pushes.
I have setup four DNS server in two sites. All these DNS servers announces
10.186.100.11/32 (and
10.186.100.12/32) up to the routers to create an anycast environment.
But if we stop the local DNS server then the dns resolution is no longer possible because the addresses are hardcoded on the local interface and the other three dns server will not be used.
I was hoping the direct protocol converts a route also to an ip address but this seems not to be the case.
With the kernel protocol I can export the route to the kernel routing table but that is not was I was want.
pns-b2-ns02 ~ # cat /etc/bird.conf
# Ansible managed
router id 10.186.244.12;
protocol device {
scan time 10;
}
protocol direct {
ipv4 {
import none;
export all;
};
interface "anycast";
}
protocol static {
ipv4 {
import all;
export all;
};
route
10.186.100.11/32 via "anycast";
}
protocol kernel {
ipv4 {
import none;
export all;
};
}
pns-b2-ns02 ~ # birdc show route; echo; ip a show dev anycast; echo; ip r | grep 10.186.100
BIRD 2.13.1 ready.
Table master4:
10.186.100.11/32 unicast [static1 17:22:18.282] * (200)
dev anycast
4: anycast: <BROADCAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000
link/ether 8e:b5:2b:bf:0d:5e brd ff:ff:ff:ff:ff:ff
inet
10.186.100.9/32 scope global noprefixroute anycast # <----- here should also be the address
10.186.100.11/32 valid_lft forever preferred_lft forever
10.186.100.11 dev anycast proto bird scope link metric 32