WAN Link Load Balancing

ESG gateway is supported a secondary uplink that can be used for load balancing and failover purposes. This article explains how to enable and configure a secondary uplink and load balancing.

Enabling and Configuring WAN2

The ESG gateway features a dedicated secondary uplink port known as WAN2. To utilize the WAN2 port, simply connect a cable to it and configure the IP address either through the ESG's local status page or via the EnGenius cloud dashboard. By default, WAN2 is enabled as a LAN interface, so users must switch its role to WAN interface.

To enable and configure WAN2:

  1. Navigate to the ESG gateway's local status page

  2. Click on the Local Setting tab at the top.

  3. In the WAN2/LAN, switch the Role to WAN2

    Configure the WAN port as needed:

    • VLAN Tagging: Assigns a VLAN tag to all traffic sent out of this port. If unset, traffic will be sent untagged.

    • Connection Type: Choose from three connection types:

      • Static IP Address: Configure the IP address, subnet, gateway, and DNS.

      • DHCP: Obtain a dynamic IP address from the ISP.

      • PPPoE: Configure the username and password.

    • Override Default MAC Address: If a specific WAN MAC address needs to be configured, fill in this field.

Once the WAN2 port has been configured and connected.

Gateway Local Status Page

Load Balancing

The ESG offers the option to utilize both of its uplinks for load balancing. Enabling Load Balance in the Configure > Gateway > Interfaces > WAN settings ensures that traffic is distributed across both uplinks. This distribution is determined by the configuration of the WAN 1 and WAN 2 ISP bandwidth.

Load Balance Configuration

The load balancing algorithm utilized is Weighted Round Robin (WRR), where the WRR value is determined by the upload speed of each ISP bandwidth. In the following scenario, WAN1 has an upload speed of 500Mbps, while WAN2 has an upload speed of 100Mbps. This results in a speed ratio of 5:1, indicating that for every five flows directed over WAN1, one flow will be routed over WAN2.

Scenario For WAN Load Balance
WAN ISP Speed
circle-info

WWAN is not supported Load Balance

Additional Considerations

Policy Routing for Load Balancing and 1:1 NAT

Load balancing is a technique used to evenly distribute network traffic across multiple WAN uplinks, ensuring efficient utilization of available bandwidth and enhancing network performance. On the other hand, 1:1 NAT is employed to map specific public IP addresses to corresponding internal IP addresses, facilitating inbound communication from external networks to internal resources

However, utilizing both load balancing and 1:1 NAT simultaneously can introduce conflicts within the network configuration. For example, when load balancing is active, outbound traffic from the internal network may be dynamically routed through any available WAN interface. This dynamic routing can potentially conflict with the static NAT mappings established for specific public IP addresses to internal resources.

To illustrate, consider a scenario where a company hosts a web server with a public IP address mapped to an internal server using 1:1 NAT. If load balancing directs outbound traffic through a different WAN interface than the one specified in the NAT mapping, external users attempting to access the web server may encounter connectivity issues or reach the wrong internal resource.

Load Balance with 1:1 NAT

To resolve this, Policy Routing can be utilized to ensure that traffic subject to 1:1 NAT rules utilizes the desired interface. Follow these steps:

  1. Navigate to Configure > Gateway > Interfaces > Policy Route and add a new route rule.

  2. Configure the policy route to specify the source IP (e.g., 192.168.66.3) and designate the preferred uplink that corresponds to the public IP referenced in the NAT rule.

  3. Click Done and Apply to save the changes.

By implementing Policy Routing, you can resolve conflicts between load balancing and 1:1 NAT, ensuring that traffic adheres to the desired routing configuration.

Add Rule for Policy Route

Last updated

Was this helpful?