node1 and node2 are physically separated by the router node in the middle.
When I set up the routing tables as below, ping, ftp, telnet etc. work as
they should - they use the routing table to find the destination.
Qnet does not work at this stage - it is not using the routing table to
find the destination. If I hack the arp table to “cheat” node1 that node2
is router, then qnet starts working.
Is there a “local” flag that can be set when a program sends a packet to the
tcpip stack, which forces it to ignore the routing table? Why would ping,
ftp, telnet etc work fine across the subnets, but qnet not?
Stuart Harding <> stuart@intellidesign.com.au> > wrote:
The only problem is in displaying the net number for “192.168.0”. The
stack
works fine - remember that ping, ftp, telnet etc all work - I am asking
why
qnet doesn’t. I have tried using different nets - it makes no
difference.
Well, I don’t think the “dispalying the net number” is the problem.
Let me start from beginning.
In one thread you’ve claimed:
I have run a packet sniffer on one of the subnets. When I try to force
the first node to see the node on the other subnet, the first node gives
out
about six ARP requests to the destination IP address, then io-net
crashes.
Can anyone suggest why ARP (an ethernet address resolver) is being used
to locate an IP address for which there is an entry in the routing table?
The only reason this happened is because node2 think it is on network
“192.168”, and when you ping node1, it think “192.168.1.132” IS on
same network, so ARP is send out, instead of send the packet directly
to “router”.
As you discovered later, when you hacked the arp table on “router”,
you basically forced it do a “proxy arp”, and “cheated” node1 that
“router” is “node2”.
Now, without hacking the arp table, I don’t expect the “ping” will
work, if node1 and node2 are physically seperated, that is,
if node2 CAN NOT see the ARP packets send by node1.
These are totally tcpip configuration, have nothing to do with
QNET.
-xtang
“Xiaodan Tang” <> xtang@qnx.com> > wrote in message
news:agepno$c85$> 1@nntp.qnx.com> …
Looks like the stack have problem with “192.168.0” network.
change it to something like “192.168.2” should fix your problem.
-xtang
Stuart Harding <> stuart@intellidesign.com.au> > wrote:
Netstat -in and netstat -rn as requested. Note that ping, ftp,
telnet,
fs-nfs2 etc work across the subnets.
/////////////////////////////
Router:
/////////////////////////////
ls /net
node1 node2 router
./netstat -rn
Routing tables
Internet:
Destination Gateway Flags Refs Use Mtu
Interface
127.0.0.1 127.0.0.1 UH 0 0 -
lo0
192.168 192.168.0.235 U 1 38 -
en0
192.168.0.235 192.168.0.235 UH 0 0 -
lo0
192.168.1 192.168.1.235 U 1 202 -
en1
192.168.1.235 192.168.1.235 UH 0 0 -
lo0
./netstat -in
Name Mtu Network Address Ipkts Ierrs Opkts
Oerrs
Coll
lo0 32976 0 0 0
0
0
lo0 32976 127 127.0.0.1 0 0 0
0
0
en0 1500 52:54:4c:19:02:fd 179 0 52
0
0
en0 1500 192.168 192.168.0.235 179 0 52
0
0
en1 1500 52:54:4c:19:03:01 211 0 216
0
0
en1 1500 192.168.1 192.168.1.235 211 0 216
0
0
/////////////////////////////
Node1:
/////////////////////////////
ls /net
node1 router
netstat -rn
Routing tables
Internet:
Destination Gateway Flags Refs Use Mtu
Interface
default 192.168.1.235 UGS 1 3 -
en0
127.0.0.1 127.0.0.1 UH 0 0 -
lo0
192.168.1 192.168.1.132 U 2 427 -
en0
192.168.1.132 192.168.1.132 UH 0 0 -
lo0
netstat -in
Name Mtu Network Address Ipkts Ierrs Opkts
Oerrs
Coll
lo0 32976 0 0 0
0
0
lo0 32976 127 127.0.0.1 0 0 0
0
0
en0 1500 00:d0:c9:42:28:07 606 0 617
0
0
en0 1500 192.168.1 192.168.1.132 606 0 617
0
0
ping 192.168.0.128
PING 192.168.0.128 (192.168.0.128): 56 data bytes
64 bytes from 192.168.0.128: icmp_seq=0 ttl=254 time=2 ms
/////////////////////////////
Node2:
/////////////////////////////
ls /net
node2 router
netstat -rn
Routing tables
Internet:
Destination Gateway Flags Refs Use Mtu
Interface
default 192.168.0.1 UG 0 0 -
en0
127.0.0.1 127.0.0.1 UH 0 4 -
lo0
192.168 192.168.0.128 U 13 391225 -
en0
192.168.0.128 192.168.0.128 UH 0 0 -
lo0
192.168.1 192.168.0.235 UGS 0 16 -
en0
netstat -in
Name Mtu Network Address Ipkts Ierrs Opkts
Oerrs
Coll
lo0 32976 4 0 4
0
0
lo0 32976 127 127.0.0.1 4 0 4
0
0
en0 1500 c0:80:ff:bf:c1:a8 576485 0 391871
0
0
en0 1500 192.168 192.168.0.128 576485 0 391871
0
0
ping node1
PING node1.qnet (192.168.1.132): 56 data bytes
64 bytes from 192.168.1.132: icmp_seq=0 ttl=254 time=2 ms
“Xiaodan Tang” <> xtang@qnx.com> > wrote in message
news:ag47p9$cnq$> 1@nntp.qnx.com> …
It is very wired that ARP packet is send out. The “only possiable
explaination” I have is that the netmask is not correct or not
working in stack.
Can you post “netstat -ni”, “netstat -nr” output on 3 nodes ?
-xtang
Stuart Harding <> sharding@gil.com.au> > wrote:
Full network setup on each node is:
node1:
io-net -drtl -ptcpip
ifconfig en0 192.168.0.128 netmask 255.255.255.0
route add 192.168.1.32 192.168.0.21
mount -Tio-net -obind=ip,resolve=dns,host=node1.mydomain
npm-qnet.so
node2:
io-net -drtl -ptcpip
ifconfig en0 192.168.1.32 netmask 255.255.255.0
route add 192.168.0.128 192.168.1.21
mount -Tio-net -obind=ip,resolve=dns,host=node2.mydomain
npm-qnet.so
router:
io-net -drtl
mount -Tio-net -oforward npm-tcpip.so
ifconfig en0 192.168.0.21 netmask 255.255.255.0
ifconfig en1 192.168.1.21 netmask 255.255.255.0
mount -Tio-net -obind=ip,resolve=dns,host=router.mydomain
npm-qnet.so
Each of the nodes and router has the correct /etc/hosts entries to
resolve
the other ip addresses. Ping, ftp and telnet will now work between
the
two
nodes. However, qnet won’t yet cross the subnets - the router can
see
all
nodes, but each node can only see itself and the router. It will
only
work
across the subnets if I add the following entries into the arp
tables:
node1:
arp -s 192.168.1.32 <ethernet address of router’s 0.21 network
card
node2:
arp -s 192.168.0.128 <ethernet address of router’s 1.21 network
card
Yes, it seems strange that ping, ftp and telnet all work with the
routing
table but qnet doesn’t…
Thanks,
Stuart
Xiaodan Tang <> xtang@qnx.com> > wrote in message
news:ad7vvs$7bq$> 1@nntp.qnx.com> …
Stuart Harding <> stuart@intellidesign.com.au> > wrote:
Replying to myself again >
I have finally got qnet running across the subnet.
I did this by adding ARP entries into each node’s arp table
directing
the IP
address of the remote node to the router’s local ethernet
interface.
I still don’t see why the ARP request is going out for the
remote
IP
address, rather than the router’s IP address, considering that
there
is
an
entry in the routing table for exactly this. Can anyone shed
some
light
on
this?
Sorry to reply late.
I don’t quite understand the satuation either. Can you post node1
and node2’s ip address, netmask ? (netstat -ni).
You are saying “ping node2” from node1 IS working, right ?
-xtang
“Stuart Harding” <> stuart@intellidesign.com.au> > wrote in message
news:ad1u36$oa4$> 1@inn.qnx.com> …
More information:
I have run a packet sniffer on one of the subnets. When I try
to
force
the
first node to see the node on the other subnet, the first node
gives
out
about six ARP requests to the destination IP address, then
io-net
crashes.
Can anyone suggest why ARP (an ethernet address resolver) is
being
used
to
locate an IP address for which there is an entry in the
routing
table?
Stuart
“Stuart Harding” <> stuart@intellidesign.com.au> > wrote in
message
news:acv8s8$nui$> 1@inn.qnx.com> …
I am running QNX 6.1.0a. I have read all the posts in the
previous
“Qnet
across subnets” thread. The outcome of that was Xiaodan
Tang’s
simplified
qnet startup command:
mount -Tio-net -obind=ip,resolve=dns,host=nodeA.domainname
npm-qnet.so
This works fine for me within subnets, but will not cross
subnets.
I have three single board computers, one having multiple
network
cards,
which I use as the router. I start io-net on all machines
and
set
the
routing tables to the point where I can ping, ftp and
telnet
from
any
machine to any other machine. I then start qnet on each
machine
using
the
above command. The result is as follows:
From the first node I can see and use /net/node1 and
/net/router.
From the second node I can see and use /net/node2 and
/net/router.
From the router I can see and use /net/router, /net/node1
and
/net/node2.
Trying to force qnet to see a node on the other subnet,
using
/net/ip_address, /net/node1, or /net/node1.domainname,
gives
the
error
message “No route to host”. It also sometimes causes
io-net
to
crash.
I have entries in /etc/hosts for router router.domainname,
node1
node1.domainname, node2 node2.domainname.
Can anyone suggest anything I may have overlooked?
Thanks,
Stuart Harding
\