Hi. I'm need create gre tunnel for ipv6. I do in command line: ip -6 tunnel add mode ip6gre remote 2001:db8:1::1 local 2001:db8:2::2 ip -6 addr add 2001:db8:3::1 dev ip6gre1 ip -6 route add 2001:db8:3::2 dev ip6gre1 ip -6 link set dev ip6gre1 multicast on ip -6 link set dev ip6gre1 up and this work! However then me write in /etc/conf.d/net: iptunnel_ip6gre1="mode ip6gre remote 2001:db8:1::1 local 2001:db8:2::2" config_ip6gre1="2001:db8:3::1 peer 2001:db8:3::2" and create /etc/init.d/net.ip6gre1 as a symlink on /etc/init.d/net.lo, and after do: /etc/init.d/net.ip6gre1 start i see: alex@host # /etc/init.d/net.ip6gre1 start * Caching service dependencies ... [ ok ] * Bringing up interface ip6gre1 * Caching network module dependencies need firewalld * Creating tunnel ip6gre1 ... Unknown tunnel mode "ip6gre" [ !! ] * ERROR: net.ip6gre1 failed to start I try change "iptunnel_ip6gre1" on "ip6tunnel_ip6gre1" or "iptunnel6_ip6gre1" but results was not good: alex@host # /etc/init.d/net.ip6gre1 start * Caching service dependencies ... [ ok ] * Bringing up interface ip6gre1 * ERROR: interface ip6gre1 does not exist * Ensure that you have loaded the correct kernel module for your hardware * ERROR: net.ip6gre1 failed to start I'm think what problem in file /lib/netifrc/net/iproute2.sh, in function: _tunnel() { ip tunnel "$@" } Most likely it is necessary, that if tunnel protocol is ipv6, this function has to look different, but i don't know how. I use net-misc/netifrc-0.2.2 and sys-apps/iproute2-3.14.0 alex@host ~ $ emerge --info Portage 2.2.8-r1 (default/linux/amd64/13.0, gcc-4.7.3, glibc-2.17, 3.12.20-gentoo x86_64) ================================================================= System uname: Linux-3.12.20-gentoo-x86_64-Intel-R-_Xeon-R-_CPU_X3480_@_3.07GHz-with-gentoo-2.2 KiB Mem: 8133916 total, 6203536 free KiB Swap: 4194300 total, 4194300 free Timestamp of tree: Thu, 29 May 2014 19:30:01 +0000 ld GNU ld (GNU Binutils) 2.23.2 ccache version 3.1.9 [enabled] app-shells/bash: 4.2_p45 dev-lang/python: 2.7.6, 3.3.3 dev-util/ccache: 3.1.9-r3 dev-util/pkgconfig: 0.28 sys-apps/baselayout: 2.2 sys-apps/openrc: 0.12.4 sys-apps/sandbox: 2.6-r1 sys-devel/autoconf: 2.69 sys-devel/automake: 1.13.4 sys-devel/binutils: 2.23.2 sys-devel/gcc: 4.7.3-r1 sys-devel/gcc-config: 1.7.3 sys-devel/libtool: 2.4.2 sys-devel/make: 3.82-r4 sys-kernel/linux-headers: 3.13 (virtual/os-headers) sys-libs/glibc: 2.17 Repositories: gentoo ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O3 -march=native -fomit-frame-pointer -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-O3 -march=native -fomit-frame-pointer -pipe" DISTDIR="/usr/portage/distfiles" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs buildpkg ccache config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="en_US.utf8" LC_ALL="" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j4" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" USE="amd64 bzip2 cli cracklib crypt cxx dri fortran iconv idn ipv6 mmx modules multilib ncurses nls nptl openmp pcre readline session snmp sse sse2 ssl tcpd unicode zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="ru en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SYNC, USE_PYTHON
please run: /etc/init.d/net.ip6gre1 --verbose start and post the output here.
Then, in /etc/conf.d/net write: iptunnel_ip6gre1="mode ip6gre remote 2001:db8:1::1 local 2001:db8:2::2" config_ip6gre1="2001:db8:3::1 peer 2001:db8:3::2" and i run: alex@host # /etc/init.d/net.ip6gre1 --verbose start * Caching service dependencies ... [ ok ] * Bringing up interface ip6gre1 * Skipping module adsl due to missing program: /usr/sbin/adsl-start /usr/sbin/pppoe-start * Skipping module br2684ctl due to missing program: br2684ctl * Skipping module bridge due to missing program: brctl * Skipping module clip due to missing program: /usr/sbin/atmsigd * Skipping module netplugd due to missing program: /sbin/netplugd * Skipping module ifplugd due to missing program: /usr/sbin/ifplugd * Skipping module ipppd due to missing program: /usr/sbin/ipppd * Skipping module iwconfig due to missing program: /sbin/iwconfig * Skipping module firewalld due to missing program: firewall-cmd * Skipping module pppd due to missing program: /usr/sbin/pppd * Skipping module dhclient due to missing program: /sbin/dhclient * Skipping module pump due to missing program: /sbin/pump * Loaded modules: apipa arping bonding tuntap ccwgroup ethtool macvlan macchanger macnet wpa_supplicant ssidnet iproute2 system vlan dhcpcd ip6rd ip6to4 * Creating tunnel ip6gre1 ... Unknown tunnel mode "ip6gre" [ !! ] * ERROR: net.ip6gre1 failed to start If in /etc/conf.d/net write: ip6tunnel_ip6gre1="mode ip6gre remote 2001:db8:1::1 local 2001:db8:2::2" config_ip6gre1="2001:db8:3::1 peer 2001:db8:3::2" output command this: alex@host # /etc/init.d/net.ip6gre1 --verbose start * Caching service dependencies ... [ ok ] * Bringing up interface ip6gre1 * Skipping module adsl due to missing program: /usr/sbin/adsl-start /usr/sbin/pppoe-start * Skipping module br2684ctl due to missing program: br2684ctl * Skipping module bridge due to missing program: brctl * Skipping module clip due to missing program: /usr/sbin/atmsigd * Skipping module netplugd due to missing program: /sbin/netplugd * Skipping module ifplugd due to missing program: /usr/sbin/ifplugd * Skipping module ipppd due to missing program: /usr/sbin/ipppd * Skipping module iwconfig due to missing program: /sbin/iwconfig * Skipping module firewalld due to missing program: firewall-cmd * Skipping module pppd due to missing program: /usr/sbin/pppd * Skipping module dhclient due to missing program: /sbin/dhclient * Skipping module pump due to missing program: /sbin/pump * Loaded modules: apipa arping bonding tuntap ccwgroup ethtool macvlan macchanger macnet wpa_supplicant ssidnet iproute2 system vlan dhcpcd ip6rd ip6to4 * ERROR: interface ip6gre1 does not exist * Ensure that you have loaded the correct kernel module for your hardware * ERROR: net.ip6gre1 failed to start If in /etc/conf.d/net write: iptunnel_ip6gre0="mode ip6gre remote 2001:db8:1::1 local 2001:db8:2::2" config_ip6gre0="2001:db8:3::1 peer 2001:db8:3::2" output command this: alex@host # /etc/init.d/net.ip6gre0 --verbose start * Caching service dependencies ... [ ok ] * Bringing up interface ip6gre0 * Skipping module adsl due to missing program: /usr/sbin/adsl-start /usr/sbin/pppoe-start * Skipping module br2684ctl due to missing program: br2684ctl * Skipping module bridge due to missing program: brctl * Skipping module clip due to missing program: /usr/sbin/atmsigd * Skipping module netplugd due to missing program: /sbin/netplugd * Skipping module ifplugd due to missing program: /usr/sbin/ifplugd * Skipping module ipppd due to missing program: /usr/sbin/ipppd * Skipping module iwconfig due to missing program: /sbin/iwconfig * Skipping module firewalld due to missing program: firewall-cmd * Skipping module pppd due to missing program: /usr/sbin/pppd * Skipping module dhclient due to missing program: /sbin/dhclient * Skipping module pump due to missing program: /sbin/pump * Loaded modules: apipa arping bonding tuntap ccwgroup ethtool macvlan macchanger macnet wpa_supplicant ssidnet iproute2 system vlan dhcpcd ip6rd ip6to4 * Creating tunnel ip6gre0 ... Unknown tunnel mode "ip6gre" [ !! ] * ERROR: net.ip6gre0 failed to start And, at last, if in /etc/conf.d/net write: ip6tunnel_ip6gre0="mode ip6gre remote 2001:db8:1::1 local 2001:db8:2::2" config_ip6gre0="2001:db8:3::1 peer 2001:db8:3::2" output command this: alex@host # /etc/init.d/net.ip6gre0 --verbose start * Caching service dependencies ... [ ok ] * Bringing up interface ip6gre0 * Skipping module adsl due to missing program: /usr/sbin/adsl-start /usr/sbin/pppoe-start * Skipping module br2684ctl due to missing program: br2684ctl * Skipping module bridge due to missing program: brctl * Skipping module clip due to missing program: /usr/sbin/atmsigd * Skipping module netplugd due to missing program: /sbin/netplugd * Skipping module ifplugd due to missing program: /usr/sbin/ifplugd * Skipping module ipppd due to missing program: /usr/sbin/ipppd * Skipping module iwconfig due to missing program: /sbin/iwconfig * Skipping module firewalld due to missing program: firewall-cmd * Skipping module pppd due to missing program: /usr/sbin/pppd * Skipping module dhclient due to missing program: /sbin/dhclient * Skipping module pump due to missing program: /sbin/pump * Loaded modules: apipa arping bonding tuntap ccwgroup ethtool macvlan macchanger macnet wpa_supplicant ssidnet iproute2 system vlan dhcpcd ip6rd ip6to4 * 2001:db8:3::1 ... * ip addr add 2001:db8:3::1 peer 2001:db8:3::2 dev ip6gre0 [ ok ] after this i see: alex@host # ip -6 tunnel show ip6gre0: gre/ipv6 remote :: local :: encaplimit 0 hoplimit 0 tclass 0x00 flowlabel 0x00000 (flowinfo 0x00000000) ip6tnl0: ipv6/ipv6 remote :: local :: encaplimit 0 hoplimit 0 tclass 0x00 flowlabel 0x00000 (flowinfo 0x00000000) But it not that is necessary.
Please test netifrc-0.2.4. It seems the ip6gre tunnel mode was newer than the rest of the code; if you could run your 4 testcases again with it, that would be superb in debugging it. Reopen if it's still buggy after that.
I'm install net-misc/netifrc-0.2.4, write in /etc/conf.d/net iptunnel_ip6gre1="mode ip6gre remote 2001:db8:1::1 local 2001:db8:2::2" config_ip6gre1="2001:db8:3::1 peer 2001:db8:3::2" and run alex@host # /etc/init.d/net.ip6gre1 --verbose start * Caching service dependencies ... [ ok ] * Bringing up interface ip6gre1 * Skipping module bridge due to missing program: brctl * Skipping module netplugd due to missing program: /sbin/netplugd * Skipping module ifplugd due to missing program: /usr/sbin/ifplugd * Skipping module ipppd due to missing program: /usr/sbin/ipppd * Skipping module iwconfig due to missing program: /sbin/iwconfig * Skipping module firewalld due to missing program: firewall-cmd * Skipping module pump due to missing program: /sbin/pump * Skipping module dhcpcd due to missing program: dhcpcd * Loaded modules: adsl apipa arping bonding br2684ctl tuntap ccwgroup clip ethtool macvlan macchanger macnet wpa_supplicant ssidnet iproute2 pppd system vlan udhcpc ip6rd ip6to4 * ip link set dev ip6gre1 up * Creating tunnel ip6gre1 ... * ip -6 tunnel add mode ip6gre remote 2001:db8:1::1 local 2001:db8:2::2 name ip6gre1 [ ok ] * ip link set dev ip6gre1 up * 2001:db8:3::1 ... * ip addr add 2001:db8:3::1 peer 2001:db8:3::2 dev ip6gre1 RTNETLINK answers: Invalid argument [ !! ] * ERROR: net.ip6gre1 failed to start After this in /var/log/messages added next lines: Jul 18 10:01:53 alex /etc/init.d/net.ip6gre1[1563]: net.ip6gre1: not allowed to be hotplugged Jul 18 10:01:53 alex /etc/init.d/net.ip6gre1[1210]: ERROR: net.ip6gre1 failed to start Command "ip -6 tunnel" show that tunnel was created: alex@host # ip -6 tunnel ip6gre1: gre/ipv6 remote 2001:db8:1::1 local 2001:db8:2::2 encaplimit 4 hoplimit 64 tclass 0x00 flowlabel 0x00000 (flowinfo 0x00000000) ip6gre0: gre/ipv6 remote :: local :: encaplimit 0 hoplimit 0 tclass 0x00 flowlabel 0x00000 (flowinfo 0x00000000) ip6tnl0: ipv6/ipv6 remote :: local :: encaplimit 0 hoplimit 0 tclass 0x00 flowlabel 0x00000 (flowinfo 0x00000000) but local address wasn't create, and wasn't create route to other side tunnel. Ok, i deleted the created tunnel, and change /etc/conf.d/net: iptunnel_ip6gre1="mode ip6gre remote 2001:db8:1::1 local 2001:db8:2::2" config_ip6gre1="null" Then i run: alex@host # /etc/init.d/net.ip6gre1 --verbose start * Caching service dependencies ... [ ok ] * Bringing up interface ip6gre1 * Skipping module bridge due to missing program: brctl * Skipping module netplugd due to missing program: /sbin/netplugd * Skipping module ifplugd due to missing program: /usr/sbin/ifplugd * Skipping module ipppd due to missing program: /usr/sbin/ipppd * Skipping module iwconfig due to missing program: /sbin/iwconfig * Skipping module firewalld due to missing program: firewall-cmd * Skipping module pump due to missing program: /sbin/pump * Skipping module dhcpcd due to missing program: dhcpcd * Loaded modules: adsl apipa arping bonding br2684ctl tuntap ccwgroup clip ethtool macvlan macchanger macnet wpa_supplicant ssidnet iproute2 pppd system vlan udhcpc ip6rd ip6to4 * ip link set dev ip6gre1 up * Creating tunnel ip6gre1 ... * ip -6 tunnel add mode ip6gre remote 2001:db8:1::1 local 2001:db8:2::2 name ip6gre1 [ ok ] * ip link set dev ip6gre1 up [ ok ] * ip -4 route flush table cache dev ip6gre1 * ip -6 route flush table cache dev ip6gre1 alex@host # rc-status Runlevel: default ... ... net.ip6gre1 [ started ] ... alex@host # /etc/init.d/net.ip6gre1 --verbose stop * Bringing down interface ip6gre1 * Skipping module bridge due to missing program: brctl * Skipping module iwconfig due to missing program: /sbin/iwconfig * Skipping module firewalld due to missing program: firewall-cmd * Skipping module pump due to missing program: /sbin/pump * Loaded modules: ip6to4 ip6rd dhcpcd udhcpc dhclient vlan system pppd iproute2 ifconfig ssidnet wpa_supplicant ipppd ifplugd netplugd macnet macchanger macvlan ethtool clip ccwgroup tuntap br2684ctl bonding arping apipa adsl * ip addr flush dev ip6gre1 scope global * ip addr flush dev ip6gre1 scope site * ip addr flush dev ip6gre1 scope host * ip -4 route flush table cache dev ip6gre1 * ip -6 route flush table cache dev ip6gre1 * ip link set dev ip6gre1 down Perfectly, everything works as expected! May be problem in functions "_add_address()" and "_add_route()" in file /lib/netifrc/net/iproute2.sh?