Network Bytes · Episode 90 · CCNA 1.9
"IPv6 anycast addresses"
An IPv6 anycast address is one address shared by several servers in different places. Each packet sent to it goes to only one of them, the nearest by the routers' own measure of distance, which is how big DNS services stay close and keep working when a site goes down.
One number, the closest shop
Think of a pizza chain with one phone number. Wherever you call from, you reach the closest shop. You don't need to know which shop that is; the phone network sorts it out.
IPv6 calls this idea anycast. Several servers, often on different continents, get the exact same address, for example 2001:db8::53. Each site advertises a route to that address, so the routers end up with several paths to it.
Delivered to only one
Unlike multicast, which delivers a copy to every member of a group, anycast delivers each packet to just one of the servers: the nearest, according to the routing protocol's own measure of distance (RFC 4291, section 2.6). "Nearest" is not about kilometres; it is whatever the routers consider the best path.
Why big DNS services use it
The DNS root servers are the classic example. There are 13 root server identities, but they are answered by more than 1,500 anycast instances around the world (ICANN RSSAC FAQ). Your query goes to a nearby copy, which keeps answers fast and spreads the load.
Anycast also gives failover. If one site goes down, its route disappears and routers start sending you to the next closest site. That is not instant: it happens once the routers stop hearing the failed site's route.
It looks like any other address
An anycast address has no special prefix. It comes from the normal unicast address space and looks exactly like any unicast address, so you cannot spot one by reading it. Each device has to be told to treat the address as anycast; on Cisco IOS you add the anycast keyword: ipv6 address 2001:db8::53/64 anycast.
Try it yourself
On a computer, run nslookup -type=AAAA a.root-servers.net to see the IPv6 address of one root server identity. It is a single address, yet it is answered by many sites worldwide. Ask a friend in another country to run traceroute (or tracert on Windows) to that same address and compare: your paths will usually end at different, nearby sites.
Good to know
- CCNA 1.9 lists anycast among the IPv6 address types (EP26 covers global unicast, link-local and multicast; EP89 covers unique local).
- Per RFC 4291 (section 2.6), an anycast address is assigned to more than one interface, usually on different nodes, and a packet sent to it is delivered to one of them, the "nearest" according to the routing protocols' measure of distance.
- Anycast addresses are taken from the unicast address space and can't be told apart from unicast addresses by their format; on Cisco IOS the
anycastkeyword marks them. - "Each one advertises a route to it" is simplified: in practice the sites announce the same prefix into the routing system (often with BGP across the internet), which is beyond CCNA scope.
- RFC 4291 also defines a required Subnet-Router anycast address (the subnet prefix with an all-zero interface ID), which the short skips.
- Anycast is not unique to IPv6: the DNS root servers use both IPv4 and IPv6 anycast.
- "Pizza chain with one phone number" is the analogy.
2001:db8::53is from the documentation prefix2001:db8::/32.
For CCNA learners
CCNA exam topic 1.9 is describe IPv6 address types, and it names anycast alongside unicast (global, unique local, link-local) and multicast. Know the difference: unicast goes to one interface, multicast to every member of a group, and anycast to the nearest one of several interfaces that share the address.
Answer to the comment question
10. Routers treat the route cost like an OSPF cost, where lower is better, so the "nearest" server is the one behind the lowest cost. Your packet follows the cost-10 route and goes to that server only; the servers behind 30 and 20 never see it (unless the cost-10 site goes down).
Test your knowledge
Quick quiz: "IPv6 anycast addresses"
4 multiple-choice questions. Pick one answer for each, then check how you did.
Sources
- IETF, "RFC 4291, IP Version 6 Addressing Architecture": section 2.6, an anycast address is assigned to more than one interface and a packet goes to the "nearest" one by the routing protocols' measure of distance; anycast addresses come from the unicast space and look the same
- Cisco, "IPv6 Addressing and Basic Connectivity Configuration Guide: IPv6 Anycast Address": assigned to several interfaces, delivered to the nearest by routing, indistinguishable from unicast, configured with the anycast keyword
- Oracle, "System Administration Guide: IP Services, IPv6 addressing": anycast delivers to the nearest interface by the routing protocol's distance and is allocated from the unicast space
- ICANN, "Root Server System Advisory Committee (RSSAC) FAQ": 13 root server identities served by more than 1,500 anycast instances worldwide
- Cisco, "CCNA 200-301 v1.1 exam topics": 1.9 describe IPv6 address types, including anycast
Video transcript
How can one IPv6 address belong to servers all over the world?
Think of a pizza chain with one phone number. Wherever you call from, you reach the closest shop.
IPv6 calls this anycast. Several servers get the exact same address, and each one advertises a route to it.
Your packet goes to only one of them: the nearest, by the routers' own measure of distance.
Big DNS services work this way. If one site goes down, routers just send you to the next closest. And an anycast address looks exactly like a normal one.
Three servers share an anycast address. The routes to them cost 30, 10 and 20. Which cost does your packet follow? Comment your answer below!
That's your byte.
More from Network Bytes
- EP88"PortFast and BPDU Guard"
- EP89"IPv6 unique local addresses"
- EP91"Voice VLANs: a phone and a PC on one port"
- EP92"QoS policing vs shaping"