Koozali.org: home of the SME Server

Legacy Forums => Experienced User Forum => Topic started by: Craig on February 21, 2002, 06:59:55 PM

Title: 2 IP's on the same NIC
Post by: Craig on February 21, 2002, 06:59:55 PM
I have 1 NIC in my SME v5.1.2 and I would like to setup an alias IP address on that same NIC.

ie: on the same NIC I would like to have 111.111.111.111 and an alias IP of 222.222.222.222

I have done this before with RedHat using Webmin but I am not sure how to achieve this with SME.

Thanks in andvance for any help.

Regards
Craig
Title: Re: 2 IP's on the same NIC
Post by: D Frost on February 21, 2002, 07:36:57 PM
Craig

Use 'ifconfig' to setup a virtual IP.

ie. 'ifconfig eth0:0 222.222.222.222 netmask 255.255.255.0 up'

This should do what you want.

Regards

David Frost.
Title: Re: 2 IP's on the same NIC
Post by: Craig on February 22, 2002, 04:17:56 PM
David

Thanks for the info

If the server gets rebooted will it loose this setting?
If it does loose this setting on a reboot I could put it in rc.local?

Regards
Craig
Title: Re: 2 IP's on the same NIC
Post by: David on February 22, 2002, 05:31:29 PM
Hi Craig

Yes it will loose the setting if rebooted, I assume you can put it in rc.local as this is the last script to be run at boot up.

Regards

David
Title: Re: 2 IP's on the same NIC
Post by: Les Mikesell on February 23, 2002, 06:54:28 PM
SME is still RedHat under the covering.  If you create /etc/sysconfig/network-scripts/ifcfg-eth0:0 with the same contents RedHat would use for an IP alias, SME will initialize the same way at startup and the ifup, ifdown scripts will work.
Title: Re: 2 IP's on the same NIC
Post by: Craig on February 26, 2002, 12:01:32 PM
Thank you for all your replies......got it all going how I want to now.

Regards
Craig