Hello,
interfaces(5) entails that the following is valid:
iface lo inet6 loopback
But such an interface always fails:
$ sudo ifup lo
RTNETLINK answers: File exists
Failed to bring up lo.
But it isn't necessary anyhow:
$ ip addr list dev lo
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
Changing the interface back to "inet" from "inet6" fixes the issue, and
gets the exact same config as above.
Ross
Hello,
I don't think that this configuration is unnecessary. There are cases where
you would want to add an additional loopback IP such as this sort of setup
(neither of these work BTW).
1) This won't work because I don't think loopback mode interfaces allow address
and netmask arguments:
iface lo inet6 loopback
address 2001:db8::1
netmask 0
2) This won't work because of this bug which prevents successful
initialization:
iface lo inet6 loopback
post-up ip -6 addr add 2001:db8::1/0 dev $IFACE
pre-down ip -6 addr flush dev $IFACE scope global
3) This won't work because it will try to call sysctl's on the virtual ifname,
which will fail:
iface lo:1 inet6 static
address 2001:db8::1
netmask 0
$ sudo ifup -v lo:1
Configuring interface lo:1=lo:1 (inet6)
run-parts --verbose /etc/network/if-pre-up.d
run-parts: executing /etc/network/if-pre-up.d/wireless-tools
run-parts: executing /etc/network/if-pre-up.d/wpasupplicant
modprobe -q net-pf-10 > /dev/null 2>&1 || true # ignore failure.
sysctl net.ipv6.conf.lo:1.autoconf=0
error: "net.ipv6.conf.lo:1.autoconf" is an unknown key
Failed to bring up lo:1.
Given every route seems blocked here, I could really benefit from a fix for
this bug.
Regards,
Matthew.
Hi
We have a very similar problem. As workaround in our case to flush the
addresses in the pre-up iface options worked. So doing in
/etc/network/interfaces:
pre-up ip -6 addr flush dev lo
i.e.
[...]
iface lo inet6 loopback
address ::1
netmask 128
pre-up ip -6 addr flush dev lo
pre-up /sbin/sysctl --system > /dev/null
up ip -6 addr add ...
[...]
(actually don't know yet if this has some undesired side-effects).
Regards,
Salvatore
Hello, What problem? Elaborate, please. What are you trying to achieve with this? What is this for? Anyway, since recently, you don't need to declare loopback interface at all.
Hello Andrew, Apologies for the terse reply in the previous message (it was mainly ment to the submitter to state our workaround, more detailed now): are using this not in production yet as we are on the way trying to achieve a load balancing setup now with IPv6 too with Linux Virtual Server Cluser[1] with IPv6 too on Wheezy based hosts. We had this previously for IPv4 only using lvs-dr (direct routing)[2]. [1] http://www.linuxvirtualserver.org/ [2] http://www.linuxvirtualserver.org/VS-DRouting.html http://www.austintek.com/LVS/LVS-HOWTO/HOWTO/LVS-HOWTO.LVS-DR.html http://www.austintek.com/LVS/LVS-HOWTO/HOWTO/LVS-HOWTO.arp_problem.html The additional IP's on the loopback device for the real servers are needed in this setup, see e.g. [3] (at least the IPv4 approach), for a recent post on the linux-ha list. [3] http://lists.linux-ha.org/pipermail/linux-ha/2013-June/047148.html So we tried to add additional addresses originally in /etc/network/interfaces for the loopback as: iface lo inet6 loopback up ip -6 addr add 2001:db8:0:0:1::1 dev lo which gives the same error message as reported: Sat Nov 2 07:43:37 2013: [....] Configuring network interfaces...RTNETLINK answers: File exists Sat Nov 2 07:43:37 2013: Failed to bring up lo. We added this to workaround this, and ended in having: iface lo inet6 loopback pre-up ip -6 addr flush dev lo up ip -6 addr add 2001:db8:0:0:1::1/64 dev lo resulting finally in # ip -6 addr show dev lo 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 inet6 2001:db8::1:0:0:1/64 scope global valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever This is actually not needed to show a minimal example. My coworker added this only to ensure that when he brings up and down the interface, to assure settings from all system configuration files are read, when playing around with these settings on the /etc/network/interfaces. Okay thanks for this hint. Is the above usecase thus wrong approach? Regards, Salvatore