IPv6 Anycast works the same as it does in IPv4. In its simplest form, a discrete subnet is advertised by multiple, separate routers. The effect of which being that clients attempting to contact nodes on that subnet will reach the router nearest to them (by network hop-count).
Setting this up is actually pretty easy, you just need to set up the same IP subnet in different, and best of all distant, parts of the network and have the routers attached to those subnets announce that subnet. Upstream routers will summarize the route-announcements, and send traffic to the router/subnet closest to the upstream routers. Machines attempting to contact IP addresses on that subnet will therefore reach the nearer group of machines.
Your question doesn't sound like this. It sounds like two subnets connected by the same router, which by definition would be simple unicast.
Conversations FROM Anycast subnets TO Anycast subnets are tricky, and should be avoided. Take this example, 2001::3/126 is an Anycast subnet hosted in 14 different locations, and 2001::4/126 is another Anycast subnet hosted in only 3. For the sake of simplicity, assume an even distribution of subnets for both Anycast networks.
- A machine in the 6th 2001::3/126 subnet starts a connection to 2001::4/126
- Due to routing tables, this SYN packet ends up getting sent to the 3rd 2001::4/126 subnet.
- The machine in the 3rd 2001::4/126 subnet sends the
ACK
packet back to 2001::3/126
- Due to routing tables, this ACK packet ends up getting sent to the 2nd 2001::3/126 subnet.
- The machine in the 2nd 2001::3/126 subnet has no record of a connection being started, so drops the packet.
- The machine in the 6th 2001::3/126 subnet never gets the ACK it is expecting.
Unicast -> Anycast works just fine since there is only one path to the source, and the network path is the same going both ways.
Anycast -> Unicast works just fine since there is only one path to the destination, and the network path is the same going both ways.
Anycast -> Anycast is problematic since there can be multiple paths, and the network path can be completely different going both ways.