phpjames
01-12-2002, 02:48 PM
I am trying to add three more IP addresses to my machine. I have 7.1 installed with one IP already but want to add a few more.
Could anyone tell me how to IP Alias? I have tried a search on Google but the results are not what I want. Is there an easy way to do this?
Could someone give me a step by step? Thanks.
J
remarkable
01-12-2002, 04:02 PM
This is quite simple.
cd /etc/sysconfig/network-scripts/
cp ifcfg-eth0 ifcfg-eth0:1
edit the ifcfg-eth0:1 and replace the IP with the new IP
DEVICE=eth0
IPADDR=xxx.xxx.xxx.xxx <- New IP Here.
NETWORK=xxx.xxx.xxx.xxx
NETMASK=255.255.255.xxx
BROADCAST=xxx.xxx.xxx.xxx
ONBOOT=yes
The above file will add the IP when you reboot the server.
now run this command to add the IP Manually.
/sbin/ifconfig eth0:1 xxx.xxx.xxx.xxx <- new IP here
Thats it!
RutRow
01-12-2002, 08:22 PM
Aliasing support has to be compiled into the kernel also. May already be enabled with a stock RH kernel.
remarkable
01-12-2002, 09:01 PM
This is not an issue with modern kernels.
phpjames
01-12-2002, 09:40 PM
Would a reboot make the kernel automatically detect the new IPs and setup the system for me?
Ughh?
RutRow
01-12-2002, 09:44 PM
Yes, but you can probably do
ifup eth0:1
RutRow
01-12-2002, 09:45 PM
Originally posted by remarkable
This is not an issue with modern kernels.
Damn.... I thought I was going to make it the whole day without learning something new... ;)