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
how do I just remove the single ADDRESS I added as an alias ? not the whole
thing ?
You first remove all ipv4.addresses and then add the one you want. Then you save/activate.
On Tue, Mar 30, 2021 at 4:41 PM Jerry Geis jerry.geis@gmail.com wrote:
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 _______________________________________________ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
Once upon a time, Peter Larsen peter@peterlarsen.org said:
how do I just remove the single ADDRESS I added as an alias ? not the whole
thing ?
You first remove all ipv4.addresses and then add the one you want. Then you save/activate.
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
Chris,
On Tue, Mar 30, 2021 at 4:41 PM Jerry Geis jerry.geis@gmail.com wrote:
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
Thanks that was it: (the minus)
nmcli con mod em1 -ipv4.address 10.1.1.2/24
Jerry