1. Abount IP Alias
IP alias / IP aliasing is assigning multiple IP addresses to a single physical network interface. Alias network interface is configured on top of existing physical network interface.
By IP aliasing we can make applications and services running on linux server available on multiple IP addresses by using only one physical network interfase.
Requirements for IP alias
* Physical Network Interface Connectivity
* Available Multiple IP Addresses
Limitations of IP alias:
* Subnet Aliasing (alias network interface IP address is preffered to be in the same network subnet as physical network interface below – if not proper network infrastructure configuration is needed)
* DHCP (alias interfaces do not support DHCP)
Example: nic eth0 192.168.1.100
2. Non-Persistent IP Alias Configuration
[[email protected] ~]$ ifconfig eth0:0 192.168.1.100 up
3. Persistent IP Alias Configuration
[[email protected] network-scripts]$ cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
TYPE=Ethernet
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=none
IPADDR=192.168.1.100
PREFIX=24
GATEWAY=192.168.1.1
DNS1=114.114.114.114
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="System eth0"
[[email protected] network-scripts]$ cat /etc/sysconfig/network-scripts/ifcfg-eth0\:0
DEVICE=eth0
TYPE=Ethernet
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=static
ONPARENT=yes
IPADDR=192.168.1.101
PREFIX=24
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="System eth0:0"