Results 1 to 3 of 3
Hello.. Sorry if this is in wrong place, also I have tried to search the forum for the answers to the following questions but with no luck. I am newbie ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 09-28-2009 #1
- Join Date
- Nov 2004
Network Load Balance - newbie questions
Sorry if this is in wrong place, also I have tried to search the forum for the answers to the following questions but with no luck.
I am newbie when it comes to Linux, but generally understand the concepts, I do however need some information as to load balance 2 internet connections. I am looking for something basic to do this.
This is what I would like to do:
I use a works program from home which uses SSL and port number of 563, this downloads test data and large video images, so it uses all my bandwidth.
I would like the above to go use my main internet connection, and then any other internet traffic to use my spare connection.
I did try and find a basic solution to do this in windows xp pro, but to no avail (sorry for swearing) I am understanding that load balancing two connections in Linux is the solution to doing this.
This leads me onto the following questions:
01) Will Fedora workstation 11 fulfill my needs? as fedora is the main version of Linux I have used since redhat 6, many mnay moons ago
02) what program will I need to install and configure?
03) Hardware issue question: The machine I will want to use has 3 networks cards in it, one built onto the motherboard, and two cards I have put in myself.
I was thinking each modem connection to each one of the seperate network cards I out in the pc, and running a wireless router from the onboard network card which has the swtich and wireless access point for my other equipment to connect to..
Would this be the best way to connect it all up?
Sorry if this is a noobish post, but I am at a lost as to where to begin with it
- 09-29-2009 #2
- Join Date
- Sep 2009
What you want is actually what I'm also trying to accomplish. See my post /forum/linux-networking/153506-iproute2-rule-based-multi-homed-snat-problem.html for some of the details on how that should work. Your situation is a bit diffrent in that you don't need SNAT on both connections and so it might work for you.
keywords to google for are: iproute2 and iptables with connmark.
- 09-29-2009 #3
- Join Date
- Aug 2009
- Mumbai, India
To answer your queries:
1) Fedora 11 should suit your needs.
2) You would require iproute and iptables to achieve policy based routing which is normally installed by default
3) Network connection seems fine to me. Two of the NIC's get connected to the respective ISP modem's and the other one serves the local network.
You'll need to create an additional routing table with the command
echo 1 table2 >> /etc/iproute2/rt_tables
Let the default route for Internet traffic be through the 2nd internet connection
route add default gw x.x.x.x dev eth2
Configure specific traffic to be routed through the primary interface
iptables -A PREROUTING -t mangle -i eth0 -p tcp --dport 563 -j MARK --set-mark 1
ip route add default via 220.127.116.11 dev eth1 table table2
ip rule add from all fwmark 1 table table2