Load Balancing & Link Failover |
Link Failover
The Link Failover feature allows us to make changes to the routing table, when a link fails. Although, all dynamic routing protocols are designed to react to link failures, the Okapi's Link Failover feature is designed keeping in mind the SME environment where we may not want to assume the existence of any peer router running a routing protocol. Okapi(when using Link Failover) just sends ICMP packets to well known hosts(say kritikal.in) using each of the ISP links available to determine if that link is up or down. New routes are inserted or deleted depending on whether that link is up or down. Since, it inserts routes into the routing table, the CLI of Link Failover is somewhat similar to that of other routing protocols.
ConfigurationIf we are getting our network connection from two interfaces, Serial 0 and FastEthernet 0, then we identify the routes to insert, when respective interfaces are up. And, we insert the routes as follows. For FastEthernet 2 interface Okapi(config)# router failover FastEthernet 2 Assuming 115.248.142.17 is our ISP's gateway, in case FastEthernet 2. Okapi(config-router)# ip route 0.0.0.0/0 115.248.142.17 distance 2 A ping address is also specified which will be used to check the health of that interfaceOkapi(config-router)# ping-address google.com
Okapi(config)# router failover Serial 0 Assuming 122.160.172.1 is our ISP's gateway, in case Serial 0. Okapi(config-router)# ip route 0.0.0.0/0 122.160.172.1 distance 3 A ping address is also specified which will be used to check the health of that interfaceOkapi(config-router)# ping-address kritikalsolutions.com
The distances, can be made equal, in which case all the traffic starts getting split between the two interfaces. This is what we call load balancing. Unfortunately, this does not go well with some applications and configurations and should be implemented carefully.
Load Balancing
Suppose you have two internet connections in your network. The Load balance feature allows you to define weights with which the outgoing traffic would be divided into these two interfaces, so that the load could be effectively shared among them. If the weights are not specified then the traffic is equally shared by the interfaces. We use the well known "ip route" command to define such multi path routes.
Configuration
For defining a default route such that the traffic is divided in the ratio of 1:2 between two interfaces with nexthop addresses of 115.248.142.17 and 122.160.172.1): (config)# ip route 0.0.0.0/0 115.248.142.17 weight 2 (config)# ip route 0.0.0.0/0 122.160.172.1 weight 1 The above routes are just like any other static routes. They can also be created using Link Failover.
Link Failover, Load Balancing and Exceptions
Load Balancing, as implemented above, can sometimes cause network problems.
To support exceptions to load balancing(with or without Failover), we need to use multiple routing tables. Multiple routing tables help us implement different routing rules for different classes of traffic. The steps are as follows.
|