Skip to content

Support IPv6 inside the tunnel #19

Closed

Description

@danderson

We don't support IPv6 on the virtual network. We should.

(This bug is unrelated to supporting IPv6 addresses for the peer-to-peer connections - see #18 for that.)

Activity

  1. added
    enhancement
    on Feb 11, 2020
  2. changed the title [-]Support IPv6 virtual network addresses[/-] [+]Support IPv6 inside the tunnel[/+] on Apr 22, 2020
  3. danderson commented on Sep 21, 2020

    @danderson
    MemberAuthor

    Right, it's time to start making progress on this. We're going to start by making a v6 default route work over Tailscale (so we can ship "default route forwarding" as a feature), and expand from there to full IPv6 support. Rough steps:

    • Adjust router_*.go to set up IPv6 if necessary (mostly applies to linux, have to duplicate iptables/iproute2 rules)
    • Minimally teach the packet filter about IPv6, enough that it can do binary allow/deny all on IPv6
    • Teach ACL editor/compiler about ::/0 as a special case, so that users can specify an ACL that applies to a dual-stacked default route.
    • Get --advertise-routes to understand IPv6 routes, and plumb throughout. This is going to be a long yak shave of undoing v4-only logic in wgengine and control.

    With the above, we can ship dual-stacked default routing. From there, upgrading to full dual-stack is:

    • Figure out an addressing plan. Unlike v4 where we have to squat CGNAT, we'll probably park a ULA /48 for our use, and carve out /128s from that.
    • Make CONTROL assign IPv6 addresses to nodes.
    • Remove/generalize all v4-specific checks in ipn/wgengine
    • Make CONTROL hand out IPv6 node addresses to nodes that understand it (and/or check that older nodes will gracefully ignore v6 addrs)
    • Teach the packet filter fully about IPv6
    • Teach the ACL compiler about IPv6

    /cc @bradfitz from our chat.

  4. danderson commented on Sep 21, 2020

    @danderson
    MemberAuthor

    Open question: on !linux, can we have an IPv6 route if we don't have an IPv6 nexthop to use? In particular, windows seems to have old-fashioned notions about how routes work, and may want a nexthop. If so, we'll have to commit to an addressing plan a little sooner, and use some reserved address as a dummy nexthop.

  5. danderson commented on Sep 22, 2020

    @danderson
    MemberAuthor

    First speedbump on linux: older kernels don't support the nat netfilter table for IPv6, so a naive setup that mimics our IPv4 setup craps out at that stage.

  6. kgersen commented on Sep 22, 2020

    @kgersen

    plz hand out at least a /64 to each node
    And allow a node to request additional /64s (ideally using dhcpv6-pd)
    Having to resort to NDPProxy or worst (NPTv6, NAT66) to join (Docker) containers or VMs running on a node is not good design.

  7. danderson commented on Sep 22, 2020

    @danderson
    MemberAuthor

    NDP is irrelevant since Tailscale is an L3 tunnel. As such, routing is not a huge deal as long as the host node has a return path into Tailscale, which is the case for containers and VMs.

    We'll think about the addressing plan some more, but the constraints and requirements we're working with are not quite the same as an ethernet LAN, so the common patterns around /64 and DHCP-PD doesn't apply very well.

    Routing additional addresses to single node is out of scope for this bug, but will happen at some point when we add support for service IPs - or routing IPs on behalf of containers and whatnot.

  8. kgersen commented on Sep 23, 2020

    @kgersen

    NDP irrelevant ? I currently have to use NDP with wireguard because on the other side they don't provide enough IPv6 subnets. May be we don't talk about the same issue(s). I'll wait for further development of this feature before bothering you more. This seems to be too early. It's just the mention of /128 that triggered me, may be for nothing ;).

  9. danderson commented on Sep 29, 2020

    @danderson
    MemberAuthor

    A problem with the above plan: we have to assign IPv6 addresses to nodes before we can subnet-route, because we need to be able to specify an AllowedIPs on the subnet router that will allow return traffic. In order to be able to do that, we need to know the peer's IPv6 node IP, so we have to have one.

    So, revised plan:

    • Adjust router_*.go to set up IPv6 if necessary (mostly applies to linux, have to duplicate iptables/iproute2 rules)
    • Figure out an addressing plan. Unlike v4 where we have to squat CGNAT, we'll probably park a ULA /48 for our use, and carve out /128s from that.
    • Make CONTROL assign IPv6 addresses to nodes. Only sufficiently new client versions get v6 addrs.
    • Teach the packet filter about IPv6.
    • Teach the ACL compiler about IPv6.
    • Get --advertise-routes to understand IPv6 routes, and plumb throughout.
    • Clean up remaining v4-isms in ipn and wgengine.

    Unfortunately, that means we don't get to take a shortcut to ship dual-stack subnet routing, we have to be mostly actually dual-stack.

    cc @bradfitz

  10. dorkmatt commented on Oct 22, 2020

    @dorkmatt

    Minor point to think about, early adopter geeky types with existing Hurricane (or other) IPv6 tunnels. Should add this to the testing criteria.

  11. bradfitz commented on Oct 22, 2020

    @bradfitz
    Member

    I can't imagine how existing tunnels would interfere.

  12. danderson commented on Jan 16, 2021

    @danderson
    MemberAuthor

    Note to self: in order to support AAAA records in MagicDNS, each v6-aware client needs to report whether it supports IPv6 locally, so that control can propagate the correct DNS records to other (potentially v6-aware) nodes. Otherwise we're relying on happy eyeballs to recover from AAAA records that lead to blackholes.

  13. danderson commented on Jan 16, 2021

    @danderson
    MemberAuthor

    Status: with the appropriate debug flag enabled, IPv6 node configuration works, and can be used for node<>node connectivity as well as v6 subnet routing w/ NAT66. Next steps are to roll out to a couple of whole domains for testing, and add in magicdns support (per above) before launching to everyone.

  14. DentonGentry commented on Feb 8, 2021

    @DentonGentry
    Contributor

    Expecting more IPv6 support in next major release.

  15. danderson commented on Mar 3, 2021

    @danderson
    MemberAuthor

    Umbrella bug is done, we're down to a tail of bugs and rollout prep.

  16. added a commit that references this issue on Mar 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

L3 Some usersP3 Can't get startedT6 Major usabilityenhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions