Bug 604334 - Network Manager IPV6 Gateway cannot be set/used in Manual mode
Summary: Network Manager IPV6 Gateway cannot be set/used in Manual mode
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: NetworkManager
Version: 13
Hardware: i686
OS: Linux
low
high
Target Milestone: ---
Assignee: Dan Williams
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F15Beta-accepted, F15BetaFreezeExcept 677609
TreeView+ depends on / blocked
 
Reported: 2010-06-15 20:47 UTC by Jani Ollikainen
Modified: 2018-03-19 16:10 UTC (History)
9 users (show)

Fixed In Version: NetworkManager-0.8.3.996-1.fc14
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-03-02 01:51:04 UTC
Type: ---
Embargoed:


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

Description Jani Ollikainen 2010-06-15 20:47:38 UTC
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 19:56:58 UTC
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 20:44:38 UTC
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 22:23:48 UTC
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 05:20:10 UTC
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 05:20:51 UTC
Created attachment 427572 [details]
Screenshot of the IPv6 without Gateway

Comment 6 Dan Williams 2010-10-07 04:21:10 UTC
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 14:59:10 UTC
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 18:16:26 UTC
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 20:06:04 UTC
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 15:40:39 UTC
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 07:41:16 UTC
(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 16:08:59 UTC
(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 15:44:16 UTC
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 06:06:30 UTC
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 06:09:57 UTC
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 20:57:40 UTC
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 23:43:17 UTC
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 23:46:16 UTC
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-02 01:49:41 UTC
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 09:47:49 UTC
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 17:43:11 UTC
Can we get this into F15 for anaconda? Proposing as NiceToHave.

Comment 22 Fedora Update System 2011-03-25 03:30:48 UTC
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 21:28:31 UTC
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.

Comment 24 Sergio Basto 2018-03-19 06:12:29 UTC
I had a similar problem in el7 and ipv6 and the solution was: 

nmcli connection edit "System em1"
print 
set ipv6.gateway bla:bla:bla
set ipv6.method manual 

and most important : save 

/etc/sysconfig/network-scripts/route6-em1 and /etc/sysconfig/network-scripts/ifcfg-em1 are modified and NetworkManager starts to work !

Comment 25 Sergio Basto 2018-03-19 16:10:12 UTC
AFAIU add IPV6_AUTOCONF=no to ifcfg-em1 do the trick , but if BOOTPROTO=static is set should implies IPV6_AUTOCONF=no ...


cat ifcfg-em1

DEVICE=em1
BOOTPROTO=static
IPADDR=94.76.xxx.xxx
SCOPE="peer 94.76.xxx.xxx"
GATEWAY=94.76.229.193
NETWORK=94.76.229.193
HWADDR=10:98:36:A0:xx:xx
NETMASK=255.255.255.255
ONBOOT=yes
TYPE=Ethernet
DNS1=217.112.87.147
DNS2=217.112.88.90
DNS3=217.112.88.10
IPV6INIT=yes
IPV6ADDR=2a02:af8:1:xxxx::xxxx/64
PROXY_METHOD=none
BROWSER_ONLY=no
PREFIX=32
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6_AUTOCONF=no
IPV6_DEFAULTGW=2a02:af8:1:xxxx::1
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
NAME="System em1"
UUID=1dad842d-1912-ef5a-a43a-bc238fb267e7


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