Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Qnet configuration for Failover using Domain name resolver: (5 Items)
   
Qnet configuration for Failover using Domain name resolver  
Please help me to solve a requirement to implement failover/loadbalancing among the QNX devices. 

For the QNX devices I am trying to do this feature, by setting up the QNet. The following comments are used, 

Machine -1(VM1)
1)#setconf _CS_HOSTNAME VM1 

#hostname
VM1                                                                        

2)#mount –Tio-pkt –o bind=en0,bind=en1,bind=en2,max_num_l4s=3 /lib/dll/lsm-qnet-so

Vi /proc/qnetstatus, shows that three slots are used. 

Machine -2(VM2)
1)#setconf _CS_HOSTNAME VM2

#hostname
VM2

2)#mount –Tio-pkt –o bind=en0,bind=en1,bind=en2,max_num_l4s=3 /lib/dll/lsm-qnet-so

Vi /proc/qnetstatus, shows that three slots are used.

3)#ls /net

VM1 VM2

 Now these two nodes are to be addressed by using unique domain names, so that the following operation can be done even 
when one or two links (eg, en0 and en1) fails

In machine-2:
ping VM1.localdomain

In machine-1
ifconfig en0 down
ifconfig en1 down

I am expecting ping command in machine-1 to succeed, when both links en0 and en1 are down, with only en2 link up.

When I try to use “resolve=DNS” option and configure the respective /etc/hosts as below, I only recognizes the first 
entry. But the nodes are still available in /net directory 

192.168.16.1 VM1.localdomain VM1
192.168.16.2 VM2.localdomain VM2

192.168.17.1 VM1.localdomain VM1
192.168.17.2 VM2.localdomain VM2

Here the ping VM1 is mapped only to 192.168.16.1(en0). Once en0 fails, VM1 is expected to be mapped as 192.168.17.1(en1)
. 

 Please help me to configure the failover/loadbalancing options in QNX using QNet
RE: Qnet configuration for Failover using Domain name resolver  
I'm a bit confused - you refer to "bind=enX" but
then later you refer to "resolve=dns" and the
ping utility, which uses tcp/ip and not qnet?

Generally, people either use (the default) ethernet
encapsulation (eg "bind-en0") and local area network 
resolver, OR they use "bind=ip,resolve=dns".

Which packet encapsulation are you trying to configure?
QNX qnet ethernet or IP?

--
aboyd
Re: RE: Qnet configuration for Failover using Domain name resolver  
Hi Andrew,

Yes, i was wrong in trying resolve=dns. But i was desperate to try all options.

I am trying the encapsulation of type ethernet.

I tried the resolve=file option as well, by editing the /etc/qnet_hosts as below

VM1.localdomain XX:XX:XX:XX:XX:XX,en0
VM1.localdomain YY:YY:YY:YY:YY:YY,en1
VM1.localdomain ZZ:ZZ:ZZ:ZZ:ZZ:ZZ,en2
VM2.localdomain AA:AA:AA:AA:AA:AA,en0
VM2.localdomain BB:BB:BB:BB:BB:BB,en1
VM2.localdomain CC:CC:CC:CC:CC:CC,en2

But this resolve=file option too resulted in index string parse errors. So i can't see any other Nodes in /net directory

Log messages:(/etc/qnetstates)
--------------------------------------
28074956: try_ifp(): new interface: en0: index 0 mac addr 00:0C:29:5B:46:38
28074956): nd_change_notify(): Node Up:   nd 0 VM2.localdomain
28074956olver): file_nr_load(): unknown l4 index string 'en1' for address '00:0c:29:5b:46:42' of host VM2.localdomain 
(Invalid argument)
28074956olver): file_nr_load(): unknown l4 index string 'en2' for address '00:0c:29:5b:46:4c' of host VM2.localdomain 
(Invalid argument)
28074956olver): file_nr_load(): no address string for node 
.localdomain (Invalid argument)
28074956: try_ifp(): new interface: en1: index 1 mac addr 00:0C:29:5B:46:42
-----------------------------------

1-Is there any syntax mistake, i am making?
2-Will resolve=file,solve my issue for failover?
3-If bind=ip, how can we do failover as the only the entry is matched in /etc/hosts

Rgs/brabhu
RE: RE: Qnet configuration for Failover using Domain name resolver  
Ok.  Don't use bind=ip or resolve=dns or resolve=file,
and you don't need to put anything in /etc/hosts - qnet
will automatically populate /net.

When qnet starts up, it should try to bind (fill all
driver slots) with all available ethernet interfaces.

The default number of driver slots is two - that will
do it for 99.9% of the people out there.  I see you
are using the:

  max_num_l4s=3 

option - that's good, because you have en0, en1 and en2.

Since you are not using bind=ip, you are using the
default ethernet bind and don't need to specify 

  bind=en0,bind=en1,bind=en2

Ok.  Once qnet is up, you wan't to make sure that
all 3 interfaces are up.  You can tell this with

  # nicinfo -r en0
  # nicinfo -r en1
  # nicinfo -r en2

Also, you can

  # cat /proc/qnetstats

and look at the tx and rx counts for the different
driver slots.  If a link is down, you won't see
any rxd packets.

When people are testing multiple links, it is quite
common to have one or more links incorrectly configured
and down, which of course will stop failover from working!

--
aboyd

Re: RE: RE: Qnet configuration for Failover using Domain name resolver  
Hi Andrew,

Yes, by the steps mentioned, I could see all the nodes up and populated in the /net directory.

With out any resolve options, I am not able to do a ping or Ftp on the node VM1.localdomain.

I need to do a file transfer, by addressing node irrespective of the interface IP addresses. So if one interface(en0) 
fails at the middle of file transfer, I should be able carry the complete transfer successfully, by the other available 
links(en1 & en2).

Rgs/Brabhu