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

problem with adding this route

616 views
Skip to first unread message

John Chan

unread,
May 13, 2003, 10:44:40 PM5/13/03
to
vxworks 5.4 -- -- PC
192.168.10.1 192.168.11.1

Vxworks KERNAL ROUTE TABLE
----------------------------------------------------------------------------
Destination Netmask Gateway Flags RefCnt Use Inf
----------------------------------------------------------------------------
127.0.0.1 255.255.255.255 127.0.0.1 5 0 0 lo0
192.168.11.1 255.255.255.255 192.168.10.1 101 0 0 cpm0
192.168.10.0 255.255.255.0 192.168.10.1 101 0 0 cpm0
255.255.255.0 255.255.255.0 192.168.10.1 101 0 0 cpm0
----------------------------------------------------------------------------

In above configuration we would like to add route

0.0.0.0 mask 0.0.0.0 gateway 192.168.11.1

we use

mRouteAdd("0.0.0.0","192.168.11.1",0,0,0,0)

or

mRouteEntryAdd("0.0.0.0","192.168.11.1",0,0,0,0,0)

,both these return ERROR.


how can I do?


--
Best Regards,
John Chen
----------------------------------------------
Communication Products D&R Dept.,
Fujian Start Network Technology Co.,Ltd.
Tel: +86-591-3703333ext8229
Email: che...@i-net.com.cn

Luc

unread,
May 14, 2003, 9:21:45 AM5/14/03
to
John,
the 2 addresses are not in the same subnet! That's why you cannot
add the route. Your VxWorks machine is on subnet 192.168.10.0 while
your PC is on subnet 192.168.11.0.

Configure your VxWorks machine to be on the same subnet as your PC
(192.168.11.something) and it should work!


Luc

Luc Tremblay
TiL Solutions Inc.
Consulting services in the embedded/real-time/telecom arena.

Junichiro Hamaguchi

unread,
May 14, 2003, 6:09:09 PM5/14/03
to VxWorks Users Group List
>John,
> the 2 addresses are not in the same subnet! That's why you cannot
>add the route. Your VxWorks machine is on subnet 192.168.10.0 while
>your PC is on subnet 192.168.11.0.
>
> Configure your VxWorks machine to be on the same subnet as your PC
>(192.168.11.something) and it should work!

Just for RFC sake...

Fisrt off, vxWorks supports CIDR.

Although the Class C private subnet 192.168.0.0-192.168.255.255
defines subnet mask to be 255.255.255.0, CIDR applies its rule
over this subnet mask rule. So, you can set different subnet mask
to your private network 192.168.x.x.

Thus, this is just a matter of subnetting. If you set /16 subnet mask,
those two nodes are on the same subnet. However, most of people
should stick to /24 subnet mask unless they have a valid reason to
change it.

-hama

John Chan

unread,
May 14, 2003, 10:02:09 PM5/14/03
to
C:\> route print


Active Routes:
Network Destination Netmask Gateway Interface
Metric

0.0.0.0 0.0.0.0 192.168.11.1
192.168.10.168 1
127.0.0.0 255.0.0.0 127.0.0.1
127.0.0.1 1
192.168.10.0 255.255.255.0 192.168.10.168 192.168.10.168
1
192.168.10.168 255.255.255.255 127.0.0.1 127.0.0.1
1
192.168.10.255 255.255.255.255 192.168.10.168 192.168.10.168
1
224.0.0.0 224.0.0.0 192.168.10.168
192.168.10.168 1
255.255.255.255 255.255.255.255 192.168.10.168 192.168.10.168
1
Default Gateway: 192.168.11.1
===========================================================================

In Windows system above, we can add gateway 192.168.11.1 which in the
different subnet
easily. How can I add gateway like this in vxworks5.4?


Best Regards,
John Chan


----------------------------------------------
Communication Products D&R Dept.,
Fujian Start Network Technology Co.,Ltd.
Tel: +86-591-3703333ext8229
Email: che...@i-net.com.cn


"Junichiro Hamaguchi" <ham...@sbcglobal.net>
??????:mailman.231.105295...@csg.lbl.gov...

John Chan

unread,
May 16, 2003, 2:44:42 AM5/16/03
to
vxworks 5.4 -- -- PC
192.168.10.168 192.168.11.1

Vxworks KERNAL ROUTE TABLE
----------------------------------------------------------------------------
Destination Netmask Gateway Flags RefCnt Use Inf
----------------------------------------------------------------------------
127.0.0.1 255.255.255.255 127.0.0.1 5 0 0 lo0

192.168.11.1 255.255.255.255 192.168.10.168 101 0 0 cpm0
192.168.10.0 255.255.255.0 192.168.10.168 101 0 0 cpm0
255.255.255.0 255.255.255.0 192.168.10.168 101 0 0 cpm0
----------------------------------------------------------------------------

In above configuration we would like to add route

0.0.0.0 mask 0.0.0.0 gateway 192.168.11.1

we use

mRouteAdd("0.0.0.0","192.168.11.1",0,0,0,0)

or

mRouteEntryAdd("0.0.0.0","192.168.11.1",0,0,0,0,0)

,both these return ERROR.


but in windows 9x or windows 2000, we can add this default gateway easily.

C:\> route print

===========================================================================


Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.11.1 192.168.10.168 1
127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1
192.168.10.0 255.255.255.0 192.168.10.168 192.168.10.168 1
192.168.10.168 255.255.255.255 127.0.0.1 127.0.0.1 1
192.168.10.255 255.255.255.255 192.168.10.168 192.168.10.168 1
224.0.0.0 224.0.0.0 192.168.10.168 192.168.10.168 1
255.255.255.255 255.255.255.255 192.168.10.168 192.168.10.168 1
Default Gateway: 192.168.11.1
===========================================================================


Best Regards,
John Chen


Johan Borkhuis

unread,
May 21, 2003, 7:55:37 AM5/21/03
to
"John Chan" <winde...@163.com> wrote:

> In Windows system above, we can add gateway 192.168.11.1 which in
> the different subnet easily. How can I add gateway like this in
> vxworks5.4?

That is a problem in VxWorks: you can only have a gateway that is within
your defined subnets. If you want to connect to an IP address outside of
your subnet you have to assign an extra IP address to this interface.

Kind regards,
Johan

--
o o o o o o o . . . _____________________________
o _____ || Johan Borkhuis |
.][__n_n_|DD[ ====_____ | JBor...@Proxim.com |
>(________|__|_[_________]_|__________________________|
_/oo OOOOO oo` ooo ooo 'o!o!o o!o!o`
=== VxWorks FAQ: http://www.xs4all.nl/~borkhuis/vxworks/vxworks.html ===

0 new messages