Dual ISP load balancing (with EdgeRouter)

Notice: Page may contain affiliate links for which we may earn a small commission through services like Amazon Affiliates or Skimlinks.

voodooFX

Active Member
Jan 26, 2014
247
52
28
Hi,

I'm setting up a dual (load balanced) ISP configuration.
I'm using the Ubiquiti Edge Router X SFP for that purpose.

This is the schema (nothing complicated)



I just have one question that maybe someone can help me with: I'm using the EdgeRouter in "Dual WAN Load-Balance" mode and I have chosen to dedicate ETH0 to ISP2 and ETH1 to ISP1, the rest of the ports are in switch mode on the 192.168.1.1/24 network with DHCP.

So the question is, since I have chosen to use the WAN ports in DHCP on the EdgeRouter does it matter if I leave the DHCP server active in the ISP1 and ISP2 routers?
I don't understand (from the guide) if there is the need to have the IP on ETH0 and ETH1 static or it can be assigned by the DHCP of the ISP router?
Also is not 100% clear to me what DHCP means in the EdgeRouter config: is this referred to the public IP or the private network IP of the port? My guess is that it's referred to the external one...
 

tullnd

Member
Apr 19, 2016
59
7
8
USA
Depends what you mean by DHCP.

DHCP server needs to be on in the EdgeRouter if you want it to hand out DHCP addresses to the devices behind it(i.e. your local LAN).

Now, ETH1 and ETH2 on the EdgeRouter, if defined to be WAN ports, can individually be set statically or configured as a DHCP address. This is entirely separate from your DHCP server settings pertaining to the LAN.

Should they be static or DHCP? That depends entirely on what your ISP is sending to each device and also how their equipment/service works. If the ISP is sending you a DHCP IPv4 address, you'll need the corresponding ETH port configured as DHCP. If it's sending you a static address, you may need to statically define it, or it may be configured in a manner to hand out the address(es) that are available as statics and you can still set the ETH port as DHCP, although I would not consider that "best practice" personally.

Also, I should mention that you indicate that each ISP is giving you a router. Are you sure it's really a router or just capable of being one? Ideally, you'd prefer to configure it as a bridge device, or you could end up dealing with double natting and other issues. You already have the EdgeRouter, so you don't want another router inbetween each WAN port of the EdgeRouter and the corresponding ISP.

Is this a service that requires a modem? If so, try to obtain a bridged device or configure it as a bridge device if this is a DHCP service. If it's a static IP scenario, some routers can be configured to pass the static IP info over a dedicated VLAN and then it basically acts like a bridge in that situation.

If a modem isn't required(i.e. GPON or other fiber to the home service where an ONT or some other node is placed to convert the fiber to ethernet), then just plug the ethernet directly into the EdgeRouter.
 

voodooFX

Active Member
Jan 26, 2014
247
52
28
Hi, so...

Yes the "main" DHCP server is in the EdgeRouter, ports ETH2-5
Yes ETH0-1 are on different networks (I have configured the routers on network 10.0.0.1 and 20.0.0.1 in order to avoid conflicts)

- The ISP "devices" are in fact real routers and unfortunately none of them has the possibility to work in bridge mode...
- Both ISPs are providing me a dynamic public IP address (they change very very rarely, but still)
- The EdgeRouter is asking if the WAN connection is providing a dynamic (=DHCP?) or static IP, but in fact this interface is not even directly connected to the external/public IP but to the natted/private network of the router and this is where I got confused, also about the DHCP server of the ISP routers. But, based on the documentation and video I see around this is kind of normal scenario, at least it seems so since basically everybody is configuring the WAN ports in DHCP with private IP addresses and this means double nat...

So yes, I'm double natting the connections, but even if it's not very nice it seems to be the only way to have this working

To go back to my original question, thinking better probably it doesn't matter if the ISP DHCP server is ON or OFF, because even if it's ON, it will basically always assign the same IP to this interface, so it's kind of static anyway...


EDIT: as said, the ISP Routers do not support the bridge operating mode, but they both support static routes, so maybe I can use this to avoid double nat?
 
Last edited:

tullnd

Member
Apr 19, 2016
59
7
8
USA
Static routes can help...but honestly, what about my other question? What kind of service is this? DSL or cable? Or something that doesn't really need a "modem"? If so, just don't use their router. Let the Edgerouter be the device that receives the IP. Long term, that'd be the better option.

I work for an ISP that does this. Every "gateway" device we provide is a routed device. If you have a static IP, we basically hand off a DHCP WAN IP to the gateway and set up a VLAN across our network, so you configure the device we give you to pass the static through the router and everything works fine. If we are handing out DHCP addresses, we basically say you can use our modem/router for connectivity if you want our support for that device, or you can provide your own(whether it's VDSL modem, or router if a GPON customer).

If this is a DSL or cable modem company, I'd look at getting your own bridged devices instead.
 

voodooFX

Active Member
Jan 26, 2014
247
52
28
It's DSL (VDSL2)
Probably it won't work because my ISP wants control over the devices but it's definitely worth give a try!