Bug 996727 - Cannot automatically set IPv6 default route if default gateway is link-local
Cannot automatically set IPv6 default route if default gateway is link-local
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: initscripts (Show other bugs)
6.6
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: initscripts Maintenance Team
qe-baseos-daemons
:
Depends On:
Blocks: 1356047
  Show dependency treegraph
 
Reported: 2013-08-13 15:56 EDT by Răzvan Sandu
Modified: 2016-11-25 08:02 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Release Note
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-11-11 07:34:53 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Răzvan Sandu 2013-08-13 15:56:57 EDT
Hello,

Description of problem:

My ISP offers native IPv6 connectivity with *static* IPv6 addreses via the following mechanism:

1. The client assigns a link-local address to the Ethernet interface of his computer (say fe80::2a02:2f0f:1b/10)

2. The default gateway is ISP's CPE device, address fe80::1/10

3. The client receives a globally-unicast /48 or /64 prefix (i.e. routable) and he may configure one of these addreses on the interface of his computer, in order to make it reachable.

So the client has, in his /etc/sysconfig/network-scripts/ifcfg-eth0:

IPV6_AUTOCONF=no
IPV6_DEFAULTGW=fe80::1
IPV6ADDR=fe80::2a02:2f0f:1b/10
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=yes
HWADDR=00:1E:67:19:51:A5
IPV6ADDR_SECONDARIES=whatever-routable-address/64

However, when restarting the network service, the following message is displayed:

ERROR   : [ipv6_set_default_route] Given IPv6 default gateway 'fe80::1' is link-local, but no scope or gateway device is specified

and the default route via fe80::1 is NOT set.

Manually typing something like:

ip -6 route replace default via fe80::1 dev eth0

solves the problem and the desired IPv6 connectivity is reached.


Version-Release number of selected component (if applicable):
iproute-2.6.32-23.el6.x86_64

How reproducible:
Always.

Steps to Reproduce:
1. Configure the Ethernet interface according to the scheme described above.
2. Restart network service


Actual results:
Default route via fe80::1 is not set; one may set it manually.

Expected results:
In the described scenario, the default route should be set automatically, based on the parameters in /etc/sysconfig/network and /etc/sysconfig/network-scripts/ifcfg-eth0, without any manual intervention.


Thanks!
Comment 2 Petr Šabata 2013-08-14 05:06:55 EDT
The issue is in the network service.  Reassigning to initscripts.
Comment 3 Lukáš Nykrýn 2013-08-14 07:28:55 EDT
Can you try to set DEVICE=eth0 in /etc/sysconfig/network-scripts/ifcfg-eth0?
Comment 4 Răzvan Sandu 2013-08-16 02:24:57 EDT
Hello,

@Lukáš Nykrýn
Thank you, it' s already set.

Răzvan
Comment 5 Lukáš Nykrýn 2013-08-16 02:26:40 EDT
And does it help with your issue?
Comment 6 Răzvan Sandu 2013-08-16 04:24:37 EDT
Hello,

No, DEVICE=eth0 was already set when the bug was initially reported.

As I said, I keep receiving the described error message when network service is restarted. If the computer is rebooted, setting default gateway is silently skipped.

Default gateway MAY be set manually after the service is restarted, via an "ip -6 route replace default via fe80::1 dev eth0", but this is not useful in case of unnatended reboots.

Best regards,
Răzvan
Comment 7 RHEL Product and Program Management 2013-10-13 22:45:03 EDT
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.
Comment 8 goslackware 2016-06-20 16:45:23 EDT
For this error:
"ERROR   : [ipv6_set_default_route] Given IPv6 default gateway 'fe80::1' is link-local, but no scope or gateway device is specified"

* Specifying the gateway device fixes this issue in RHEL5, by adding the following line to the config:
IPV6_DEFAULTDEV=eth0
Comment 9 David Kaspar [Dee'Kej] 2016-11-11 07:34:53 EST
Hello Razvan,

(In reply to goslackware from comment #8)
> * Specifying the gateway device fixes this issue in RHEL5, by adding the
> following line to the config:
> IPV6_DEFAULTDEV=eth0

Yes, this is correct. I was looking into the source code and I can confirm that  you need to set the 'IPV6_DEFAULTDEV=<device>' in your configuration (in this case <device> = eth0).

This is caused beucase you haven't used zone indices in your IPv6 specification for default gateway:

> IPV6_DEFAULTGW=fe80::1

According to Wikipedia [1]:
"Because all link-local addresses in a host have a common prefix, normal routing procedures cannot be used to choose the outgoing interface when sending packets to a link-local destination. A special identifier, known as a zone index, is needed to provide the additional routing information; in the case of link-local addresses, zone indices correspond to interface identifiers.

* most Unix-like systems (e.g., BSD, Linux, OS X) use the interface name as a zone index: fe80::3%eth0
"

This confirms to what I see in the code of initscripts. So, unless you specify the IPV6_DEFAULTDEV=eth0, you need to have the IPV6_DEFAULTGW in this format:

IPV6_DEFAULTGW=fe80::1%eth0

In case you need any more help, please contact us via the Customer Portal:
https://access.redhat.com/

Our support engineers will be able to help you much faster.

Best regards,

David

-----

[1] https://en.wikipedia.org/wiki/IPv6_address#Link-local_addresses_and_zone_indices

Note You need to log in before you can comment on or make changes to this bug.