ClearOS Documentation

×

Warning

301 error for file:https://clearos.com/dokuwiki2/lib/exe/css.php?t=dokuwiki&tseed=82873f9c9a1f5784b951644363f20ef8

User Tools

Site Tools


Multi-WAN

The Multi-WAN feature in ClearOS allows you to connect your system to multiple Internet connections. ClearOS multi-WAN not only provides load balancing, but also automatic failover.

How It Works

The ClearOS multi-WAN has the following features:

  • auto-failover
  • load balanced / round-robin based on user-defined weights
  • manual backup

To give you an example of how multi-WAN works, imagine two 1 Mbit/s DSL lines with two users on the local network. With every new connection to a server on the Internet, the multi-WAN system alternates WAN interfaces. User A could be downloading a large file through WAN #1, while User B is making a voice-over-IP (VoIP) telephone call on WAN #2.

With some applications, the download speed for the multi-WAN system can use the full 2 Mbit/s available. For example, downloading a large file from a peer-to-peer network will use the bandwidth from both WAN connections simultaneously. This is possible since the peer-to-peer technology uses many different Internet “peers” for downloading. At the other end of the spectrum, consider the case of downloading a large file from a web site. In this case, only a single WAN connection is used – 1 Mbit/s maximum.

Bandwidth aggregation (combining multiple WAN interfaces to look like a single WAN interface) is not possible without help for your ISP since both ends of an Internet connection must be configured. In ClearOS you would need to manually configure network bonding rather than use the MultiWan module.

Configuration

https://clearos.com/dokuwiki2/lib/exe/fetch.php?media=content:en_us:7_multiwan_1.png

Mode

https://clearos.com/dokuwiki2/lib/exe/fetch.php?media=content:en_us:7_multiwan_2.png

Load balanced / round-robin based on user-defined weights

In order to achieve this mode, configure each NIC as Primary mode and set the weights as you require.

Weights

Multi-WAN weights are used to load balance outbound Internet traffic. By default, all WAN interfaces are given a weight of one. This default configuration means the network traffic will be roughly evenly split amongst the different WAN connections.

In one of the typical multi-WAN configurations, a second broadband connection is used for backup. This second connection is often a low-cost and low-bandwidth connection. In this case, you would want to set the weight on your high-bandwidth connection to 3 or 4, while leaving your low-cost/low-end connection with a weight of 1.

The calculation for amount of bandwidth for a certain NIC is the weight of that NIC over the sum of all NICs. For example, if I have 3 external multi-WAN NICs eth0, eth1, and eth2 and the weight is 4, 3, and 1 respectively. This will mean that the bandwidth will be divided as such:

NICWeightFractionPercentage
eth044/850%
eth133/837.5%
eth211/812.5%
TOTAL8

Auto-failover

In this mode, if the Primary interface goes down ClearOS will automatically switch to the backup interface.
Set the main interface you want to use in Primary mode and the interface you'd like to fail over to in Backup mode.

Manual backup

In this mode, if the Primary interface goes down ClearOS will not switch to the Standby interface. Switching will only happen with manual intervention from the ClearOS administrator. You may want this mode if your backup line is very expensive.
Set the main interface you want to use in Primary mode and the reserve interface in Standby mode.

Source Based Routes

https://clearos.com/dokuwiki2/lib/exe/fetch.php?media=content:en_us:7_multiwan_3.png

In some situations, you may want a system on your local area network (LAN) to always use a particular WAN interface. A source-based route definition makes this possible.

The IP Address field also accepts subnets both in CIDR form and /w.x.y.z form. This can be very useful, especially if you change your DHCP scope to be a subnet of your LAN subnet. As an example, if you LAN subnet is 10.11.12.0/24, you can have DHCP start at 10.11.12.128 and finish at 10.11.12.191. This way your DHCP devices always are in the range 10.11.12.128/26 and you can assign them to an interface accordingly. Static IP's must be outside this subnet and Static DHCP Leases can be outside this subnet and assigned to a different interface.

Destination Port Rules

https://clearos.com/dokuwiki2/lib/exe/fetch.php?media=content:en_us:7_multiwan_4.png

In some situations, you may want to send network traffic for a specific port out a particular WAN interface. For example, you may want to send all NTP traffic out a particular WAN network.

Routing Policies

Some Internet service providers (ISPs) will not allow traffic from source addresses they do not recognize as their own. The following scenarios will give you a good idea of common issues faced in a multi-WAN environment. In the examples, we assume two connections, but the same issues crop up with three or more connections.

DNS Servers

The DNS servers configured on the ClearOS system will be provided by one or both ISPs. In our example, we are going to assume that ISP #1 provides the DNS servers. If a DNS request from your network goes out the ISP #2 connection, it might get blocked by ISP #1. Result: DNS requests will only succeed on ISP #1.

Solution – Use DNS servers that are accessible from any network. If your ISPs do not provide such DNS servers, then we recommend using OpenDNS. Other Public DNS servers are available.

Note: your network configuration settings should have the Automatic DNS Servers checkbox unchecked. (Webconfig > Network > Settings > IP Settings then per-interface). See the IP Settings User Guide.

DMZ Networks and 1-to-1 NAT

If you have a range of extra IP addresses provided by ISP #1, you may need to explicitly send traffic from these extra IPs out the ISP #1 connection. ISP #2 may drop the packets.

Solution – Use a Source Based Route for your DMZ network or 1-to-1 NAT.

Dynamic DNS

While on the road, you may need to connect back to your ClearOS system. If you have a dynamic IP, you can use the dynamic DNS hostname to make the connection. For this reason, the built-in dynamic DNS system will always report an IP address that has a working connection to the Internet.

If your ClearOS system uses real public IP addresses, you can select the preferred WAN interface to use when all your WAN connections are functioning.

content/en_us/7_ug_multiwan.txt · Last modified: 2018/06/21 08:48 by nickh

https://clearos.com/dokuwiki2/lib/exe/indexer.php?id=content%3Aen_us%3A7_ug_multiwan&1544777731