IP alias

How to setup IP aliases

Configure IP Aliases in Red Hat / CentOS

IP aliasing is a term for assigning multiple IP addresses to a single network interface. It is quite useful in a shared web hosting for instance, particularly if the domains have SSL certificates. You can setup each domain to resolve to different IP address, even if they are all sharing the same network interface.

You have to be root to perform this tasks.

1. Disable Network Manager

# service NetworkManager stop

# chkconfig NetworkManager off

2. Add IP alias from cli

# ip addr addr add dev eth0 label eth0:1

# ip addr show eth0

3. Persistently add lias

Create the file /etc/sysconfig/network-scripts/ifcfg-eth0:1

# cat /etc/sysconfig/network-scripts/ifcfg-eth0:1

IP alias
4. Restart network service

# service network restart
# ip addr show eth0


Leave a Reply

Your email address will not be published. Required fields are marked *