Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Solaris9 - setting virtual IP

Status
Not open for further replies.

BlaY0

Programmer
Feb 1, 2007
5
SI
Hi,

I'm a first-timer here and would like to ask you guys a question.

Is it possible to set virtual network device so that it is only plumbed and set but not UP (by ordinary means like /etc/hostname.*) after/across reboots.

Regards,

B
 
what is your intention? Do you intend to setup a NIC and if your primary failes you just run a "ifconfig hme1 up"? Why not write a script ~root/setup-alternate-nic.sh

Best Regards, Franz
--
UNIX System Manager from Munich, Germany
 
Thanks for the reply Franz,

My intention is to have 2 machines with same floating VIP address, and it has to be plumbed on both machines during boot because there are some apps being started also at boot time and are depending on this VIP address. I can bring UP VIP afterwards on one of those machines manually or via script that's no problem.

I just need to know if there is a way of doing this via /etc/hostname.* otherwise I will have to make a scripts that will start just after /etc/init.d/network.

Regards,

B
 
well, afaik the /etc/rc2.d/S69... will configure full working NICs by default. I suggest to write your own S70script rather than edit S69script, since a OS patch may overwrite this file and all your effords are lost... ;-)

Best Regards, Franz
--
UNIX System Manager from Munich, Germany
 
That's what I'm intending to do if there's really no way via default /etc/init.d/network and /etc/hostname.*.

Regards,

B
 
I think that you can add commands to your /etc/hostname.*. files. If you create /etc/hostname.hme0:1 you type in what you want, but leave off the up command.

Code:
addif name netmask + broadcast +
 
Hmm, it doesn't work. I tried adding:

name
addif name_vip netmask + broadcast +

...to my /etc/hostname.hme0 and it brings up both hme0 and hme0:1. I tried even with down parameter which had no effect. Am I missing something?
 
have a look on the rc2.d/S69... file, the script configures the NIC; I suggest not to change this script, since a patch may overwrite this file

Best Regards, Franz
--
UNIX System Manager from Munich, Germany
 
Create a file named /etc/hostname.hme0:1, don't put it in the /etc/hostname.hme0.
 
It doesn't matter, one could create a new /etc/hostname.hme0:1 or put addif to an existing /etc/hostname.hme0 ... it should work both ways but there is a line in /etc/init.d/network (near the end of it):

/sbin/ifconfig -adD4 auto-revarp netmask + broadcast + up

...which silently brings up all downed nondhcp ipv4 interfaces thus preventing what I am trying to accomplish.

Obviously I will have to make my own boot scripts. Thanks both of you guys for your time.

Regards,

B
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top