Load-Balancing with Static Routing

We will be using a simple topology to understand the concept  :


We made loopbacks each on R1& R2 and configure default static-routing with next hop interfaces on R2.

 Configuration is like this :

On R1:

Configuring Default-routes on R1:

On R2:

Now we did traceroute from R1  to Loopback 2.2.2.2 on R2 :

Take a look … it is sending one packet from 12.12.12.0/24 network and other from

And this is what R1 shows but whats happening  behind the scenes on R2 ?

Enabling Debug ip packet on R2 will help to know the sources of packets .

So, this is interesting ….

It shows,

For  one packet  source is 12.12.12.1 ( interface S0/0)

And for another 30.15.20.1 (interface S0/1)  and the process take place like this and packets are sended from each serial interface of R1  alternatively .

But here’s the catch ….

With traceroute load-balancing is  working fine but when  I tried with PING to 2.2.2.2

And as usual #debug ip packets  was enabled  on R2 . Things are not in favour now 🙁

They are only using same route to send and receive packets .

And at the same time on R1

Note: Routed packets via FIB …

I saw it is following only 30.15.20.0/24 network to send packets . No load balancing .

Look at the above picture carefully ,

When R1 is sending packet  s=30.15.20.1 , d=2.2.2.2,  routed through RIB.

And When R2 is sending Acknowledgement reply for this packet when s=2.2.2.2  and d=30.15.20.1, routed via FIB.

Mummble …. Now whats that CEF, FIB, RIB ??

 

RIB – routing information base

FIB – forwarding information base

CEF– Cisco Express Forwarding

Once CEF is enabled, it will form the FIB table with the help of Routing table. Now router no longer looks on RIB and FIB acts as replacement for RIB.

CEF also generates adjacency table which pre-maps all of the next hop ip as well as MAC address so as we configure Static routing, CEF add routes to FIB (forwarding information base) and send the packets through the interface which is added first into the table and the static route  we have configured first will be  added first and will be used to send packets .

Since, here 30.15.20.0/24 is stored first as well as configured first for static route so it will be using 30.15.20.0/24

 

 

At the same moment and it will not check the routing table when sending packets to another router/network from then on unless there is change in the routing table and will forward all the packets based on CEF table only.

CEF is ON by default on the routers.

Now, try to debug after Disabling CEF on R1

 

 

We are successful to load-balance equally from R1-R2 by disabling CEF. J

 

NOTE:  Routed via RIB  not FIB  i.e. No longer using FIB table created by CEF.

Now, why??  Why ?? traceroute is able to do load-balancing without disabling CEF ?

Better to find out through practical approach

CEF is enable (by default)

Enable #debug ip packet   and

Traceroute to 2.2.2.2

Note : sending broad/multicast .

 Now, why it was choosing 30.15.20.0/24 not 12.12.12.10/24 network when we are sending packets through PING ??

Thank you for reading .