On Mit, 2008-04-30 at 14:11 +0200, Henning Rogge wrote:
> Am Mittwoch 30 April 2008 13:36:45 schrieben Sie:
[...]
> > Am Mittwoch 30 April 2008 13:07:16 schrieb Axel Neumann:
> > > For older olsrd versions there has been the "recommendation" to always use
> > > a different netmask for each olsr interface of a node.

Are you sure? I can't remember such a thing (or anything in that direction).

> > > My question is whether this recommendation still applies to the recent
> > > olsrd versions or if a new versions can also cope with a configuration like
> > > this: ath0 10.0.0.1/16, ath1 10.0.0.2/16, eth0 10.0.0.3/16
> > > Linux (and most likely windows) wont like this.

Are you sure?
I have since ages (<= 0.4.10):
----  snip  ----
{3}ip a show dev eth0
2: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 00:40:63:d8:1c:2c brd ff:ff:ff:ff:ff:ff
    inet 193.238.156.51/22 brd 193.238.159.255 scope global eth0
    inet6 fe80::240:63ff:fed8:1c2c/64 scope link 
       valid_lft forever preferred_lft forever
{4}ip a show dev tap0
7: tap0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 100
    link/ether 00:ff:bd:00:84:24 brd ff:ff:ff:ff:ff:ff
    inet 193.238.156.57/22 brd 193.238.159.255 scope global tap0
    inet6 fe80::2ff:bdff:fe00:8424/64 scope link 
       valid_lft forever preferred_lft forever
----  snip  ----

> > linux likes setsockopt(.., SO_BINDTODEVICE) which should do this.
> yes, but the routing would still not work.

It works with OLSR as there are host routes for all reachable IP
addresses. So the network routes only used for not-existing IP addresses
(where it is IMNSHO completely irrelevant via which interface the
not-existing IP address can't be reached).

> Imagine you have one interface with the netmask 10.0.0.1/16 and one with the 
> netmask 10.0.0.2/16.

In the cable world, both interfaces may be in the same broadcast domain
(e.g. connected to the same switch, no VLANs or similar).
Thus the above should work with any (reasonable) OS/device/IP-Stack.

> The kernel has a packet which has to be transfered to a node called 10.0.0.3. 
> How should the kernel determine what interface is to use ?

The kernel can use either one as there are routes etc.

What am I missing in this thread (apart from the fact that I ignored the
WLAN part and aspects. But from a pure layer 3 point of view, it should
work)?

	Bernd
-- 
Firmix Software GmbH                   http://www.firmix.at/
mobil: +43 664 4416156                 fax: +43 1 7890849-55
          Embedded Linux Development and Services




