mesh icon indicating copy to clipboard operation
mesh copied to clipboard

Add IPv6 support

Open pznamensky opened this issue 8 years ago • 5 comments

It seems that mesh doesn't support IPv6 at the moment. https://github.com/weaveworks/mesh/blob/f76d3efd85d69f5f6c202ca0509e3fa556aa4233/router.go#L102 We use IPv6 almost everywhere. And in the most cases we don't have any IPv4 addreses except 127.0.0.1. I guess we are not alone with such setup. Is it possible to add IPv6 support?

pznamensky avatar Jul 17 '17 22:07 pznamensky

Is it possible to add IPv6 support?

Sure. Shouldn't be hard. PRs welcome.

rade avatar Jul 18 '17 06:07 rade

I'm not sure that it is the right way, but simple replacing tcp4 with tcp in net.ResolveTCPAddr(), net.ListenTCP() and net.DialTCP() does the trick. I've tested mesh with prometheus alertmanager when servers have only IPv4 or only IPv6. And this works as expected. But when servers work both with IPv4 and IPv6 connections establish only using single address family.

pznamensky avatar Jul 19 '17 19:07 pznamensky

But when servers work both with IPv4 and IPv6 connections establish only using single address family.

Which one? I believe the general rule is that when there is a choice, IPv6 should be used.

rade avatar Jul 19 '17 19:07 rade

I'm sorry for the delay. But as far as I remember both were used. Several times used IPv4. And several times used IPv6.

pznamensky avatar Jul 25 '17 10:07 pznamensky

Since mesh peer identity isn't based on address, it shouldn't matter which address family is used to connect.

mpalmer avatar Oct 03 '17 09:10 mpalmer