advertisement
WAN Load Balancing 1-3
When WAN load balancing is disabled, the router uses its existing routing protocols and tables to determine the path for a particular IP flow and will also remember this route for future packets that belong to the same flow.
In order to efficiently operate with applications that can simultaneously run multiple applications, the WAN load balancer is able to create sessions without the need to specify port information.
The load balancer manages its sessions (creating, deleting, etc.) by starting a timer for each new session created. Each timer is refreshed when a packet for its particular session passes through the load balancer. When a particular timer reaches its orphantimeout value, its associated session is deemed to be orphan and is deleted.
If the load balancer is unable to find a particular resource in its tables and alternative non-load-balanced routes exist, the router will use the best alternative route available. Note that it is not mandatory for a router’s WAN links to operate via the load balancer.
Load Distribution Methods
■
■
■
■
The following load distribution methods can be configured:
Weighted Least Connect Distribution
Weighted Fast Response Distribution
Round Robin Distribution
This distribution method assigns new load balancer sessions alternately to each of the WAN ports available. This distribution method is simple to implement and is light on processing resources. However, round robin takes no account of factors such as the bandwidth of each WAN connection, as does the weighted lottery distribution method, which is described next.
Weighted Lottery Distribution
This distribution method assigns load balancer sessions to WAN ports by using a pseudo-random selection process. Each WAN port is assigned a weighting factor that increases or decreases the chances of the pseudo-random selection process selecting a particular port. Weighting factors can be set either manually or automatically.
When configuring the WAN load balancer manually, we recommend setting the weighting factor equal to the bandwidth of the link divided by a factor such as 1000. Therefore, a 10 Mbps link would be assigned a weighting factor of
10000000 ÷ 1000 = 10000.
The higher the weighting factor that is applied to a port, the greater will be its chances of being selected.
Software Version 2.7.5
C613-10454-00 REV A
1-4 Release Note
For example, if a router has two ports A and B, and:
• port A is configured with a weighting factor of 1000
• port B is configured with a weighting factor of 2000. then the load balancer is twice as likely to select port B than port A. However, if both ports are assigned the same weighting factor then the selection process resorts to the round robin selection method.
Weighted Least Connect Distribution
This distribution method assigns new load balancer sessions to WAN ports based on the current load (in sessions) on each WAN port. The load on a port is determined by dividing the number of its current sessions, by its weighted value. The WAN load balancer selects the WAN port with the smallest load, or more precisely, the port with the least connections relative to its weighting. To simplify configuration, weighted least connect uses the inverse of these values then selects the port with the highest numeric value. This is explained in the following example.
If a router has two ports A and B, and:
• port A is configured with a weighting factor of 4000 and has 10 current
WAN load balancer sessions
• port B is configured with a weighting factor of 2000 and has 4 current
WAN load balancer sessions then the weighted least connect for port A will be, 4000 ÷ 10 = 400, and the weighted least connect for port B will be 2000 ÷ 4 = 500.
In this case, the load balancer will select port B next because it has the higher weighted least connect value.
Because the weighted least connect method is based on dynamic information, it offers a slight advantage over the static ratio assignment method used by the weighted lottery selection. In the weighted lottery configuration, distribution of WAN load balancer sessions could become slightly unbalanced if some of the WAN ports are unavailable for selection, or if some WAN load balancer sessions persist for longer than others. By contrast, the weighted least connect configuration would maintain an even session distribution.
Software Version 2.7.5
C613-10454-00 REV A
WAN Load Balancing 1-5
Weighted Fast Response Distribution
This distribution method assigns new load balancer sessions to WAN ports based on the response times recorded for the transmission of WAN load balancer healthcheck messages. These messages are transmitted from each of the WAN load balancer ports and record response times between these ports and selected distant hosts. WAN ports that have faster healthcheck response times will be selected more frequently than those with slower response times.
This distribution method is useful when network latency is an important factor.
Note that you must configure WAN load balancer healthchecks in order to operate the weighted fast response distribution. Without healthchecks configured, the selection process will apply the equivalent of the round robin selection method.
Each WAN load balancer resource maintains a moving average that covers the last four response times for each healthcheck host. From the averages received for each healthcheck host, the WAN load balancer calculates an overall average for each port.
The following figure shows a simple single host network configured for weighted fast response distribution.
Remote Site A
Software Version 2.7.5
C613-10454-00 REV A
ISP-1 ISP-2
Port 1 Port 2
Load Balancing Router
Healthcheck Message
WANLB_WFRes
The load balancer sends healthcheck messages from its ports 1 and 2, to remote site A. Although the messages from each port have a common destination, their network path and conditions are different.
1-6 Release Note
The following figure shows how the round trip response times are used to determine which port the load balancer will use for its data traffic.
Healthcheck Interval
(set to1second)
Average
Response
Times
Network Response Time (Running Average) = 100 ms
200 ms
100 ms
50 ms
1 second
50 ms
1 second
50 ms
1 second
150 ms
1 second
Network Response Times for Port 1
150 ms
1 second
100 ms
1 second
200 ms
Network Response Time (Running Average) = 50 ms
200 ms
50 ms
55 ms 50 ms 50 ms
1 second 1 second 1 second
Network Response Times for Port 2
45 ms
1 second
WANLB_WFR_Graph
This figure illustrates the timing delays for a series of healthcheck messages transmitted from 2 ports on a router, where each port is sending healthchecks to a common host via its own respective network. The distance travelled by the healthchecks is indicated by the vertical arrow shown on the left-hand side of the chart, whilst their delay is measured on the horizontal time scale. An average response time, based on the last 4 healthchecks, is shown by the grey bars, which are measured by the time scale shown on the right-hand side of the chart.
The following table shows the last 4 response times recorded for each port together with their average values.
Port
1
2
Last 4 response times
50,50,150,150
55,50,50,45
Average
100
50
Because messages transmitted from port 2 have an average response that is twice as fast as those from port 1, the load balancer will select port 2 twice as often as port 1 for the data it transmits during the next healthcheck interval.
Note that because the WAN load balancer healthcheck’s messages are based on
ICMP packets, the response times recorded may not reflect the latency for other traffic types. Also, it is important that the sites chosen as healthcheck hosts are appropriate. For example, public servers can get overloaded with requests.
Selecting these servers as healthcheck hosts could produce unrealistic results.
Software Version 2.7.5
C613-10454-00 REV A
WAN Load Balancing 1-7
Assigning Weights
For weighted least connect and weighted lottery, the WAN port's assigned weight influences how often the WAN port will be selected. A good rule of thumb is to base this weight on the link's bandwidth. For situations where the underlying bandwidth of a WAN port is not known, or the bandwidth does not reflect the actual achievable throughput, WAN load balancer provides two alternatives; Automatic, and Perfect Automatic, weightings.
Automatic Weight
This method assigns a weight based on the port speed of your WAN interface.
The WAN port's weight is automatically set to the speed of the link (in bits per second) divided by 1000. Therefore, a 10 Mbps link, has a weight of:
1000
=
10000000
1000
= 10000
Where a port has autonegotiated its speed, the load balancer uses the negotiated speed for its weight calculation.
Where several IP interfaces use the same physical interface, the automatic weighting does not reflect the actual IP throughput that the interface is capable of. For this reason, you should not use automatic weighting with PPP links over Eth, VLAN, or L2TP interfaces.
Perfect Automatic Weight
This method assigns a weight based on throughput measurements taken by an adaptive bandwidth detection (ABD) process. ABD calculates a WAN port’s available bandwidth based on the average throughput of its IP interface measured over small preset resolution periods. After a predefined update interval has expired, the ABD process records the maximum value from the individual averages observed during this interval, and uses this as the WAN port's weight for the next update interval.
Software Version 2.7.5
C613-10454-00 REV A
1-8 Release Note
The following figure illustrates the adaptive bandwidth Detection - Weight
Calculation process
1500
1000
500
Ave BW
750 kbps
1s
Ave BW
1000 kbps
Ave BW
1250 kbps
Ave BW
1000 kbps
1s 1s 1s
Resolution Period (set to 1second)
Ave BW
750 kbps
1s
IP
Throughput
(kbps)
2000
1500
1000
50
Maximum average throughput detected
5 10 15 20 25 30 35 40 45 50 55
Update Interval (set to 1 minute)
60
Instantaneous bandwidth
Maximum average throughput over the update interval = 1250 kbps
WANLB_ABW
Healthchecks
By default, the WAN load balancer is only able to detect network malfunctions as far as the first remote connection from its wide area ports. To detect malfunctions within the wider Internet you will need to configure the WAN load balancer’s healthchecks facility. By periodically sending healthcheck packets to remote hosts and monitoring their responses, the router can determine the health of selected WAN links. The WAN load balancer healthchecks can be sent from every WAN load balancer resource, to every configured host.
It is important that you give some thought to your choice of a healthcheck host and select a site that is highly reliable. The healthcheck host could be a website critical to your organisation, however, public servers can get overloaded with requests and may drop healthcheck packets.We recommend that you use
Servers within a VPN network, or an intermediate node within your ISP, as your healthcheck hosts.
When healthchecks are configured, the operational state of a WAN load balancer resource is determined by the reachability of its healthcheck hosts. A
WAN load balancer resource needs at least one reachable host before it can start balancing traffic. If the WAN load balancer has no reachable healthcheck hosts then the resource will no longer balance its traffic. Although you can configure healthchecks to operate with any distribution method, only the weighted fast response method applies load balancing based on network response.
Software Version 2.7.5
C613-10454-00 REV A
advertisement
Related manuals
advertisement
Table of contents
- 2 Introduction
- 3 Upgrading to Software Version 2.7.5
- 4 Overview of New Features
- 5 MSS Clamping
- 5 Overview
- 6 Example
- 7 Command Reference Updates
- 7 create ppp
- 8 create ppp template
- 9 set ppp
- 10 set ppp template
- 11 show ppp pppoe
- 12 show ppp template
- 13 Reflecting TOS onto L2TP-tunnelled Packets
- 14 Command Reference Updates
- 14 add l2tp call
- 14 add l2tp ip
- 14 add l2tp user
- 15 set l2tp call
- 15 set l2tp user
- 16 show l2tp call
- 16 show l2tp ip
- 17 show l2tp user
- 18 New Speed and Duplex Mode Options
- 18 Fixed Speed and Autonegotiated Duplex Mode
- 18 Fixed 1000 Mbps Full Duplex Mode
- 19 Command Reference Updates
- 19 set switch port
- 20 Disabling IP ARP Cache Refreshing
- 20 Command Reference Updates
- 20 set ip arp refresharp
- 21 show ip
- 22 DHCP Option 82 Relay
- 23 Command Reference Updates
- 23 enable bootp relay option82
- 23 disable bootp relay option82
- 23 purge bootp relay
- 24 set bootp relay option82
- 25 set bootp relay option82 port
- 26 show bootp relay
- 27 show bootp relay port
- 28 IGMP Enhancements
- 28 Fast Leave
- 29 Filtering and Throttling
- 32 Command Reference Updates
- 32 add igmp filter
- 33 create igmp filter
- 33 delete igmp filter
- 34 destroy igmp filter
- 34 set igmp filter
- 35 set igmpsnooping fastleave
- 36 set switch port
- 38 show igmp filter
- 39 show igmpsnooping
- 40 show switch port
- 41 OSPF Network Types
- 43 Command Reference Updates
- 43 add ospf interface
- 44 set ospf interface
- 45 show ospf interface
- 46 BGP Enhancements
- 46 Changes to Algorithm for Determining the Best Route
- 48 Automatic Summarising: Advertising as Few Routes as Possible
- 51 Importing and Advertising the Default Route
- 52 Command Reference Updates
- 52 add bgp peer
- 52 disable bgp autosummary
- 53 disable bgp defaultoriginate
- 53 enable bgp autosummary
- 54 enable bgp defaultoriginate
- 54 set bgp peer
- 55 show bgp
- 56 show bgp peer
- 57 Classifying According to the Layer 5 Byte
- 58 Command Reference Updates
- 58 create classifier
- 59 set classifier
- 61 show classifier
- 63 Firewall Enhancements
- 63 Increased Number of Firewall Policy Rules
- 63 SIP Application Layer Gateway Diagnostic Tools
- 65 UDP Port Timeout
- 66 Command Reference Updates
- 66 add firewall policy udpporttimeout
- 67 delete firewall policy udpporttimeout
- 67 disable firewall policy
- 68 disable firewall policy debug
- 68 enable firewall policy
- 69 enable firewall policy debug
- 70 set firewall policy udpporttimeout
- 71 show firewall policy
- 72 show firewall policy udpporttimeout
- 73 show firewall session
- 74 WAN Load Balancing
- 75 VRRP Preemption Delay
- 76 Command Reference Updates
- 76 create vrrp
- 77 set vrrp
- 78 show vrrp
- 80 Introduction
- 80 Operating Principles
- 81 Load Distribution Methods
- 81 Round Robin Distribution
- 81 Weighted Lottery Distribution
- 82 Weighted Least Connect Distribution
- 83 Weighted Fast Response Distribution
- 85 Assigning Weights
- 86 Healthchecks
- 87 Operation with Other Software Features
- 87 Operation with Firewall
- 88 Operation with Policy Based Routing
- 88 Operation with Priority Based Routing
- 88 Operation with UPnP NAT Traversal
- 89 Configuring WAN Load Balancing
- 89 How to configure the WAN Load Balancer
- 91 Configuration Examples
- 94 Command Reference
- 94 add wanlb healthcheck
- 95 add wanlb resource
- 96 delete wanlb healthcheck
- 97 delete wanlb resource
- 97 disable wanlb
- 98 disable wanlb debug
- 99 disable wanlb healthcheck
- 100 disable wanlb resource
- 101 enable wanlb
- 102 enable wanlb debug
- 103 enable wanlb healthcheck
- 104 enable wanlb resource
- 105 reset wanlb resource
- 106 reset wanlb resource counter
- 107 set wanlb
- 108 set wanlb abd
- 110 set wanlb healthcheck
- 111 set wanlb resource
- 112 show wanlb
- 113 show wanlb debug
- 114 show wanlb healthcheck
- 115 show wanlb resource
- 122 show wanlb sessions
- 125 Introduction
- 126 Types of Filters
- 126 About Prefix Lists
- 127 About AS Path Lists
- 127 About Route Maps
- 129 About IP Route Filters
- 130 About IP Filters
- 130 Creating Filters
- 130 Creating Prefix Lists
- 131 Creating AS Path Lists for BGP
- 131 Creating Route Maps for BGP
- 138 Creating Route Maps for OSPF
- 141 Creating IP Route Filters
- 142 Creating IP Filters
- 142 Applying Filters
- 143 Applying Filters When Writing to the RIB
- 145 Applying Filters When Redistributing from the RIB
- 148 Applying Filters Before Advertising Routes
- 151 Overview of Filters for each Route Source
- 151 Border Gateway Protocol (BGP-4)
- 152 Open Shortest Path First (OSPF)
- 154 Routing Information Protocol (RIP)
- 154 Interface Routes
- 155 Statically-Configured Routes
- 156 Configuration Examples
- 156 Filtering When Writing BGP Routes to the RIB: Using an AS Path Filter
- 157 Filtering When Writing BGP Routes to the RIB: Using a Route Map
- 158 Filtering Before Advertising Routes with BGP: Using an AS Path Filter
- 159 Filtering Before Advertising Routes with BGP: Using a Route Map
- 160 Filtering Inbound and Outbound BGP Routes: Using Communities
- 161 Filtering When Importing Routes from BGP to OSPF
- 162 Command Reference
- 162 add ip aspathlist
- 164 add ip communitylist
- 166 add ip prefixlist
- 168 add ip route filter
- 171 add ip routemap
- 178 delete ip aspathlist
- 179 delete ip communitylist
- 179 delete ip prefixlist
- 180 delete ip route filter
- 181 delete ip routemap
- 182 set ip prefixlist
- 184 set ip route filter
- 187 set ip routemap
- 195 show ip aspathlist
- 196 show ip communitylist
- 197 show ip prefixlist
- 199 show ip route filter
- 200 show ip routemap