linux source routing problem
I have a weird issue with source routing on a linux box.
The plan goes like this:
I have 2 internet providers at my office and i want to use a single router to route them both ( i don't need load balancing or failover). I just want access to either provider based on the ip i use on my pc.
The first provider, let's call it RDS, is simple: i've got an RDS_IP, RDS_MASK and RDS_GW.
The second provider is complicated, we'll call it INES. I have a INES_IP, INES_MASK, INES_GW and they also gave me a subnet of public ip's: ILAN_NET which i have to route myself through INES_IP.
I also have a third nic with an local ip: LAN_NET and an alias for the INES subnet: ILAN_NET
the router has dhcp enabled, giving by default ip's from LAN_NET and using the default gw, RDS
I have snat for the LAN_NET to go through RDS.
If i enter an ip from the ILAN_NET, instead of routing in through the INES_GW, it also goes through RDS_GW.
the routing i've used for about 5 months has worked perfectly untill one day, when it just stopped. this is my setup:
ip route add $RDS_MASK dev $RDS_IF src $RDS_IP table rds
ip route add default via $RDS_GW table rds
ip route add $INES_MASK dev $INES_IF src $INES_IP table ines
ip route add default via $INES_GW table ines
ip route add default via $RDS_GW
ip rule add from $RDS_IP table rds
ip rule add from $INES_IP table ines
ip route add $LAN_NET dev $LAN_IF table rds
ip route add 127.0.0.0/8 dev lo table rds
ip route add $ILAN_NET dev $ILAN_IF table ines
ip route add 127.0.0.0/8 dev lo table ines
what puzzles me the most is that this setup has worked, and now it doesn't .... without any changes on the router.
I've tried everything save for a format/reinstall.
Is there a better/different way to do this?