Bug 996727

Summary: Cannot automatically set IPv6 default route if default gateway is link-local
Product: Red Hat Enterprise Linux 6 Reporter: Răzvan Sandu <rsandu2004>
Component: initscriptsAssignee: initscripts Maintenance Team <initscripts-maint-list>
Status: CLOSED NOTABUG QA Contact: qe-baseos-daemons
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.6CC: deekej, ebenes, goslackware
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Release Note
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-11 12:34:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1356047    

Description Răzvan Sandu 2013-08-13 19:56:57 UTC
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 09:06:55 UTC
The issue is in the network service.  Reassigning to initscripts.

Comment 3 Lukáš Nykrýn 2013-08-14 11:28:55 UTC
Can you try to set DEVICE=eth0 in /etc/sysconfig/network-scripts/ifcfg-eth0?

Comment 4 Răzvan Sandu 2013-08-16 06:24:57 UTC
Hello,

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

Răzvan

Comment 5 Lukáš Nykrýn 2013-08-16 06:26:40 UTC
And does it help with your issue?

Comment 6 Răzvan Sandu 2013-08-16 08:24:37 UTC
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 Program Management 2013-10-14 02:45:03 UTC
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 20:45:23 UTC
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 12:34:53 UTC
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