Distributed Elixir and node names on IPv6

How does one set a node name address to IPv6?
But more specifically, how does one connect to an IPv6 node instance?

With IPv4: > iex --name node@123.456.7.89 --cookie abc
It works fine and I can connect two nodes

With IPv6: > iex --name node@fe12::345:6789:1234:5678 --cookie abc
The node started but I can’t connect two nodes with:

Node.connect(:“node@fe12::345:6789:1234:5678”)

I think you may need to specify --erl "-proto_dist inet6_tcp" too. It’s mentioned on the erl man page.

That doesn’t seem to be right

What does not seem to be right?

Does @chrismcg’s suggestion not work for you?

The nodes seem to start correctly like so:

iex --name test@ipv6 --erl “-proto_dist inet6_tcp” --cookie test

However attempting to connect them with from another node:

Node.connect(:“test@ipv6”)

returns false.

For me it worked…

I can’t test across a network though, since my current network is IPv4 only. I will try to connect over a IPv6 enabled network later this evening (can take up to 12 hours until I am able to test!).

1 Like