1755675 Members
3657 Online
108837 Solutions
New Discussion юеВ

related to logical ip

 
Sunil Surve
Advisor

related to logical ip

Suppose machine A has a logical ip.
now if we connect from machine B to machine A using logical ip, the netstat output shows the logical ip on both the sides.
if we connect from machine A to machine B the netstat output on machine B shows the physical IP. This means that in IP packet it enters the physical IP address. Is there any way in which we can actually have the source IP address in the IP packet to be the logical IP. If this is possible then the machine B will then be able to show the logical IP in the netstat output.
3 REPLIES 3
Victor BERRIDGE
Honored Contributor

Re: related to logical ip

Hi,
The only case I had a configuration alike was on IBM boxes with HACMP.... here you would configure a boot_IP/hostname that would be reconfigured to service_IP/hostname.
So when the service hosname is in use the other is unavailabe...

For software in packages that need the info or that does calls like hostname etc. we load these as variables in the environment of the package sofware.

All the best
Victor
Elmar P. Kolkman
Honored Contributor

Re: related to logical ip

The IP address you see as the source address is the IP address of the network connection used to connect to the destination. So, if you want to have the right address, you need to make sure you use a route that will use the logical IP address instead of the primary IP address. But that would also mean that all connections that can, will use this route. So it might not be what you want.

You'll have to determine for yourself if it's acceptable.
Every problem has at least one solution. Only some solutions are harder to find.
Carsten Krege
Honored Contributor

Re: related to logical ip

You should read the appendix of the Serviceguard Manual, Chapter "Designing Applications to Run on Multiple Systems", subchapter "Bind to Relocatable IP Addresses".

The basic statement is that your application should call the system call bind(2) before connecting to a remote system. THis guarantees that you always use the source IP address that you want to use. Otherwise the connect request will be sent using the stationary IP address of the system's outbound LAN interface rather
than the desired relocatable application IP address.

Carsten
-------------------------------------------------------------------------------------------------
In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move. -- HhGttG