Nmcli

Home » CentOS » Nmcli
CentOS 3 Comments

under CentOS 7 – I use “alias” like eth1:0 for an alias network. Remove the file restart network – and back to normal. Now I am trying to us NetworkManager.

I can ‘add’ the network fine. however – when I remove the network nmcli connection delete “Wired connection 2” ipv4.addr 192.168.1.58/22

it remove BOTH address and removes the “Wired connection 2” config file –
and it reverts to DHCP not the other static address I had associated with
“Wired connection 2”.

how do I just remove the single ADDRESS I added as an alias ? not the whole thing ?

Thanks

Jerry

3 thoughts on - Nmcli

  • thing ?

    You first remove all ipv4.addresses and then add the one you want. Then you save/activate.

  • Once upon a time, Peter Larsen said:

    That’s not necessary. For any setting that can be multi-valued (such as addresses and routes), you can prefix with + or – to add or remove just one entry. For example, to remove just address 10.1.1.2/24:

    nmcli con mod em1 -ipv4.address 10.1.1.2/24
    nmcli con up em1