gns3-server icon indicating copy to clipboard operation
gns3-server copied to clipboard

Docker non-static IPv6 interface configuration not working

Open ghost opened this issue 7 years ago • 7 comments

https://www.gns3.com/qa/how-can-i-configure-the-ubuntu-d

The interface configuration for docker container is done by an injected busybox binary. While this works fine for IPv4, it has severe limitations for IPv6. Static configuration works (iface <interface> inet6 static), but 'auto' (SLAAC) and 'dhcp' (DHCPv6) are not supported. The alpine documentation https://wiki.alpinelinux.org/wiki/Configure_Networking#IPv6_Stateless_Autoconfiguration shows a workaround to setup SLAAC. But the DHCPv6 will not work, the client in busybox (udhcpc6) is too simple to be useful.

I think, that for GNS3 users, it's important to be able to use IPv6, so that's quite unfortunate. I see no easy solution, here my ideas:

  • wait for a better IPv6 support in busybox The latest busybox version 1.27, dated July 3rd, has changed the udhcpc6 status from "not ready" to "experimental", so some work is going on. Nevertheless the ifup/ifdown commands still don't support auto and dhcp for IPv6.
  • add some workarounds Currently the busybox in GNS3 is v1.24.2, by upgrading to 1.27 we would have a udhcpc6 that basically should work. But as the dhcp method is not integrated in ifup/ifdown some scripts have to be developed, that can be called from the interface configuration (via pre-up/pre-down/post-up/post-down). This is completely non-standard, but at least some basic IPv6 auto configuration is possible.
  • add the real ifupdown package Instead of using ifup/ifdown and udhcpc6 from busybox the binaries from the ifupdown and dhclient package can be used. Then we would have a real thing. But that means we have to additionally compile/support these packages and add the binaries to GNS3. I'm not sure, if adding even more third party binaries is the right way.
  • let the docker container configure the interface Instead of using an injected busybox, we can simply tell the docker container, that it should handle the interface configuration. But there are two issues with that:
    • As docker container normally don't have to configure the network interfaces, some stripped down images like debian-slim don't have the necessary binaries.
    • This will fail with non-Debian/Ubuntu/Alpine distributions like Fedora. They use a completely different configuration method, the GNS3 generated /etc/network/interfaces file is no help for them.

ghost avatar Oct 16 '17 08:10 ghost

Hi @ehlers

Thanks for deep explanation and proposed solutions.

In my opinion 1-st and 3-rd options are the most likely. First option would be the best, however if more people will face this issue maybe third one would do the trick. Of course it requires additional software, but thing is that will work.

Cheers, Dominik

ziajka avatar Oct 16 '17 09:10 ziajka

Hi @ehlers I've tested SLAAC (auto) with gns3/endhost and webterm and the host could get an IP form RS/RA Indeed, DHCPv6 doesn't work, I thought about testing packages like dibbler-client or isc-dhcp (dhclient).

selection_005_16_10

AJNOURI avatar Oct 16 '17 10:10 AJNOURI

Well "auto" works by accident. With "iface eth0 inet6 auto", the configuration of that interface fails with ifup: unknown method "auto". But then the GNS3 docker startup script activates all interfaces, what by default activates IPv6 autoconfiguration.

ghost avatar Oct 16 '17 10:10 ghost

Bring ifup/ifdown will require static build to avoid issues with libc. I think 1 is the best options with a possible contribution to busybox if it's doesn't progress.

Le lun. 16 oct. 2017 à 11:24, ziajka [email protected] a écrit :

Hi @ehlers https://github.com/ehlers

Thanks for deep explanation and proposed solutions.

In my opinion 1-st and 3-rd options are the most likely. First option would be the best, however if more people will face this issue maybe third one would do the trick. Of course it requires additional software, but thing is that will work.

Cheers, Dominik

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/GNS3/gns3-server/issues/1196#issuecomment-336830567, or mute the thread https://github.com/notifications/unsubscribe-auth/AAVFXbOFtU6o8rBQ6wKnXYjVqCA5Iy4jks5ssyDHgaJpZM4P6Sls .

julien-duponchelle avatar Oct 16 '17 11:10 julien-duponchelle

Hi Team, has anyone come across any solution to this? I'm configuring alpine nodes in CML2 (Cisco) and running across the same issue... cat image - thank you

pr0b3r7 avatar Oct 25 '20 17:10 pr0b3r7

The Alpine documentation about IPv6 Stateless Autoconfiguration states, that iface eth0 inet6 auto should work. But testing with the latest Alpine v3.12.1 shows the error message ifup: unknown method "auto", same as you got.

As a workaround you can use the manual method, which only activates the interface. As accept_ra is active by default, you don't have to touch that setting. But if you want to be on the safe side you can set it in the configuration.

iface eth0 inet6 manual
	pre-up echo 1 > /proc/sys/net/ipv6/conf/eth0/accept_ra

But there is still no support for DHCPv6 in Alpine/Busybox. So basically nothing has changed.

b-ehlers avatar Oct 26 '20 09:10 b-ehlers

The Alpine documentation about IPv6 Stateless Autoconfiguration states, that iface eth0 inet6 auto should work. But testing with the latest Alpine v3.12.1 shows the error message ifup: unknown method "auto", same as you got.

As a workaround you can use the manual method, which only activates the interface. As accept_ra is active by default, you don't have to touch that setting. But if you want to be on the safe side you can set it in the configuration.


iface eth0 inet6 manual

	pre-up echo 1 > /proc/sys/net/ipv6/conf/eth0/accept_ra

But there is still no support for DHCPv6 in Alpine/Busybox. So basically nothing has changed.

Thank you will test and communicate results with the proposed workaround

pr0b3r7 avatar Oct 31 '20 01:10 pr0b3r7