[ECOS] Set route to interface

Gary Thomas gary@mlbassoc.com
Tue Dec 31 01:01:00 GMT 2002


On Mon, 2002-12-30 at 10:35, Roland Caßebohm wrote:
> On Montag, 30. Dezember 2002 18:26, Gary Thomas wrote:
> > > I have althought tried it with netmask 255.255.255.0 instead of
> > > 255.255.255.255. Then it works. The routing table looks as follows:
> > >
> > > Routing tables
> > > Destination     Gateway         Mask            Flags    Interface
> > > 127.0.0.0       127.0.0.1       255.0.0.0       UG       lo0
> > > 192.168.1.0     192.168.1.0     255.255.255.0   U        eth0
> > > 192.168.50.0    192.168.50.0    255.255.255.0   U        eth0
> >
> > Indeed, the BSD networking code really only likes routes via networks.
> >
> > > But this is not realy what I want, I want somthing like this:
> >
> > Why?  What's wrong with the above routing?
> I have written a server, who get a broadcast message from a host, which is 
> searching it. In my case it could be possible, that the server is wrong 
> configured so that it is in the wrong network. But it should answer to the 
> broadcast message, that the host knows the server is there. I thought I could 
> only set a route to this host and don't change anything else.
> But I think it ist o.k. like this.
> 
> Thank you for your help,
> 
> Roland
> 
> >
> > > Routing tables
> > > Destination     Gateway         Mask            Flags    Interface
> > > 127.0.0.0       127.0.0.1       255.0.0.0       UG       lo0
> > > 192.168.1.30    192.168.1.30    255.255.255.255 U        eth0
> > > 192.168.50.0    192.168.50.0    255.255.255.0   U        eth0
> > >
> 

The reason I asked is that the routing table mostly tells the stack
which "wire" to send a packet via and, if there is a gateway between
the source and the destination, which gateway to use.  Since I am
assuming that 192.168.1.30 and 192.168.5.100 are on the same "wire",
all you really need is to indicate that the network 192.168.1.0 is
also available directly on that wire, which is what has been done.

-- 
------------------------------------------------------------
Gary Thomas                 |
MLB Associates              |  Consulting for the
+1 (970) 229-1963           |    Embedded world
http://www.mlbassoc.com/    |
email: <gary@mlbassoc.com>  |
gpg: http://www.chez-thomas.org/gary/gpg_key.asc
------------------------------------------------------------


--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss



More information about the Ecos-discuss mailing list