Skip to contentSkip to conversation

Weight in SAME and SNAT targets?

DISCUSSION Peter Surda 1 participant 1 message Dec 19, 2002 netfilter

lore
Share & tools
lore
#0 lore raw

Hello dear developers!

According to the documentation, when doing SNAT to multiple IPs, it chooses the IP with the lowest number of active connections. I assume SAME uses a similar method as well.

I tried very hard to find the place in the code responsible for this, but apparently I am blind or my grep is fscked. Could you please kindly direct me to the file with the code and perhaps even some docs?

I currently use SNAT and SAME to loadbalance over several lines (don't explain to me it shouldn't be done this way, our provider can't manage to persuade their cisco to do "normal" loadbalancing so this is the only way that works). However, soon we'll have lines with different bandwidth, and the current method would cause suboptimal results (well, I can theoretically use more IPs per line to do this, this possibility is being investigated). But this wouldn't be necessary if it was possible to give the IPs different weight. I don't think coding this is that difficult, but not being able to find the responsible lines in code is a big showstopper.

Anyway, netfilter rocks, you can do a lot of cool stuff with it.

Bye,

Peter Surda (Shurdeek) <[email protected]>, ICQ 10236103, +436505122023

--
Press every key to continue.