Red Hat Bugzilla – Bug 996727
Cannot automatically set IPv6 default route if default gateway is link-local
Last modified: 2016-11-25 08:02:53 EST
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:
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):
Steps to Reproduce:
1. Configure the Ethernet interface according to the scheme described above.
2. Restart network service
Default route via fe80::1 is not set; one may set it manually.
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.
The issue is in the network service. Reassigning to initscripts.
Can you try to set DEVICE=eth0 in /etc/sysconfig/network-scripts/ifcfg-eth0?
Thank you, it' s already set.
And does it help with your issue?
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.
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.
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:
(In reply to goslackware from comment #8)
> * Specifying the gateway device fixes this issue in RHEL5, by adding the
> following line to the config:
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:
According to Wikipedia :
"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:
In case you need any more help, please contact us via the Customer Portal:
Our support engineers will be able to help you much faster.