[CentOS] How to do virtual IP on NetworkManager

Mon Jan 18 13:55:36 UTC 2021
Jerry Geis <jerry.geis at gmail.com>

Hi All,

I use virtual IP from time to time on CentOS 7. just take something like
eth0 and make eth0:1 put in there the IP and subnet and bring up the new IP
and it works.

How do I do that with NetworkManager on the command line (assuming all
static IP information)
I do something like this from nmcli to set the static address:
nmcli connection modify eth0 ipv4.method manual ipv6.method ignore
autoconnect yes ipv4.addr 192.168.1.8/24 gw4 192.168.1.1 ipv4.dns 8.8.8.8

How then do I add a virtual IP?

Thanks

Jerry