GNOME Bugzilla – Bug 750412
RFE: Allow IPv4 address from DHCP but manually-configured default gateway
Last modified: 2020-11-12 14:31:07 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.
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
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).