Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Help! Cannot access vxworks from another network

541 views
Skip to first unread message

Joe Georger

unread,
Feb 27, 2002, 2:42:57 PM2/27/02
to
I've got a MVME 2100 running VxWorks 5.4 BSP 1.2/1. The problem is that the
VxWorks board is on one subnet and my development pc is on another. I've
set up the boot parameters to what should work, but doesn't.

I've set up the VxWorks board as follows:
e = 155.34.103.42
h = 155.34.103.41
g = 155.34.103.1

My development pc is 155.34.99.99. I cannot ping the VxWorks board from
this pc, but I can ping it from the host pc. I can ping the host pc from my
devel pc. I can ping my devel pc from the host pc. So I know the network
is working.

Strangely enough, we are also using another VxWorks-based board created by
VMetro. I am having the same problem with it. Of course I attributed it to
VMetro's software, which I cannot change.

Any ideas?

Thanks,
Joe


david lindauer

unread,
Feb 27, 2002, 3:56:27 PM2/27/02
to

Joe Georger wrote:

do you need a routing table entry?

David

>
> Thanks,
> Joe

Joe Georger

unread,
Feb 27, 2002, 4:11:49 PM2/27/02
to
> do you need a routing table entry?
>
I wouldn't think so. Isn't that what the gateway entry is for? To tell the
machine this is where you send packets destined for other networks..... The
only time I've had to mess with adding routes (on workstations) is when I
have more than one gateway on my subnet. I've never messed with it on
VxWorks and this is my first attempt at accessing it from a different
subnet.

Joe

doug dotson

unread,
Feb 27, 2002, 5:00:44 PM2/27/02
to
I had to turn on IP Forwarding on my host.

doug

"Joe Georger" <jgeo...@ll.mit.edu> wrote in message
news:kUbf8.70$Sk3....@llslave.llan.ll.mit.edu...

Tim Shaw

unread,
Feb 27, 2002, 9:04:40 PM2/27/02
to
Have you set up an entry in your development PC's route table. Although the
gateway is specified at the boot prompt, the PC has to know how to get back to
the vxWorks machine. If you haven't try adding the following at a DOS prompt on
the development PC:

route ADD 155.34.103.0 MASK 255.255.255.0 <gateway> METRIC 2 IF 1

where <gateway> is the IP address of your hostname on your 155.34.99.0 network.

To be honest, I'd be surprised if there were errors in the vmetro software, as
I've always found their software excellent.

Joe Georger

unread,
Feb 28, 2002, 8:03:01 AM2/28/02
to
> Have you set up an entry in your development PC's route table. Although
the
> gateway is specified at the boot prompt, the PC has to know how to get
back to
> the vxWorks machine. If you haven't try adding the following at a DOS
prompt on
> the development PC:
>
> route ADD 155.34.103.0 MASK 255.255.255.0 <gateway> METRIC 2 IF 1
>
> where <gateway> is the IP address of your hostname on your 155.34.99.0
network.
>
The gateway on my development pc is 155.34.99.1. I have no trouble pinging
the host pc (155.34.103.41) on the 103 subnet. Therefore I would think that
I should be able to ping the VxWorks board as well. Unless I am missing
some nuance of networking....

> To be honest, I'd be surprised if there were errors in the vmetro
software, as
> I've always found their software excellent.

Well, we've encountered a number of files limit of 248 on their mdr
software, which is just plain inexcusable when several hundred gigabyte
raids are commonly available. We've also encountered a limit of 10 mdr-220
boards that can be used in 1 cage with their midas-120 gateway and
shared-memory networking. They have since recitified the situation, but
having such low, fixed numbers in software is pretty bad. I suppose these
are minor annoyances, since their software is stable.

Thanks,
Joe

Joe Georger

unread,
Feb 28, 2002, 8:08:08 AM2/28/02
to
> I had to turn on IP Forwarding on my host.
>
> doug

My host is a WinNT machine. I'm not even sure this is an option. Our
gateway on that subnet is a router. The only reason the host pc is even
down there on the same subnet was for VxWorks to ftp and boot off of. And I
was going to switch that over to my development pc....

Thanks,
Joe

John

unread,
Feb 28, 2002, 10:33:13 AM2/28/02
to
Hello all,

"Joe Georger" <jgeo...@ll.mit.edu> wrote in message news:<kUbf8.70$Sk3....@llslave.llan.ll.mit.edu>...

> > do you need a routing table entry?
> >
> I wouldn't think so. Isn't that what the gateway entry is for? To tell the
> machine this is where you send packets destined for other networks.....

No, the gateway in the bootline tells the target where to send packets
destined for the host. It does not add a default route.

Try adding the following somewhere in the target's init sequence (or
you can type it at the target shell if you have that installed):

routeAdd ("0", "155.34.103.1")

That should get you a default route pointing at your router OK.

HTH,

John...

Joe Georger

unread,
Feb 28, 2002, 10:55:28 AM2/28/02
to
> No, the gateway in the bootline tells the target where to send packets
> destined for the host. It does not add a default route.
>
> Try adding the following somewhere in the target's init sequence (or
> you can type it at the target shell if you have that installed):
>
> routeAdd ("0", "155.34.103.1")
>
> That should get you a default route pointing at your router OK.
>
> HTH,
>
> John...

John,

You are on the right track I believe. I've been doing a little more
digging, searching the old archives, and from over 2 years ago I think I
found the answer. It looks like VxWorks only adds a route to the host's
subnet. So there is no route for packets destined for other networks. This
makes very little sense to me.

What this means is that if I chose my 155.34.99.99 pc as my host (with the
VxWorks board being 155.34.103.42 and it's gateway being 155.34.103.1), then
VxWorks would only set up a route to the 155.34.103.0 network, but no other.
The apparent solution is to modify the bootConfig.c file with the routeAdd
command above and build a new bootrom. It has also been suggested to modify
the usrNetwork.c file, but I am not sure where that file is used (if anyone
could help me out here that would be great!). So I am currently building a
new bootrom and let everyone know what happens after I flash it.

Thanks,
Joe

David Laight

unread,
Feb 28, 2002, 11:06:25 AM2/28/02
to
Joe Georger wrote:


I call the vxWorks code broken. It is possible to have a system where
the 'boot' host isn't found using the default route. But those systems
have hand crafted IP routing and people who understand what they are
doing.


I changed the code in usrNetwork.c to make the 'gateway' parameter
be the default route. I didn't bother with network booting (target was
going to be standalone), so dunno what the boot roms do. Hoever they
probably only need to talk to the subnet that contains the boot host...

David

Dave Korn

unread,
Feb 28, 2002, 11:18:59 AM2/28/02
to
"Joe Georger" <jgeo...@ll.mit.edu> wrote in message
news:4Qpf8.71$Sk3....@llslave.llan.ll.mit.edu...

> > Have you set up an entry in your development PC's route table. Although
> the
> > gateway is specified at the boot prompt, the PC has to know how to get
> back to
> > the vxWorks machine. If you haven't try adding the following at a DOS
> prompt on
> > the development PC:
> >
> > route ADD 155.34.103.0 MASK 255.255.255.0 <gateway> METRIC 2 IF 1
> >
> > where <gateway> is the IP address of your hostname on your 155.34.99.0
> network.
> >
> The gateway on my development pc is 155.34.99.1. I have no trouble
pinging
> the host pc (155.34.103.41) on the 103 subnet. Therefore I would think
that
> I should be able to ping the VxWorks board as well. Unless I am missing
> some nuance of networking....

You're going to have to draw an ascii-art diagram of the subnets, showing
the two pcs, the gateway, and the vxworks target, I think...

DaveK
--
moderator of
alt.talk.rec.soc.biz.news.comp.humanities.meow.misc.moderated.meow
Burn your ID card! http://www.optional-identity.org.uk/
Help support the campaign, copy this into your .sig!
Proud Member of the Exclusive "I have been plonked by Davee because he
thinks I'm interesting" List Member #<insert number here>
Master of Many Meowing Minions
Holder of the exhalted PF Chang's Crab Wonton Award for kook spankage above
and beyond the call of hilarity.


Tim Shaw

unread,
Feb 28, 2002, 7:46:10 PM2/28/02
to
Great suggestion Dave, here's my guess:


vx Target PC host
155.34.103.42 155.34.103.41
|__________________|_____________________ 155.34.103.0 net
|
|
155.34.103.1
Gateway (PC?)
155.34.99.XX
|
__________________________________|_____ 155.34.99.0 net
|
155.34.99.99
dev PC


So the vxWorks targets needs to have the following:
routeNetAdd "155.34.99.0", "155.34.103.1"
which tells it to use the gateway to get to the 155.34.99.0 network.

Then on the development PC, you need to add the route:


route ADD 155.34.103.0 MASK 255.255.255.0 <gateway> METRIC 2 IF 1

which you obviously have done if you can ping the 155.34.103.41 host.

Joe Georger

unread,
Mar 1, 2002, 9:28:04 AM3/1/02
to
Tim,

Your diagram is accurate. The 155.34.103.1 gateway is a router (I don't
have access to it, though). My development pc has a default gateway of
155.34.99.1 (another router). Therefore I didn't need to add a route to
access the 155.34.103.0 network. I have been searching thru this
newsgroup's archives and came across the following:

You have to set the default route, period. The way I did it was to modify
usrNetwork.c and add the following line to usrNetInit()

if (params.gad[0] != EOS) routeAdd("0.0.0.0", params.gad);

The nice thing about doing it this way is your default route will always
be to the gateway you enter at the boot prompt, so if you ever change that
the default route will automatically follow.

And this:

This is a very old issue - in both bootConfig.c and usrNetwork.c, routeAdd()
is called to install a default gateway, but the destination network is the
same subnet on which the Host is located. This code, as shipped, only good
for
VME bp/sm networks - it works for the CPU which is connected only to the VME
network, and helps it conenct to the Host via the VME/Ethernet gateway.

It has been suggested several times to change this statement to add
"0.0.0.0"
as destination, making the default gateway function in all cases (including
the VME network special case), but the suggestion was not incorporated into
the product. I beleive that I have filed a TSR about this back in 1991, when
I
worked for Applied Materials Inc.

The only and the most elegant fix is to change the routeAdd() statement in
bootCOnfig.c, usrNetwork.c to be:

routeAdd("0.0.0.0", params.gad);

I did change these files as recommended above. AFAIK the bootConfig.c file
is used in compiling the bootrom, so I did that and reflashed my board.
That didn't work. I figured that the bootrom code is superseded by the
VxWorks image....

I also changed userNetwork.c, but when I rebuilt my VxWorks image, I don't
think that file was used?? In any event, that didn't work either. Is this
a viable idea? It sure seems like it should work....

Thanks,
Joe

"Tim Shaw" <Tim....@dsto.defence.gov.au> wrote in message
news:3C7ECF52...@dsto.defence.gov.au...

david lindauer

unread,
Mar 1, 2002, 10:17:42 AM3/1/02
to
when we first caught on that we needed a route, we tried adding it in
usrAppInit(), figuring that the network would be available by then. (but I don't
know the initialization sequence exactly so that whole idea may have been for
the birds). That didn't work so we defered the routeAdd() until kernel
initialization was complete (e.g. in a user level task). As the code is written
we actually wait for serial port communications to commence before doing the
routeAdd(), and I don't know if you can make it work without some sort of delay
or not. It is something we didn't look into deeply, we just wanted it to work
and had to get on with development.

David

Joe Georger

unread,
Mar 5, 2002, 8:33:33 AM3/5/02
to
After going back and forth with WindRiver tech support, the problem has
mostly been solved. David was right, the solution is putting the routeAdd
command in the usrAppInit.c file. This pertains to projects built using
Tornado. If you were building from the command line, then what I posted
previously, namely putting the routeAdd command in usrNetwork.c.

The only problem in putting the routeAdd command in usrAppInit is that I was
forced to enter a hardcoded gateway string. The variable params.gad (which
is the gateway entered in the boot parameters) is not in scope for this file
apparently. I've asked WindRiver this and am awaiting a response. I don't
feel like messing with it anymore - I have to get on with my real work.

I should mention an alternative solution - putting the routeAdd command in a
startup script. That would work as well.

Joe

"david lindauer" <dlin...@notifier-is.net> wrote in message
news:3C7F9B96...@notifier-is.net...

Michael Lawnick

unread,
Mar 5, 2002, 9:28:15 AM3/5/02
to
Hi Joe,
you wrote
<snip>

>The variable params.gad (which
> is the gateway entered in the boot parameters) is not in scope for this
file
> apparently.
<snip>
Why don't bring into scope with sysNvRamGet() and bootStringToStruct() ?
A glance into bootConfig.c sometimes brings up some surprising easy
solutions ;-)

HTH
--
Mit freundlichen Grüßen,
Michael Lawnick
==============================================
SOFTEC GmbH Tel +49-731-96600-0
Promenade 17 Fax +49-731-96600-23
D-89073 Ulm Michael Lawnick
Germany law...@softec.de
==============================================

"Joe Georger" <jgeo...@ll.mit.edu> schrieb im Newsbeitrag
news:HK3h8.83$Sk3....@llslave.llan.ll.mit.edu...

Joe Georger

unread,
Mar 6, 2002, 9:31:26 AM3/6/02
to
I think I finally nailed everything I wanted to. (To summarize I wanted the
bootline gateway to be the default gateway to other networks, and I wanted
to do this using Tornado). Thanks to a suggestion by Michael Lawnick I
pilfered some code from the bootConfig.c file and threw it into
usrAppInit.c. This was to get the gateway from the bootline.... The system
now works the way it should from the factory. Here is an excerpt of my
code:

#include "vxWorks.h"
#include "bootLib.h"
#include "prjParams.h"

void usrAppInit (void)
{
BOOT_PARAMS params;

#ifdef USER_APPL_INIT
USER_APPL_INIT; /* for backwards compatibility */
#endif
/* add application specific code here */
bootStringToStruct (BOOT_LINE_ADRS, &params);
if ((sysNvRamGet (BOOT_LINE_ADRS, BOOT_LINE_SIZE, 0) == ERROR) ||
(*BOOT_LINE_ADRS == EOS))
{
/* either no non-volatile RAM or empty boot line */
printf("Adding hardwired gateway\n");
routeAdd ("0.0.0.0", "155.34.103.1");
}
else {
printf("Adding gateway %s from bootline\n", params.gad);
routeAdd("0.0.0.0", params.gad);
}
}


Michael

unread,
Mar 7, 2002, 4:57:26 AM3/7/02
to
The default gateway ("0.0.0.0") does not solve case when we want to
access VxWorks target from two (or more) different networks
simultaneously.
Let's see the following configuration:


________________________________________ 11.0.x.x net
|
11.0.7.22
Pc Host Gateway ...
10.0.1.244 10.0.6.52 ...
|__________________|_____________________ 10.0.x.x net
|
| <-- Ethernen
|
10.0.7.46
VxWorks Target
62.90.13.177
|
| <-- Dial UP Networking PPP
connection
|
62.90.13.178
Gateway (WindowsNT Workstation)
169.254.0.1
|
__________________________________|_____ 169.254.x.x net
|
169.254.0.2
Pc host

To connect Ethrnet interface I have to call on target
routeAdd("0.0.0.0", "10.0.7.46");

And in order to connect to Dial Up Networking interface I have to call
on target
routeAdd("0.0.0.0", "169.254.0.1");

But VxWorks does not allow to have 2 defaults gateways (WindowsNT
allows several default gateways).

In most cases we don't know the gateway IP addresses and we need two
default gateways.
So the only way (?) is to use dynamical routing algorithms. I added
RIP component in Tornado and RIP (version1) started to run on target.
Then I added RIP service on Gateway WindowsNT 62.90.13.178 and added
gateway entry in route table on 169.254.0.2 PC host:
"route add 62.90.13.0 mask 255.255.255.0 169.254.0.1".
It does not help.

May be somebody know how to access VxWorks target from two different
networks?

Thanks,
Michael


"Joe Georger" <jgeo...@ll.mit.edu> wrote in message news:<P9Mf8.78$Sk3....@llslave.llan.ll.mit.edu>...

David Laight

unread,
Mar 7, 2002, 6:57:31 AM3/7/02
to
Michael wrote:


Generally you can only have 1 default gateway. Otherwise how do you
select it - it is the DEFAULT, the one used when there isn't a
specific gateway.


With the above, you need to specify 10.0.6.52 as the gateway to

11.x.x.x network and 62.90.13.178 for the 169.254.x.x network.

The default route is used for you route out to the great wide
outdooes (the rest of the web).

David


Michael

unread,
Mar 10, 2002, 3:59:14 AM3/10/02
to
Both nets (11.0.x.x and 169.254.x.x) could be connected to other
routers so we need something like default gateways. If two default
gateways can not exists, may be RIP (or another protocol?) could be
used to add dynamically entries to the router table? I tried RIP (see
my previous letter) without success.
Is it possible to use RIP for the purpose?


David Laight <da...@spamm.me.l8s.co.uk> wrote in message news:<3C875618...@spamm.me.l8s.co.uk>...

0 new messages