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 192.168.0.11/24 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 DEVICE=eth0:1 IPADDR=192.168.0.11 PREFIX=24 ONPARENT=yes
4. Restart network service
# service network restart # ip addr show eth0
Linux System Admins Journey to Google Cloud Platform As a Linux system administrator, you have…
As a network professional, troubleshooting is a crucial part of your daily routine. To streamline…
The net-tools set of packages had been deprecated years back, although the commands are still…
Re-posting my answer to a Google cloud platform's Google Kubernetes Engine (GKE) related question in…
Recently I was trying to download numerous files from a certain website using a shell…