Re: > ip-cef understanding ...., cant get a clear picture of

From: Bogdan Sass (bogdan.sass@catc.ro)
Date: Sat Sep 27 2008 - 04:16:34 ART


rakesh_groupstudy@yahoo.com wrote:
> one final doubt b&. i was messing up with ip cef command and its usgae and
> got
> this b& is my understanding of the ip cef correct following this paragraph?
>
> Recent Cisco IOS releases have Cisco Express Forwarding (CEF) enabled by
> default. CEF allows fast switching of packets based on a per-destination
> switching architecture. The first packet in a flow is routed, and the rest
> are
> switched. This is the preferred behavior in most circumstances, because it
> allows load balancing in fast-switching architectures. However, if we were to
> ping the destination network, we would not see load balancing occurring on a
> packet level because CEF treats the entire series of pings as one flow.
> CEF on R3 overrides the per-packet balancing behavior of process switching
> with per-destination load balancingb&
>
>
    Strange quote here... It mixes up CEF and fast switching.
   
    You basically have three major types of packet switching in a router:
    1) process switching. Every packet causes a routing table lookup.
Slow as hell :P , but allows for per-packet load-balancing
    2) fast switching (route once, switch many). The first packet going
to a particular destination causes a routing table lookup. The result of
that lookup is subsequently kept in a cache, and following packets going
towards that destination use the stored result. Faster than process
switching, but it still requires that first table lookup, and allows
only for per-destination load-balancing (due to this caching of the
routing table lookup result).
    3) CEF. The "cache" used for switching the packets is prebuilt,
based on the routing table. All packets are switched using that cache.
The fastest switching method of the three, allows for both per-packet
and per-destination load-balancing (by default, is uses per-destination).

    So with ip cef enabled with the default settings, if the router has
two paths to the same destination, it would only use one of the paths
for all packets going towards a particular destination. All of the
packets going towards 10.10.10.2 (for example) will use the first path -
no matter if it's 2 packets or 1000 packets we're talking about. Packets
going towards another host (10.10.11.1, for example) will use the second
path, and so on - in most networks, the flows balance each other out,
and both paths are used almost equally.
    You can use per-packet load-balancing with CEF, but there is a
reason for using per-destination load-balancing by default: it avoids
problems with packets arriving to the destination out of order, due to
unequal-delay paths.

    HTH,

-- 
Bogdan Sass
CCAI,CCNP,CCSP,JNCIA-ER
Information Systems Security Professional
"Curiosity was framed - ignorance killed the cat"

Blogs and organic groups at http://www.ccie.net



This archive was generated by hypermail 2.1.4 : Sat Oct 04 2008 - 09:26:20 ART