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 192.168.200.101/24 192.168.101.1

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
something?

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 192.168.200.101/24 192.168.101.1
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.

Dan

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
command.

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

nmcli con mod my-con-em1 ipv4.addresses " "

...in 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.

Thanks!
Jorge
_______________________________________________
networkmanager-list mailing list
networkmanager-list gnome org
https://mail.gnome.org/mailman/listinfo/networkmanager-list




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