use ipv6 #867

Closed
opened 2009-12-20 22:17:06 +00:00 by warner · 37 comments

Shawn Willden points out that IPv6 is a likely way to deal with the servers-behind-NAT problem (#169, #445, #49, #50), since a lot of ISPs offer v6 tunnel services these days, which effectively gives the server host a publically-reachable v6 address.

To make this work, we need a couple of things, probably in the following order:

  • python must handle v6 addresses, in the socket module
  • twisted must handle v6 addresses: connecting to them, reporting them when asking a socket who it is connected to, and enumerating them on listenable interfaces. The existing IPv4Address class must grow a corresponding IPv6Address partner.
  • foolscap must handle them: putting them in connection hints (foolscap#60 has some notes on formats), connecting to them, etc
  • tahoe must handle them: formatting them into Welcome page listings, passing them through the Introducer without problems, logging them correctly

Let's collect pointers to other tickets (especially the twisted ones) and progress reports here.

Shawn Willden points out that IPv6 is a likely way to deal with the servers-behind-NAT problem (#169, #445, #49, #50), since a lot of ISPs offer v6 tunnel services these days, which effectively gives the server host a publically-reachable v6 address. To make this work, we need a couple of things, probably in the following order: * python must handle v6 addresses, in the `socket` module * twisted must handle v6 addresses: connecting to them, reporting them when asking a socket who it is connected to, and enumerating them on listenable interfaces. The existing `IPv4Address` class must grow a corresponding `IPv6Address` partner. * foolscap must handle them: putting them in connection hints ([foolscap#60](http://foolscap.lothar.com/trac/ticket/60) has some notes on formats), connecting to them, etc * tahoe must handle them: formatting them into Welcome page listings, passing them through the Introducer without problems, logging them correctly Let's collect pointers to other tickets (especially the twisted ones) and progress reports here.
warner added the
c/code-network
p/major
t/enhancement
v/1.5.0
labels 2009-12-20 22:17:06 +00:00
warner added this to the undecided milestone 2009-12-20 22:17:06 +00:00
Author

twisted#3014 looks to be the main v6-in-Twisted ticket, and is moving very slowly (created two years ago). It looks like there's a bunch of v6 address lookup code already in place, but perhaps the actual make-a-TCP-connection code is not.

[twisted#3014](http://twistedmatrix.com/trac/ticket/3014) looks to be the main v6-in-Twisted ticket, and is moving very slowly (created two years ago). It looks like there's a bunch of v6 address lookup code already in place, but perhaps the actual make-a-TCP-connection code is not.
Author

Foolscap#155 is the new v6-in-Foolscap ticket. Doesn't look too hard once the twisted ticket is done. That twisted ticket is still open, although I think there's been some good progress on it in the last month.

[Foolscap#155](http://foolscap.lothar.com/trac/ticket/155) is the new v6-in-Foolscap ticket. Doesn't look too hard once the twisted ticket is done. That twisted ticket is still open, although I think there's been some good progress on it in the last month.

The relevant Twisted ticket now seems to be http://twistedmatrix.com/trac/ticket/5085, which is fixed.

The relevant Twisted ticket now seems to be <http://twistedmatrix.com/trac/ticket/5085>, which is fixed.
ClashTheBunny commented 2013-02-08 13:35:33 +00:00
Owner

With progress by Marcus Wanner on Foolscap#155 I felt some motivation to work on IPv6 inside of Tahoe. Right now I've just done some of the ip_utils that are specific to IPv4 including some test cases that were missing. If my IPv6 work never makes it into Tahoe, my test cases would be useful to pull in.

You can follow my progress at and send pull requests to github. It's nothing much right now, but it's where I'm putting my work, so if anybody has anything to add, send it my way.

I asked on IRC and nobody else seems to be working on this, so let me know if you have something already done.

There may be some point to document a way to tunnel IPv4 over IPv6 until this work is done so that people can take advantage of IPv6 without the platform support within Tahoe. Something as simple as nc and some pipes.

With progress by Marcus Wanner on [Foolscap#155](http://foolscap.lothar.com/trac/ticket/155) I felt some motivation to work on IPv6 inside of Tahoe. Right now I've just done some of the ip_utils that are specific to IPv4 including some test cases that were missing. If my IPv6 work never makes it into Tahoe, my test cases would be useful to pull in. You can follow my progress at and send pull requests to [github](https://github.com/ClashTheBunny/tahoe-lafs/commits/ipv6). It's nothing much right now, but it's where I'm putting my work, so if anybody has anything to add, send it my way. I asked on IRC and nobody else seems to be working on this, so let me know if you have something already done. There may be some point to document a way to tunnel IPv4 over IPv6 until this work is done so that people can take advantage of IPv6 without the platform support within Tahoe. Something as simple as nc and some pipes.

Thanks! I don't think anyone else is working on this at the Tahoe end, so feel free to continue.

Thanks! I don't think anyone else is working on this at the Tahoe end, so feel free to continue.

Attachment 32.png (161874 bytes) added

Screenshot from 2013-02-14

**Attachment** 32.png (161874 bytes) added Screenshot from 2013-02-14
158 KiB

ClashTheBunny wrote on tahoe-dev:

I've made some progress with IPv6. The first time a node is brought up it listens on both IPv4 and IPv6. I still have to figure out many side cases and test what is best when there is only IPv6, only IPv4, or both. It also needs to set the port correctly in the furl file after it is first run so that it listens to the correct protocol on the next runs. It's still communicating over IPv6!

Yay!

Re: the screenshot, the "Connected?" column should probably show IPv6 addresses in the same format they appear in furls.

After these side cases are thought out, tests, tests, and more tests!

Excellent.

[ClashTheBunny](wiki/ClashTheBunny) wrote on tahoe-dev: > I've made some progress with IPv6. The first time a node is brought up it listens on both IPv4 and IPv6. I still have to figure out many side cases and test what is best when there is only IPv6, only IPv4, or both. It also needs to set the port correctly in the furl file after it is first run so that it listens to the correct protocol on the next runs. It's still communicating over IPv6! Yay! Re: [the screenshot](/tahoe-lafs/trac/attachments/000078ac-1b75-f1a8-ff3b-c5ca533415fa), the "Connected?" column should probably show IPv6 addresses in the same format they appear in furls. > After these side cases are thought out, tests, tests, and more tests! Excellent.
ClashTheBunny commented 2013-03-02 21:03:30 +00:00
Owner

How time flies. I've made some good progress on the IPv6 implementation and now need some good advice as to what to write new tests for. I could also use some code review. Everything implemented as far as I can tell:

    • I've added a new boolean option "ipv6privacy" that will turn off all addresses that contain a MAC address
    • The fe80*
      /10 addresses are silently dropped
    • I've added a new boolean option "preferipv4" that will list address in an order that should prioritize IPv4 addresses when true. It will also listen on IPv4 interfaces only. I am pretty sure that this works, but it would be nice for some people to do some tests. I think this may need to be converted to a tri-state of ipversion = v4, ipversion = preferv4, and ipversion = preferv6. Suggestions welcome.
    • IPv6 and IPv4 addresses are now listed in the "Connected?" column as they appear in FURLs.
    • I detect if I'm listening on IPv6, and write my port file as an IPv6 port in that case. If IPv6 comes up the first time, may as well make it come up always. If it doesn't come up, you need to delete the port file and bring it up again.
    • I've written a few tests, and updated others that needed updating, but as I said above, I would like some advice as to what else needs to be tested, and what should be assumed from foolscap's tests passing.

Things not complete that may be good to include in this:

  • The webserver still is IPv4 only. It seems to be a larger update than this one because more of the low level stuff is done there and not handled by foolscap like here.
  • I don't know exactly where logging of IP addresses happen, but I haven't seen any addresses logged yet. I've grepped around the code and didn't see anything, but a pointer to where this would happen would be nice.

Things required:

Remember, there are probably still bugs, so treat this as dangerous with data. I don't think I touched anything mission critical though, and all the old tests pass, so I wouldn't be too scared either.

How time flies. I've made some good progress on the IPv6 implementation and now need some good advice as to what to write new tests for. I could also use some code review. Everything implemented as far as I can tell: * * I've added a new boolean option "ipv6privacy" that will turn off all addresses that contain a MAC address * The fe80* /10 addresses are silently dropped * I've added a new boolean option "preferipv4" that will list address in an order that should prioritize IPv4 addresses when true. It will also listen on IPv4 interfaces only. I am pretty sure that this works, but it would be nice for some people to do some tests. I think this may need to be converted to a tri-state of ipversion = v4, ipversion = preferv4, and ipversion = preferv6. Suggestions welcome. * IPv6 and IPv4 addresses are now listed in the "Connected?" column as they appear in FURLs. * I detect if I'm listening on IPv6, and write my port file as an IPv6 port in that case. If IPv6 comes up the first time, may as well make it come up always. If it doesn't come up, you need to delete the port file and bring it up again. * I've written a few tests, and updated others that needed updating, but as I said above, I would like some advice as to what else needs to be tested, and what should be assumed from foolscap's tests passing. Things not complete that may be good to include in this: * The webserver still is IPv4 only. It seems to be a larger update than this one because more of the low level stuff is done there and not handled by foolscap like here. * I don't know exactly where logging of IP addresses happen, but I haven't seen any addresses logged yet. I've grepped around the code and didn't see anything, but a pointer to where this would happen would be nice. Things required: * foolscap from Marcus Wanner's ipv6 branch on github: git clone <https://github.com/marcuswanner/foolscap> -b ipv6 * Twisted 12.1 * My ipv6 Tahoe branch. * IPv6 of course! Remember, there are probably still bugs, so treat this as dangerous with data. I don't think I touched anything mission critical though, and all the old tests pass, so I wouldn't be too scared either.
ClashTheBunny commented 2013-03-04 10:06:34 +00:00
Owner

I converted preferv6 to a tri-state of ipversion = v4, ipversion = preferv4, and ipversion = preferv6. In a 7 node network with two nodes only reachable via IPv6, the upload succeeds on a "preferv4" host and a "preferv6" host, but fails on the "v4" host. So I know that v4 works as expected. I'm happy with the way preferv6 and preferv4 work. They advertise the right version first, but still work with either version.

I need to get some real testing done with Windows before 7 or another operating system that has a separate ipv4 stack from an ipv6 stack. If anybody is willing to try this, I would greatly appreciate it.

I converted preferv6 to a tri-state of ipversion = v4, ipversion = preferv4, and ipversion = preferv6. In a 7 node network with two nodes only reachable via IPv6, the upload succeeds on a "preferv4" host and a "preferv6" host, but fails on the "v4" host. So I know that v4 works as expected. I'm happy with the way preferv6 and preferv4 work. They advertise the right version first, but still work with either version. I need to get some real testing done with Windows before 7 or another operating system that has a separate ipv4 stack from an ipv6 stack. If anybody is willing to try this, I would greatly appreciate it.
Owner

A few comments:
** the URL of your git repo/branch should probably be in this ticket

  • Probably someone (you?) should file a separate ticket for making the WUI listen on *
    1 (and presumably then the CLI interface could use that next, another ticket).
  • whether a node is willing to use v4 vs v6 for outgoing connections should be separate from whether the node listens on v4 or v6 (foolscap)
  • the concept of the port file seems a little off. nodes listen on an address/port pair, or rather a set of them. what port means now is "put this together with INADDR_ANY". But, it could be "put it with INADDR_ANY, and also with INADDR6_ANY". So probably the node config needs a config to list the address families on which to listen, defaulting to all OS-supported families. (For extra credit, test on a BSD system without INET in the kernel - I need to see if that still builds, and if not fix it.) I suggest "IncomingFamiles = inet6, inet", being a set.
  • for outgoing connections, the introducer furl, or data from the introducer, will have a list of addresses. I think it makes sense to 1) include a list of acceptable address families, defaulting to all OS-supported families and 2) have a way to express preference. For preference, I would start with v6, following the modern tradition. So I can see this being a "OutgoingFamilies = inet6, inet" and it being a list rather than a set.
A few comments: ** the URL of your git repo/branch should probably be in this ticket * Probably someone (you?) should file a separate ticket for making the WUI listen on * 1 (and presumably then the CLI interface could use that next, another ticket). * whether a node is willing to use v4 vs v6 for outgoing connections should be separate from whether the node listens on v4 or v6 (foolscap) * the concept of the port file seems a little off. nodes listen on an address/port pair, or rather a set of them. what port means now is "put this together with INADDR_ANY". But, it could be "put it with INADDR_ANY, and also with INADDR6_ANY". So probably the node config needs a config to list the address families on which to listen, defaulting to all OS-supported families. (For extra credit, test on a BSD system without INET in the kernel - I need to see if that still builds, and if not fix it.) I suggest "IncomingFamiles = inet6, inet", being a set. * for outgoing connections, the introducer furl, or data from the introducer, will have a list of addresses. I think it makes sense to 1) include a list of acceptable address families, defaulting to all OS-supported families and 2) have a way to express preference. For preference, I would start with v6, following the modern tradition. So I can see this being a "OutgoingFamilies = inet6, inet" and it being a list rather than a set.
ClashTheBunny commented 2013-03-04 14:28:43 +00:00
Owner

Replying to gdt:

A few comments:

  • the URL of your git repo/branch should probably be in this ticket

It's listed in my first comment, but it's here (for easier grep-ability): https://github.com/ClashTheBunny/tahoe-lafs/commits/ipv6

  • Probably someone (you?) should file a separate ticket for making the WUI listen on ::1 (and presumably then the CLI interface could use that next, another ticket).

Yeah, I'm thinking that either we should make three tickets with this as the parent, or create two more tickets with those parts of the process. If we did three tickets, I would call mine "Tahoe-LAFS transport over IPv6" or something like that. I'll let zooko or David-Sarah figure that out, because they know more about the management of the project.

  • whether a node is willing to use v4 vs v6 for outgoing connections should be separate from whether the node listens on v4 or v6 (foolscap)

Agreed. I'll look into how that works in foolscap. The problem is that there aren't many controls that I have. Right now I can specify which addresses are advertised and in which order. I can also specify if the listen port is TCPv4 or TCPv6. I don't think I can tell foolscap not to make connections to a certain address family, but as I said, I'll look into that.

  • the concept of the port file seems a little off. nodes listen on an address/port pair, or rather a set of them. what port means now is "put this together with INADDR_ANY". But, it could be "put it with INADDR_ANY, and also with INADDR6_ANY". So probably the node config needs a config to list the address families on which to listen, defaulting to all OS-supported families. (For extra credit, test on a BSD system without INET in the kernel - I need to see if that still builds, and if not fix it.) I suggest "IncomingFamiles = inet6, inet", being a set.

I don't know if the first case exists. I think I can specify INADDR_ANY and INADDR6_ANY. Linux automatically makes INADDR6_ANY also receive IPv4 connections if /proc/sys/net/ipv6/bindv6only is set to the default value of 0. In NetBSD I think this would be sysctl -w net.inet6.ip6.v6only=0. This INADDR_ANY and INADDR6_ANY translate to this in a tub entry:

0 or tcp:0 is any free port the OS will give us on only INADDR_ANY
tcp6:0 is any free port the OS will give us on INADDR6_ANY, if your OS listens on INADDR6_ANY for INADDR_ANY connections also, you get both. This is Linux's default, I think every BSD, and I've heard that Windows 7 also, but Windows XP/Vista have seperate V6 and V4 stacks, so it only listens on INADDR6_ANY.

or tcp: listens on INADDR_ANY on that specific port
tcp6: listens on INADDR6_ANY on that specific port, with the above caveats about stacks and listening on both.

Either way, I'll set up bindv6only on a test machine I'm running to make sure that the expected behavior works (or that ipv4 connections don't work!).

  • for outgoing connections, the introducer furl, or data from the introducer, will have a list of addresses. I think it makes sense to 1) include a list of acceptable address families, defaulting to all OS-supported families and 2) have a way to express preference. For preference, I would start with v6, following the modern tradition. So I can see this being a "OutgoingFamilies = inet6, inet" and it being a list rather than a set.

This is essentially what I did with ipversion above. I don't know if there is a real way of asking foolscap to actually prefer one over the other, but I do know that if I list IPv6 addresses at the end of the list of addresses advertised to the introducer, I, more often than not, get IPv6 connections. The opposite is also true, if I list them first, I rarely get IPv6 connections. If you look at the code that includes ipversion it's kinda a combination of these last two comments. I now understand that they can be split into two variables:

IncomingFamily = inet or inet6, implementation details would then state that, depending on your OS and settings this will give you v4, v6, or both.

and PreferredOutgoingFamily would do the previous reordering of addresses when advertising to the introducer my addresses.

I don't think I can tell the introducer that I support one type of address or another, but that would have to happen in foolscap. Also, it would be nice to file a bug against foolscap to have a true preference of family be possible. The bug tracker is currently down, so I keep making comments on Marcus Wanner's latest commit to his ipv6 branch of foolscap on github (https://github.com/marcuswanner/foolscap/commit/d890c7739008103ebdd2ecdb5dab971ef9cee484). Right now I'm going to split my tri-state variable 'ipversion' into the two you suggested. We'll hope that foolscap is able to either be fixed or keeps it current behavior. I'll also make a comment in the code about how it works for me but there is no official way of doing this yet.

Replying to [gdt](/tahoe-lafs/trac/issues/867#issuecomment-374947): > A few comments: > * the URL of your git repo/branch should probably be in this ticket It's listed in my [first comment](/tahoe-lafs/trac/issues/867#issuecomment-374942), but it's here (for easier grep-ability): <https://github.com/ClashTheBunny/tahoe-lafs/commits/ipv6> > * Probably someone (you?) should file a separate ticket for making the WUI listen on ::1 (and presumably then the CLI interface could use that next, another ticket). Yeah, I'm thinking that either we should make three tickets with this as the parent, or create two more tickets with those parts of the process. If we did three tickets, I would call mine "Tahoe-LAFS transport over IPv6" or something like that. I'll let zooko or David-Sarah figure that out, because they know more about the management of the project. > * whether a node is willing to use v4 vs v6 for outgoing connections should be separate from whether the node listens on v4 or v6 (foolscap) Agreed. I'll look into how that works in foolscap. The problem is that there aren't many controls that I have. Right now I can specify which addresses are advertised and in which order. I can also specify if the listen port is TCPv4 or TCPv6. I don't think I can tell foolscap not to make connections to a certain address family, but as I said, I'll look into that. > * the concept of the port file seems a little off. nodes listen on an address/port pair, or rather a set of them. what port means now is "put this together with INADDR_ANY". But, it could be "put it with INADDR_ANY, and also with INADDR6_ANY". So probably the node config needs a config to list the address families on which to listen, defaulting to all OS-supported families. (For extra credit, test on a BSD system without INET in the kernel - I need to see if that still builds, and if not fix it.) I suggest "IncomingFamiles = inet6, inet", being a set. I don't know if the first case exists. I think I can specify INADDR_ANY and INADDR6_ANY. Linux automatically makes INADDR6_ANY also receive IPv4 connections if /proc/sys/net/ipv6/bindv6only is set to the default value of 0. In NetBSD I think this would be sysctl -w net.inet6.ip6.v6only=0. This INADDR_ANY and INADDR6_ANY translate to this in a tub entry: 0 or tcp:0 is any free port the OS will give us on only INADDR_ANY tcp6:0 is any free port the OS will give us on INADDR6_ANY, if your OS listens on INADDR6_ANY for INADDR_ANY connections also, you get both. This is Linux's default, I think every BSD, and I've heard that Windows 7 also, but Windows XP/Vista have seperate V6 and V4 stacks, so it only listens on INADDR6_ANY. <any number> or tcp:<any number> listens on INADDR_ANY on that specific port tcp6:<any number> listens on INADDR6_ANY on that specific port, with the above caveats about stacks and listening on both. Either way, I'll set up bindv6only on a test machine I'm running to make sure that the expected behavior works (or that ipv4 connections don't work!). > * for outgoing connections, the introducer furl, or data from the introducer, will have a list of addresses. I think it makes sense to 1) include a list of acceptable address families, defaulting to all OS-supported families and 2) have a way to express preference. For preference, I would start with v6, following the modern tradition. So I can see this being a "OutgoingFamilies = inet6, inet" and it being a list rather than a set. This is essentially what I did with ipversion above. I don't know if there is a real way of asking foolscap to actually prefer one over the other, but I do know that if I list IPv6 addresses at the end of the list of addresses advertised to the introducer, I, more often than not, get IPv6 connections. The opposite is also true, if I list them first, I rarely get IPv6 connections. If you look at the code that includes ipversion it's kinda a combination of these last two comments. I now understand that they can be split into two variables: [IncomingFamily](wiki/IncomingFamily) = inet or inet6, implementation details would then state that, depending on your OS and settings this will give you v4, v6, or both. and [PreferredOutgoingFamily](wiki/PreferredOutgoingFamily) would do the previous reordering of addresses when advertising to the introducer my addresses. I don't think I can tell the introducer that I support one type of address or another, but that would have to happen in foolscap. Also, it would be nice to file a bug against foolscap to have a true preference of family be possible. The bug tracker is currently down, so I keep making comments on Marcus Wanner's latest commit to his ipv6 branch of foolscap on github (<https://github.com/marcuswanner/foolscap/commit/d890c7739008103ebdd2ecdb5dab971ef9cee484>). Right now I'm going to split my tri-state variable 'ipversion' into the two you suggested. We'll hope that foolscap is able to either be fixed or keeps it current behavior. I'll also make a comment in the code about how it works for me but there is no official way of doing this yet.
ClashTheBunny commented 2013-03-04 18:47:49 +00:00
Owner

Greg Troxel helped me understand some things about dual stack vs split stack v4/v6 implementations, it should now work in both cases. The configuration options are now outgoingfamily as either preferv6 or preferv4 and incomingfamily as inet, inet6, or both.

I still don't think that I can stop foolscap from connecting to IPv6 addresses that are advertised to it if I have IPv6 connectivity to that node. Outgoingfamily still chooses to advertise IPv6 addresses first or last based off of my experience with foolscap, but it still doesn't prevent connections over IPv6 or IPv4.

I just pushed these changes to github, so keep testing away everyone!

Greg Troxel helped me understand some things about dual stack vs split stack v4/v6 implementations, it should now work in both cases. The configuration options are now outgoingfamily as either preferv6 or preferv4 and incomingfamily as inet, inet6, or both. I still don't think that I can stop foolscap from connecting to IPv6 addresses that are advertised to it if I have IPv6 connectivity to that node. Outgoingfamily still chooses to advertise IPv6 addresses first or last based off of my experience with foolscap, but it still doesn't prevent connections over IPv6 or IPv4. I just pushed these changes to github, so keep testing away everyone!
Owner

I forgot about foolscap's try-them-all-first-one-wins plan. Given that, I don't think it makes sense to fight the foolscap way. The usual reasons to try v6 first are to promote v6 adoption and to avoid NAT pain. The reasons to configure v4 first instead are because v6 is flaky or slow (due to infrastructure/routing, not protocol).

Longer term, foolscap should become aware of AF preference and support that somehow.

I forgot about foolscap's try-them-all-first-one-wins plan. Given that, I don't think it makes sense to fight the foolscap way. The usual reasons to try v6 first are to promote v6 adoption and to avoid NAT pain. The reasons to configure v4 first instead are because v6 is flaky or slow (due to infrastructure/routing, not protocol). Longer term, foolscap should become aware of AF preference and support that somehow.

Given foolscap's try-them-all-first-one-wins behaviour, is there any real need for the preferv4 option? If the required v6 connectivity isn't available, then the attempted v6 connections should fail quickly (or am I wrong about that?) So the only reason to use preferv4 would be if the v6 connections can succeed but are not reliable in some way. But, in that case it would still be possible for a v6 connection to be made if preferv4 is set, and so setting that wouldn't solve the unreliability.

Given foolscap's try-them-all-first-one-wins behaviour, is there any real need for the `preferv4` option? If the required v6 connectivity isn't available, then the attempted v6 connections should fail quickly (or am I wrong about that?) So the only reason to use `preferv4` would be if the v6 connections *can* succeed but are not reliable in some way. But, in that case it would still be possible for a v6 connection to be made if `preferv4` is set, and so setting that wouldn't solve the unreliability.
Owner

In a multi-AF world, foolscap not having a "only use this AF" runtime config is at least a misfeature if not a bug.
But until foolscap gets that, I don't see the point in sorting.

In a multi-AF world, foolscap not having a "only use this AF" runtime config is at least a misfeature if not a bug. But until foolscap gets that, I don't see the point in sorting.
ClashTheBunny commented 2013-03-08 12:01:06 +00:00
Owner

Updated branch to include tests for IPv6 in client tests and introducer tests.

Added option to include fe80::/10 addresses but is off by default and should not be documented. In the future, it will allow more flexibility with fewer changes. If somebody really wants an fe80 address to show up, they can read the source code and enable the option.

An option for end to end testing would be to turn off IPv4 in all of the regular tests. This would allow all of the other tests to be tested over IPv6, thereby testing IPv6.

All my new tests pass, including the tests that I added for IPv4 addresses.

Updated branch to include tests for IPv6 in client tests and introducer tests. Added option to include fe80::/10 addresses but is off by default and should not be documented. In the future, it will allow more flexibility with fewer changes. If somebody really wants an fe80 address to show up, they can read the source code and enable the option. An option for end to end testing would be to turn off IPv4 in all of the regular tests. This would allow all of the other tests to be tested over IPv6, thereby testing IPv6. All my new tests pass, including the tests that I added for IPv4 addresses.

Replying to ClashTheBunny:

Added option to include fe80::/10 addresses but is off by default and should not be documented. In the future, it will allow more flexibility with fewer changes. If somebody really wants an fe80 address to show up, they can read the source code and enable the option.

I think we prefer all options to be documented.

Replying to [ClashTheBunny](/tahoe-lafs/trac/issues/867#issuecomment-374953): > Added option to include fe80::/10 addresses but is off by default and should not be documented. In the future, it will allow more flexibility with fewer changes. If somebody really wants an fe80 address to show up, they can read the source code and enable the option. I think we prefer all options to be documented.
Owner

Replying to [davidsarah]comment:21:

Replying to ClashTheBunny:

Added option to include fe80::/10 addresses but is off by default and should not be documented. In the future, it will allow more flexibility with fewer changes. If somebody really wants an fe80 address to show up, they can read the source code and enable the option.

I think we prefer all options to be documented.

I think the point here is that including fe80::/10 is basically broken but there are perhaps reasons why someone would want to experiment. I think clashthebunny is talking about a variable to set in the sources, not command-line support. I would say that if there's a requirement to expose this in command-line and docs, then the option shouldn't exist. I haven't seen a valid use-case for it yet.

Replying to [davidsarah]comment:21: > Replying to [ClashTheBunny](/tahoe-lafs/trac/issues/867#issuecomment-374953): > > Added option to include fe80::/10 addresses but is off by default and should not be documented. In the future, it will allow more flexibility with fewer changes. If somebody really wants an fe80 address to show up, they can read the source code and enable the option. > > I think we prefer all options to be documented. I think the point here is that including fe80::/10 is basically broken but there are perhaps reasons why someone would want to experiment. I think clashthebunny is talking about a variable to set in the sources, not command-line support. I would say that if there's a requirement to expose this in command-line and docs, then the option shouldn't exist. I haven't seen a valid use-case for it yet.
Owner

Seems like the ticket regarding IPv6 support in Twisted got closed 10 months ago:

https://twistedmatrix.com/trac/ticket/3014

Does anyone know what else might still be missing? (and could update the ticket description with that?)

Seems like the ticket regarding IPv6 support in Twisted got closed 10 months ago: <https://twistedmatrix.com/trac/ticket/3014> Does anyone know what else might still be missing? (and could update the ticket description with that?)
Author

The main remaining issue is that Foolscap needs to support it: http://foolscap.lothar.com/trac/ticket/155

The last time I looked at this, Foolscap was blocked on a different Twisted bug (twisted#8014), which is preventing us from using a HostnameEndpoint to connect. We really want to use HostnameEndpoint because they handle A or AAAA records in DNS, so you can publish a normal hostname in your FURL and have clients connect over whichever of v4/v6 both ends support.

The consequence is that the process emits unhandled AlreadyCalledError failures when there are multiple connection hints and some of them don't answer right away. This happens all the time with automatically-generated FURLs, since they include non-routable (local) addresses and other unconnectable things. The errors cause Foolscap's unit tests to fail, and would show up as errors in the logs for a real application (probably causing Tahoe's unit tests to fail too, although maybe there we can constraint the FURLs to not hit this case).

I haven't seen any movement on that ticket since I filed it 5 months ago, but it's possible that other changes in Twisted may have fixed the problem. The next step will be to re-introduce the HostnameEndpoint change and see if the Foolscap tests pass or fail with the latest version of Twisted.

There are probably some other cosmetic things that need updating: we need to make sure the FURL parser can handle dotted-quad IP addresses, and Tahoe has a handful of places that want to display IP addresses that may need changes.

The main remaining issue is that Foolscap needs to support it: <http://foolscap.lothar.com/trac/ticket/155> The last time I looked at this, Foolscap was blocked on a different Twisted bug ([twisted#8014](https://twistedmatrix.com/trac/ticket/8014)), which is preventing us from using a HostnameEndpoint to connect. We really want to use HostnameEndpoint because they handle A **or** AAAA records in DNS, so you can publish a normal hostname in your FURL and have clients connect over whichever of v4/v6 both ends support. The consequence is that the process emits unhandled `AlreadyCalledError` failures when there are multiple connection hints and some of them don't answer right away. This happens all the time with automatically-generated FURLs, since they include non-routable (local) addresses and other unconnectable things. The errors cause Foolscap's unit tests to fail, and would show up as errors in the logs for a real application (probably causing Tahoe's unit tests to fail too, although maybe there we can constraint the FURLs to not hit this case). I haven't seen any movement on that ticket since I filed it 5 months ago, but it's possible that other changes in Twisted may have fixed the problem. The next step will be to re-introduce the HostnameEndpoint change and see if the Foolscap tests pass or fail with the latest version of Twisted. There are probably some other cosmetic things that need updating: we need to make sure the FURL parser can handle dotted-quad IP addresses, and Tahoe has a handful of places that want to display IP addresses that may need changes.

Now that the Tahoe-LAFS server side supports endpoints and we have transport handlers for the client side it should be easy to get IPv6 working. I think the simplest possible solution would be:

  • write a IPv6 handler (client side) which uses TCP6ClientEndpoint

  • configure the node's tub.port= to be set to an endpoint string which uses TCP6ServerEndpoint

Now that the Tahoe-LAFS server side supports endpoints and we have transport handlers for the client side it should be easy to get IPv6 working. I think the simplest possible solution would be: - write a IPv6 handler (client side) which uses TCP6ClientEndpoint - configure the node's tub.port= to be set to an endpoint string which uses TCP6ServerEndpoint
Author

I've updated foolscap#155 with notes about the new DefaultTCP parser plan. Twisted's HostnameEndpoint works now, and current Foolscap uses it by default. So the following should work right now:

  • tub.port = tcp6:12345
  • tub.location = tcp:HOSTNAME:12345 (where HOSTNAME has a valid AAAA record)

When foolscap#155 is done, the following should work too:

  • tub.port = tcp6:12345
  • tub.location = tcp:[2600:3c01::f03c:91ff:fe93:d272]:12345

We're not planning to enhance the (legacy) automatic-IP-address detection routine to include IPv6 addresses, since we've deprecated that in favor of human-provided hostnames. So I think once the foolscap ticket is closed and a new release made, (and any cosmetic status displays fixed), we can declare our ipv6 support as complete and close this ticket.

I've updated [foolscap#155](https://foolscap.lothar.com/trac/ticket/155) with notes about the new `DefaultTCP` parser plan. Twisted's HostnameEndpoint works now, and current Foolscap uses it by default. So the following should work right now: * `tub.port = tcp6:12345` * `tub.location = tcp:HOSTNAME:12345` (where HOSTNAME has a valid AAAA record) When [foolscap#155](https://foolscap.lothar.com/trac/ticket/155) is done, the following should work too: * `tub.port = tcp6:12345` * `tub.location = tcp:[2600:3c01::f03c:91ff:fe93:d272]:12345` We're not planning to enhance the (legacy) automatic-IP-address detection routine to include IPv6 addresses, since we've deprecated that in favor of human-provided hostnames. So I think once the foolscap ticket is closed and a new release made, (and any cosmetic status displays fixed), we can declare our ipv6 support as complete and close this ticket.

Sorry for me not being sure about all the consequences of this: Does this mean foolscap can then – given IPv6 is configured properly – overcome NAT barriers?
Thanks for any clarifying comments.

Sorry for me not being sure about all the consequences of this: Does this mean foolscap can then – given IPv6 is configured properly – overcome NAT barriers? Thanks for any clarifying comments.
Author

Only if the machine has a publically-reachable IPv6 address. I suspect most home computers that have v6 addresses will still be blocked by a firewall of some sort. So unfortunately, no, I don't think enabling IPv6 will significantly help with the NAT barrier.

Only if the machine has a publically-reachable IPv6 address. I suspect most home computers that have v6 addresses will still be blocked by a firewall of some sort. So unfortunately, no, I don't think enabling IPv6 will significantly help with the NAT barrier.

Alright, thanks. So with full administrative control, it should be possible. At least – let's see!

Alright, thanks. So with full administrative control, it *should* be possible. At least – let's see!
Author

foolscap#155 is done. I plan to make a new Foolscap release in the next couple of days (either named 0.12.4 or 0.13.0): once that's out, we can close this ticket.

[foolscap#155](https://foolscap.lothar.com/trac/ticket/155) is done. I plan to make a new Foolscap release in the next couple of days (either named 0.12.4 or 0.13.0): once that's out, we can close this ticket.
Author

Oh, actually, this might need more work. I'm doing some manual testing, and it looks like our default behavior of listening on tcp:PORT only makes an IPv4 listening socket. I tried connecting to that (on a host with both IPv4 and IPv6 addresses bound to en0) with nc -6 IPV6ADDR PORT and it wouldn't connect. If I listen on tcp6:PORT then nc -6 works but nc -4 doesn't.

I think we might need to listen on both tcp:PORT and tcp6:PORT to allow A+AAAA hosts to accept both v4 and v6 connections.

If so, we need tahoe.cfg's tub.port= to accept multiple ports (or second-guess the user and automatically add tcp6: every time we see tcp:, which feels a bit wrong). We either need a delimiter (whitespace? comma?) or to accept multiple config keys (like tub.1.port= and tub.2.port= or something). And we need the default create-node behavior to produce both kinds.

And we need to see what happens if you try to listen on tcp6:1234 on a box that doesn't have IPv6 support: either catch+ignore the error, or test ahead of time and avoid it.

Oh, actually, this might need more work. I'm doing some manual testing, and it looks like our default behavior of listening on `tcp:PORT` only makes an IPv4 listening socket. I tried connecting to that (on a host with both IPv4 and IPv6 addresses bound to en0) with `nc -6 IPV6ADDR PORT` and it wouldn't connect. If I listen on `tcp6:PORT` then `nc -6` works but `nc -4` doesn't. I think we might need to listen on both `tcp:PORT` and `tcp6:PORT` to allow A+AAAA hosts to accept both v4 and v6 connections. If so, we need tahoe.cfg's `tub.port=` to accept multiple ports (or second-guess the user and automatically add `tcp6:` every time we see `tcp:`, which feels a bit wrong). We either need a delimiter (whitespace? comma?) or to accept multiple config keys (like `tub.1.port=` and `tub.2.port=` or something). And we need the default create-node behavior to produce both kinds. And we need to see what happens if you try to listen on `tcp6:1234` on a box that doesn't have IPv6 support: either catch+ignore the error, or test ahead of time and avoid it.
Author

I bet we should avoid using commas as delimiters in the tub.port= string. I can't find any existing Endpoints that use commas internally, but I wouldn't be surprised if some endpoint author down the line decides to use them, and then we'll have some parsing confusion. Whitespace seems like a better option right now.

I bet we should avoid using commas as delimiters in the `tub.port=` string. I can't find any existing Endpoints that use commas internally, but I wouldn't be surprised if some endpoint author down the line decides to use them, and then we'll have some parsing confusion. Whitespace seems like a better option right now.

Replying to warner:

If so, we need tahoe.cfg's tub.port= to accept multiple ports (or second-guess the user and automatically add tcp6: every time we see tcp:, which feels a bit wrong). We either need a delimiter (whitespace? comma?) or to accept multiple config keys (like tub.1.port= and tub.2.port= or something). And we need the default create-node behavior to produce both kinds.

Although I am not sure to what extend we're willing to change the semantics of the config file but it's an option to rename tcp: to tcp4:, introduce tcp6: and use tcp: for trying IPv4 and IPv6.
IMHO, most people probably don't care with which IP version data is carried.
For those who do, there is the flexibility to configure it.

And we need to see what happens if you try to listen on tcp6:1234 on a box that doesn't have IPv6 support: either catch+ignore the error, or test ahead of time and avoid it.

Well, staying with the semantics above, tcp: (or any other auto-detected thing) could fail silently if at least one IP version works.
Explicit configurations should fail loudly.

Replying to [warner](/tahoe-lafs/trac/issues/867#issuecomment-374964): > If so, we need tahoe.cfg's `tub.port=` to accept multiple ports (or second-guess the user and automatically add `tcp6:` every time we see `tcp:`, which feels a bit wrong). We either need a delimiter (whitespace? comma?) or to accept multiple config keys (like `tub.1.port=` and `tub.2.port=` or something). And we need the default create-node behavior to produce both kinds. Although I am not sure to what extend we're willing to change the semantics of the config file but it's an option to rename `tcp:` to `tcp4:`, introduce `tcp6:` and use `tcp:` for trying IPv4 and IPv6. IMHO, most people probably don't care with which IP version data is carried. For those who do, there is the flexibility to configure it. > And we need to see what happens if you try to listen on `tcp6:1234` on a box that doesn't have IPv6 support: either catch+ignore the error, or test ahead of time and avoid it. Well, staying with the semantics above, `tcp:` (or any other auto-detected thing) could fail silently if at least one IP version works. Explicit configurations should fail loudly.
Author

Good points. Twisted's endpoint language uses tcp: for IPv4-based TCP ports, and tcp6: for IPv6-based ones.. they didn't add a tcp4: for anything, which is a bit inconsistent, I guess. I kind of like the idea of redefining tub.port='s tcp: to mean both, but I wonder if it'd be confusing, since then we can no longer claim it's exactly an Endpoint string.

Oh also, maybe we should only do the dual-tcp:+tcp6: thing when we're automatically setting up the listener (with tahoe create-node --hostname=ABC). In other cases, let the user be explicit (which might mean that the --port= argument to tahoe create-node needs to accept multiple ports too.. maybe tahoe create-node --port "tcp:1234 tcp6:1234" ?).

Also also, endpoint strings can include paths (to TLS certificates, and unix-domain sockets), and on a sufficiently ill-advised system, those might include spaces. So maybe whitespace as a delimiter isn't such a great idea after all.

I thought of another use case where you might want multiple listening ports (listening on a public v4/v6 address and a Tor hidden-service's locally-forwarded port), except that in that case I think we decided the Tor/I2P listeners would be added independently, instead of being listen in tub.port.

Good points. Twisted's endpoint language uses `tcp:` for IPv4-based TCP ports, and `tcp6:` for IPv6-based ones.. they didn't add a `tcp4:` for anything, which is a bit inconsistent, I guess. I kind of like the idea of redefining `tub.port=`'s `tcp:` to mean both, but I wonder if it'd be confusing, since then we can no longer claim it's exactly an Endpoint string. Oh also, maybe we should only do the dual-`tcp:`+`tcp6:` thing when we're automatically setting up the listener (with `tahoe create-node --hostname=ABC`). In other cases, let the user be explicit (which might mean that the `--port=` argument to `tahoe create-node` needs to accept multiple ports too.. maybe `tahoe create-node --port "tcp:1234 tcp6:1234"` ?). Also also, endpoint strings can include paths (to TLS certificates, and unix-domain sockets), and on a sufficiently ill-advised system, those might include spaces. So maybe whitespace as a delimiter isn't such a great idea after all. I thought of another use case where you might want multiple listening ports (listening on a public v4/v6 address *and* a Tor hidden-service's locally-forwarded port), except that in that case I think we decided the Tor/I2P listeners would be added independently, instead of being listen in `tub.port`.

Replying to warner:

Good points. Twisted's endpoint language uses tcp: for IPv4-based TCP ports, and tcp6: for IPv6-based ones.. they didn't add a tcp4: for anything, which is a bit inconsistent, I guess. I kind of like the idea of redefining tub.port='s tcp: to mean both, but I wonder if it'd be confusing, since then we can no longer claim it's exactly an Endpoint string.

I see, interesting. I can't judge on this. 0.02:
Does it actually matter to have proper Endpoints (as a user: never cared)?
Do Tahoe users ever come in direct contact with Twisted (as a user: don't want to)?
But your point is definitely to consider and maybe a show stopper for tcp4:.

Oh also, maybe we should only do the dual-tcp:+tcp6: thing when we're automatically setting up the listener (with tahoe create-node --hostname=ABC). In other cases, let the user be explicit (which might mean that the --port= argument to tahoe create-node needs to accept multiple ports too.. maybe tahoe create-node --port "tcp:1234 tcp6:1234" ?).

Yes, IMHO the automatic mode should always be default unless explicitly configured otherwise.
tahoe create-node --port … could use the same delimiter as tub.port for consistency.

Also also, endpoint strings can include paths (to TLS certificates, and unix-domain sockets), and on a sufficiently ill-advised system, those might include spaces. So maybe whitespace as a delimiter isn't such a great idea after all.

Speaking of file system paths (mind Windows), there are not much delimiters we can use while maintaining full compatibility with all possible paths. It's probably inevitable to choose "just any".

Replying to [warner](/tahoe-lafs/trac/issues/867#issuecomment-374967): > Good points. Twisted's endpoint language uses `tcp:` for IPv4-based TCP ports, and `tcp6:` for IPv6-based ones.. they didn't add a `tcp4:` for anything, which is a bit inconsistent, I guess. I kind of like the idea of redefining `tub.port=`'s `tcp:` to mean both, but I wonder if it'd be confusing, since then we can no longer claim it's exactly an Endpoint string. I see, interesting. I can't judge on this. 0.02: Does it actually matter to have proper Endpoints (as a user: never cared)? Do Tahoe users ever come in direct contact with Twisted (as a user: don't want to)? But your point is definitely to consider and maybe a show stopper for `tcp4:`. > Oh also, maybe we should only do the dual-`tcp:`+`tcp6:` thing when we're automatically setting up the listener (with `tahoe create-node --hostname=ABC`). In other cases, let the user be explicit (which might mean that the `--port=` argument to `tahoe create-node` needs to accept multiple ports too.. maybe `tahoe create-node --port "tcp:1234 tcp6:1234"` ?). Yes, IMHO the automatic mode should always be default unless explicitly configured otherwise. `tahoe create-node --port …` could use the same delimiter as `tub.port` for consistency. > Also also, endpoint strings can include paths (to TLS certificates, and unix-domain sockets), and on a sufficiently ill-advised system, those might include spaces. So maybe whitespace as a delimiter isn't such a great idea after all. Speaking of file system paths (mind Windows), there are not much delimiters we can use while maintaining full compatibility with all possible paths. It's probably inevitable to choose "just any".
Author

Replying to [lpirl]comment:37:

Does it actually matter to have proper Endpoints (as a user: never cared)?
Do Tahoe users ever come in direct contact with Twisted (as a user: don't want to)?
But your point is definitely to consider and maybe a show stopper for tcp4:.

Well, it's nice to be able to say "for more complex situations, read the Twisted endpoint docs, because --port is really just an endpoint string", and delegate all that documentation job to the Twisted folks.

Yes, IMHO the automatic mode should always be default unless explicitly configured otherwise.
tahoe create-node --port … could use the same delimiter as tub.port for consistency.

Yeah. Ok, so I think we can say that --listen=tcp (which is the default) will mean "listen on both v4 and v6, whichever is available", and it can cause multiple endpoint strings to get written into tahoe.cfg.

Speaking of file system paths (mind Windows), there are not much delimiters we can use while maintaining full compatibility with all possible paths. It's probably inevitable to choose "just any".

Good point. We'll just document that some unusual endpoint strings won't work, if their internal characters are mistaken as tub.port delimiters.

Replying to [lpirl]comment:37: > Does it actually matter to have proper Endpoints (as a user: never cared)? > Do Tahoe users ever come in direct contact with Twisted (as a user: don't want to)? > But your point is definitely to consider and maybe a show stopper for `tcp4:`. Well, it's nice to be able to say "for more complex situations, read the Twisted endpoint docs, because --port is really just an endpoint string", and delegate all that documentation job to the Twisted folks. > Yes, IMHO the automatic mode should always be default unless explicitly configured otherwise. > `tahoe create-node --port …` could use the same delimiter as `tub.port` for consistency. Yeah. Ok, so I think we can say that `--listen=tcp` (which is the default) will mean "listen on both v4 and v6, whichever is available", and it can cause multiple endpoint strings to get written into tahoe.cfg. > Speaking of file system paths (mind Windows), there are not much delimiters we can use while maintaining full compatibility with all possible paths. It's probably inevitable to choose "just any". Good point. We'll just document that some unusual endpoint strings won't work, if their internal characters are mistaken as `tub.port` delimiters.

comma separated endpoint descriptor strings in tub.port; pull-request for your review https://github.com/tahoe-lafs/tahoe-lafs/pull/348

comma separated endpoint descriptor strings in tub.port; pull-request for your review <https://github.com/tahoe-lafs/tahoe-lafs/pull/348>
Author

looks good, I'll land it in a minute.

Still to do for this ticket:

  • tahoe create-node --hostname= should detect if v6 is available, then write out a tub.port = with both tcp:PORT and tcp6:PORT. Or maybe we don't need to detect anything first? We must make sure the node won't crash at startup if v6 is not available, which means we need a host without v6 support to learn what sort of exception might get raised.
  • Add something to the docs about v6, explaining A/AAAA DNS records, bracketed IPv6 address hints, and warning that the endpoints in tub.port cannot include commas (because we stole them for delimiters between multiple endpoints)
  • wait for a foolscap release (with the bracketed-v6 parser) and bump the tahoe dependency to require it
looks good, I'll land it in a minute. Still to do for this ticket: * `tahoe create-node --hostname=` should detect if v6 is available, then write out a `tub.port =` with both `tcp:PORT` and `tcp6:PORT`. Or maybe we don't need to detect anything first? We must make sure the node won't crash at startup if v6 is not available, which means we need a host without v6 support to learn what sort of exception might get raised. * Add something to the docs about v6, explaining A/AAAA DNS records, bracketed IPv6 address hints, and warning that the endpoints in tub.port cannot include commas (because we stole them for delimiters between multiple endpoints) * wait for a foolscap release (with the bracketed-v6 parser) and bump the tahoe dependency to require it
Brian Warner <warner@lothar.com> commented 2016-09-20 20:15:43 +00:00
Owner

In b00c2d2/trunk:

test tub.port with multiple endpoints, add docs

I think the preferred way to listen on both IPv4 and IPv6 will be to use
"--port=tcp:PORT,tcp6:PORT". This is now reflected in the docs.

refs ticket:867
In [b00c2d2/trunk](/tahoe-lafs/trac/commit/b00c2d21b7bd4b2ce63ff4fa14a82b9b02dfe360): ``` test tub.port with multiple endpoints, add docs I think the preferred way to listen on both IPv4 and IPv6 will be to use "--port=tcp:PORT,tcp6:PORT". This is now reflected in the docs. refs ticket:867 ```

I was testing out the IPv4 + IPv6 on a couple of servers... running an introducer + storage node on one and another storage node on the other. I noticed that it dOES NOT work to specify the following:

tub.port=tcp6:3456,tcp:3456

However it works fine if i specify the interfaces in both endpoint descriptor strings like so:

tub.port = tcp6:interface=2600\:3c01\:f03c\:91ff\:fe93\:d272:3456,tcp:interface=8.8.8.8:3456
2016-09-21T12:48:40+0000 [twisted.internet.defer#critical] Unhandled error in Deferred:

Traceback (most recent call last):
  File "/home/human/foolscap/src/foolscap/pb.py", line 537, in startService
    service.MultiService.startService(self)
  File "/home/human/virtenv-tahoe/local/lib/python2.7/site-packages/twisted/application/service.py", line 283, in startService
    service.startService()
  File "/home/human/foolscap/src/foolscap/pb.py", line 53, in startService
    d = self._ep.listen(self)
  File "/home/human/virtenv-tahoe/local/lib/python2.7/site-packages/twisted/internet/endpoints.py", line 470, in listen
    interface=self._interface)
--- <exception caught here> ---
  File "/home/human/virtenv-tahoe/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 120, in execute
    result = callable(*args, **kw)
  File "/home/human/virtenv-tahoe/local/lib/python2.7/site-packages/twisted/internet/posixbase.py", line 478, in listenTCP
    p.startListening()
  File "/home/human/virtenv-tahoe/local/lib/python2.7/site-packages/twisted/internet/tcp.py", line 983, in startListening
    raise CannotListenError(self.interface, self.port, le)
twisted.internet.error.CannotListenError: Couldn't listen on any:3456: [Errno 98] Address already in use.
2016-09-21T12:48:40+0000 [-] Listener starting on 44617
2016-09-21T12:48:40+0000 [foolscap.pb.Listener#info] Starting factory <Listener at 0x7fd04ff73d90 on <twisted.internet.endpoints.TCP4ServerEndpoint object at 0x7fd04ff73dd0> with tub yi45keoq72z3ce3jrug2wxxwy4f6rc2l>
2016-09-21T12:48:40+0000 [-] Listener starting on 57245
2016-09-21T12:48:40+0000 [foolscap.pb.Listener#info] Starting factory <Listener at 0x7fd04ff73ed0 on <twisted.internet.endpoints.TCP4ServerEndpoint object at 0x7fd04ff73f10> with tub u4ppdne5ehcwacdz3ccivfm3usotpxgj>
2016-09-21T12:48:40+0000 [-] client running

i've posted a PR to fix the configuration docs here:
https://github.com/tahoe-lafs/tahoe-lafs/pull/352

I was testing out the IPv4 + IPv6 on a couple of servers... running an introducer + storage node on one and another storage node on the other. I noticed that it dOES NOT work to specify the following: ``` tub.port=tcp6:3456,tcp:3456 ``` However it works fine if i specify the interfaces in both endpoint descriptor strings like so: ``` tub.port = tcp6:interface=2600\:3c01\:f03c\:91ff\:fe93\:d272:3456,tcp:interface=8.8.8.8:3456 ``` ``` 2016-09-21T12:48:40+0000 [twisted.internet.defer#critical] Unhandled error in Deferred: Traceback (most recent call last): File "/home/human/foolscap/src/foolscap/pb.py", line 537, in startService service.MultiService.startService(self) File "/home/human/virtenv-tahoe/local/lib/python2.7/site-packages/twisted/application/service.py", line 283, in startService service.startService() File "/home/human/foolscap/src/foolscap/pb.py", line 53, in startService d = self._ep.listen(self) File "/home/human/virtenv-tahoe/local/lib/python2.7/site-packages/twisted/internet/endpoints.py", line 470, in listen interface=self._interface) --- <exception caught here> --- File "/home/human/virtenv-tahoe/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 120, in execute result = callable(*args, **kw) File "/home/human/virtenv-tahoe/local/lib/python2.7/site-packages/twisted/internet/posixbase.py", line 478, in listenTCP p.startListening() File "/home/human/virtenv-tahoe/local/lib/python2.7/site-packages/twisted/internet/tcp.py", line 983, in startListening raise CannotListenError(self.interface, self.port, le) twisted.internet.error.CannotListenError: Couldn't listen on any:3456: [Errno 98] Address already in use. 2016-09-21T12:48:40+0000 [-] Listener starting on 44617 2016-09-21T12:48:40+0000 [foolscap.pb.Listener#info] Starting factory <Listener at 0x7fd04ff73d90 on <twisted.internet.endpoints.TCP4ServerEndpoint object at 0x7fd04ff73dd0> with tub yi45keoq72z3ce3jrug2wxxwy4f6rc2l> 2016-09-21T12:48:40+0000 [-] Listener starting on 57245 2016-09-21T12:48:40+0000 [foolscap.pb.Listener#info] Starting factory <Listener at 0x7fd04ff73ed0 on <twisted.internet.endpoints.TCP4ServerEndpoint object at 0x7fd04ff73f10> with tub u4ppdne5ehcwacdz3ccivfm3usotpxgj> 2016-09-21T12:48:40+0000 [-] client running ``` i've posted a PR to fix the configuration docs here: <https://github.com/tahoe-lafs/tahoe-lafs/pull/352>

IPv6 essentially works in Tahoe-LAFS now, as of dawuud's 2016 changes. There are some remaining usability nits but they don't block any actual functionality.

Also, I had to read 40+ comments on this ticket to figure that out.

So I'm closing this as fixed. If someone is concerned with the usability nits, they can file new tickets for them.

One ticket, one feature, one PR, one master merge, please. ;)

IPv6 essentially works in Tahoe-LAFS now, as of dawuud's 2016 changes. There are some remaining usability nits but they don't block any actual functionality. Also, I had to read 40+ comments on this ticket to figure that out. So I'm closing this as fixed. If someone is concerned with the usability nits, they can file new tickets for them. One ticket, one feature, one PR, one master merge, please. ;)
exarkun added the
r/fixed
label 2020-01-18 00:22:19 +00:00
Sign in to join this conversation.
No labels
c/code
c/code-dirnodes
c/code-encoding
c/code-frontend
c/code-frontend-cli
c/code-frontend-ftp-sftp
c/code-frontend-magic-folder
c/code-frontend-web
c/code-mutable
c/code-network
c/code-nodeadmin
c/code-peerselection
c/code-storage
c/contrib
c/dev-infrastructure
c/docs
c/operational
c/packaging
c/unknown
c/website
kw:2pc
kw:410
kw:9p
kw:ActivePerl
kw:AttributeError
kw:DataUnavailable
kw:DeadReferenceError
kw:DoS
kw:FileZilla
kw:GetLastError
kw:IFinishableConsumer
kw:K
kw:LeastAuthority
kw:Makefile
kw:RIStorageServer
kw:StringIO
kw:UncoordinatedWriteError
kw:about
kw:access
kw:access-control
kw:accessibility
kw:accounting
kw:accounting-crawler
kw:add-only
kw:aes
kw:aesthetics
kw:alias
kw:aliases
kw:aliens
kw:allmydata
kw:amazon
kw:ambient
kw:annotations
kw:anonymity
kw:anonymous
kw:anti-censorship
kw:api_auth_token
kw:appearance
kw:appname
kw:apport
kw:archive
kw:archlinux
kw:argparse
kw:arm
kw:assertion
kw:attachment
kw:auth
kw:authentication
kw:automation
kw:avahi
kw:availability
kw:aws
kw:azure
kw:backend
kw:backoff
kw:backup
kw:backupdb
kw:backward-compatibility
kw:bandwidth
kw:basedir
kw:bayes
kw:bbfreeze
kw:beta
kw:binaries
kw:binutils
kw:bitcoin
kw:bitrot
kw:blacklist
kw:blocker
kw:blocks-cloud-deployment
kw:blocks-cloud-merge
kw:blocks-magic-folder-merge
kw:blocks-merge
kw:blocks-raic
kw:blocks-release
kw:blog
kw:bom
kw:bonjour
kw:branch
kw:branding
kw:breadcrumbs
kw:brians-opinion-needed
kw:browser
kw:bsd
kw:build
kw:build-helpers
kw:buildbot
kw:builders
kw:buildslave
kw:buildslaves
kw:cache
kw:cap
kw:capleak
kw:captcha
kw:cast
kw:centos
kw:cffi
kw:chacha
kw:charset
kw:check
kw:checker
kw:chroot
kw:ci
kw:clean
kw:cleanup
kw:cli
kw:cloud
kw:cloud-backend
kw:cmdline
kw:code
kw:code-checks
kw:coding-standards
kw:coding-tools
kw:coding_tools
kw:collection
kw:compatibility
kw:completion
kw:compression
kw:confidentiality
kw:config
kw:configuration
kw:configuration.txt
kw:conflict
kw:connection
kw:connectivity
kw:consistency
kw:content
kw:control
kw:control.furl
kw:convergence
kw:coordination
kw:copyright
kw:corruption
kw:cors
kw:cost
kw:coverage
kw:coveralls
kw:coveralls.io
kw:cpu-watcher
kw:cpyext
kw:crash
kw:crawler
kw:crawlers
kw:create-container
kw:cruft
kw:crypto
kw:cryptography
kw:cryptography-lib
kw:cryptopp
kw:csp
kw:curl
kw:cutoff-date
kw:cycle
kw:cygwin
kw:d3
kw:daemon
kw:darcs
kw:darcsver
kw:database
kw:dataloss
kw:db
kw:dead-code
kw:deb
kw:debian
kw:debug
kw:deep-check
kw:defaults
kw:deferred
kw:delete
kw:deletion
kw:denial-of-service
kw:dependency
kw:deployment
kw:deprecation
kw:desert-island
kw:desert-island-build
kw:design
kw:design-review-needed
kw:detection
kw:dev-infrastructure
kw:devpay
kw:directory
kw:directory-page
kw:dirnode
kw:dirnodes
kw:disconnect
kw:discovery
kw:disk
kw:disk-backend
kw:distribute
kw:distutils
kw:dns
kw:do_http
kw:doc-needed
kw:docker
kw:docs
kw:docs-needed
kw:dokan
kw:dos
kw:download
kw:downloader
kw:dragonfly
kw:drop-upload
kw:duplicity
kw:dusty
kw:earth-dragon
kw:easy
kw:ec2
kw:ecdsa
kw:ed25519
kw:egg-needed
kw:eggs
kw:eliot
kw:email
kw:empty
kw:encoding
kw:endpoint
kw:enterprise
kw:enum34
kw:environment
kw:erasure
kw:erasure-coding
kw:error
kw:escaping
kw:etag
kw:etch
kw:evangelism
kw:eventual
kw:example
kw:excess-authority
kw:exec
kw:exocet
kw:expiration
kw:extensibility
kw:extension
kw:failure
kw:fedora
kw:ffp
kw:fhs
kw:figleaf
kw:file
kw:file-descriptor
kw:filename
kw:filesystem
kw:fileutil
kw:fips
kw:firewall
kw:first
kw:floatingpoint
kw:flog
kw:foolscap
kw:forward-compatibility
kw:forward-secrecy
kw:forwarding
kw:free
kw:freebsd
kw:frontend
kw:fsevents
kw:ftp
kw:ftpd
kw:full
kw:furl
kw:fuse
kw:garbage
kw:garbage-collection
kw:gateway
kw:gatherer
kw:gc
kw:gcc
kw:gentoo
kw:get
kw:git
kw:git-annex
kw:github
kw:glacier
kw:globalcaps
kw:glossary
kw:google-cloud-storage
kw:google-drive-backend
kw:gossip
kw:governance
kw:grid
kw:grid-manager
kw:gridid
kw:gridsync
kw:grsec
kw:gsoc
kw:gvfs
kw:hackfest
kw:hacktahoe
kw:hang
kw:hardlink
kw:heartbleed
kw:heisenbug
kw:help
kw:helper
kw:hint
kw:hooks
kw:how
kw:how-to
kw:howto
kw:hp
kw:hp-cloud
kw:html
kw:http
kw:https
kw:i18n
kw:i2p
kw:i2p-collab
kw:illustration
kw:image
kw:immutable
kw:impressions
kw:incentives
kw:incident
kw:init
kw:inlineCallbacks
kw:inotify
kw:install
kw:installer
kw:integration
kw:integration-test
kw:integrity
kw:interactive
kw:interface
kw:interfaces
kw:interoperability
kw:interstellar-exploration
kw:introducer
kw:introduction
kw:iphone
kw:ipkg
kw:iputil
kw:ipv6
kw:irc
kw:jail
kw:javascript
kw:joke
kw:jquery
kw:json
kw:jsui
kw:junk
kw:key-value-store
kw:kfreebsd
kw:known-issue
kw:konqueror
kw:kpreid
kw:kvm
kw:l10n
kw:lae
kw:large
kw:latency
kw:leak
kw:leasedb
kw:leases
kw:libgmp
kw:license
kw:licenss
kw:linecount
kw:link
kw:linux
kw:lit
kw:localhost
kw:location
kw:locking
kw:logging
kw:logo
kw:loopback
kw:lucid
kw:mac
kw:macintosh
kw:magic-folder
kw:manhole
kw:manifest
kw:manual-test-needed
kw:map
kw:mapupdate
kw:max_space
kw:mdmf
kw:memcheck
kw:memory
kw:memory-leak
kw:mesh
kw:metadata
kw:meter
kw:migration
kw:mime
kw:mingw
kw:minimal
kw:misc
kw:miscapture
kw:mlp
kw:mock
kw:more-info-needed
kw:mountain-lion
kw:move
kw:multi-users
kw:multiple
kw:multiuser-gateway
kw:munin
kw:music
kw:mutability
kw:mutable
kw:mystery
kw:names
kw:naming
kw:nas
kw:navigation
kw:needs-review
kw:needs-spawn
kw:netbsd
kw:network
kw:nevow
kw:new-user
kw:newcaps
kw:news
kw:news-done
kw:news-needed
kw:newsletter
kw:newurls
kw:nfc
kw:nginx
kw:nixos
kw:no-clobber
kw:node
kw:node-url
kw:notification
kw:notifyOnDisconnect
kw:nsa310
kw:nsa320
kw:nsa325
kw:numpy
kw:objects
kw:old
kw:openbsd
kw:openitp-packaging
kw:openssl
kw:openstack
kw:opensuse
kw:operation-helpers
kw:operational
kw:operations
kw:ophandle
kw:ophandles
kw:ops
kw:optimization
kw:optional
kw:options
kw:organization
kw:os
kw:os.abort
kw:ostrom
kw:osx
kw:osxfuse
kw:otf-magic-folder-objective1
kw:otf-magic-folder-objective2
kw:otf-magic-folder-objective3
kw:otf-magic-folder-objective4
kw:otf-magic-folder-objective5
kw:otf-magic-folder-objective6
kw:p2p
kw:packaging
kw:partial
kw:password
kw:path
kw:paths
kw:pause
kw:peer-selection
kw:performance
kw:permalink
kw:permissions
kw:persistence
kw:phone
kw:pickle
kw:pip
kw:pipermail
kw:pkg_resources
kw:placement
kw:planning
kw:policy
kw:port
kw:portability
kw:portal
kw:posthook
kw:pratchett
kw:preformance
kw:preservation
kw:privacy
kw:process
kw:profile
kw:profiling
kw:progress
kw:proxy
kw:publish
kw:pyOpenSSL
kw:pyasn1
kw:pycparser
kw:pycrypto
kw:pycrypto-lib
kw:pycryptopp
kw:pyfilesystem
kw:pyflakes
kw:pylint
kw:pypi
kw:pypy
kw:pysqlite
kw:python
kw:python3
kw:pythonpath
kw:pyutil
kw:pywin32
kw:quickstart
kw:quiet
kw:quotas
kw:quoting
kw:raic
kw:rainhill
kw:random
kw:random-access
kw:range
kw:raspberry-pi
kw:reactor
kw:readonly
kw:rebalancing
kw:recovery
kw:recursive
kw:redhat
kw:redirect
kw:redressing
kw:refactor
kw:referer
kw:referrer
kw:regression
kw:rekey
kw:relay
kw:release
kw:release-blocker
kw:reliability
kw:relnotes
kw:remote
kw:removable
kw:removable-disk
kw:rename
kw:renew
kw:repair
kw:replace
kw:report
kw:repository
kw:research
kw:reserved_space
kw:response-needed
kw:response-time
kw:restore
kw:retrieve
kw:retry
kw:review
kw:review-needed
kw:reviewed
kw:revocation
kw:roadmap
kw:rollback
kw:rpm
kw:rsa
kw:rss
kw:rst
kw:rsync
kw:rusty
kw:s3
kw:s3-backend
kw:s3-frontend
kw:s4
kw:same-origin
kw:sandbox
kw:scalability
kw:scaling
kw:scheduling
kw:schema
kw:scheme
kw:scp
kw:scripts
kw:sdist
kw:sdmf
kw:security
kw:self-contained
kw:server
kw:servermap
kw:servers-of-happiness
kw:service
kw:setup
kw:setup.py
kw:setup_requires
kw:setuptools
kw:setuptools_darcs
kw:sftp
kw:shared
kw:shareset
kw:shell
kw:signals
kw:simultaneous
kw:six
kw:size
kw:slackware
kw:slashes
kw:smb
kw:sneakernet
kw:snowleopard
kw:socket
kw:solaris
kw:space
kw:space-efficiency
kw:spam
kw:spec
kw:speed
kw:sqlite
kw:ssh
kw:ssh-keygen
kw:sshfs
kw:ssl
kw:stability
kw:standards
kw:start
kw:startup
kw:static
kw:static-analysis
kw:statistics
kw:stats
kw:stats_gatherer
kw:status
kw:stdeb
kw:storage
kw:streaming
kw:strports
kw:style
kw:stylesheet
kw:subprocess
kw:sumo
kw:survey
kw:svg
kw:symlink
kw:synchronous
kw:tac
kw:tahoe-*
kw:tahoe-add-alias
kw:tahoe-admin
kw:tahoe-archive
kw:tahoe-backup
kw:tahoe-check
kw:tahoe-cp
kw:tahoe-create-alias
kw:tahoe-create-introducer
kw:tahoe-debug
kw:tahoe-deep-check
kw:tahoe-deepcheck
kw:tahoe-lafs-trac-stream
kw:tahoe-list-aliases
kw:tahoe-ls
kw:tahoe-magic-folder
kw:tahoe-manifest
kw:tahoe-mkdir
kw:tahoe-mount
kw:tahoe-mv
kw:tahoe-put
kw:tahoe-restart
kw:tahoe-rm
kw:tahoe-run
kw:tahoe-start
kw:tahoe-stats
kw:tahoe-unlink
kw:tahoe-webopen
kw:tahoe.css
kw:tahoe_files
kw:tahoewapi
kw:tarball
kw:tarballs
kw:tempfile
kw:templates
kw:terminology
kw:test
kw:test-and-set
kw:test-from-egg
kw:test-needed
kw:testgrid
kw:testing
kw:tests
kw:throttling
kw:ticket999-s3-backend
kw:tiddly
kw:time
kw:timeout
kw:timing
kw:to
kw:to-be-closed-on-2011-08-01
kw:tor
kw:tor-protocol
kw:torsocks
kw:tox
kw:trac
kw:transparency
kw:travis
kw:travis-ci
kw:trial
kw:trickle
kw:trivial
kw:truckee
kw:tub
kw:tub.location
kw:twine
kw:twistd
kw:twistd.log
kw:twisted
kw:twisted-14
kw:twisted-trial
kw:twitter
kw:twn
kw:txaws
kw:type
kw:typeerror
kw:ubuntu
kw:ucwe
kw:ueb
kw:ui
kw:unclean
kw:uncoordinated-writes
kw:undeletable
kw:unfinished-business
kw:unhandled-error
kw:unhappy
kw:unicode
kw:unit
kw:unix
kw:unlink
kw:update
kw:upgrade
kw:upload
kw:upload-helper
kw:uri
kw:url
kw:usability
kw:use-case
kw:utf-8
kw:util
kw:uwsgi
kw:ux
kw:validation
kw:variables
kw:vdrive
kw:verify
kw:verlib
kw:version
kw:versioning
kw:versions
kw:video
kw:virtualbox
kw:virtualenv
kw:vista
kw:visualization
kw:visualizer
kw:vm
kw:volunteergrid2
kw:volunteers
kw:vpn
kw:wapi
kw:warners-opinion-needed
kw:warning
kw:weapi
kw:web
kw:web.port
kw:webapi
kw:webdav
kw:webdrive
kw:webport
kw:websec
kw:website
kw:websocket
kw:welcome
kw:welcome-page
kw:welcomepage
kw:wiki
kw:win32
kw:win64
kw:windows
kw:windows-related
kw:winscp
kw:workaround
kw:world-domination
kw:wrapper
kw:write-enabler
kw:wui
kw:x86
kw:x86-64
kw:xhtml
kw:xml
kw:xss
kw:zbase32
kw:zetuptoolz
kw:zfec
kw:zookos-opinion-needed
kw:zope
kw:zope.interface
p/blocker
p/critical
p/major
p/minor
p/normal
p/supercritical
p/trivial
r/cannot reproduce
r/duplicate
r/fixed
r/invalid
r/somebody else's problem
r/was already fixed
r/wontfix
r/worksforme
t/defect
t/enhancement
t/task
v/0.2.0
v/0.3.0
v/0.4.0
v/0.5.0
v/0.5.1
v/0.6.0
v/0.6.1
v/0.7.0
v/0.8.0
v/0.9.0
v/1.0.0
v/1.1.0
v/1.10.0
v/1.10.1
v/1.10.2
v/1.10a2
v/1.11.0
v/1.12.0
v/1.12.1
v/1.13.0
v/1.14.0
v/1.15.0
v/1.15.1
v/1.2.0
v/1.3.0
v/1.4.1
v/1.5.0
v/1.6.0
v/1.6.1
v/1.7.0
v/1.7.1
v/1.7β
v/1.8.0
v/1.8.1
v/1.8.2
v/1.8.3
v/1.8β
v/1.9.0
v/1.9.0-s3branch
v/1.9.0a1
v/1.9.0a2
v/1.9.0b1
v/1.9.1
v/1.9.2
v/1.9.2a1
v/cloud-branch
v/unknown
No milestone
No project
No assignees
6 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: tahoe-lafs/trac#867
No description provided.