Solved

linux as loabalance

Posted on 2006-07-06
2
245 Views
Last Modified: 2010-04-20
can linux work as load balance  My company have 2 adsl company connect to in ternet can i PUt  2 adsl company in to one linux box then distribute inter net to 10 computers to computer in my office
0
Comment
Question by:teera
2 Comments
 
LVL 16

Accepted Solution

by:
xDamox earned 225 total points
ID: 17048987
Hi,

Yes Linux can be a load balancer:

if you want to balance the load to the 3 addresses 10.0.0.5, 10.0.0.6 and 10.0.0.7, then you can do as follows :

# iptables -t nat -A POSTROUTING -o eth0 -m nth --counter 7 --every 3 --packet 0 -j SNAT --to-source 10.0.0.5
# iptables -t nat -A POSTROUTING -o eth0 -m nth --counter 7 --every 3 --packet 1 -j SNAT --to-source 10.0.0.6
# iptables -t nat -A POSTROUTING -o eth0 -m nth --counter 7 --every 3 --packet 2 -j SNAT --to-source 10.0.0.7

Of course you need to compile the nth extention module into the iptables.
0
 
LVL 22

Assisted Solution

by:pjedmond
pjedmond earned 225 total points
ID: 17062393
You could also look at a number of the software solutions for this type of thing which would include 'fail-over' etc:

http://lcic.org/load_balancing.html

http://linas.org/linux/load.html

also has some useful info.

(   (()
(`-' _\
 ''  ''
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question