Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - QNet over IP:which resolver to choose?: (5 Items)
   
QNet over IP:which resolver to choose?  
In a Qnet distributed network, if there are n number of nodes and each nodes having 3 interfaces, How will these nodes 
be addressed?

That is for example,

QNet
------
Node1 -> Interface en0 192.10.0.111  |
           -> Interface en1 192.11.0.111  |->nd1.local.net
           -> Interface en2 192.12.0.111  |

Node2 -> Interface en0 192.10.0.112  |
           -> Interface en1 192.11.0.112  |->nd2.local.net
           -> Interface en2 192.12.0.112  |

Non-Qnx
PC1  -> Interface en0 192.10.0.113  -> pc1.local.net

Resolver should allow to do the following,
Case 1:
From Node1,
ping      nd2.local.net

Case 2:
From PC1
ping      nd2.local.net

In both cases ping should succeed.

Please let me know the commands to execute and the corresponding source files to look at for any changes to make.
RE: QNet over IP:which resolver to choose?  
ping doesn't use qnet, it uses the IP stack.

Qnet 101
--------

Let's say you have two hosts:  host1 and host2
(this sound a bit like a Dr Suess story, but
stick with me).

Regardless of the number of network links between
host1 and host2, if you have at least ONE functioning
network link between the two, and qnet is running
on both, on host1 you can do the following to test
qnet:

  # ls /net
  # ls /net/host2
  # pidin -n host2
  # pidin > /net/host2/tmp/fubar1
  # cat /proc/qnetstats

And on host2, you can do the following to test qnet:

  # ls /net
  # ls /net/host1
  # pidin -n host1
  # pidin > /net/host1/tmp/fubar2
  # cat /proc/qnetstats
 
On host2, you could even look at the qnetstat on host1:

  # cat /net/host1/proc/qnetstats

Ok.  Now, onto multiple links.  To keep it simple,
assume you have two ethernet nics (and drivers) so
that when qnet starts, it finds and uses both.

With two crossover cables attached between host1
and host2, you ought to be able to repeat the above,
and if you look at the qnetstats, you will see that
packets flow over both links (load balancing).

Now, disconnect one of the cables, and repeat
the above tests - they should still succeed,
using only the single functioning network link.
You can verify this by looking at the qnetstats.
This is failover functioning correctly.

Now, reconnect the disconnected cable.  After
the drivers auto-negotiation is completed,
re-run the above tests.  You should see qnet
using both links again, via the counts in the
qnetstats.

Just to re-iterate: qnet and tcp/ip are both
separate, distinct, orthogonal protocols which
live above the driver at the SAME LEVEL.

99.999% of our customers use the default ethernet
encapsulation (eg bind=en0) which has qnet talk
directly to the driver to transmit and receive
packets.

0.0001% of our customer use "bind=ip" which
instructs qnet to talk to the tcp/ip stack
to transmit and receive packets, which are
encapsulated with IP headers.  We have protocol
type for qnet IIRC.

Clear as mud?

--
aboyd
 
Re: RE: QNet over IP:which resolver to choose?  
> crossover cables 

just to clarify: if your ethernet nics support HP-MDIX
you don't need crossover cables.

http://www.hp.com/hpinfo/abouthp/iplicensing/automdix.html
Re: RE: QNet over IP:which resolver to choose?  
Thanks Andrew. Its crystal clear.
I could understand the significance of QNet.
RE: RE: QNet over IP:which resolver to choose?  
> I could understand the significance of QNet.

QNX Fundamentals
----------------

Fundamentally, what happens in QNX is that a thread
in a client process (virtual address space) calls the 
kernel call Send when it wants a server to do something.

This kernel call Send does two things:

1) blocks the client thread, and

2) transfers the data from the client process virtual
   address space from the server process virtual 
   address space

Actually, I lie like a rug.  #1 above occurs, but #2
doesn't actually occur until a server thread calls the
kernel call Receive - usually there is one, who previously
called Receive, and is blocked, waiting for a client to
wake it up.

The server does whatever it does with the client data - it
could be write() data, or a request for read() data - and
after it has satisfied the client's request, it calls the
kernel call Reply.  The kernel call Reply then transfers 
any data the server wishes to provide to the client, from
the server virtual address space, to the blocked client
thread's virtual address space.

It's a bit more complicated than that in the corner cases,
but fundamentally, that's what's happenning under the covers.


Qnet 102
--------

One little detail I left out:  before any client can make
the fundamental kernel calls above, it has to make a function
call:

ConnectAttach()

which takes as the first parameter an "nd" or node descriptor.

If the server is local, the nd is zero.  If the server is
on another node - serviced by the qnet protocol - the nd is 
non-zero.

So, the neat thing about QNX is that the thread communication
primitives are *exactly the same* in the local case as in the
remote case.

Over the decades, customers who have realized this have used
this to scale their implementations from one machine to hundreds,
which is pretty neat.

--
aboyd