Policy routing based on source address
Marc Evans
Marc@SoftwareHackery.Com
Sat, 12 Jan 2002 14:13:14 -0500 (EST)
Thanks for the thought Doug. Sadly, I have changed the script to try all
possible permutations of the subinterfaces lo and eth0 and find none of
them make a difference. I seperately tries the routes both with and
without the src qualifier and still, the ping works fine, the traceroute
doesn't.
Anyone else have any ideas? Is there any good way to debug the routing
decision method, i.e. a magic bit to flip in /proc?
- Marc
On Sat, 12 Jan 2002, Doug VanLeuven wrote:
> Marc Evans wrote:
> >
> > Hello Matthew -
> >
> > Thanks for you help, but sadly, something isn't quite right. Here is
> > precisely what has been done:
> >
> > [/root]# ip rule list
> > 0: from all lookup local
> > 32761: from 192.168.1.41 iif lo lookup as1
> > 32762: from 192.168.1.40 iif lo lookup as209
> > 32763: from 192.168.1.39 iif lo lookup as3561
> > 32764: from 192.168.1.38 iif lo lookup as2548
> > 32765: from 192.168.1.37 iif lo lookup as1239
> > 32766: from all lookup main
> > 32767: from all lookup default
> >
> > [/root]# ip route list table all
> > default via 192.168.1.33 dev eth0 table as1239 src 192.168.1.37
> > default via 192.168.1.35 dev eth0 table as2548 src 192.168.1.38
> > default via 192.168.1.51 dev eth0 table as3561 src 192.168.1.39
> > default via 192.168.1.52 dev eth0 table as209 src 192.168.1.40
> > default via 192.168.1.53 dev eth0 table as1 src 192.168.1.41
>
> Perhaps changing the dev eth0 to dev eth0, dev eth0:1, dev eth0:2,
> dev eth0:3 corresponding to the IP addresses.
> Also, if it's being selected because it's address is given,
> you don't need the src address on the route & may even work against you.
>