Configure dual-IP for Ubuntu
Sudo Vim/etc/Network/interfaces open the IP configuration file
1 auto lo 2 iface lo inet loopback 3 auto eth0 4 iface eth0 inet static 5 #pre-up ifconfig eth0 hw ether xx:xx:xx:xx:xx:xx 6 address 210.47.248.180 7 netmask 255.255.255.0 8 gateway 210.47.248.254 9 nameserver 8.8.8.810 auto eth0:011 iface eth0:0 inet static12 address 192.168.3.4013 netmask 255.255.255.0
Pre-up ifconfig eth0 HW ether is the cloned MAC address
Auto eth0: 0 indicates the added IP address.
Configure Dual IP addresses in centos 6.5
Sudo Vim/etc/sysconfig/network-scripts/ifcfg-Auto_eth0
1 HWADDR=74:D0:2B:27:30:FF 2 TYPE=Ethernet 3 BOOTPROTO=none 4 IPADDR=210.47.248.171 5 PREFIX=24 6 GATEWAY=210.47.248.254 7 DNS1=8.8.8.8 8 DEFROUTE=yes 9 IPV4_FAILURE_FATAL=yes10 IPV6INIT=no11 NAME="Auto eth0"12 UUID=3baad9b7-be6c-419b-bfff-c19a3ff1fe6013 ONBOOT=yes14 LAST_CONNECT=140567100515 IPADDR2=192.168.3.416 PREFIX2=24
Ipaddr2 and prefix2 are added as IP addresses. The prefix value is 24, which is equivalent to the subnet mask 255.255.255.0.
Configure dual-IP addresses for a single Nic in Ubuntu and centos 6.5