To avoid single points of failure some networks use multiple ISPs. This allows for multiple routes or paths for the traffic to reach the Internet. By changing 3 variables different approaches can be used to manage the bandwidth and traffic flow. The variables involved are:

Distance |
Not distance the way we normally think of it,but the reliability of the routing protocols based on the number of hops between nodes and the cost to transverse them. |

Priority |
The level of priority of one interface compared to others |

Weight |
The ratio of how the traffic flow will be divided between ports |

These variables work like a top down filter. If the values for the interfaces are the same for the first variable the check drops down the second variable. If the values for the interfaces are the same for the second variable the check drops down to the third. Once a variable is reached with a difference between the values that variable is the basis for how routing is determined.

## The Values

While it may seem counter intuitive, in Distance and Priority, the higher number values are given lower priority in these settings. For instance, a value of 5 has precedence over a value of 10. The closer a number is to Zero (0), the greater priority it gives. If it helps, think of the values as placing in a race. 1st place is better than 2nd and so on.

The Weight values do not follow this line of thinking. The value for the Weight variable is the number of parts of the total in the ratio. For instance if one interface is 5 and the other 10 that would mean 5 out of 15 and 10 out of 15 respectively and 10/15, as a ratio, is more bandwidth.

## Order of Application

The values associated with route preference are handled in the following order:

### Distance

- If Distance is not equal, path is based on distance only
- If Distance is equal, basis of the path falls to Priority

### Priority

- If Priority is not equal, path is based on Priority only
- If Priority is equal, basis of the path falls to Weight

### Weight

- If Weight is equal, traffic from even addresses goes out one interface; traffic from odd addresses goes out the other
- If Weigh is not equal, path distribution is treated as a ratio
- Values must be integers

## Location

The location for the 3 values above has changed through the versions of the firmware but as of in Version 5 the locations are as follows:

**Distance:**

Router > Static > Static Routes

**Priority:**

Router > Static > Static Routes

**Weight:**

Router > Static > Settings

>>ECMP Load Balancing Method = Weighted Load Balance

## Examples

### Using only WAN1, but able to fail over to WAN2

All of the traffic will go out WAN1 unless the system determines that WAN1 is down in which case all traffic will go out WAN2.

#### Set Distances as:

- WAN1 Distance = Same as WAN2 (example: 10)
- WAN2 Distance = Same as WAN1 (example: 10)

#### Set Priorities as:

- WAN1 Priority = Lower Integer Value than WAN2 (example: 5)
- WAN2 Priority = Higher Integer Value than WAN1 (example: 10)

#### Set Weights as:

- WAN1 Weight = Not applicable, it doesn’t get to this point
- WAN2 Weight = Not applicable,it doesn’t get to this point

### Using WAN1 and WAN2 equally:

Traffic divided equally between the routes. A good set up if both interfaces have equal bandwidth capability.

#### Set Distances as:

- WAN1 Distance = Same as WAN2 (example: 10)
- WAN2 Distance = Same as WAN1 (example: 10)

#### Set Priorities as:

- WAN1 Priority = Same as WAN1 (example: 5)
- WAN2 Priority = Same as WAN1 (example: 5)

(5 used as example because that is the default for DHCP assigned interfaces)

#### Set Weights as:

- WAN1 Weight = Same as WAN2 (example: 1)
- WAN2 Weight = Same as WAN1 (example: 1)

### Using WAN1 and WAN2 in a weighted Ratio:

More traffic will use the route with the larger ratio assigned to it. Good if both interfaces are to be used constantly but have different levels of bandwidth capability.

#### Set Distances as:

- WAN1 Distance = Same as WAN2 (example: 10)
- WAN2 Distance = Same as WAN1 (example: 10)

#### Set Priorities as:

- WAN1 Priority = Same as WAN1 (example: 5)
- WAN2 Priority = Same as WAN1 (example: 5)

You would now need to determine the Ratio

**Example of Ratio:**

Because the finale values must be integers, multiply the bandwidth of all of the interfaces by a number that will make them all an integer.

Wan1 = T1 = 1.5 MB (x2) = 3

Wan2 = Cable = 10 MB (x2) = 20

#### Set Weights as:

- WAN1 Weight = 3, 3/23 of the traffic will go out wan1
- WAN2 Weight = 20, 20/23 of the traffic will go out wan2

* Note:* Any ratio can be used. This ratio was used because it closely matches the actual bandwidth available and would therefore optimize the performance of the network.

### Bruce Davis

#### Latest posts by Bruce Davis (see all)

- Interactions between WAN LLB and Asymmetric Routing - January 11, 2017
- Fixed Port Range IP Pools algorithm - November 2, 2016
- Signature vs. Adaptive vs. Behavioral - October 17, 2016