22

So, there're a bunch of questions on SF about the uses and how anycast IPs are cool. My approach is something more practical. What specifically I need to have to use one of those addresses?

  • Do I need to be an AS (Autonomous System)?
  • If I want to use an Anycast IP on my internal network, is it possible?
  • Do I need anything special with a registrar/operator(s) to use it?

Basically, if I want to use an Anycast IP address, what exactly I need, from the equipment to configuration part.

1

3 Answers 3

12

This is what I've learned about any-cast...

  1. Yes, you need an AS to run anycast. You will also need to run BGP and route at least a /24 on the public side.
  2. Theoretically, as long as you run BGP, you should be fine; so run BGP and have multiple routers announce 192.168.1.XX or what ever you want using an AS in the range of 64512 through 65535 as these are designated private for said purpose.
  3. Only if you run public BGP. If you want to do that you have to register an IP block from LANIC and an AS also, but if you want to run private you don't.

As far as equipment is required: all you should need is one or more routers that support BGP. Vyatta and PFsense do, if you do not have a compatible router and you feel like going open source. Then you setup each router to broadcast the same IPs.

3
  • 2
    Make sure you really are using the correct AS number, otherwise you'll end up on this list and make you look like a dill ;) Mar 10, 2011 at 0:41
  • And get blocked on every router in the world.
    – Jacob
    Mar 10, 2011 at 0:45
  • Can you do this virtually? As in without actual equipment except a general purpose computer and hypervisors? Mar 20, 2015 at 9:38
5

Anycast in IPv4 just means that the IP address used is present on multiple machines and so can be reached in multiple places, not having to get back to a common end-point.

If you're not planning on getting other networks to use your anycast instance, then you don't need to announce the route and so don't need to use BGP or have an AS. You just need to make sure that your internal network has routing which provides a route to the anycast IP which is local.

Eg, if you have a border router and hang the anycast IP on a box which is on a switch connected to that, then you might have the anycast IP configured on loopback on the hosting box and have the router use a static route which points the anycast IP at the normal IP of the hosting box.

Within your organisation, you control the routing and you don't need to register what you're doing. This is commonly used for implementing things like blackhole routes, for instance. In practice, the common expectation is that you don't hijack IP address space not assigned to you; you don't create debugging problems for others; you don't interfere with the ability of others to be reached on the Internet. As long as what you're doing isn't breaking anyone but yourself, though, it's your network to do with as you please.

For an example of address-space anyone can use, you might look at http://www.as112.net/ which has three IP addresses that anyone can implement on their own network.

3

this is more of a comment than an answer, but i'm too new to comment, so an "answer" it is.

Assuming that you're talking a public announcement, I'm wondering if a /24 as the previous poster suggested is big enough. I've been told by folks who ought to know that many ISPs will not accept routes any smaller than a ( mumble mumble - /22 or /21 is what I remember).

I've got an old /24 that's been announced since the internet was young, and we've not run into any issues with losing connectivity from it, but I'd be concerned.

1
  • The ones I know will accept a /24 but you are right in certain cases it needs to be /22
    – Jacob
    Mar 10, 2011 at 3:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .