TCP/IP large stack routing problem

I’m trying to run Samba which requires the large stack. When I
edit:

/etc/system/enum/include/net

and remove the t from -dttcpip and reboot, routing no longer
works.

I’m running the devn-el900.so driver and using dhcp. phlip
shows the correct entries for route and nameserver and my local
network is still accessible. netstat returns the no namelist error
as if the small stack is running.

Shouldn’t it be this simple?


David L. Hawley D.L. Hawley and Associates

David Hawley <David.L.Hawley@computer.org> wrote:

I’m trying to run Samba which requires the large stack. When I
edit:

/etc/system/enum/include/net

and remove the t from -dttcpip and reboot, routing no longer
works.

I’m running the devn-el900.so driver and using dhcp. phlip
shows the correct entries for route and nameserver and my local
network is still accessible. netstat returns the no namelist error
as if the small stack is running.

The “netstat” is missed it’s “set uid” bit, so you have to be
super user to run it. (su, or login root).

-xiaodan

Shouldn’t it be this simple?


David L. Hawley D.L. Hawley and Associates

Previously, Xiaodan Tang wrote in qdn.public.qnxrtp.installation:

David Hawley <> David.L.Hawley@computer.org> > wrote:
I’m trying to run Samba which requires the large stack. When I
edit:

/etc/system/enum/include/net

and remove the t from -dttcpip and reboot, routing no longer
works.

I’m running the devn-el900.so driver and using dhcp. phlip
shows the correct entries for route and nameserver and my local
network is still accessible. netstat returns the no namelist error
as if the small stack is running.

The “netstat” is missed it’s “set uid” bit, so you have to be
super user to run it. (su, or login root).

OK, that helps for netstat, but what do I need to do to get routing
to work with the large stack?


David L. Hawley D.L. Hawley and Associates

David Hawley <David.L.Hawley@computer.org> wrote:
: Previously, Xiaodan Tang wrote in qdn.public.qnxrtp.installation:
:> David Hawley <David.L.Hawley@computer.org> wrote:
:> > I’m trying to run Samba which requires the large stack. When I
:> > edit:
:>
:> > /etc/system/enum/include/net
:>
:> > and remove the t from -dttcpip and reboot, routing no longer
:> > works.
:>
:> > I’m running the devn-el900.so driver and using dhcp. phlip
:> > shows the correct entries for route and nameserver and my local
:> > network is still accessible. netstat returns the no namelist error
:> > as if the small stack is running.
:>
:> The “netstat” is missed it’s “set uid” bit, so you have to be
:> super user to run it. (su, or login root).

: OK, that helps for netstat, but what do I need to do to get routing
: to work with the large stack?

What’s the problem?

You can use:

  • ‘netstat -rn’ to view the routing table.
  • the ‘route’ utility to add / delete routes?

-seanb

I still cannot get routing to work by simply editing:
/etc/system/enum/include/net

to:
all
set(IONET_CMD, io-net -ptcpip)

So as a hack, I’m using the following rc.local

slay -f io-net fs-nfs2 inetd dhcp.client
io-net -del900 -ptcpip
sleep 2
dhcp.client -h shadow -i en0 -d
sleep 5
mount -Tio-net /lib/dll/npm-qnet.so
fs-nfs2
/usr/sbin/inetd

If I do not use the sleeps, then dhcp.client runs ready and /net
ends up with an entry that contains non-asci characters.

On a second box with the small stack, I just mount qnet in rc.local and end up with 2 entries in net for that name on shadow. ie:
/home/dlh> ls /net
dave dave. shadow

on dave, I end up with dave. and shadow entries.

I also tried adding -pqnet to the enum/include/net file. That seem
to cause the system to hang requiring a reset.

The enum stuff, seems to almost work, but is a real pain in the neck when it fails.

Dave

Previously, Sean Boudreau wrote in qdn.public.qnxrtp.installation:

David Hawley <> David.L.Hawley@computer.org> > wrote:
: Previously, Xiaodan Tang wrote in qdn.public.qnxrtp.installation:
:> David Hawley <> David.L.Hawley@computer.org> > wrote:
:> > I’m trying to run Samba which requires the large stack. When I
:> > edit:
:
:> > /etc/system/enum/include/net
:
:> > and remove the t from -dttcpip and reboot, routing no longer
:> > works.
:
:> > I’m running the devn-el900.so driver and using dhcp. phlip
:> > shows the correct entries for route and nameserver and my local
:> > network is still accessible. netstat returns the no namelist error
:> > as if the small stack is running.
:
:> The “netstat” is missed it’s “set uid” bit, so you have to be
:> super user to run it. (su, or login root).

: OK, that helps for netstat, but what do I need to do to get routing
: to work with the large stack?

What’s the problem?

You can use:

  • ‘netstat -rn’ to view the routing table.
  • the ‘route’ utility to add / delete routes?

-seanb


David L. Hawley D.L. Hawley and Associates

David Hawley <David.L.Hawley@computer.org> wrote:

I still cannot get routing to work by simply editing:
/etc/system/enum/include/net

to:
all
set(IONET_CMD, io-net -ptcpip)

So as a hack, I’m using the following rc.local

slay -f io-net fs-nfs2 inetd dhcp.client
io-net -del900 -ptcpip
sleep 2
dhcp.client -h shadow -i en0 -d
sleep 5
mount -Tio-net /lib/dll/npm-qnet.so
fs-nfs2
/usr/sbin/inetd

If I do not use the sleeps, then dhcp.client runs ready and /net
ends up with an entry that contains non-asci characters.

instead of “sleep 2”, “on -w /dev/socket -W 30” will be more reliable,
instead of “sleep 5”, if_up could be used.

On a second box with the small stack, I just mount qnet in rc.local and end up with 2 entries in net for that name on shadow. ie:
/home/dlh> ls /net
dave dave. shadow

on dave, I end up with dave. and shadow entries.

The entry “dave” and “shadow” showes this 2 box have same domain,
the entry “dave.” showes a machine called “dave” with no (NULL) domain.

I also tried adding -pqnet to the enum/include/net file. That seem
to cause the system to hang requiring a reset.

No. put “mount …” in rc.local is recommanded.

-xtang@qnx.com

The enum stuff, seems to almost work, but is a real pain in the neck when it fails.

Dave

Previously, Sean Boudreau wrote in qdn.public.qnxrtp.installation:
David Hawley <> David.L.Hawley@computer.org> > wrote:
: Previously, Xiaodan Tang wrote in qdn.public.qnxrtp.installation:
:> David Hawley <> David.L.Hawley@computer.org> > wrote:
:> > I’m trying to run Samba which requires the large stack. When I
:> > edit:
:
:> > /etc/system/enum/include/net
:
:> > and remove the t from -dttcpip and reboot, routing no longer
:> > works.
:
:> > I’m running the devn-el900.so driver and using dhcp. phlip
:> > shows the correct entries for route and nameserver and my local
:> > network is still accessible. netstat returns the no namelist error
:> > as if the small stack is running.
:
:> The “netstat” is missed it’s “set uid” bit, so you have to be
:> super user to run it. (su, or login root).

: OK, that helps for netstat, but what do I need to do to get routing
: to work with the large stack?

What’s the problem?

You can use:

  • ‘netstat -rn’ to view the routing table.
  • the ‘route’ utility to add / delete routes?

-seanb

\

David L. Hawley D.L. Hawley and Associates

Xiaodan Tang <xtang@qnx.com> wrote:

David Hawley <> David.L.Hawley@computer.org> > wrote:
I still cannot get routing to work by simply editing:
/etc/system/enum/include/net

to:
all
set(IONET_CMD, io-net -ptcpip)

Oh, forgot this. So what is the problem ? You can’t ping
some IP on local network? you can ping IP over internet?
You can’t resolve a name?

netstat -nr should give you a clue, and at least put “route add …”
in rc.local should solve any “routing problem”.

-xtang

So as a hack, I’m using the following rc.local

slay -f io-net fs-nfs2 inetd dhcp.client
io-net -del900 -ptcpip
sleep 2
dhcp.client -h shadow -i en0 -d
sleep 5
mount -Tio-net /lib/dll/npm-qnet.so
fs-nfs2
/usr/sbin/inetd

If I do not use the sleeps, then dhcp.client runs ready and /net
ends up with an entry that contains non-asci characters.

instead of “sleep 2”, “on -w /dev/socket -W 30” will be more reliable,
instead of “sleep 5”, if_up could be used.

On a second box with the small stack, I just mount qnet in rc.local and end up with 2 entries in net for that name on shadow. ie:
/home/dlh> ls /net
dave dave. shadow

on dave, I end up with dave. and shadow entries.

The entry “dave” and “shadow” showes this 2 box have same domain,
the entry “dave.” showes a machine called “dave” with no (NULL) domain.

I also tried adding -pqnet to the enum/include/net file. That seem
to cause the system to hang requiring a reset.

No. put “mount …” in rc.local is recommanded.

xtang@qnx.com

The enum stuff, seems to almost work, but is a real pain in the neck when it fails.

Dave

Previously, Sean Boudreau wrote in qdn.public.qnxrtp.installation:
David Hawley <> David.L.Hawley@computer.org> > wrote:
: Previously, Xiaodan Tang wrote in qdn.public.qnxrtp.installation:
:> David Hawley <> David.L.Hawley@computer.org> > wrote:
:> > I’m trying to run Samba which requires the large stack. When I
:> > edit:
:
:> > /etc/system/enum/include/net
:
:> > and remove the t from -dttcpip and reboot, routing no longer
:> > works.
:
:> > I’m running the devn-el900.so driver and using dhcp. phlip
:> > shows the correct entries for route and nameserver and my local
:> > network is still accessible. netstat returns the no namelist error
:> > as if the small stack is running.
:
:> The “netstat” is missed it’s “set uid” bit, so you have to be
:> super user to run it. (su, or login root).

: OK, that helps for netstat, but what do I need to do to get routing
: to work with the large stack?

What’s the problem?

You can use:

  • ‘netstat -rn’ to view the routing table.
  • the ‘route’ utility to add / delete routes?

-seanb

\

David L. Hawley D.L. Hawley and Associates

Previously, Xiaodan Tang wrote in qdn.public.qnxrtp.installation:

Xiaodan Tang <> xtang@qnx.com> > wrote:
David Hawley <> David.L.Hawley@computer.org> > wrote:
I still cannot get routing to work by simply editing:
/etc/system/enum/include/net

to:
all
set(IONET_CMD, io-net -ptcpip)

Oh, forgot this. So what is the problem ? You can’t ping
some IP on local network? you can ping IP over internet?
You can’t resolve a name?

I can ping the local net fine, routing is not working to the outside.
Here’s netstat -rn:

netstat -rn

Routing tables

Internet:
Destination Gateway Flags Refs Use Mtu Interface
default 192.168.1.1 UG 0 2 - lo0
127.0.0.1 127.0.0.1 UH 2 135 - lo0
192.168.1 192.168.1.100 U 0 3 - en0
192.168.1.100 192.168.1.100 UH 0 4 - lo0

As you can see the default has interface lo0 instead of en0. Why is
this? (Here I have removed my rc.local and am using the net file above).


netstat -nr should give you a clue, and at least put “route add …”
in rc.local should solve any “routing problem”.

It seems to me that dhcp should do this properly. If I modify rc.local, I want it to be pretty generic.

Also, in rc.local you suggest using if_up before mounting qnet. I’m being somewhat dense here - what interface should I wait for in if_up?


Thanks,
Dave

-xtang

So as a hack, I’m using the following rc.local

slay -f io-net fs-nfs2 inetd dhcp.client
io-net -del900 -ptcpip
sleep 2
dhcp.client -h shadow -i en0 -d
sleep 5
mount -Tio-net /lib/dll/npm-qnet.so
fs-nfs2
/usr/sbin/inetd

If I do not use the sleeps, then dhcp.client runs ready and /net
ends up with an entry that contains non-asci characters.

instead of “sleep 2”, “on -w /dev/socket -W 30” will be more reliable,
instead of “sleep 5”, if_up could be used.

On a second box with the small stack, I just mount qnet in rc.local and end up with 2 entries in net for that name on shadow. ie:

/home/dlh> ls /net
dave dave. shadow

on dave, I end up with dave. and shadow entries.

The entry “dave” and “shadow” showes this 2 box have same domain,
the entry “dave.” showes a machine called “dave” with no (NULL) domain.


David L. Hawley D.L. Hawley and Associates

OK,

I’m finally figuring out some things. The problems:

  1. Changing to use the large stack (and DHCP) by editing
    /etc/system/enum/include/net
    leaves me with an incorrect routing table default entry

WHY?

  1. There are some timing issues WRT starting qnet.

My solutions:

1.a. To use large tcp stack, edit /etc/system/enum/include/net
to read:

all
set(IONET_CMD, io-net -ptcpip)

  • tiny stack has 2 t’s

b. in /etc/rc.d/rc.local

if_up en0 # wait till en0 has an address
route change default 192.168.1.1 # point to cable router.


2. It’s a good idea to wait for en0 to be configured before mounting
qnet. So do it after an if_up en0 in rc.local as in:

if_up en0
mount -Tio-net /lib/dll/npm-qnet.so

It seems to me that the need to do a route change is a bug somewhere in dhcp.client.

I’m also confused about the example use of if_up dnix in the help section describing dhcp.client

io-net -dne2000 -pttcpip
waitfor /dev/socket
dhcp.client &
if_up ndix

I think that this should read:

io-net -dne2000 -pttcpip
on -w /dev/socket -W30 dhcp.client
if_up en0

since waitfor appears to be a shell function (OK, it probably is
OK for an example boot script)

I don’t think that dnix is an RTP interface - and the if_up command
would only be needed if something else follows in the script. So it’s a poor example of if_up usage.


Previously, David Hawley wrote in qdn.public.qnxrtp.installation:

Previously, Xiaodan Tang wrote in qdn.public.qnxrtp.installation:
Xiaodan Tang <> xtang@qnx.com> > wrote:
David Hawley <> David.L.Hawley@computer.org> > wrote:
I still cannot get routing to work by simply editing:
/etc/system/enum/include/net

to:
all
set(IONET_CMD, io-net -ptcpip)

Oh, forgot this. So what is the problem ? You can’t ping
some IP on local network? you can ping IP over internet?
You can’t resolve a name?

I can ping the local net fine, routing is not working to the outside.
Here’s netstat -rn:

netstat -rn

Routing tables

Internet:
Destination Gateway Flags Refs Use Mtu Interface
default 192.168.1.1 UG 0 2 - lo0
127.0.0.1 127.0.0.1 UH 2 135 - lo0
192.168.1 192.168.1.100 U 0 3 - en0
192.168.1.100 192.168.1.100 UH 0 4 - lo0

As you can see the default has interface lo0 instead of en0. Why is
this? (Here I have removed my rc.local and am using the net file above).


netstat -nr should give you a clue, and at least put “route add …”
in rc.local should solve any “routing problem”.

It seems to me that dhcp should do this properly. If I modify rc.local, I want it to be pretty generic.

Also, in rc.local you suggest using if_up before mounting qnet. I’m being somewhat dense here - what interface should I wait for in if_up?


Thanks,
Dave


-xtang

So as a hack, I’m using the following rc.local

slay -f io-net fs-nfs2 inetd dhcp.client
io-net -del900 -ptcpip
sleep 2
dhcp.client -h shadow -i en0 -d
sleep 5
mount -Tio-net /lib/dll/npm-qnet.so
fs-nfs2
/usr/sbin/inetd

If I do not use the sleeps, then dhcp.client runs ready and /net
ends up with an entry that contains non-asci characters.

instead of “sleep 2”, “on -w /dev/socket -W 30” will be more reliable,
instead of “sleep 5”, if_up could be used.

On a second box with the small stack, I just mount qnet in rc.local and end up with 2 entries in net for that name on shadow. ie:

/home/dlh> ls /net
dave dave. shadow

on dave, I end up with dave. and shadow entries.

The entry “dave” and “shadow” showes this 2 box have same domain,
the entry “dave.” showes a machine called “dave” with no (NULL) domain.

\

David L. Hawley D.L. Hawley and Associates


David L. Hawley D.L. Hawley and Associates

This default route to localhost prob should be fixed in the next patch.

-seanb

David Hawley <David.L.Hawley@computer.org> wrote:
: I can ping the local net fine, routing is not working to the outside.
: Here’s netstat -rn:

: # netstat -rn
: Routing tables

: Internet:
: Destination Gateway Flags Refs Use Mtu Interface
: default 192.168.1.1 UG 0 2 - lo0
: 127.0.0.1 127.0.0.1 UH 2 135 - lo0
: 192.168.1 192.168.1.100 U 0 3 - en0
: 192.168.1.100 192.168.1.100 UH 0 4 - lo0

: As you can see the default has interface lo0 instead of en0. Why is
: this? (Here I have removed my rc.local and am using the net file above).