Re: question about ip address tables in iproute2

From: Edwin Chiu (
Date: Fri Nov 24 2000 - 17:44:34 EST

Have you tried just:

ip rule to 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


> 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 subnet get stamped
> with the 0.2 address as the sender. This seems wrong to me, as they are
> being sent "via".
> # ip ru li
> 0: from all lookup local
> 199: from lookup masq_table
> 200: from lookup eth0_table
> 201: from lookup eth1_table
> 1000: from all to 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

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