Koozali.org: home of the SME Server

2 IP's on the same NIC

Craig

2 IP's on the same NIC
« 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

D Frost

Re: 2 IP's on the same NIC
« Reply #1 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.

Craig

Re: 2 IP's on the same NIC
« Reply #2 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

David

Re: 2 IP's on the same NIC
« Reply #3 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

Les Mikesell

Re: 2 IP's on the same NIC
« Reply #4 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.

Craig

Re: 2 IP's on the same NIC
« Reply #5 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