If you're doing multiple addresses, NM's connection editor/ifcfg plugin will write IPADDRn PREFIXn GATEWAYn as configuration items. GATEWAYn is arguably invalid - even if you have multiple addresses on a device, you can't have multiple gateways. (Unless I'm missing something?)
Of course, there's just one default route and and NM takes it from the first address (that is address/prefix/gateway triplet). In case of one address, there's no problem as we only have one gateway. However, in case of multiple addresses the things gets complicated, because all of a sudden, we have more gateways. We want to save gateway part of the triplet for all addresses, so ifcfg-rh uses GATEWAYn. Storing addresses: http://cgit.freedesktop.org/NetworkManager/NetworkManager/tree/src/settings/plugins/ifcfg-rh/writer.c#n1235 That's why I posted a patch for initscripts to read the gateway from the first address (be it GATEWAY, GATEWAY0, GATEWAY1 or GATEWAY2): https://bugzilla.redhat.com/show_bug.cgi?id=708409#c5 I suggested in bug 604334 that the gateway part of the address may be redundant, but the Dan preferred to have it with an IP: https://bugzilla.redhat.com/show_bug.cgi?id=604334#c12 Also, for IPv6 (bug 604334), ifcfg-rh plugin uses IPV6_DEFAULTGW for the default route from ifcfg file (if not present then from global /etc/sysconfig/network). (Here, I think, initscripts should add the description that IPV6_DEFAULTGW can be set in ifcfg file too; this is necessary to have default gateway per network and not just global). There was no variable to store gateways for multiple addresses for IPv6 (such as IPV6_DEFAULTGW<n>), so NM now simple looses those when writting to ifcfg. All in all, I think we should come to a conclusion how to store/read the addresses, so that initscripts and NM are consistent and there's no confusion. Backwards compatibility may make it harder, though. Any thoughts, suggestions?
Hm, I see why you might want to store it, but it still doesn't read right, as if you have multiple addresses, it will only ever use the first one.
This message is a reminder that Fedora 16 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 16. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '16'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 16's end of life. Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 16 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged to click on "Clone This Bug" and open it against that version of Fedora. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Fedora 16 changed to end-of-life (EOL) status on 2013-02-12. Fedora 16 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. Thank you for reporting this bug and we are sorry it could not be fixed.
Reopening for a fix in NetworkManager ifcfg-rh plugin. Upstream branch jk/ifcfg-rh-gateway changes a way NM writes the stuff. It will write the first address info as IPADDR, PREFIX and GATEWAY instead of IPADDR0, PREFIX0, GATEWAY0.
We might also prefix GATEWAY1, GATEWAY_2, ... with "NM_", or use another variable name in order not to confuse users. But it would make backwards compatibility much harder.
Patch looks good to me.
The patch pushed to upstream master branch: e554ef6 ifcfg-rh: write GATEWAY instead of GATEWAY0 to be ifup-compatible (rh #771673)