Bug 467165 (ifroute_and_IPv6) - ifroute does not support IPv6
Summary: ifroute does not support IPv6
Status: RESOLVED FIXED
: 482669 (view as bug list)
Alias: ifroute_and_IPv6
Product: openSUSE 11.1
Classification: openSUSE
Component: Network (show other bugs)
Version: Final
Hardware: 32bit openSUSE 11.1
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Marius Tomaschewski
QA Contact: E-mail List
URL:
Whiteboard: maint:released:11.0:23139 maint:relea...
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-17 15:00 UTC by Arjen Runsink
Modified: 2009-06-20 12:29 UTC (History)
2 users (show)

See Also:
Found By: Community User
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
Fix for ifup-tunnel to modprobe required kernel modules (433 bytes, patch)
2009-01-20 13:29 UTC, Marius Tomaschewski
Details | Diff
Proposed ipv6 related fixes for ifup-route (7.61 KB, patch)
2009-01-20 13:31 UTC, Marius Tomaschewski
Details | Diff
Fixed /etc/sysconfig/network/scripts/ifup-route script (17.46 KB, text/plain)
2009-01-20 13:31 UTC, Marius Tomaschewski
Details
Patch to not to pass sit0,gre0,tunl0 to ifup-tunnel (1.80 KB, patch)
2009-01-21 17:12 UTC, Marius Tomaschewski
Details | Diff
Improved ifup-tunnel patch just skipping sit0 in ifup-tunnel (2.64 KB, patch)
2009-01-27 13:07 UTC, Marius Tomaschewski
Details | Diff
test logs and config files (38.95 KB, application/x-compressed-tar)
2009-03-04 10:03 UTC, Arjen Runsink
Details
Proposed patch to fix the read_routes function. (350 bytes, patch)
2009-03-04 11:18 UTC, Marius Tomaschewski
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Arjen Runsink 2009-01-17 15:00:52 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.
Comment 1 Marius Tomaschewski 2009-01-20 13:29:52 UTC
Created attachment 266201 [details]
Fix for ifup-tunnel to modprobe required kernel modules
Comment 2 Marius Tomaschewski 2009-01-20 13:31:02 UTC
Created attachment 266202 [details]
Proposed ipv6 related fixes for ifup-route
Comment 3 Marius Tomaschewski 2009-01-20 13:31:41 UTC
Created attachment 266203 [details]
Fixed /etc/sysconfig/network/scripts/ifup-route script
Comment 4 Marius Tomaschewski 2009-01-20 13:48:11 UTC
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/
Comment 5 Marius Tomaschewski 2009-01-20 14:57:23 UTC
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
Comment 7 Arjen Runsink 2009-01-21 09:33:58 UTC
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
Comment 8 Marius Tomaschewski 2009-01-21 16:43:03 UTC
(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
Comment 9 Marius Tomaschewski 2009-01-21 17:12:24 UTC
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".
Comment 10 Marius Tomaschewski 2009-01-27 13:07:44 UTC
Created attachment 267895 [details]
Improved ifup-tunnel patch just skipping sit0 in ifup-tunnel
Comment 11 Marius Tomaschewski 2009-01-27 13:10:55 UTC
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.
Comment 12 Arjen Runsink 2009-03-04 10:03:44 UTC
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
Comment 13 Marius Tomaschewski 2009-03-04 11:18:53 UTC
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.
Comment 14 Marius Tomaschewski 2009-03-04 11:19:27 UTC
Please retest with above patch.
Comment 15 Arjen Runsink 2009-03-04 13:08:38 UTC
Hello Marius,

I applied the change to the script. 

This resolves the issue.

Thanks for the fix and your patience.

Best regards,
Arjen Runsink
Comment 17 Swamp Workflow Management 2009-03-04 16:24:52 UTC
The SWAMPID for this issue is 22848.
Please submit the patch and patchinfo file using this ID.
(https://swamp.suse.de/webswamp/wf/22848)
Comment 19 Marius Tomaschewski 2009-03-16 10:31:55 UTC
*** Bug 482669 has been marked as a duplicate of this bug. ***
Comment 20 Swamp Workflow Management 2009-04-09 08:01:11 UTC
The SWAMPID for this issue is 23825.
Please submit the patch and patchinfo file using this ID.
(https://swamp.suse.de/webswamp/wf/23825)
Comment 26 Marius Tomaschewski 2009-04-09 10:52:54 UTC
packages submitted
Comment 27 Swamp Workflow Management 2009-04-16 13:28:43 UTC
Update released for: sysconfig
Products:
openSUSE 10.3 (i386, ppc, x86_64)
Comment 28 Swamp Workflow Management 2009-04-16 13:29:15 UTC
Update released for: sysconfig
Products:
openSUSE 11.0 (debug, i386, ppc, x86_64)
Comment 29 Swamp Workflow Management 2009-04-20 14:10:54 UTC
Update released for: sysconfig, sysconfig-debuginfo, sysconfig-debugsource
Products:
openSUSE 11.1 (debug, i586, ppc, x86_64)
Comment 30 Swamp Workflow Management 2009-05-04 22:09:55 UTC
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)
Comment 31 Swamp Workflow Management 2009-06-19 22:08:43 UTC
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)