Re: Change existing IP via nmcli

On Fri, 2014-01-03 at 18:52 -0400, Jorge Fábregas wrote:
Hi everyone,

Fedora 20 here. I'm learning my way through nmcli and I'm having a hard
time trying to change an existing ip address (non-interactive way):

nmcli con mod my-con-em1 ipv4.addresses

The problem is that it's not *modifying* the ip.  It is actually
*adding* it to the existing connection.  Is this a bug or am I missing

As I alluded to in my other mail, at the moment NM doesn't implement
direct changing of the interface's addresses/routes with immediate
effect.  At this time you have to reconnect the interface with your new
changes for them to take effect.  So for example:

nmcli con mod my-con-em1 ipv4.addresses
nmcli dev disconnect em1
nmcli con up my-con-em1

and em1 would have the new address.

In the future we will add the ability to change addresses/routes and
other properties on-the-fly like you are trying to do here.


I know there are alternate ways (GUI version, edit ifcfg* file, nmcli
interactive way)...just want to know what I'm doing wrong on the above

BTW, playing with the above issue..I tried this one:

nmcli con mod my-con-em1 ipv4.addresses " " order to see if I could empty out all existing IP addresses and
got nmcli to crash:

** (process:16190): CRITICAL **: nmc_parse_and_build_ip4_address:
assertion 'ip_str != NULL' failed
Segmentation fault (core dumped)

100% reproducible.  Don't know if it's a known issue.  If not please let
me know so I can open a bugzilla.

networkmanager-list mailing list
networkmanager-list gnome org

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]