After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 750412 - RFE: Allow IPv4 address from DHCP but manually-configured default gateway
RFE: Allow IPv4 address from DHCP but manually-configured default gateway
Status: RESOLVED OBSOLETE
Product: NetworkManager
Classification: Platform
Component: IP and DNS config
1.0.x
Other Linux
: Normal enhancement
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2015-06-04 18:02 UTC by Joonas Sarajärvi
Modified: 2020-11-12 14:31 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Joonas Sarajärvi 2015-06-04 18:02:15 UTC
This is possibly a bit silly request, but I'll try to describe my use case.

I have a network, a single LAN segment, with two hosts connected to the ISP. Both of these are configured to work as routers. Only one of the two routers is set up as a DHCP server. The router without DHCP is mostly there for experimentation. I'll refer to these as the primary router and the secondary router, respectively. The DHCP server configuration is not aware of the secondary router, so it only sets the primary router as the default gateway.

To reproduce an issue with the secondary router, I want to configure a host to use it as the as the default gateway. However, I would like to keep using DHCP for address assignment, so that I do not accidentally pick an address that'd conflict with one assigned by the DHCP server of the primary router.

I try to set this up with nmcli:
    nmcli con add\
        type ethernet\
        ifname enp3s0\
        con-name enp3s0-secondary\
        autoconnect no save yes
    nmcli con modify id enp3s0-secondary ipv4.gateway 10.0.0.1
To the second command, I get this response:
Error: Failed to modify connection 'enp3s0-secondary': ipv4.gateway: gateway cannot be set if there are no addresses configured

Now, would it make sense to allow this kind of setup? I am not entirely sure if this is a common use case at all. Someone on IRC suggested me to file a bug, so here it is.
Comment 1 Thomas Haller 2015-06-05 07:50:36 UTC
sounds like a valid feature to me.


one minor problem is that the client library currently fails connections that have a gateway, but no static addresses.

That means, if we relax that, clients using an older libnm version then the server will not be able to see such a connection. But that might not be a huge issue.

This bug is slightly related:
  https://bugzilla.gnome.org/show_bug.cgi?id=747814#c10
Comment 2 André Klapper 2020-11-12 14:31:07 UTC
bugzilla.gnome.org is being shut down in favor of a GitLab instance. 
We are closing all old bug reports and feature requests in GNOME Bugzilla which have not seen updates for a long time.

If you still use NetworkManager and if you still see this bug / want this feature in a recent and supported version of NetworkManager, then please feel free to report it at https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/

Thank you for creating this report and we are sorry it could not be implemented (workforce and time is unfortunately limited).