Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - /net remains empty after network cable disconnect/reconnect: Page 1 of 2 (11 Items)
   
/net remains empty after network cable disconnect/reconnect  
Hi,

I am using 6.3.0 sp1 with npm-qnet-compat.so sometimes when the network cable is reconnected after more than 5 minutes 
the entries for other nodes on network in /net directory vanish and never come back. 

After this only the nodes that are restarted are populated in /net. 
Is there any way I could do some function call/operation from the MDI_LINK_UP callback to repopulate the /net directory.
 

I see that in 6.3.0 sp2 in a Patch ID 234 there is some work to add _NETMGR_QOS_FLUSH which I suppose does what I want. 
 

Is there any other way I could do say a broadcast ping  on qnet or cause the nbd to be recreated?

Thanks and Regards,
Ashwin
RE: /net remains empty after network cable disconnect/reconnect  
re: "compat" qnet ...

The entries in /net are really only hints.  More to 
the point, do you really have network connectivity?

For example, on node "fred" - with the empty /net - 
if you type the following:

  # ls /net/bob

where "bob" is a remote node - that you think is up and
connected - does it work?  Does an entry for bob appear
in /net?

I thought compat qnet periodically broadcasts the
equivalent of gratituous arps, but I may be wrong.

--
aboyd

Re: RE: /net remains empty after network cable disconnect/reconnect  
Hi,

The nodes that bootup are shown in /net, so networking is working. 

We see that the time taken for nodes to reappear is long and sometimes unpredictable. 
Isn't there any way when the link comes up we send some message/packet which can have the effect of repopulating the /
net quickly. 

Thanks and Regards,
Ashwin
Re: RE: /net remains empty after network cable disconnect/reconnect  
This is qnet-compat right? 

You can specify "broadcast=0x0305" option when you load the qnet.

The high 16bit 0x03 tells qnet to keep broadcasting it's name, and the
low 0x05 means do this every 5 seconds.

-xtang

 
On Wed, 2009-05-06 at 05:30 -0400, Ashwin Patwekar wrote:
> Hi,
> 
> The nodes that bootup are shown in /net, so networking is working.
> 
> We see that the time taken for nodes to reappear is long and sometimes
> unpredictable.
> Isn't there any way when the link comes up we send some message/packet
> which can have the effect of repopulating the /net quickly.
> 
> Thanks and Regards,
> Ashwin
> 
> 
> _______________________________________________
> Networking Drivers
> http://community.qnx.com/sf/go/post28768
> 
> 
> 
RE: RE: /net remains empty after network cable disconnect/reconnect  
xtang:  did you want to add this to the wiki?

I know that qnet compat has been deprecated for
a couple of releases now, but people are still
using it.

--
aboyd

-----Original Message-----
From: Xiaodan Tang [mailto:community-noreply@qnx.com] 
Sent: Wednesday, May 06, 2009 8:30 AM
To: drivers-networking
Subject: Re: RE: /net remains empty after network cable
disconnect/reconnect

This is qnet-compat right? 

You can specify "broadcast=0x0305" option when you load the qnet.

The high 16bit 0x03 tells qnet to keep broadcasting it's name, and the
low 0x05 means do this every 5 seconds.

-xtang

 
On Wed, 2009-05-06 at 05:30 -0400, Ashwin Patwekar wrote:
> Hi,
> 
> The nodes that bootup are shown in /net, so networking is working.
> 
> We see that the time taken for nodes to reappear is long and sometimes
> unpredictable.
> Isn't there any way when the link comes up we send some message/packet
> which can have the effect of repopulating the /net quickly.
> 
> Thanks and Regards,
> Ashwin
> 
> 
> _______________________________________________
> Networking Drivers
> http://community.qnx.com/sf/go/post28768
> 
> 
> 

_______________________________________________
Networking Drivers
http://community.qnx.com/sf/go/post28777
Re: RE: /net remains empty after network cable disconnect/reconnect  
Hi,

thanks for the reply. 

strangely when I tried load qnet  on one of the node with the command
mount -T io-net -o bind=ip0,broadcast=0x0305 npm-qnet-compat.so 
the entries of other nodes do not come in /net. 

I was browsing the svn code 
1. There is a function  trans_ifup_input in trans_ctrl_ifup.c which seems to be called when and interface goes up to 
announce itself it might also be recreating ndb not sure though. In my case the link is coming up again so can something
 like this be used ?
2.  also the L4MSG_IFUP seems to be interesting can it be used? 

Thanks and Regards,
Ashwin
RE: RE: /net remains empty after network cable disconnect/reconnect  
It's been a long time, but let me try...

When a node first come up, it will broadcast a few message to make sure
no name conflict, and then it will broadcast and announce "node XYZ is
coming up". 

Other nodes in the network, will then contact "node XYZ" to say hello,
this populate the /net on node XYZ. This is done in unicast.

If you pull the network cable, wait for a while, QNET on node XYZ will
slowly timeout all other nodes, make them disappear from /net.

Plug the cable back, WOULD NOT causing the "node come up" event, so
nothing would happen. You can try the back door trick, once the link is
up, do a "rmdir /net/XYZ", this will force QNET re-announce itself (I
think), and hopefully you will see others started talk to you.

Now, broadcast is considered "un-reliable", so there is no guarantee
that everyone will talk back to you. The "broadcast=" option is just to
keeps broadcasting "node XYZ is up", so everyone else could add XYZ into
their /net. They will not unicast back though. So you need to start
EVERY QNET with "broadcast=" to make /net "reliable"

Hope this helps.

-xtang



> -----Original Message-----
> From: Ashwin Patwekar [mailto:community-noreply@qnx.com]
> Sent: May 6, 2009 10:08 AM
> To: drivers-networking
> Subject: Re: RE: /net remains empty after network cable
> disconnect/reconnect
> 
> Hi,
> 
> thanks for the reply.
> 
> strangely when I tried load qnet  on one of the node with the command
> mount -T io-net -o bind=ip0,broadcast=0x0305 npm-qnet-compat.so
> the entries of other nodes do not come in /net.
> 
> I was browsing the svn code
> 1. There is a function  trans_ifup_input in trans_ctrl_ifup.c which
seems
> to be called when and interface goes up to announce itself it might
also
> be recreating ndb not sure though. In my case the link is coming up
again
> so can something like this be used ?
> 2.  also the L4MSG_IFUP seems to be interesting can it be used?
> 
> Thanks and Regards,
> Ashwin
> 
> _______________________________________________
> Networking Drivers
> http://community.qnx.com/sf/go/post28808
RE: RE: /net remains empty after network cable disconnect/reconnect  
Hey xtang, he's using "bind=ip" so he's not using 
the built-in qnet compat lan resolver, correct?

--
aboyd
RE: RE: /net remains empty after network cable disconnect/reconnect  
Hi Andrew,

Good catch! :)

Actually, since there is no "resolver=dns" set, qnet-compat is still
going to do the same "ndp", just do it over ip. (broadcast over ip)

It might be also possible to "ifconfig en0 delete", and then "ifconfig
en0 <ip>" to generate an interface down/up, and cause QNET to
re-announce....

-xtang 

> -----Original Message-----
> From: Andrew Boyd [mailto:community-noreply@qnx.com]
> Sent: May 6, 2009 11:00 AM
> To: drivers-networking
> Subject: RE: RE: /net remains empty after network cable
> disconnect/reconnect
> 
> Hey xtang, he's using "bind=ip" so he's not using
> the built-in qnet compat lan resolver, correct?
> 
> --
> aboyd
> 
> _______________________________________________
> Networking Drivers
> http://community.qnx.com/sf/go/post28819
Re: RE: RE: /net remains empty after network cable disconnect/reconnect  
I had read about the rmdir trick in a post but that did not work. 

I also tried ifconfig en0 delete and ifconfig en0 <ip> but no luck with that too.

I noticed one more thing when I start io-net with -v option during the qnet mount command the following error is printed
 
#   mount -T io-net -o bind=ip0 npm-qnet-compat.so
# io-net: warning: autoload of "ncm-qnet_en.so" failed: Library cannot be found

where is this lib I could not locate this in the qnx installation.

Thanks and Regards,
Ashwin