This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 604334 - Network Manager IPV6 Gateway cannot be set/used in Manual mode
Network Manager IPV6 Gateway cannot be set/used in Manual mode
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: NetworkManager (Show other bugs)
13
i686 Linux
low Severity high
: ---
: ---
Assigned To: Dan Williams
Fedora Extras Quality Assurance
:
Depends On:
Blocks: F15Beta-accepted/F15BetaFreezeExcept 677609
  Show dependency treegraph
 
Reported: 2010-06-15 16:47 EDT by Jani Ollikainen
Modified: 2011-04-12 17:28 EDT (History)
8 users (show)

See Also:
Fixed In Version: NetworkManager-0.8.3.996-1.fc14
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-03-01 20:51:04 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
Screenshot of the IPv6 without Gateway (41.28 KB, image/png)
2010-06-29 01:20 EDT, Jani Ollikainen
no flags Details

  None (edit)
Description Jani Ollikainen 2010-06-15 16:47:38 EDT
Description of problem:
Static IPV6 connection can only be used locally as Gateway cannot be given.
Try to set Static IPV6 with Gateway. The Graphics GUI just accepts it
but the value will not stay there. Network manager doens't use IPV6_DEFAULTGW
either.

Version-Release number of selected component (if applicable):
NetworkManager-0.8.1-0.1.git20100510.fc13.i686

How reproducible:
Always

Steps to Reproduce:
1. Edit connections
2. Wired
3. System eth0 - Edit
4. IPv6 Settings
5. Method: Static
6. Manual
7. Input address, prefix, gateway
8. Apply
9. Edit again and go to IPv6 Settings
10. No Gateway
  
Actual results:
Gateway doesn't stay

Expected results:
Gateway should stay

Workaround:
service NetworkManager stop
chkconfig NetworkManager off
service network restart

Additional info:
/etc/sysconfig/network-scripts/ifcfg-eth0:

# Intel Corporation 82566DM-2 Gigabit Network Connection
DEVICE=eth0
ONBOOT=yes
IPADDR=XXX.YYY.78.39
NETMASK=255.255.255.240
GATEWAY=XXX.YYY.78.33
HWADDR=00:1F:C6:7E:02:5D
TYPE=Ethernet
IPV6INIT=yes
IPV6ADDR="XXX:YYY:1ec::39/64"
IPV6_DEFAULTGW="XXX:YYY:1ec::1"
BOOTPROTO=none
PREFIX=28
DNS1=XXX.YYY.78.35
DOMAIN=example.org
DEFROUTE=yes
IPV6_AUTOCONF=no
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=yes
NAME="System eth0"
UUID=5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03
DNS2=XXX:YYY:1ec::35
Comment 1 Dan Williams 2010-06-28 15:56:58 EDT
Hmm, I can't get this to happen with master... I'm going to do a new build quite soon that is comparable to master.

And IPV6_DEFAULTGW needs to go into /etc/sysconfig/network actually since it's a *global* setting, instead of into the specific ifcfg.  If you put it there, does that work as a workaround for the time being?
Comment 2 Jani Ollikainen 2010-06-28 16:44:38 EDT
I had that also there:

$ cat /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=yes
HOSTNAME=cd.example.org
IPV6_DEFAULTGW="XXX:YYY:1ec::1"
IPV6_DEFAULTDEV="eth0"

Well, let's test again:

service network stop
service NetworkManager start
ip -6 route

default dev eth0  proto static  metric 1024  mtu 1500 advmss 1440 hoplimit 0

Commented IPB6_DEFAULTDEV if it would only need the IPV6_DEFAULTGW and it
still isn't there.

service NetworkManager stop
service network start
ip -6 route

default via XXX:YYYY:1ec::1 dev eth0  metric 1  mtu 1500 advmss 1440 hoplimit 0
default dev eth0  proto static  metric 1024  mtu 1500 advmss 1440 hoplimit 0
Comment 3 Dan Williams 2010-06-28 18:23:48 EDT
Ah, I'm wrong; IPV6_DEFAULTGW is only checked for the device to use as the default device.

To test, do you still have the problem where you cannot enter the gateway when you update to these builds?

http://koji.fedoraproject.org/koji/buildinfo?buildID=179844
Comment 4 Jani Ollikainen 2010-06-29 01:20:10 EDT
rpm -Fvh *
Preparing...                ########################################### [100%]
   1:NetworkManager-glib    ########################################### [ 33%]
   2:NetworkManager         ########################################### [ 67%]
   3:NetworkManager-gnome   ########################################### [100%]
service network stop
service NetworkManager start
ip -6 route

default dev eth0  proto static  metric 1024  mtu 1500 advmss 1440 hoplimit 0

Trying to edit it. Hitting apply and the password for root. After that those windows close and when I go back to edit the connections there isn't gateway.

I'll attach screenshot of the window without GW.
Comment 5 Jani Ollikainen 2010-06-29 01:20:51 EDT
Created attachment 427572 [details]
Screenshot of the IPv6 without Gateway
Comment 6 Dan Williams 2010-10-07 00:21:10 EDT
Yeah, I can reproduce with master.  The problem is that with the ifcfg file format only DEFAULTGW allows you to specify a default gateway.  And there's only one of those.  So we'll need to figure out how to add a per-address GW.

Bill?
Comment 7 Bill Nottingham 2010-10-07 10:59:10 EDT
IPV6_DEFAULTGW has a bizarre syntax it accepts of "<nexthop>%<interface>"; other ways this is done is via ADDRESSN/GATEWAYN used by ifup-routes for static routes.
Comment 8 Jani Ollikainen 2010-11-19 13:16:26 EST
Umm, nexthop is gw? but what is interface?

Did try these:
IPV6_DEFAULTGW="2001:14b8:1ec::1%eth0"
IPV6_DEFAULTGW="2001:14b8:1ec::1%2001:14b8:1ec::39"

But ip -6 route:
2001:14b8:1ec::/64 dev eth0  proto kernel  metric 256  mtu 1500 advmss 1440 hoplimit 0
fe80::/64 dev eth0  proto kernel  metric 256  mtu 1500 advmss 1440 hoplimit 0
default dev eth0  proto static  metric 1024  mtu 1500 advmss 1440 hoplimit 0


That basic
IPV6_DEFAULTGW="2001:14b8:1ec::1"

Seems to work nicely without NetworkManager:
# ip -6 route
unreachable ::/96 dev lo  metric 1024  error -101 mtu 16436 advmss 16376 hoplimit 0
unreachable ::ffff:0.0.0.0/96 dev lo  metric 1024  error -101 mtu 16436 advmss 16376 hoplimit 0
2001:14b8:1ec::/64 dev eth0  proto kernel  metric 256  mtu 1500 advmss 1440 hoplimit 0
unreachable 2002:a00::/24 dev lo  metric 1024  error -101 mtu 16436 advmss 16376 hoplimit 0
unreachable 2002:7f00::/24 dev lo  metric 1024  error -101 mtu 16436 advmss 16376 hoplimit 0
unreachable 2002:a9fe::/32 dev lo  metric 1024  error -101 mtu 16436 advmss 16376 hoplimit 0
unreachable 2002:ac10::/28 dev lo  metric 1024  error -101 mtu 16436 advmss 16376 hoplimit 0
unreachable 2002:c0a8::/32 dev lo  metric 1024  error -101 mtu 16436 advmss 16376 hoplimit 0
unreachable 2002:e000::/19 dev lo  metric 1024  error -101 mtu 16436 advmss 16376 hoplimit 0
unreachable 3ffe:ffff::/32 dev lo  metric 1024  error -101 mtu 16436 advmss 16376 hoplimit 0
fe80::/64 dev eth0  proto kernel  metric 256  mtu 1500 advmss 1440 hoplimit 0
default via 2001:14b8:1ec::1 dev eth0  metric 1  mtu 1500 advmss 1440 hoplimit 0
default dev eth0  proto static  metric 1024  mtu 1500 advmss 1440 hoplimit 0

Also tested the syntax you suggested. Ok it works with network start, not with NetworkManager
IPV6_DEFAULTGW="2001:14b8:1ec::2%eth0"
default via 2001:14b8:1ec::2 dev eth0  metric 1  mtu 1500 advmss 1440 hoplimit 0

So I'm not any smarter how to get IPv6 working with NetworkManager
Comment 9 Pierre Ossman 2010-12-28 15:06:04 EST
Dan, update? This bug is now 6 months old and static IPv6 configuration is still unusable on F13 and F14 (and RHEL 6?). GATEWAY seems to be fine for IPv4, even though it is not per address, so IPV6_DEFAULTGW should fit the bill for most uses here.

There also is some indication that this is a architectural problem in NM. Compare the documentation for IPv4:

"Array of IPv4 address structures. Each IPv4 address structure is composed of 3 32-bit values; the first being the IPv4 address (network byte order), the second the prefix (1 - 32), and last the IPv4 gateway (network byte order)."

with that for IPv6:

"Array of IPv6 address structures. Each IPv6 address structure is composed of 2 members, the first being a byte array containing the IPv6 address (network byte order) and the second a 32-bit integer containing the IPv6 address prefix."

(from http://projects.gnome.org/NetworkManager/developers/settings-spec-08.html)
Comment 10 Jirka Klimes 2011-01-07 10:40:39 EST
It seems that there are several problems here:

(1) gateway items are lost from manual address configuration because ifcfg-rh plugin doesn't store this piece of info (there is no variable in ifcfg for this to use).
Though, if you change uncheck "Available to all users", the info won't get lost (will be stored in GConf).
However, while ponding about the issue I think that the gateway entry for each address is not right and redundant. For specifying static routes, there is "Routes..." dialog (route-*, route6-* files). And the default gateway is just one and should be defined via
GATEWAY  for IPv4
IPV6_DEFAULTGW for IPv6
in /etc/sysconfig/network

(2) ifcfg-rh plugin currently uses IPV6_DEFAULTGW only for determining if the device could be default.
That should be fixed to take default gateway address from this variable too.

> "Array of IPv6 address structures. Each IPv6 address structure is composed of 2
> members, the first being a byte array containing the IPv6 address (network byte
> order) and the second a 32-bit integer containing the IPv6 address prefix."

That's actually updated to include gateway the same way as IPv4.
However, I think that that the gateway should rather be removed from both IPv4 and IPv6 specifications instead as described above.
Initcripts only use route(6)- files for additional routes. So NM probably should.
Comment 11 Pierre Ossman 2011-01-08 02:41:16 EST
(In reply to comment #10)
> However, while ponding about the issue I think that the gateway entry for each
> address is not right and redundant.

There is some sense here given that a gateway is generally tied to a specific subnet (exception being a gateway specified using a link-local address). Having you specify the gateway in the same place you specify the network information reduces the risk of errors somewhat. Things do get ambiguous when you have multiple addresses and multiple gateways though...

> For specifying static routes, there is
> "Routes..." dialog (route-*, route6-* files). And the default gateway is just
> one and should be defined via
> GATEWAY  for IPv4
> IPV6_DEFAULTGW for IPv6
> in /etc/sysconfig/network
> 

No, that won't work. One new feature of NM compared to initscripts is the ability to have multiple configurations for the same interface. Hence, it needs to be able to store the gateway information in a way that's associated with the rest of the interface settings, not globally.
Comment 12 Dan Williams 2011-01-11 11:08:59 EST
(In reply to comment #11)
> (In reply to comment #10)
> > However, while ponding about the issue I think that the gateway entry for each
> > address is not right and redundant.
> 
> There is some sense here given that a gateway is generally tied to a specific
> subnet (exception being a gateway specified using a link-local address). Having
> you specify the gateway in the same place you specify the network information
> reduces the risk of errors somewhat. Things do get ambiguous when you have
> multiple addresses and multiple gateways though...

That was the original reason for the address/prefix/gateway triplet for IPv4 and also the reason why it was carried along for IPv6.  Even though it's probably not used very much, I think gateway should stay on a per-subnet/per-prefix basis just for flexibility.

> > For specifying static routes, there is
> > "Routes..." dialog (route-*, route6-* files). And the default gateway is just
> > one and should be defined via
> > GATEWAY  for IPv4
> > IPV6_DEFAULTGW for IPv6
> > in /etc/sysconfig/network
> > 
> 
> No, that won't work. One new feature of NM compared to initscripts is the
> ability to have multiple configurations for the same interface. Hence, it needs
> to be able to store the gateway information in a way that's associated with the
> rest of the interface settings, not globally.

GATEWAY/IPV6_DEFAULTGW is hack if used with an IP address specifically because the gateway address is a per-*network* preference, when the machine is in a single location, but GATEWAY/IPV6_DEFAULTGW in ifcfg syntax is a *global* option.  It's simply not going to work for most cases.  We really do want per-network setting for "when connected to this network, don't give this device the default route", which is per-network, not global.

Here's where ifcfg + GATEWAY/IPV6_DEFAULTGW break down...  I have 2 locations.  In location A, eth0 should get the default route.  In location B, eth1 should get the default route.  With ifcfg, you cannot move between location A and B without editing /etc/sysconfig/network and changing GATEWAY/IPV6_DEFAULTGW manually.  If the "never default" option were per-network (ie, contained in a single ifcfg file) then it would be easy and no editing would be required: have ifcfg-eth0-A + ifcfg-eth1-A for location A, and ifcfg-eth0-B + ifcfg-eth1-B for location B.
Comment 13 Jirka Klimes 2011-01-26 10:44:16 EST
Fix pushed upstream:
1f004c112288cd809bd07a17f0d134794bf1f4d9 (master)
893b44a894dd76d40e185e94d948b25629828498 (NM_0_8)

It currently uses IPV6_DEFAULTGW in ifcfg file. Thus it supports gateway only for the the primary address/prefix. In case IPV6_DEFAULTGW is missing in ifcfg, it reads the value from the network file.

It will be enhanced later after we found out the proper way to store the gateway addresses (i.e. compatible with initscripts, etc.)
Comment 14 Fedora Update System 2011-02-24 01:06:30 EST
NetworkManager-0.8.3.995-1.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/NetworkManager-0.8.3.995-1.fc14
Comment 15 Fedora Update System 2011-02-24 01:09:57 EST
NetworkManager-0.8.3.995-1.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/NetworkManager-0.8.3.995-1.fc13
Comment 16 Fedora Update System 2011-02-24 15:57:40 EST
NetworkManager-0.8.3.995-1.fc14 has been pushed to the Fedora 14 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update NetworkManager'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/NetworkManager-0.8.3.995-1.fc14
Comment 17 Fedora Update System 2011-02-25 18:43:17 EST
Package NetworkManager-0.8.3.996-1.fc14:
* should fix your issue,
* was pushed to the Fedora 14 updates-testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing NetworkManager-0.8.3.996-1.fc14'
as soon as you are able to, then reboot.
Please go to the following url:
https://admin.fedoraproject.org/updates/NetworkManager-0.8.3.996-1.fc14
then log in and leave karma (feedback).
Comment 18 Fedora Update System 2011-02-25 18:46:16 EST
Package NetworkManager-0.8.3.996-1.fc13:
* should fix your issue,
* was pushed to the Fedora 13 updates-testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing NetworkManager-0.8.3.996-1.fc13'
as soon as you are able to, then reboot.
Please go to the following url:
https://admin.fedoraproject.org/updates/NetworkManager-0.8.3.996-1.fc13
then log in and leave karma (feedback).
Comment 19 Fedora Update System 2011-03-01 20:49:41 EST
NetworkManager-0.8.3.996-1.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 20 Fedora Update System 2011-03-03 04:47:49 EST
Package NetworkManager-0.8.3.997-1.fc13:
* should fix your issue,
* was pushed to the Fedora 13 updates-testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing NetworkManager-0.8.3.997-1.fc13'
as soon as you are able to, then reboot.
Please go to the following url:
https://admin.fedoraproject.org/updates/NetworkManager-0.8.3.997-1.fc13
then log in and leave karma (feedback).
Comment 21 Radek Vykydal 2011-03-06 12:43:11 EST
Can we get this into F15 for anaconda? Proposing as NiceToHave.
Comment 22 Fedora Update System 2011-03-24 23:30:48 EDT
NetworkManager-0.8.3.998-2.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/NetworkManager-0.8.3.998-2.fc13
Comment 23 Fedora Update System 2011-04-12 17:28:31 EDT
NetworkManager-0.8.3.998-2.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

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