Al:

Can you tell us WHY you want the kernel to use a lesser match?  By
design, it uses the route that matches the most bits.  You have an 8 bit
match on the eth0 route and a 24 bit match on the eth1 route.

If you want to change the way route decisions are made, you can create
your own routing tables and use policy routing to enforce any arbitrary
routing policy you choose.

Look up the ip rule command in the iproute2 documentation.  It appears
that this command will allow you to do what you appear to want to do. 

On Fri, 2005-08-12 at 18:13 +0300, Al Boldi wrote:
> People wrote:
> >     .
> >     .
> > [Confusion}
> >     .
> >     .
> 
> Recap:
> 
> ip route list:
> 10.0.0.0/24 dev eth0  proto kernel  scope link  src 10.0.0.1
> 10.0.1.0/24 dev eth1  proto kernel  scope link  src 10.0.1.1
> 10.0.0.0/8 dev eth0  proto kernel  scope link  src 10.0.0.1
> 127.0.0.0/8 dev lo  scope link 
> 
> ip route list match 10.0.1.2:
> 10.0.1.0/24 dev eth1  proto kernel  scope link  src 10.0.1.1
> 10.0.0.0/8 dev eth0  proto kernel  scope link  src 10.0.0.1
> 
> ip route list match 10.0.1.2/8:
> 10.0.0.0/8 dev eth0  proto kernel  scope link  src 10.0.0.1
> 
> Now:
> Host receives ping from 10.0.1.2/8 on 10.0.0.0/8 eth0
> Host replies to 10.0.1.2 using route 10.0.1.0/24 eth1.
> 
> Host should have replied to 10.0.1.2 using route 10.0.0.0/8 eth0!
> 
> Is it possible to instruct the Kernel to use the dest-mask instead of 
> just letting it assume /32?
> 
> Thanks!
> 
> --
> Al
> -
> To unsubscribe from this list: send the line "unsubscribe linux-net" in
> the body of a message to [EMAIL PROTECTED]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to