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
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.
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
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...
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
> 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 ===