Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Dual WAN, One ISP, balancing possible?

    Scheduled Pinned Locked Moved Routing and Multi WAN
    28 Posts 8 Posters 12.8k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • G
      Gnurf
      last edited by

      Hello all.

      New to PFSense, but liking it, what I´m trying to achive is more bandwith through dual WAN.

      My ISP allows me a number of public IP´s and certain bandwith to go with each IP. All IP´s have the same GW and on same subnet. I get them through DHCP.

      Example:
      I have one TP-cable (ISP delivers through a RJ-45 connection) connected to a hub (100/100), through which I get one public IP per connected computer (say 213.x.x.15 and 213.x.x.85) and then 10mb up/10mb down per computer (IP).

      My thought was to connect those two cables to a PFsense box and this way getting 20/20 mb connection.
      PFsense box at time being is an AMD 2800+ Sempron with onboard NIC, two Netgear 10/100 NICs, 512meg and using 1.0.1-SNAPSHOT-01-11-2007

      I tried loadbalancing and it works.. Kindof.. It only allows one WAN at the time to be active, so it either uses WAN1 or WAN2, never giving me more than 10 mb in each direction. So it is either WAN1 or WAN2 that gets the bandwith while the other gets none. It never gets "balanced" so PFsense uses both WANs at the same time…

      I tried following the wiki on balancing and made a pool using WAN1 and WAN2 and different monitoring IP´s (WAN1 monitoring google and WAN2 monitoring yahoo), and in my Firewallrules pointing the LAN GW to my pool. No luck.

      Is what I am trying to achive possible? Feels like since I´m using the same GW/ISP and subnet on both WANs, it just doesnt get balanced properly (or the way I want). or am I doing something horrobly wrong?
      Tried searching the forum, but did not succed in getting answeres I needed.

      213.x.x.15 (GW=213.x.x.1)
                         /                                       
      ISP -  (HUB)                                           PFSensebox - LAN 192.x.x.x
                         \                                       /
                          213.x.x.85 (GW=213.x.x.1)

      Thanks all..

      1 Reply Last reply Reply Quote 0
      • H
        hoba
        last edited by

        Unfortunately you need unique gateways for loadbalancing/policybased routing. Maybe you can work around with that by setting up VIPs for each of your public IPs and create some nats that will send half of the traffic out natted to IP1 and the other half natted to IP2 and so on.

        1 Reply Last reply Reply Quote 0
        • G
          Gnurf
          last edited by

          Hmmm..

          Any thoughts, tips or pointers in that direction?

          How can I achieve what your saying?

          1 Reply Last reply Reply Quote 0
          • H
            hoba
            last edited by

            Add the additional IPs at firewall>virtual IP (try ProxyARP or CARP). Then go to firewall>nat, outbound tab. Enable advanced outbound NAT and add some mapping to nat some of your traffic to the real WAN IP and some other part of traffic to the virtual IP.

            1 Reply Last reply Reply Quote 0
            • G
              Gnurf
              last edited by

              Thanks for your quick replies..

              Won´t what you´re suggesting mean that it wont be "real" loadbalancing, but only in cases specified in NAT-rules?
              Thus, not all traffic will be balanced..?

              Ahwell… Seems like there is no "easy" way to get this going...
              Even though I can see 2 public IPs on my box, I cannot use them at the same time..  :-\

              1 Reply Last reply Reply Quote 0
              • H
                hoba
                last edited by

                It's not a real lodbalancing, that is correct. More like a policybased routing.

                1 Reply Last reply Reply Quote 0
                • GruensFroeschliG
                  GruensFroeschli
                  last edited by

                  might it not be possible to have a standard 20$ router between one of the IP's and the Pf?

                  213.x.x.15 (GW=213.x.x.1) –- cheaprouter ---(some_private_network)
                                    /                                                                                   
                  ISP -  (HUB)                                                                                        PFSensebox - LAN 192.x.x.x
                                    \                                                                                    /
                                      213.x.x.85 (GW=213.x.x.1) ---------------------------------

                  for line1 as monitor IP 213.x.x.1
                  and for line2 as monitor IP an IP one hop behind 213.x.x.1

                  i'm not sure if that would work ^^"

                  We do what we must, because we can.

                  Asking questions the smart way: http://www.catb.org/esr/faqs/smart-questions.html

                  1 Reply Last reply Reply Quote 0
                  • H
                    hoba
                    last edited by

                    It might work. Haven't tested such a config yet. Not sure what would happen though when tracerouting across the cheap router and if the states get messed up.  ;)

                    1 Reply Last reply Reply Quote 0
                    • GruensFroeschliG
                      GruensFroeschli
                      last edited by

                      as in this thread:
                      http://forum.pfsense.org/index.php/topic,2679.0.html

                      In my test-environment i used 2 boxes and had a static WAN IP on each of them in the same subnet.
                      (my university's network was the ISP ;) )

                      ISP subnet: 160.85.39.0/24
                      ISP router: 160.85.39.1/24
                      ISP proxy: 160.85.39.2/24
                      WAN1: 160.85.39.120/24
                      WAN2: 160.85.39.121/24
                      crosslink: 10.10.10.x/30

                      ISP-subnet
                                  /       
                                /           
                              /               
                      WAN1                  WAN2
                        |        crosslink      |
                      pf1–---------------pf2
                        |                          |
                      LAN1                    LAN2

                      loadbanace worked from each of the 2 LAN's well. (with all the necessary pools and firewallrules in place).
                      As monitor IP's i've used on both of the WAN's directly the next router (160.85.39.1)
                      and on the crosslink i've used on both as monitor IP the proxy (160.85.39.2)

                      So far that worked well but i didnt do anything with tracrouting ^^"

                      We do what we must, because we can.

                      Asking questions the smart way: http://www.catb.org/esr/faqs/smart-questions.html

                      1 Reply Last reply Reply Quote 0
                      • E
                        Eson
                        last edited by

                        Hi

                        Im pretty sure the original poster has BBB Sweden as ISP. They provide med with an 100/10mbit connection, with that I get 5 public IPs and the weird thing is, as the original poster said, that they dont limit the upload anywhere. I will only have 100mbit down in total but I get 10mbit upload per IP so in a sense I have a 100/50mbit connection if I could only use all 5 IPs bandwith at the same time. I would settle for 20 or 30mbits though :) I dont want to have it in total at the same time though as per the original poster, I just want to be able to utilize the 10mbit connections for different servers.

                        Lets say for example that I have an ftpserver and my main computer, could I with pfsense and the virtual IP-thing suggested above have my FTP-server use one of the 10mbit and my main computer the other? You might say then why dont just place the FTP server on a public IP directly, well I just want to have all this behind one firewall.

                        1 Reply Last reply Reply Quote 0
                        • D
                          databeestje
                          last edited by

                          No you can not use the load balancer when both interfaces share the same address space or gateway.

                          1 Reply Last reply Reply Quote 0
                          • M
                            majedalanni
                            last edited by

                            Dear
                            I bought a hardware with dual wan and put two wire from my hub.
                            the two WANS IP (10.175.175.1/8,10.175.175.2/8) and they have same GW 10.1.1.1
                            and the bandwidth double and its work

                            but how I make this with pfsense?

                            Regards

                            1 Reply Last reply Reply Quote 0
                            • H
                              hoba
                              last edited by

                              @majedalanni:

                              Dear
                              I bought a hardware with dual wan and put two wire from my hub.
                              the two WANS IP (10.175.175.1/8,10.175.175.2/8) and they have same GW 10.1.1.1
                              and the bandwidth double and its work

                              but how I make this with pfsense?

                              Regards

                              The solution is right above in this thread. Please read more closely.

                              1 Reply Last reply Reply Quote 0
                              • M
                                majedalanni
                                last edited by

                                Dear

                                What I want to  say why the hardware make the sum of bandwidth without error and why the pfsense cant do ???  :-\

                                1 Reply Last reply Reply Quote 0
                                • H
                                  hoba
                                  last edited by

                                  @majedalanni:

                                  Dear

                                  What I want to  say why the hardware make the sum of bandwidth without error and why the pfsense cant do ???  :-\

                                  I don't understand this sentence. Please try to find some other words.

                                  1 Reply Last reply Reply Quote 0
                                  • M
                                    majedalanni
                                    last edited by

                                    sory for my bad english

                                    but I want to know can pfsense sum bandwith for 10 WAN IP (same gateway) like the hardware dual wan  (SMCBR24Q) and if no …......... why ?

                                    1 Reply Last reply Reply Quote 0
                                    • H
                                      hoba
                                      last edited by

                                      It can, but you need different gateways (at least if you want to balance it). Other option is to use 1:1 or advanced outbond nat like described above but that won't give you balancing but only simultaneous use by different clients.

                                      1 Reply Last reply Reply Quote 0
                                      • M
                                        majedalanni
                                        last edited by

                                        dear

                                        And in future is it support?
                                        and If I make advance NAT is it sum the bandwidth ?

                                        and many thaks for you ;D

                                        1 Reply Last reply Reply Quote 0
                                        • H
                                          hoba
                                          last edited by

                                          I think bill said in a similiar thread that it could be done but our gui doesn't support it. If that is the case we might add support for it later.

                                          If you use advanced outbound NAT it will sum up the bandwidth but you need several clients to use all of the bandwidth. None of the clients can use more than one IPs up/down restrictions though.

                                          1 Reply Last reply Reply Quote 0
                                          • M
                                            majedalanni
                                            last edited by

                                            OK

                                            If I make this topology

                                            10 ip one GW                                      1 IP and 9 Sub          configure with multi GW
                                            ISP –-------------- Switch----------Router----------------pfsense-----------------------------

                                            --------ISA Server-------Clients

                                            it is work ?
                                            and really I need make this work and I am sorry for disturb  you  :P

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.