You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
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.
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.
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.
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.
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 ;).
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.
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.
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.
Activity
[-]Support IPv6 virtual network addresses[/-][+]Support IPv6 inside the tunnel[/+]danderson commentedon Sep 21, 2020
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:
::/0as a special case, so that users can specify an ACL that applies to a dual-stacked default route.With the above, we can ship dual-stacked default routing. From there, upgrading to full dual-stack is:
/cc @bradfitz from our chat.
danderson commentedon Sep 21, 2020
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.
wgengine/router: set up basic IPv6 routing/firewalling.
danderson commentedon Sep 22, 2020
First speedbump on linux: older kernels don't support the
natnetfilter table for IPv6, so a naive setup that mimics our IPv4 setup craps out at that stage.kgersen commentedon Sep 22, 2020
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.
danderson commentedon Sep 22, 2020
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.
kgersen commentedon Sep 23, 2020
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 ;).
wgengine/router: set up basic IPv6 routing/firewalling.
wgengine/router: set up basic IPv6 routing/firewalling.
danderson commentedon Sep 29, 2020
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:
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
dorkmatt commentedon Oct 22, 2020
Minor point to think about, early adopter geeky types with existing Hurricane (or other) IPv6 tunnels. Should add this to the testing criteria.
bradfitz commentedon Oct 22, 2020
I can't imagine how existing tunnels would interfere.
wgengine/filter: add full IPv6 support.
net/packet: represent IP6 as two uint64s.
wgengine/filter: treat * as both a v4 and v6 wildcard.
wgengine/filter: twiddle bits to optimize
wgengine/filter: eliminate unnecessary memory loads.
wgengine/filter: inline ip6InList into match.
danderson commentedon Jan 16, 2021
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.
danderson commentedon Jan 16, 2021
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.
DentonGentry commentedon Feb 8, 2021
Expecting more IPv6 support in next major release.
danderson commentedon Mar 3, 2021
Umbrella bug is done, we're down to a tail of bugs and rollout prep.
Merge pull request tailscale#19 from mtojek/6640-hide-warning