Find the answer to your Linux question:
Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    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



  2. #2
    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.

  3. #3
    Linux Newbie
    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
    ( you could substitute table2 with any other name you want to define )

    Let the default route for Internet traffic be through the 2nd internet connection
    route add default gw x.x.x.x dev eth2
    ( where x.x.x.x is the gateway ip of 2nd ISP and eth2 is the interface connected to the modem of the 2nd ISP)

    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
    (eth0 is assumed to be interface connected to local network; add any other ports as required)

    ip route add default via dev eth1 table table2
    (substitute with gateway IP of primary ISP, eth1 with actual interface its connected to and table2 with table name defined above)
    ip rule add from all fwmark 1 table table2

  4. $spacer_open

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts