f22: how to change default gateway via line command
Dario Lesca
d.lesca at solinos.it
Tue Jun 9 22:40:22 UTC 2015
Il giorno mar, 09/06/2015 alle 15.44 +0800, Ed Greshko ha scritto:
> Or not....
>
> [root at f22k ~]# nmcli conn mod enp0s3 ipv4.gateway 192.168.1.18
> Error: Failed to modify connection 'enp0s3': ipv4.gateway: gateway
> cannot be set if there are no addresses configured
>
> FWIW, on this system ....
>
> [root at f22k ~]# ip route sho
> default via 192.168.1.1 dev enp0s3 proto static metric 100
> 192.168.1.0/24 dev enp0s3 proto kernel scope link src
> 192.168.1.224 metric 100
>
> [root at f22k ~]# nmcli conn show enp0s3 | grep 192.168.1.1
> IP4.GATEWAY: 192.168.1.1
> IP4.DNS[1]: 192.168.1.1
> DHCP4.OPTION[5]: domain_name_servers =
> 192.168.1.1
> DHCP4.OPTION[8]: dhcp_server_identifier =
> 192.168.1.1
> DHCP4.OPTION[17]: routers = 192.168.1.1
> DHCP4.OPTION[29]: next_server = 192.168.1.1
>
> I'm not the OP, but I figured I'd test it out anyway.
I have the same error:
[lesca at dodo ~]$ nmcli conn show p6p1 | grep -E '(192.168.61.|ipv4.add)'
ipv4.addresses:
IP4.INDIRIZZO[1]: 192.168.61.80/24
IP4.GATEWAY: 192.168.61.254
IP4.DNS[1]: 192.168.61.254
DHCP4.OPZIONE[4]: server_name = 192.168.61.254
DHCP4.OPZIONE[5]: domain_name_servers = 192.168.61.254
DHCP4.OPZIONE[7]: ip_address = 192.168.61.80
DHCP4.OPZIONE[10]: dhcp_server_identifier = 192.168.61.254
DHCP4.OPZIONE[13]: broadcast_address = 192.168.61.255
DHCP4.OPZIONE[18]: routers = 192.168.61.254
DHCP4.OPZIONE[28]: network_number = 192.168.61.0
DHCP4.OPZIONE[30]: next_server = 192.168.61.254
[lesca at dodo ~]$ LANG=c sudo nmcli conn mod p6p1 ipv4.gateway 192.168.61.250
Error: Failed to modify connection 'p6p1': ipv4.gateway: gateway cannot be set if there are no addresses configured
This occur why the field "ipv4.addresses" is empty, like many other
"ipv4.*" flags:
[lesca at dodo ~]$ nmcli conn show p6p1 | grep ipv4.
ipv4.method: auto
ipv4.dns:
ipv4.dns-search:
ipv4.addresses:
ipv4.gateway: --
ipv4.routes:
ipv4.route-metric: -1
ipv4.ignore-auto-routes: no
ipv4.ignore-auto-dns: no
ipv4.dhcp-client-id: --
ipv4.dhcp-send-hostname: yes
ipv4.dhcp-hostname: --
ipv4.never-default: no
ipv4.may-fail: yes
Some other suggest?
Thanks
--
Dario Lesca
(inviato dal mio Linux Fedora 22 con Gnome 3.16)
More information about the users
mailing list