This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: ECOS:Incorrect default gateway entry - Free BSD
- From: Andrew Lunn <andrew at lunn dot ch>
- To: Alok Singh <aloks at broadcom dot com>
- Cc: ecos-discuss at ecos dot sourceware dot org
- Date: Tue, 24 Jul 2007 08:39:30 +0200
- Subject: Re: [ECOS] ECOS:Incorrect default gateway entry - Free BSD
- References: <FE7FB54DCB7C6949A1D3F9FF22DA6C136D5DB9@lvl7in-mail01.lvl7.com>
On Tue, Jul 24, 2007 at 03:50:35AM +0530, Alok Singh wrote:
> Hi,
>
> I'm trying to add the default gateway entry. I'm not able to
> ping(access) the box from a different subnet. The dump of
> "show_network_tables" is showing junk mask value. This may be the reason
> why I'm not able to ping the
> Box from a different subnet.
>
> Interestingly, when I'm configuring the default gateway entry to
> 255.255.255.255, to enable DHCP client to send packets out, I'm not
> getting any error. I'm able to get the address.
>
> Dump when gateway is 255.255.255.255 -
This is not a valid host IP address. It is a broadcast address.
Try giving your gateway the IP address 192.168.0.1 and your target
192.168.0.2. Give both a netmask for 255.255.255.0.
Andrew
> ***************
> Destination Gateway Mask Flags Interface
>
> 0.0.0.0 0.0.0.0 -1.0.0.0 U eth0
^^
Im supprised you are getting -1 here. Obviously it should be
255. However, i would expect it to be printed correctly. What eCos
sources and gcc are you using?
> 0.0.0.0 255.255.255.255 0.0.0.0 UG eth0
>
> Interface statistics
>
> eth0 IP: 0.0.0.0, Broadcast: 255.255.255.255, Netmask: -1.0.0.0
>
> UP BROADCAST RUNNING MULTICAST MTU: 1500, Metric: 0
>
> Rx - Packets: 0, Bytes: 0, Tx - Packets: 0, Bytes: 0
>
> lo0 IP: 127.0.0.1, Broadcast: 127.0.0.1, Netmask: -1.0.0.0
>
> UP LOOPBACK RUNNING MULTICAST MTU: 16384, Metric: 0
>
> Rx - Packets: 0, Bytes: 0, Tx - Packets: 0, Bytes: 0
>
> *************************************
>
> After getting the DHCP address, I do a cyg_route_reinit(), and then
> configure the stack again.
>
> After route_reinit(), dump is -
> ***************
> Destination Gateway Mask Flags Interface
>
> Interface statistics
>
> eth0 IP: 0.0.0.0, Broadcast: 255.255.255.255, Netmask: -1.0.0.0
>
> UP BROADCAST RUNNING MULTICAST MTU: 1500, Metric: 0
>
> Rx - Packets: 6, Bytes: 1800, Tx - Packets: 4, Bytes: 1144
>
> lo0 IP: 127.0.0.1, Broadcast: 127.0.0.1, Netmask: -1.0.0.0
>
> UP LOOPBACK RUNNING MULTICAST MTU: 16384, Metric: 0
>
> Rx - Packets: 0, Bytes: 0, Tx - Packets: 0, Bytes: 0
> *****************
>
> After configuring the gateway,
> *************************
> Destination Gateway Mask Flags Interface
>
> 0.0.0.0 10.240.3.1 0.0.0.0.0.0.0.3.0.0.0.1 UG eth0
^^^^^^^^^^^^^^^^^^^^^^^
This looks very strange. Why so many bytes?
Andrew
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss