1

I am trying to wrap my head around anycast on ipv4 and then ipv6. I am trying to figure out how to properly setup anycast on a multilayer switch and haven't found any good documentation on how it plays out.

Scenerio: Corp network with datacenter and core on a catalyst 6500 series, Uplink2 with ip 10.0.50.1/29 connected to corp master server for DNS/Authentication/TFTP with 10.0.50.2/29 as an anycast address. VM host on a trunk with server ip of 10.0.10.2/24 on vlan2 for the datacenter would host a vm with a 2ndary dns/auth server that would attach to the anycast ip of 10.0.50.2 and using ispf routing values to have all clients/servers access it and then the master if it goes down.

The port the host is on would it need to be a layer 3 port or is there a way to handle it with a layer 2 trunk port? would the VM server or host system its self have to handle ospf to allow routing to properly be manipulated for that purpose? I had seen one article talk about adding the anycast to a lo interface on the DNS/Auth server and using ospf on it to allow for the any cast to work.

Rough Network diagram. All black servers would be ones I want to assign an anycast address to. Gi8/1 is currently a layer2 trunk attached to a linux Kvm server. gi5/2 is a layer 3 connected directly to the master server.

enter image description here

3
  • You need to provide us with a network diagram, the network devices, and the network device configurations. Also, anycast is not explicitly configured on a network device. You use the same network in multiple places, and the routing protocol will only populate the routing table with the closest (by the routing protocol). When that network goes down, the next closest will be placed in the routing table.
    – Ron Maupin
    Commented Mar 4, 2018 at 22:10
  • That's not really how to use anycast. For anycast, you would have the servers with the same IP addresses, meaning that you would have the same network in two places. If hosts are on one of the networks, they could never reach a different network with the same network address. In this case, I would simply have multiple DNS servers configured in the hosts.
    – Ron Maupin
    Commented Mar 6, 2018 at 20:34
  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you could provide and accept your own answer.
    – Ron Maupin
    Commented Apr 1, 2018 at 22:15

1 Answer 1

1

I'm not sure if I get your approach but most probably you're not doing it right.

Anycast is termination of the same IP address/subnet in multiple points in your network. For this the subnet in which the IP address is contained cannot be used for anything else than multicast - you need to be able to route it off multiple routers without breaking anything.

You'll need a dedicated anycast subnet that you may just put on top of your normal subnet. For instance, you configure the anycast address 10.99.50.2 as a secondary address on the host 10.0.50.2. On another host 10.0.60.2 a bit further down the road you also configure 10.99.50.2 as secondary address. Now, on the router 10.0.50.1 (close to 10.0.50.2) you add an IP address 10.99.50.1/24 to the same interface it's got 10.0.50.1 bound on. For the router 10.0.60.1 (close to 10.0.60.2) you do the exact same thing.

The result is that clients using the router 10.0.50.1 will be routed to the host with the primary address 10.0.50.2 and clients using the router 10.0.60.1 will end up on the host with the primary address 10.0.60.2.

In a corporate network, it is usually easier to use split-brain DNS and resolve the DNS name depending on location to point to the nearest server.

On the Internet, anycast is more practical than split-brain DNS as you've got no control over which DNS server your clients use.

2
  • so the host usually have directly connected 2ndary ip, that makes sense. in this case i was trying to have the master and 2ndary on the same switch and set the master to a further value in ospf. would it take a layer 3 port on both hosts to allow that to work on the same switch? or is it possible to set the ospf value on a layer2 port to allow for fallover etc?
    – Kendrick
    Commented Mar 6, 2018 at 23:43
  • "is it possible to set the ospf value on a layer2 port to allow for fallover etc?" Routing happens at layer-3, not layer-2. At layer-2, frames are delivered directly from host-to-host by layer-2 address, and the switches are transparent devices.
    – Ron Maupin
    Commented Mar 7, 2018 at 0:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.