yes, this is a crazy subject. I have 4 ADSL lines to the same provider, which even have the same gateway. Those lines are connected to the same machine (more crazyness: even connected to the same nic. it works fine, I swear). this machine will serve this conenction to a local net. so, I setup the ifaces correctly, everything works. I add balancing using this command: # ip route replace default nexthop dev ppp0 nexthop dev ppp1 nexthop dev ppp2 nexthop dev ppp3 I try this downloading a iso image using BT and checking with iptraf. the load gets balanced. fine. then I issue this command to setup masquerading for each ppp line: # for i in 1 2 3 4; do> sudo iptables -t nat -A POSTROUTING -s 172.16.16.0/22 -o ppp$i -j MASQUERADE; > donenow I try to do the same download from a machine in the intranet and all the traffic goes to only one of the ppp lines. is important to note that this setup was successfully working in a previous incarnation of the gateway (this time each ppp line was attached to its own nic, but I think this is irrelevant, as balancing *is* somewhat working) running a 2.4.7 kernel from RedHat-6.0 (yes, *that* old; reason why we''re trying to replace it with something newer). so, any ideas? if you need more data, don''t hesitate to ask. -- Marcos Dione Departamento de Cómputos Facultad de Ciencias Químicas - UNC ---------------------------------------------------------------- Facultad de Ciencias QuÃmicas - Universidad Nacional de CÃrdoba
Marcos Dione wrote:> yes, this is a crazy subject. I have 4 ADSL lines to the same provider, which >even have the same gateway. Those lines are connected to the same machine (more >crazyness: even connected to the same nic. it works fine, I swear). this machine >will serve this conenction to a local net. > > so, I setup the ifaces correctly, everything works. I add balancing using this >command: > ># ip route replace default nexthop dev ppp0 nexthop dev ppp1 nexthop dev ppp2 >nexthop dev ppp3 > > I try this downloading a iso image using BT and checking with iptraf. the load >gets balanced. fine. > > then I issue this command to setup masquerading for each ppp line: > ># for i in 1 2 3 4; do > > >>sudo iptables -t nat -A POSTROUTING -s 172.16.16.0/22 -o ppp$i -j MASQUERADE; >>done >> >> > > >Have you tried instead: iptables -t nat -A POSTROUTING -s 172.16.16.0/22 -o ppp+ -j MASQUERADE ? I do not know the implementation, but perhaps one rule with a ''+'' makes a difference over summing up the 4 individual interfaces. Interesting setup you have anyway!
Quoting Zoilo Gomez <zoilo@xs4all.nl>:> Have you tried instead: > > iptables -t nat -A POSTROUTING -s 172.16.16.0/22 -o ppp+ -j MASQUERADE > > > ? > > I do not know the implementation, but perhaps one rule with a ''+'' > makes a difference over summing up the 4 individual interfaces.no joy :-| -- Marcos Dione Departamento de Cómputos Facultad de Ciencias Químicas - UNC ---------------------------------------------------------------- Facultad de Ciencias QuÃmicas - Universidad Nacional de CÃrdoba