Red Hat Enterprise Linux (RHEL) 4 ifconfig adding an alias
I’ve setup multiple IPs on FreeBSD before, so I expected the process to be about the same for RHEL 4. It took me about a half hour to figure out that I didn’t want to create an alias (at least not by using that terminology). I finally found this site which helped me through it.
Manual:
ifconfig eth0:0 up 192.168.1.2 netmask 255.255.255.0 ifconfig eth0:1 up 192.168.1.3 netmask 255.255.255.0
Automatic:
In /etc/sysconfig/network-scripts/ifcfg-eth0:0 put
DEVICE=eth0:0 BOOTPROTO=none ONBOOT=yes IPADDR=192.168.1.2 NETMASK=255.255.255.0
In /etc/sysconfig/network-scripts/ifcfg-eth0:1 put
DEVICE=eth0:1 BOOTPROTO=none ONBOOT=yes IPADDR=192.168.1.3 NETMASK=255.255.255.0
That’s it!
