This instruction below is how to add alias IP on CentOS with this instruction we will able to use 2 IP address wiht only 1 NIC.

Configure static IP for primary interface

[[email protected] ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
 DEVICE=eth0
 TYPE=Ethernet
 UUID=XXXXXXX
 ONBOOT=yes
 NM_CONTROLLED=yes
 HWADDR=XXXXXXX
 IPADDR=192.168.111.100
 NETMASK=255.255.255.0
 NETWORK=192.168.111.0
 BROADCAST=192.168.111.255
 ONBOOT=yes
 BOOTPROTO=static

Create sub-interface for adding new alias IP

[[email protected] ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0:1
 DEVICE="eth0:1"
 IPADDR="192.168.111.101"
 NETMASK="255.255.255.0"

Configure your hostname and default gateway

[[email protected] ~]# cat /etc/sysconfig/network
 NETWORKING=yes
 HOSTNAME=centos.local
 GATEWAY=192.168.111.2
 Configure DNS servers
[[email protected] ~]# cat /etc/resolv.conf
 nameserver 8.8.8.8
 nameserver 8.8.4.4

Check sub-interface and alias IP is up and online.

[[email protected] ~]# ifconfig
 eth0 Link encap:Ethernet HWaddr XXXXXXX
 inet addr:192.168.111.100 Bcast:192.168.111.255 Mask:255.255.255.0
 inet6 addr: fe80::20c:29ff:feb8:f3f/64 Scope:Link
 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
 RX packets:143 errors:0 dropped:0 overruns:0 frame:0
 TX packets:94 errors:0 dropped:0 overruns:0 carrier:0
 collisions:0 txqueuelen:1000
 RX bytes:15560 (15.1 KiB) TX bytes:10414 (10.1 KiB)

eth0:1 Link encap:Ethernet HWaddr XXXXXXX
 inet addr:192.168.111.101 Bcast:192.168.111.255 Mask:255.255.255.0
 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1