Configure for load balancing using static route

Posted: 12 May 2018 in CCNA
Tags: , ,

Today through this article i will try to show you how to configure load balancing or load sharing using static routing.I mean one can use static routing too for load-balancing.Here in this architecture we have total 3 routers R1 ,R1 and R3. When any traffic generated from R1 for R3 it can travel in two ways: In other ways you can simply say that when we want to send something from PC0 (1.0.0.2) to PC1 (5.0.0.2) our packets reach there in two ways. here in this lab there are two possible paths to travell from pc0 to pc1. The First one is R1R3 and the second one is R1R2R3.I am going to perform this lab with the help of cisco packet tracer here.So just start learning load balancing and load sharing using static route with the help of an example lab using cisco packet tracer.

so when we have two simultaneously path to send packets from source to destination that is known as load balancing.

So here for Load Balancing we need to configure two static route to reach network 5.0.0.0/8 from network 1.0.0.0/8.

 

load balancing

load balancing configuration using static routing

keep in Mind that there are total two methods of load-balancing or Load sharing:

1. Load balancing can be per-packet based
2.Load balancing can be  per-destination based.

When we say about load balancing you must be sure that load balancing and load sharing are approx same thing. Load sharing or load balancing is actually a method to divide the network traffic and sent it to destination through different links available in the network.

 

Now when we come to more specif Form of Load sharing and That is Load sharing through static routes then load sharing can be divided in to two Parts:
1. Equal Cost Load-sharing:

In Equal cost Load sharing using static routes a router automatically share traffic if more than one link to same destination available with equal metric.

2. Non Equal Cost Load-sharing:

In unequal-cost Load sharing static routes sends the traffic to all available links available in the network but the traffic percentage will be different across different links.

A weak link gets only 40% of the Traffic but a strong link gets the 60% of the traffic. here weak and strongs are in terms of speed usually.

 

configuration on Router R1:
r1(config)#ip route 5.0.0.0 255.0.0.0 2.0.0.2

r1(config)#ip route 5.0.0.0 255.0.0.0 3.0.0.2

r1(config)#ip route 4.0.0.0 255.0.0.0 2.0.0.2

r1(config)#ip route 4.0.0.0 255.0.0.0 3.0.0.2

 

configuration on Router R2:
R2(config)#ip route 1.0.0.0 255.0.0.0 2.0.0.1

R2(config)#ip route 1.0.0.0 255.0.0.0 4.0.0.2

R2(config)#ip route 3.0.0.0 255.0.0.0 2.0.0.1

R2(config)#ip route 3.0.0.0 255.0.0.0 4.0.0.2

R2(config)#ip route 5.0.0.0 255.0.0.0 4.0.0.2

R2(config)#ip route 5.0.0.0 255.0.0.0 2.0.0.1

 

configuration on Router R3:
R3(config)#ip route 1.0.0.0 255.0.0.0 3.0.0.1

R3(config)#ip route 1.0.0.0 255.0.0.0 4.0.0.1

R3(config)#ip route 2.0.0.0 255.0.0.0 3.0.0.1

R3(config)#ip route 2.0.0.0 255.0.0.0 4.0.0.1

 

 

check routing table for load balancing on router R3:
R3#show ip route

S 1.0.0.0/8 [1/0] via 3.0.0.1

[1/0] via 4.0.0.1

S 2.0.0.0/8 [1/0] via 3.0.0.1

[1/0] via 4.0.0.1

C 3.0.0.0/8 is directly connected, Serial0/0/0

C 4.0.0.0/8 is directly connected, Serial0/0/1

C 5.0.0.0/8 is directly connected, FastEthernet0/0

 

as you ca see the first one sending the traffic through 3.0.0.1 and the second one sending the traffic through 4.0.0.1.

 

use ip debug command to find load balancing path.
R3#debug ip packet

Packet debugging is on

R3#

IP: tableid=0, s=5.0.0.2 (FastEthernet0/0), d=1.0.0.2 (Serial0/0/1), routed via RIB

IP: s=5.0.0.2 (FastEthernet0/0), d=1.0.0.2 (Serial0/0/1), g=4.0.0.1, len 28, forward

IP: tableid=0, s=5.0.0.2 (Serial0/0/1), d=1.0.0.2 (Serial0/0/0), routed via RIB

IP: s=5.0.0.2 (Serial0/0/1), d=1.0.0.2 (Serial0/0/0), g=3.0.0.1, len 28, forward

IP: tableid=0, s=1.0.0.2 (Serial0/0/0), d=5.0.0.2 (FastEthernet0/0), routed via RIB

IP: s=1.0.0.2 (Serial0/0/0), d=5.0.0.2 (FastEthernet0/0), g=5.0.0.2, len 28, forward

 

 

To understand Load balancing more keep few facts in Mind:

Load balancing and backup Path is two different thing.

In next tutorial i will show you how to configure Backup path using static route and What is the Difference between load balancing and backup Path.

 

CEF Load-Balancing 

CEF – Cisco Express Forwarding load balancing is by default using source and destination IP to calculate the hash and distribute traffic over multiple paths.

 

CEF is on by default, But if you find some device with CEF off like in Mine case.  as  you can see below cef is off on my router.
R2#show ip cef

%IPv4 CEF not running

 

If CEF is OFF on your Router you can enable it using below command.
R2(config)#ip cef

 

You can see CEF working using below command:
R2#show ip cef

Prefix Next Hop Interface

0.0.0.0/0 drop Null0 (default route handler entry)

0.0.0.0/32 receive

1.0.0.0/8 attached to Serial0/0/1

attached to Serial0/0/0

2.0.0.0/8 attached Serial0/0/0

2.0.0.0/32 receive

2.0.0.2/32 receive

2.255.255.255/32 receive

3.0.0.0/8 attached to Serial0/0/1

attached to Serial0/0/0

4.0.0.0/8 attached Serial0/0/1

4.0.0.0/32 receive

4.0.0.1/32 receive

4.255.255.255/32 receive

5.0.0.0/8 attached to Serial0/0/1

attached to Serial0/0/0

224.0.0.0/4 drop

224.0.0.0/24 receive

255.255.255.255/32 receive

R2#

ethical hacking Tuition center

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s