FS#18699 - [netcfg] add IPv6 support
Attached to Project:
Arch Linux
Opened by Olivier Mehani (shtrom) - Tuesday, 16 March 2010, 03:01 GMT
Last edited by Rémy Oudompheng (remyoudompheng) - Monday, 13 June 2011, 10:54 GMT
Opened by Olivier Mehani (shtrom) - Tuesday, 16 March 2010, 03:01 GMT
Last edited by Rémy Oudompheng (remyoudompheng) - Monday, 13 June 2011, 10:54 GMT
|
Details
Description:
Currently, netcfg only allows configuring IPv4 connectivity. It would be good to also be able to configure IPv6 parameters using the same mechanism. The following options would be sufficient to replicate what is available for IPv4. IP6='static' # or 'stateless' or 'dhcp' ADDR6='2001:DB8::1' # example prefik from RFC 3849 PREFIXLEN='...' # default 64 IP6CFG='...' |
This task depends upon
Closed by Rémy Oudompheng (remyoudompheng)
Monday, 13 June 2011, 10:54 GMT
Reason for closing: Implemented
Additional comments about closing: Coming in netcfg 2.6
Monday, 13 June 2011, 10:54 GMT
Reason for closing: Implemented
Additional comments about closing: Coming in netcfg 2.6
Also, there is something unclear about how to set net.ipv6.conf.all.accept_ra. The commit message explains it further.
====
The following options are added:
- IP6:
- none: deactivate autoconfiguration and don't do anything else
- stateless: “normal” autoconfiguration
- dhcp: use “dhclient -6”
- dhcp-noaddr: use “dhclient -6 -S” and stateless autoconfiguration
- static: configure $INTERFACE with $ADDR6/$PREFIXLEN
* 'dhcp' and 'static' also deactivate stateless autoconfiguration; it
is reactivated in any case when the interface is brought down to
restore a “neutral” situation
- GATEWAY6, IP6CFG: similar to their IPv4 counterparts except the commands
are run ith “ip -6”
Both DHCPv6 options also use variable DHCLIENT6_OPTIONS for further
configuration
IFOPTS is used for both IPv4 and IPv6, and only if the interface is not
already up.
Potential bug: The relationship of the net.ipv6.conf.*.accept_ra sysctl
values is not straigthforward nor well documented. According to scarce
information [0,1,2], it would seem that:
- net.ipv6.conf.default.accept_ra is used to initialise new interfaces,
- net.ipv6.conf.INTERFACE.accept_ra controls the actual value BUT
- net.ipv6.conf.all.accept_ra is combined with the previous value
before any decision is applied to the interface.
Now, “combined” seems to take a varying meaning depending on the
parameter under consideration [0, 2]. I couldn't dedicate much time to
crawling the kernel source, so I did some tests instead. My tentative
conclusion is that net.ipv6.conf.all.accept_ra is ORed with
net.ipv6.conf.INTERFACE.accept_ra. So, to really ignore RAs, both these
settings have to be set to 0.
[0] http://marc.info/?l=linux-kernel&m=123606366021995&w=2
[1] http://lkml.indiana.edu/hypermail/linux/kernel/0103.0/0440.html
[2] http://marc.info/?l=linux-kernel&m=123617372002934&w=2
Today a major Dutch ISP launched native IPv6 for their customers. It has
been calculated that there will be no more new IPv4-delegationspace in
less than 300 days. I'd like to jump on the bandwagon.
Olivier are you still interested in this bug? Perhaps we can work toogether
on writing patches so that we can do the work ourselves.
I sure am interested!
Did you try out my patchsets yet? Are there features that didn't work as expected or weren't present?
Priority: normal
WTF?! This should be:
Severity: critical
Priority: flash
This IPv6-agnostic approach of ArchLinux may soon force me to switch to another distro. :-(
I can't test it, as I do not know a single provider that offers IPv6 support that I would have access to.
1) You can set up a local IPv6 network not connected to the Internet.
If you are limited in hardware, use VirtualBox or other virtualization
software to run your simulated network of a few IPv6 nodes, routers etc.
2) You can use a tunneling solution; SixXS.net is good and free and
certainly stable enough for use in testing and development.
IMO, static tunneling would even be fit for production use.
3) You can switch ISP to one which has already done their homework:
http://www.sixxs.net/faq/connectivity/?faq=native&country=de
(not sure if they fall in the "don't have access" category)
What about the guy that thinks this is such a high priority - he could test it.
About the topic of IPv6 in general: At some point in the very near future, I will contact my ISP and see what their timeline towards IPv6 support is. I remember a quote from a guy that manages a big university network - he says that while the hardware vendors claim that there is IPv6 support in their products, none of it actually works right and their promises don't add up. This means that setting up IPv6 infrastructure is impossible for them right now, even though they desperately want to. That is of course no excuse that IPv6 support on Arch is moving along so slowly - Linux should work fine in general.
FS#18700The only thing about IPv6 not being supported by netcfg is DHCPv6, so file a bug about that instead please.
Static addresses work
Stateless addresses work
For stateless, without DHCP support, all you'd need is a DNS server in /etc/resolv.conf
For stateful static addressing, use iproute2, which is the supported networking mechanism.
ifconfig and route have both been deprecated for years now.
Here's a brief description of the changes:
Added an explicit IPv4 declaration to the original dhclient call and specified a lease file for it just to make sure that it wouldn't conflict with the IPv6 version. Copied the original dhclient call for the new IPv6 call and placed it within a separate checkyesno block. Modified that dhclient call to be explicit in supporting IPv6 and to use a separate PID file and lease file (so that the two processes don't clobber each other's data).
Here's the new parameters that it adds to the profiles:
DHCLIENT_V6 - This defaults to "no" just like the DHCLIENT parameter and is within the DHCLIENT if statement, so if you aren't using DHCLIENT, then you won't need to worry about this.
DHCLIENT6_OPTIONS - This is just a separate version of the DHCLIENT_OPTIONS parameter because some parameters only apply to DHCPv6, so you need to put them in their own string.
EDIT: Just to be clear this patch does work on my systems.