Operating System - HP-UX
1834022 Members
2671 Online
110063 Solutions
New Discussion

Re: using ifconfig in MC/SG Control script

 
Pramod_4
Trusted Contributor

using ifconfig in MC/SG Control script

Hi,

Any one know whether "ifconfig" can be used instead of "cmmodnet" in MC/SG control script ?

I have already tested it by putting "ifconfig" in the control script and found that package start/stop is all right. Floating IP is getting assigned and removed as expected on start and stop.

I wanted to use ifconfig to control the IP assignment to the net interface. For example if I want to assign the IP to lan1:3 instead of lan1:1, the cmmodnet does not allow this but ifconfig does.

What I would like to know is that is there any potential problem by using ifconfig in control script ?

Thanks in advance.

Pramod
4 REPLIES 4
Trevor Dyson
Trusted Contributor

Re: using ifconfig in MC/SG Control script

Hi,

The only potential problem I can think of is that you would need to be absolutely certain that another package had not already failed over to use lan1:3, otherwiae you would remove that package's IP config and it may stop working.

Regards, Trevor
I've got a little black book with me poems in
melvyn burnard
Honored Contributor

Re: using ifconfig in MC/SG Control script

This would certainly be classed as an unsupported methodology within the MC/SG control scripts.
I would question why you need to force the floating ip address to go to a specific lan other than the one it is supposed to be set on.
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
Pramod_4
Trusted Contributor

Re: using ifconfig in MC/SG Control script

Let me thank Trevor and Melvyn for the reply.


Melvyn:

To answer your question I need to write the entire story. Okay, a brief of it is as follows:

I need to force all outbound communication ( inbound is not an issue at all, all of my client Boxes use floating IP ) to be through a specific IP that is floating IP of the package.

By default in a MC/SG setup any outbound traffic through any net interface ( of course route matters, considering a default gateway ) will flow through the static IP ( which will be first IP on the net interface ) if application does not have any control over the source IP.

Which ever IP gets assigned to that interface ( floating IP?s) later wont be used as a source IP for the outbound communication.

So to make the floating IP as the first IP on the card I need to assign the floating IP by using the ifconfig command. I achieve them by doing the following:

Assume that I use ?lan1? interface in this example and by default there is an IP x.x.x.A on it which is a static IP.

On package startup, it assigns a floating IP to that interface and remove the static IP by using the following:

ifconfig lan1 0.0.0.0

Once the static is removed from the net interface and floating IP is the only IP on that interface, so all outbound will use the floating IP ( heartbeat LAN is a private LAN between two cluster nodes )

This works all right for me, now the question is that if I have two packages on the cluster and only one specific floating IP has to be used for outbound connection, now I need to ensure that the floating IP of that package ( let me say package-A ) comes first on the interface at any given time ( even after any fail over ).

So I need to ensure that package-A?s floating IP is assigned on lan1:1 and package-B?s IP is assigned on lan1:2.
cmmodnet does not allow me to specify the index number ( :1) with the interface name while assigning the IP but ifconfig does. That is the reason why I have asked this question.

As I have already said, I have already tested and found that it is working all right for me, but what I need to know is that is there going to be any hidden problem if I do this configuration.

If you TCP/IP and MC/SG guru?s could through some light on it.. I would really appreciate.

Thanks,

Pramod









Stephen Doud
Honored Contributor

Re: using ifconfig in MC/SG Control script

Hello,

Like Melvyn, I have to echo that any alteration of the standard
package control script removes support responsibility from HP.
That said, customers do it all the time to meet their needs,
which makes the product that much more attractive.

I applaud your inventiveness to resolve this need. Customers
have begun using the ifconfig command in the
customer_defined_run_cmds section to meet special needs the
generic package control script does not perform.

To the question of hidden problems caused by removing the static
IP from a LAN, replacing it with a relocatable IP...

Before users had the ability to use the ifconfig command to layer
multiple IPs on a single LAN card, cmmodnet was the only way it
could be done, and that command was not "legal" to operate
manually.

SvcGd tests LANs using linkloop, a lower layer of the OSI model.
SvcGd uses the resulting test return to determine SUBNET outages
as well, to IP is not involved here.

The IP only shows up in the cluster configuration file and the
package control scripts.

If the package is halted, what happens to "stationary" IP on the
LAN card? If the stationary IP is removed, such that the LAN has
no IP, I suspect future cmcheckconf/cmapplyconf commands will
fail unless the stationary IP is reinstated.