Bugzilla – Bug 467165
ifroute does not support IPv6
Last modified: 2009-06-20 12:29:44 UTC
I use and IPv6 sixxs tunnel using sit. The default route should be set using ifroute-sit1 All according to this how-to: http://en.opensuse.org/SixXS_IPv6_Tunnel It looks as if the script /etc/sysconfig/network/scripts/ifup-route can not handle IPv6 Executing /etc/sysconfig/network/scripts/ifstatus-route sit1 crashes silently but works ok for the other interfaces and then only showing the IPv4 portion.
Created attachment 266201 [details] Fix for ifup-tunnel to modprobe required kernel modules
Created attachment 266202 [details] Proposed ipv6 related fixes for ifup-route
Created attachment 266203 [details] Fixed /etc/sysconfig/network/scripts/ifup-route script
The ifup-tunnel requires a "modprobe sit" to get it working. Seems, it is not loaded automatically (any more?) as in case of gre. Same to ipip tunnels. The ipv6 support in the ifup-route script was broken in several cases... In the ifstatus-route case, it compared ipv6+ipv4 against ipv4 routes and reported an error when not all routes were set up. Since I can't compare without to normalize (compress) the ipv6 addresses, the status reports only if all ipv4 routes are applied. This has to be fixed later. The ifup/down-route part should now apply the routes correctly... Please test if the attached fixed ifup-route script works for you. I'm going to prepare a test package as well - will appear in http://download.opensuse.org/repositories/home:/mtomaschewski:/11.1/openSUSE_11.1/
For your info - the following notations should work fine now for ipv4 and ipv6: prefix/len gateway - [interface | -] [flags] prefix gateway len [interface | -] [flags] and for ipv4 only, the traditional notation with netmask: prefix gateway netmask [interface | -] [flags] * Examples: 2001:DB8:ABCD:0:: 2001:DB8:ABCD:1::200 64 eth1 2001:DB8:ABCD:2::/64 2001:DB8:ABCD:1::200 - eth1 2001:DB8:ACBA::/48 - - lo unreachable 192.168.2.0/24 192.168.1.200 - eth1 192.168.0.0 192.168.1.200 24 eth1 192.168.3.0 192.168.1.200 255.255.255.0 eth1 10/8 192.168.1.200 - eth1 default 192.168.1.200 - eth1 default 2001:DB8:ABCD:1::200 - eth1
Hi Marius, I installed the test package you created. I also had the issue described, where the module for sit was not inserted. This is ok now. Executing /etc/sysconfig/network/scripts/ifstatus-route sit1 does now show the IPv6 routes for sit1. The default route from ifroute-sit1 is however not added. I verified the syntax and tried with both default 2001:DB8:ABCD:1::200 - sit1 and default 2001:DB8:ABCD:1::200 As the only lines in the ifroute-sit1 file. There are no errors in the console or in /var/log/messages Anything I can do to narrow this down? Rgrds, Arjen
(In reply to comment #7) > Hi Marius, Hi! > Executing /etc/sysconfig/network/scripts/ifstatus-route sit1 > does now show the IPv6 routes for sit1. > > The default route from ifroute-sit1 is however not added. > I verified the syntax and tried with both > > default 2001:DB8:ABCD:1::200 - sit1 > and > default 2001:DB8:ABCD:1::200 > > As the only lines in the ifroute-sit1 file. > > There are no errors in the console or in /var/log/messages > > Anything I can do to narrow this down? Please verify your installation (sysconfig version 0.71.11-15.1 and modifications using "rpm -V sysconfig") and your config (see bellow) and attach the /tmp/out.txt + outputs of: /etc/sysconfig/network/scripts/ifdown-route sit1 bash -vx /etc/sysconfig/network/scripts/ifup-route sit1 &>/tmp/out.txt /etc/sysconfig/network/scripts/ifstatus-route sit1 It works perfectly here using sysconfig-0.71.11-15.1 as in the home:mtomaschewski:11.1 project using a heartbeat sixxs tunnel. BTW: There is also a sysconfig-0.71.11-17.1 that contains a new fix: - Fix to not handle sit0,gre0,tunl0 in ifup-tunnel (bnc#467165). but there are no changes to the ifup-route script. The configuration I've used here: IPv4 local IP: 222.222.222.222 IPv4 remote IP: 111.111.111.111 IPv6 local IP: 2001:DB8:AAA:BBB::2 IPv6 remote IP: 2001:DB8:AAA:BBB::1 IPv6 subnet : 2001:DB8:ABCD::/48 ifcfg-sit1: STARTMODE='onboot' BOOTPROTO='static' IPADDR='2001:DB8:AAA:BBB::2/64' TUNNEL='sit' #TUNNEL_DEVICE=dsl0 TUNNEL_LOCAL_IPADDR='222.222.222.222' TUNNEL_REMOTE_IPADDR='111.111.111.111' TUNNEL_TTL='64' ifroute-lo: # don't route own subnet back to the internet 2001:DB8:ABCD::/48 - - - unreachable 127/8 ifroute-eth1: 2001:DB8:ABCD:0:: 2001:DB8:ABCD:1::200 64 - 2001:DB8:ABCD:2::/64 2001:DB8:ABCD:1::200 ifroute-sit1: default 2001:DB8:AAA:BBB::1 - - # ip tunnel show sit1 sit1: ipv6/ip remote 222.222.222.222 local 111.111.111.111 ttl 64 # ip addr show sit1 19: sit1@NONE: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1280 qdisc noqueue state UNKNOWN link/sit 111.111.111.111 peer 222.222.222.222 inet6 2001:DB8:AAA:BBB::2/64 scope global valid_lft forever preferred_lft forever inet6 fe80::aaaa:bbbb/128 scope link valid_lft forever preferred_lft forever # ip -6 route show 2001:DB8:AAA:BBB::/64 via :: dev sit1 proto kernel metric 256 mtu 1480 advmss 1420 hoplimit 4294967295 2001:DB8:ABCD::/64 via 2001:DB8:ABCD:1::200 dev eth1 metric 1024 mtu 1500 advmss 1440 hoplimit 4294967295 2001:DB8:ABCD:1::/64 dev eth1 proto kernel metric 256 mtu 1500 advmss 1440 hoplimit 4294967295 2001:DB8:ABCD:2::/64 via 2001:DB8:ABCD:1::200 dev eth1 metric 1024 mtu 1500 advmss 1440 hoplimit 4294967295 unreachable 2001:DB8:ABCD::/48 dev lo metric 1024 error -101 mtu 16436 advmss 16376 hoplimit 4294967295 fe80::/64 dev eth0 proto kernel metric 256 mtu 1500 advmss 1440 hoplimit 4294967295 fe80::/64 dev eth1 proto kernel metric 256 mtu 1500 advmss 1440 hoplimit 4294967295 fe80::/64 via :: dev sit1 proto kernel metric 256 mtu 1480 advmss 1420 hoplimit 4294967295 default via 2001:DB8:AAA:BBB::1 dev sit1 metric 1024 mtu 1480 advmss 1420 hoplimit 4294967295 Note the "-6" in the "ip -6 route show" command above -- "ifstatus sit1" shows only routes for the sit1 interface, that is: [...] Active IPv6 routes for interface sit1: 2001:DB8:AAA:BBB::/64 via :: proto kernel metric 256 mtu 1280 advmss 1220 hoplimit 4294967295 fe80::/64 via :: proto kernel metric 256 mtu 1280 advmss 1220 hoplimit 4294967295 default via 2001:DB8:AAA:BBB::1 metric 1024 mtu 1280 advmss 1220 hoplimit 4294967295 See also "man 5 routes" and "man 5 ifcfg-tunnel". This does not have anything to do with the routing, but few words about sixxs tunnels: - when your tunnel is of type static you need static IPv4 IP - when your tunnel is of type ayiya (tun interface) or heartbeat (sit interface), you need aiccu. (to "drive" the tunnel in ayiya mode or to make heartbeat) http://download.opensuse.org/repositories/home:/mtomaschewski:/aiccu/ Please install it and check that all is working using "aiccu test". In heatbeat mode, you can also use aiccu to just make the beat and configure it using ifcfg-sit1 file. "aiccu test" enables the tunnel for 300 seconds - enough time to reboot to see that the ifcfg works (e.g. ping6 $RemoteIPv6). The /etc/aiccu.conf should look like this then: username XXXXXXX password YYYYYYY #tunnel_id TTTTT ipv6_interface sit1 daemonize true automatic true defaultroute false makebeats true noconfigure true
Created attachment 266583 [details] Patch to not to pass sit0,gre0,tunl0 to ifup-tunnel The ifup-tunnel script creates/destroys tunnels; this does not work for sit0 & co and produces errors. With this patch, the interface (when ifcfg-sit0 exists) will be handled in a generic way, that is just set up and activates the "automatic tunnels". See "ip link set up dev sit0 ; ip addr show sit0".
Created attachment 267895 [details] Improved ifup-tunnel patch just skipping sit0 in ifup-tunnel
Arjen, when it still does not work, please provide the complete output of bash -vx /etc/sysconfig/network/scripts/ifup-route sit1 ; ip -6 route show as described in comment #8.
Created attachment 276974 [details] test logs and config files It took some time, I know The attached tar file holds the config files and 2 logs of tests performed with 2 versions of the sysconfig package. The issue is present in both. When I read through it, it looks as if the ifroute-sit1 file is not being sourced. Rgrds, Arjen
Created attachment 277012 [details] Proposed patch to fix the read_routes function. Just make a "cat ifroute-sit1" -- the line is incomplete (no EOL ["\n"] at the end) and the while read loop in read_routes can't read it correctly. The attached patch or a 'echo "" >> ifroute-sit1' fixes the problem. I'll add this fix. Please retest.
Please retest with above patch.
Hello Marius, I applied the change to the script. This resolves the issue. Thanks for the fix and your patience. Best regards, Arjen Runsink
The SWAMPID for this issue is 22848. Please submit the patch and patchinfo file using this ID. (https://swamp.suse.de/webswamp/wf/22848)
*** Bug 482669 has been marked as a duplicate of this bug. ***
The SWAMPID for this issue is 23825. Please submit the patch and patchinfo file using this ID. (https://swamp.suse.de/webswamp/wf/23825)
packages submitted
Update released for: sysconfig Products: openSUSE 10.3 (i386, ppc, x86_64)
Update released for: sysconfig Products: openSUSE 11.0 (debug, i386, ppc, x86_64)
Update released for: sysconfig, sysconfig-debuginfo, sysconfig-debugsource Products: openSUSE 11.1 (debug, i586, ppc, x86_64)
Update released for: sysconfig Products: SLE-DEBUGINFO 10-SP2 (i386, ia64, ppc, s390x, x86_64) SLE-DESKTOP 10-SP2 (i386, x86_64) SLE-RT 10-SP2 (i386, x86_64) SLE-SERVER 10-SP2 (i386, ia64, ppc, s390x, x86_64)
Update released for: sysconfig, sysconfig-debuginfo, sysconfig-debugsource Products: SLE-DEBUGINFO 11 (i386, ia64, ppc64, s390x, x86_64) SLE-DESKTOP 11 (i386, x86_64) SLE-SERVER 11 (i386, ia64, ppc64, s390x, x86_64)