All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] multiple links and nat
@ 2006-01-05 16:02 seph
  2006-01-05 16:21 ` Edmundo Carmona
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: seph @ 2006-01-05 16:02 UTC (permalink / raw)
  To: lartc

Hi, this might be a dumb question, but I'm not finding much
information online.

I'm trying to setup a 2.6 linux box to run nat across multiple
upstream links as a simple way to aggregate bandwidth. I found the
instructions in lartc section 4.2
(http://lartc.org/howto/lartc.rpdb.multiple-links.html) fairly clear
and straightforward. I implemented those, and a couple of trivial
iptables commands and tried it.

Persistent masqueraded connections (like ssh) weren't very happy. The
frequently hung, and I saw the "MASQUERADE: Route sent us somewhere
else." error. googling for that, I see lots of suggestions to use
connmark, but no examples of how connmark and the multiple link stuff
interact. Does anyone have a pointer?

The rules I'm using are roughly:

/sbin/ip route add P1_NET dev IF1 src IP1 table 201
/sbin/ip route add default via P1 table 201
/sbin/ip route add P1_NET dev IF1 src IP1
/sbin/ip route add 127.0.0.0/8 dev lo table 201
/sbin/ip rule add from IP1 table 201
/sbin/ip route add P2_NET dev IF2 src IP2 table 202
/sbin/ip route add default via P2 table 202
/sbin/ip route add P2_NET dev IF2 src IP2
/sbin/ip route add 127.0.0.0/8 dev lo table 202
/sbin/ip rule add from IP2 table 202


/sbin/ip route del default
/sbin/ip route add default scope global nexthop via P1 dev IF1 weight 1 nexthop via P2 dev IF2 weight 4
/sbin/ip route flush cache


/sbin/iptables -t nat -A PREROUTING -s LOCALNET -d P1_NET -j ACCEPT
/sbin/iptables -t nat -A PREROUTING -s LOCALNET -d P2_NET -j ACCEPT
/sbin/iptables -t nat -A POSTROUTING -o IF1 -s LOCALNET -j MASQUERADE
/sbin/iptables -t nat -A POSTROUTING -o IF2 -s LOCALNET -j MASQUERADE


thanks
seph
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-01-20 10:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-05 16:02 [LARTC] multiple links and nat seph
2006-01-05 16:21 ` Edmundo Carmona
2006-01-06 19:14 ` seph
2006-01-07  5:02 ` gypsy
2006-01-20 10:24 ` [LARTC] Multiple " Mikael Svenson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.