# NON PERSISTENT
ip addr add <address>/<subnet_prefix_len> dev <phys_dev> label <phys_dev>:<addr_seq_num>
Create an ifcfg file named /etc/sysconfig/network-scripts/ifcfg-<phys_dev>:<addr_seq_num>. To continue with the preceding example, the file name would be /etc/sysconfig/network-scripts/ifcfg-ens2f0:0, and the contents would be:
DEVICE="ens2f0:0"
BOOTPROTO=static
IPADDR=192.168.20.50
NETMASK=255.255.255.0
ONBOOT=yes
$ auto <phys_dev>:<addr_seq_num>
$ iface <phys_dev>:<addr_seq_num> inet static address <address> netmask <address_netmask>
Where the netmask is not the prefix but the 255.255.x.x. address.
To continue with the earlier example:
$ auto ens2f0:0
$ iface ens2f0:0 inet static address 192.168.20.50 netmask 255.255.255.0