Theoretical limit to advertised routes?

I’m in the middle of a prototype for setting TailScale up for my small company’s VPN solution and would like to be able to advertise routes for the public ranges of a few regions of one of the big cloud providers so we can simplify some resource access. I was able to advertise 144 ranges on a node pretty easily but this was a relatively small subset for one region. Is there a theoretical limit to the number of advertised routes on a single node? Is there likely to be any performance issues with advertising too many routes?

Related: Is there an easier way to add the routes than setting them with the --advertise-routes=xxx,yyy.zzz... parameter?


I’m not sure if there’s a theoretical limit to the subnets you can route beyond what the linux kernel config you are using supports. As for making a big list of subnets into a more digestible form, try editing this Go program on the Go playground:, the list of subnets ipNets will need to be customized, however this program will create the most optimized possible subnets.

I’m not having trouble optimizing the route list, I checked over the output from the API I’m calling to get them in the first place and they’re clearly doing optimizations on their end but thanks for the pointer that might come in useful someday for something else.

What I was hoping for was a config file I could update or the ability to pass a file as an argument instead of having all of them on the cmd line. I’m working on a script to read the public subnet list from the cloud’s API and construct the cmd line from that output. Then I can just schedule the script occasionally to update with the current list.