ZeroTierOne icon indicating copy to clipboard operation
ZeroTierOne copied to clipboard

Set underlay network prefer IPv6 to IPv4

Open Paladin-F opened this issue 3 years ago • 3 comments

All of my nodes can get both IPv4 and IPv6 addresses. But some of nodes can only get private IPv4 address from ISP. Is there any way for me to set zerotier prefer IPv6 to IPv4 globally? Tks!

Paladin-F avatar Sep 07 '22 06:09 Paladin-F

Hi, it should use the best route per peer. I don't think there is a setting to prefer one or the other.

laduke avatar Sep 07 '22 17:09 laduke

Hi, it should use the best route per peer. I don't think there is a setting to prefer one or the other.

With multipath policy, an option named "ipvPref" is just like what I need. But I‘m not sure this option will work with single path.

Paladin-F avatar Sep 08 '22 13:09 Paladin-F

You could try:

{
  "settings":
  {
    "defaultBondingPolicy": "ipv6-active-backup",
    "policies":
    {
      "ipv6-active-backup":
      {
        "ipvPref": 6,
        "failoverInterval": 10000,
        "basePolicy": "active-backup"
      }
    }
  }
}

This rule should still work even though you have a single link. It will create a bond but you can ignore it. If the ambient link probes add too much traffic overhead you can increase failoverInterval to something like 60000 or higher.

joseph-henry avatar Sep 12 '22 16:09 joseph-henry