Re: Setting static IP and gateway
- From: Colin Henry <colin henry gmail com>
- To: Thomas Haller <thaller redhat com>
- Cc: networkmanager-list gnome org
- Subject: Re: Setting static IP and gateway
- Date: Mon, 16 Feb 2015 15:55:58 +0100
On 16 Feb 2015, at 14:41, Thomas Haller <thaller redhat com> wrote:
On Mon, 2015-02-16 at 11:34 +0100, Colin Henry wrote:
Hi,
Having loads of problems when trying to set a new system that was set up to use DHCP to now use a static
ip and gateway. I’ve done lots of searches and the vast majority of it appears to be around setting up a
new connection or completely disabling NetworkManager.
I try and set the gateway several ways:
[root server ~]# nmcli con mod eno16777736 ipv4.method manual ipv4.addresses 192.168.115.133/24,
192.168.115.2
Error: value for '192.168.115.2' is missing.
[root server ~]# nmcli con mod eno16777736 ipv4.method manual ipv4.addresses 192.168.115.133/24, gw
192.168.115.2
Error: invalid <setting>.<property> 'gw'.
[root server ~]# nmcli con mod eno16777736 ipv4.method manual ipv4.addresses 192.168.115.133/24, ipv4.gw
192.168.115.2
Error: invalid property 'gw': 'gw' not among [method, dns, dns-search, addresses, address-labels, routes,
ignore-auto-routes, ignore-auto-dns, dhcp-client-id, dhcp-send-hostname, dhcp-hostname, never-default,
may-fail].
[root server ~]#
$ nmcli connection modify eno16777736 ipv4.method manual ipv4.addresses "192.168.115.133/24 192.168.115.2"
$ nmcli connection modify eno16777736 ipv4.method manual ipv4.addresses 192.168.115.133/24\ 192.168.115.2
(both lines are equal, in Shell you have to quote or escape the whitespace)
On NetworkManager 1.0 the above would be deprecated syntax. Here you
would do instead:
$ nmcli connection modify eno16777736 ipv4.method manual ipv4.addresses 192.168.115.133/24 ipv4.gateway
192.168.115.2
Thomas
Thomas,
Works perfectly, many thanks for the quick reply.
Colin
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]