Click to See Complete Forum and Search --> : DCOM Gurus only: Multihomed DCOM Client


Mike Wild
July 6th, 1999, 02:20 AM
Dear DCOM Gurus

I have the following problem:

1. I have one configuration, which is exactly like this picture is showing:

Client.....................Server
_______................_______
|129.0.0.1|_______ |129.0.0.3|
|129.0.0.2|_______ |129.0.0.4|
|_______|...............|______|

This means, we have two seperate Point to Point connections.

2. I have one configuration, which one connection is a normal LAN and the other
is a Point to Point, with the following IPs:

Client PC:
P to P
IP: 129.0.0.1
Subnet Mask: 255.255.255.0

LAN
IP: 10.6.7.17
Subnet Mask: 255.255.252.0


Server PC:
P to P
IP: 129.0.0.2
Subnet Mask: 255.255.255.0

LAN
IP: 10.6.7.2
Subnet Mask: 255.255.252.0

I tried both configurations and both showed the following behaviour.
When I create and call one serverobject over the first connection
( 10.6.7.17 ) and a second serverobject over the second connection
(129.0.0.2) everything is working great. But if we unplug the first connection
(10.6.7.17 to 10.6.7.2)nothing is working anymore.

The server is writen with ATL and has a simple Interface with one testmethod.

In the client I do in short terms the following:

....
CoInitializeEx( NULL, COINIT_APARTMENTTHREADED );

HRESULT hRes;
COSERVERINFO serverInfo = {0};
serverInfo.pwszName = _T("tigerA");
MULTI_QI qi = { &IID_ICoolPing, NULL, 0 };

hRes = CoCreateInstanceEx( CLSID_CoolPing , NULL, CLSCTX_SERVER,
&serverInfo, 1, &qi );

COSERVERINFO serverInfo2 = {0};
serverInfo2.pwszName = _T("tigerB");
MULTI_QI qi2 = { &IID_ICoolPing, NULL, 0 };

hRes = CoCreateInstanceEx( CLSID_CoolPing , NULL, CLSCTX_SERVER,
&serverInfo2, 1, &qi2 );

long lCounter = 0;
hRes = ((ICoolPing*)qi1.pItf)->ping( &lCounter );
if( FAILED( hRes ))
{
hRes = ((ICoolPing*)qi2.pItf)->ping( &lCounter );
}
.....

This way we want to provide a failtolerant system. This means if one
serverconnection is broken the client can use the second one. But it doesn't
matter what we are trying, if the primary connection( first NIC in the
settings) is unavailable, the second isn't working anymore.

Is there a possibility to configure this binding during runtime???
All hints are appreciated. Thank you very much.

Mike Wild