Re: question about ip address tables in iproute2

From: Edwin Chiu (Edwin.Chiu@e-wares.com)
Date: Fri Nov 24 2000 - 17:44:34 EST


Have you tried just:

ip rule to 192.168.0.0/24 lookup masq_table pref 1000

You might also play around with your preferences.. try 10, and see if the
other rules might not
be interfering somehow (201?). Try removing the main table as well ;)

You should be able to test the routing by doing a:

ip route get from src-ip to dst-ip
ip route get dst-ip from src-ip oif output_interface

Edwin

> However, it seems that iproute2 is dependent on the order of the
> listings in the address table. From my testing, the outgoing packet
> being sent out on a subnet is stamped with the first address listed for
> that subnet. This doesn't seem to make sense to me. For instance, if
> the positions of the 0.20 and 0.2 addresses under eth1 are reversed,
> then any default packets going onto the 192.168.0.0 subnet get stamped
> with the 0.2 address as the sender. This seems wrong to me, as they are
> being sent "via 192.168.0.20".
>
> # ip ru li
> 0: from all lookup local
> 199: from 192.168.0.20 lookup masq_table
> 200: from 192.168.0.1 lookup eth0_table
> 201: from 192.168.0.2 lookup eth1_table
> 1000: from all to 192.168.0.0/24 lookup masq_table
> 32766: from all lookup main
> 32767: from all lookup 253
>



-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org



This archive was generated by hypermail 2b29 : Thu Nov 30 2000 - 21:00:28 EST