Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Binding QNET to ip using QNX7.1: (7 Items)
   
Binding QNET to ip using QNX7.1  
Hello,

With QNX 6.5 on an x86 platform I was able to bind QNET to IP using mount as follows:

mount -T io-pkt -o bind=ip0,resolve=dns /lib/dll/lsm-qnet.so

The interface was en0 (or en1). I had a few extra arguments to do with timing and retries but they don't seem to help me
 here.

I am trying to do the same thing with QNX 7.1 on Raspberry Pi4's.

The command above creates /net but it remains empty. Note that I'm doing this with both Pi's and there is a pair of 
Ubiquiti Nanostation 5M wifi modems between them.

I modified the genet shared object to set up the interfaces as en0 instead of genet0 but this doesn't help. Fine with IP
 but not QNET.

The node names are in /etc/host.

Is there something I'm missing? Is this facility available in 7.1? (the documentation describes how to use lsm-qnet.so 
so I presume it's available in 7.1). There are no examples.

Could it be something to do with gns? (the global name server) Each is started as follows:

gns -s <hostname>

Any hints/ideas welcome and appreciated!

Geoff.

Re: Binding QNET to ip using QNX7.1  
Hi Geoffrey , i've try on my board (QNX7.1/ARM) to run qnet with the following options:
  mount -Tio-pkt -o"mount=:" lsm-qnet.so &                                  (autoresolve)
  mount -Tio-pkt -o"mount=:",bind=fec0 lsm-qnet.so &
  mount -Tio-pkt -o"mount=:",bind=fec0,resolve=dns lsm-qnet.so &

All works ok and I've the /net directoty populated. 
Have You verified that network is up and running? 
You can try to specify the  mount point explicitly in the arguments (mount=:)

Mario


Re: Binding QNET to ip using QNX7.1  
Hi Mario,

Thanks for responding.

Where is all this documented? I have never seen the -o "mount=:" notation and can't find any other reference to it.Can 
you explain it a bit please?

QNET works fine for all nodes that DON'T attempt to encapsulate the QNET packets inside IP. In other words, when I add 
the following mount command:

mount -T io-pkt -o bind=ip0,resolve=dns lsm-qnet.so /net becomes empty. 

I figure the that "ip0" means use teh IP encapsulation on the network interface "0" - for example en0 or genet0, or even
 fec0. But I might be wrong as the documentation for lsm-qnet.so simply quotes "bind=ip" with no numerical indicator. 
But in the past (with QNX6.5) it was always ip0 -> en0 or ip1 -> en1. I am assuming that on the RPi4 bind=ip0 will/
should use genet0.

The documentation is quite clear in stating that when binding to ip, the resolver MUST be dns. I presume that means the 
IP addresses need to be in /etc/host mapping to the node name (hostname)

I won't be back in my office until Tuesday (Eastern Australia time) so I won't be able to play much until then.

Cheers,

Geoff.

> Hi Geoffrey , i've try on my board (QNX7.1/ARM) to run qnet with the following
>  options:
>   mount -Tio-pkt -o"mount=:" lsm-qnet.so &                                  
> (autoresolve)
>   mount -Tio-pkt -o"mount=:",bind=fec0 lsm-qnet.so &
>   mount -Tio-pkt -o"mount=:",bind=fec0,resolve=dns lsm-qnet.so &
> 

> All works ok and I've the /net directoty populated. 
> Have You verified that network is up and running? 
> You can try to specify the  mount point explicitly in the arguments (mount=:)
> 
> Mario
> 
> 


Re: Binding QNET to ip using QNX7.1  
Hi Geoffrey, qnet is documented in many places, but You can get some usefull info 
about the dll options using this command:
use lsm-qnet.so

Try to use this command:
mount -Tio-pkt -o"mount=:",bind=fec0,bind=ip,resolve=dns lsm-qnet.so &
or:
mount -Tio-pkt -o bind=fec0,bind=ip,resolve=dns lsm-qnet.so &

Mount options is this one:
 mount=directory[:[.]domain]*
     A network directory. Default directory is "/net".
     Default domain is either the hostname domain if
     it has one, or the directory with the slashes changed
     to dots and reversed. i.e. "/net/outside/canada" would
     have a domain of "canada.outside.net".
     The first mount is the default directory and domain
     that the local hostname will resolve through.

I have specified the default options, so You can also omit the mount (it's just a my preference)

You have to specify two bind options, one for interface (fec0 or en0 or any other You have)
and one to bind the ip : it is not indented to be a OR option :-)


>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
Oct 27 08:44:43.600                   iopkt.274462          main_buffer      0  lsm-qnet.so mount=:,bind=fec0,bind=ip,
resolve=dns
Oct 27 08:44:43.601            io_pkt_v6_hc.274462                 slog      0  qnet(L4): qnet_birth(): qnet_init() - 
calling
Oct 27 08:44:43.602            io_pkt_v6_hc.274462                 slog      0  qnet(kif): mac_load(): security policy 
not being used
Oct 27 08:44:43.604            io_pkt_v6_hc.274462                 slog      0  qnet(L4): try_ifp(): new interface: fec0
: index 0 mac addr 20:0A:0D:70:1C:46
Oct 27 08:44:43.604            io_pkt_v6_hc.274462                 slog      0  qnet(QOS): nd_change_notify(): Node Up: 
  nd 0 tec-cpucoms.net.intra
Oct 27 08:44:43.605            io_pkt_v6_hc.274462                 slog      0  qnet(L4): qnet_birth(): qnet_init() - 
complete
Oct 27 08:44:43.804            io_pkt_v6_hc.274462                 slog      0  qnet(L4): lr_verify_my_name_and_domain()
: set _CS_DOMAIN
Oct 27 08:44:44.003            io_pkt_v6_hc.274462                 slog      0  qnet(L4): lr_verify_my_name_and_domain()
: starting resolution of our hostname tec-cpucoms.net.intra
to ensure unique
Oct 27 08:44:44.329                   iopkt.274462          main_buffer      0  mx6q_mii_callback(): link up lan 0 idx 0
 (1000 BaseT Full Duplex)
Oct 27 08:44:44.403            io_pkt_v6_hc.274462                 slog      0  qnet(L4): lr_verify_my_name_and_domain()
: qnet going online
Oct 27 08:44:44.604            io_pkt_v6_hc.274462                 slog      0  qnet(L4): lr_inbound(): rxd pkt type 2 
with duplicate name/domain, staying online
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Re: Binding QNET to ip using QNX7.1  
Hi Mario,

Following your instructions I'm not having much luck. As you will see I'm employing your 2nd mount option (no "mount:-")
.

The scenario is as follows:

Two RP4's connected to each other via a network switch. 

One has the hostname "rpi4-teg" with the IP address 192.168.15.213 and the other "rpi4-ndldev" with the IP address 192.
168.15.209. /etc/hosts file below.

When QNET is started as follows both (and a couple of other QNX machines) become visible in /net and everything works 
fine:

mount -T io-pkt -o bind=genet0 lsm-qnet.so

However, when QNET is started, attempting to bind to IP, as follows only the hostname shows in /net.

mount -T io-pkt -o bind=genet0,bind=ip,resolve=dns lsm-qnet.so

I don't expect the other two QNX7.1 machines on the network to remain visible as they are "pure" QNET - no IP 
encapsulation. But I would have expected the two that are intended to have IP encapsulation to appear in each ones /net 
directory. For example:

ls /net
/rpi4-teg   /rpi4-ndldev

But only one appears - the name of the RPi4 issuing the command.

I have tried changing various timeout and retry options to no avail. Certainly, my lsm-qnet.so setup in QNX6.5 doesn't 
work! :-)

The intent is to not have a switch but instead for each to be connected point-to-point using Ubiquiti NanoStation M5's 
that of course can route only IP. These are both configured with IP addresses on the same network as 192.168.15.20 and 
192.168.15.21 respectively.

With rpi4-ndldev physically connected ONLY to the Ubiquiti (no switch connection) I am able to ping rpi4-teg (using the 
serial terminal). Likewise from an SSH terminal on rpi4-teg I can ping rpi4-ndldev. This proves that the wireless system
 and IP is working.

The syslog entries start showing "bad layer 2" messages (as shown below). I don't know what these mean or why they occur
. Any help with this much appreciated! (BTW, we do have a standard support agreement but I thought I'd try the forum 
first as I figure - and am hoping - that this will be real easy to resolve)!

Anyway, following is how I am configuring both Pi's :

Thanks for your attention! :-)

Geoff.

--------------------------------------------------------------------------    

// The network driver is started in ifs-rpi4.bin (IFS)
    
    #######################################################################
    ## Network driver
    #######################################################################
    display_msg Starting Network driver...
    io-pkt-v6-hc
    mount -T io-pkt /lib/dll/devnp-genet.so
    if_up -p genet0

    /lib/dll/lsm-qnet.so=lsm-qnet.so

--------------------------------------------------------------------------    

// output of slog2info - filtered to include io-pkt related entries. Note that the RTC is not read until after the mount
 -T io-pkt -o bind=genet,bind=ip... call

Jan 01 12:00:00.372                    iopkt.65549          main_buffer*     0  tcpip starting
Jan 01 12:00:00.372                    iopkt.65549          main_buffer      0  smmu support is disabled
Jan 01 12:00:00.374                    iopkt.65549          main_buffer      0  initializing IPsec...
Jan 01 12:00:00.374                    iopkt.65549          main_buffer      0   done

Jan 01 12:00:00.374                    iopkt.65549          main_buffer      0  IPsec: Initialized Security Association 
Processing.

// this is presumably from the following in the IFS
  io-pkt-v6-hc
  mount -T io-pkt /lib/dll/devnp-genet.so

Jan 01 12:00:00.376                    iopkt.65549          main_buffer      0  /lib/dll/devnp-genet.so (null)
Jan 01 12:00:00.376                    iopkt.65549          main_buffer      0  genet0

Jan 01 12:00:00.478             io_pkt_v6_hc.65549                 slog*     0  genet:genet_ext_phy_init():309: Detected
 PHY vendor OUI:0x180361.
Jan 01 12:00:00.488             io_pkt_v6_hc.65549                 slog      0 ...
View Full Message
Re: Binding QNET to ip using QNX7.1  
Hi, Geoffrey, standard support is Ok, they will support You well.
BTW I suspect the trouble is in the dns option: probably the name of the target is not
registered or You do not have a dns in touch....
maybe You can try just with the ip ecapslulation:
mount -T io-pkt -o bind=genet0,bind=ip lsm-qnet.so

good work
Mario


Re: Binding QNET to ip using QNX7.1  
Hi Mario,

I got diverted away from my IP binding problem for a few days. A couple of hours at it yesterday did not bear fruit so I
 have raised a ticket with the support folks.

Thanks for your input!

Geoff.