Latest News

What is CEF- Cisco Express Forwarding: Load-Balancing with Static Routing

What is CEF- Cisco Express Forwarding: Load-Balancing with Static Routing

The topology is given below we will be using here :

clip_image001

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

Configuration is like this :

On R1:

clip_image003

Configuring Default-routes on R1:

clip_image004

On R2:

clip_image006

Now we did trace route from R1 to Loopback 2.2.2.2 on R2 :

clip_image007

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 what’s happening behind the scenes on R2 ?

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

clip_image009

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 has been sent from each serial interface of R1 alternatively.

But here’s the catch ….

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

clip_image010

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

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

clip_image012

And at the same time on R1

clip_image014

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

clip_image015

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

clip_image017

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

clip_image019

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??

Hope this is informative for you .

Thank you for reading.

No comments:

Post a Comment

Contact Us

24x7 online , we happy to answer you
tamilcypc@gmail.com

Disclaimer

This Blog and its TUT's are intended for educational purposes only, no-one involved in the creation of this TuT may be held responsible for any illegal acts brought about by this Blog or TuT.



Featured Post

Custom Domains And HTTPS Redirection Code