ok im trying to setup multiple ip masquerading on linux. im running 2.4.14 w/ slackware 7.1, and i have 3 nics, eth0 is eepro100 and is for my internal network (10.0.0.1), eth1 and eth2 are 3c509 and each have a cable modem attached.
<internal network> ---- eth0 <linux gateway> eth1 ---- cable modem-------------------same gateway and isp
eth2
cablemodem ------------------------------------------------- same gateway and isp
hopefully that graphic looks ok if you stretch your window. anyway, i get dhcp assigned to each external nics. each interface is working. no problem there. i can successful masq out one interface (iptables -t nat -A POSTROUTING -s 10.0.0.50 -o eth2 -j MASQUERADE), but when i try the other (iptables -t nat -A POSTROUTING -s 10.0.0.50 -o eth1 -j MASQUERADE after flushing the rules iptables -t nat -F) it wont masq. the one that will successful masq is the one with the last entry in my routing tables (route -e) which shows two default gateways at the same address via different interfaces (both cable modems are same ISP). was that clear?
what i would like to work is being able to send 10.0.0.x out eth1 and 10.0.0.y out eth2, primitive load balancing by ip address. now ive been focusing my troubleshooting around the dual default gateways, is there a way i can set route so it will work with multiple MASQs? i suspect if i could set the routes to not select one over the other it would work.
ive looked briefly at equal cost multipath routing but i didnt find a good resource. would this be one avenue i should pursue?
<internal network> ---- eth0 <linux gateway> eth1 ---- cable modem-------------------same gateway and isp
eth2
cablemodem ------------------------------------------------- same gateway and isp
hopefully that graphic looks ok if you stretch your window. anyway, i get dhcp assigned to each external nics. each interface is working. no problem there. i can successful masq out one interface (iptables -t nat -A POSTROUTING -s 10.0.0.50 -o eth2 -j MASQUERADE), but when i try the other (iptables -t nat -A POSTROUTING -s 10.0.0.50 -o eth1 -j MASQUERADE after flushing the rules iptables -t nat -F) it wont masq. the one that will successful masq is the one with the last entry in my routing tables (route -e) which shows two default gateways at the same address via different interfaces (both cable modems are same ISP). was that clear?
what i would like to work is being able to send 10.0.0.x out eth1 and 10.0.0.y out eth2, primitive load balancing by ip address. now ive been focusing my troubleshooting around the dual default gateways, is there a way i can set route so it will work with multiple MASQs? i suspect if i could set the routes to not select one over the other it would work.
ive looked briefly at equal cost multipath routing but i didnt find a good resource. would this be one avenue i should pursue?