[c-nsp] Per packet Load balancing

Rodney Dunn rodunn at cisco.com
Tue Sep 7 12:45:46 EDT 2004


On Tue, Sep 07, 2004 at 10:04:49PM +0530, Amol Sapkal wrote:
> Thanks!
> On Tue, 7 Sep 2004 12:20:59 -0400, Rodney Dunn <rodunn at cisco.com> wrote:
> > You shouldn't do it that way.
> > 
> > You can configure CEF to do per-packet load
> > balancing.
> > 
> > Turn on CEF globally and then on the inbound
> > interface feeding the downstream equal cost paths
> > do "ip load-sharing per-packet".
> > 
> > Don't leave it like you have it now.  You are process
> > switching all the traffic.
> 
> 
> This works, I checked on the client router interface. The incoming
> traffic is load balanced.
> 
> Apologies for asking it here (and not reading it myself), what does
> 'ip load-sharing per-packet' actually do?

CEF switching is done on the inbound side.  Well, that's the
way we talk about it.  To affect CEF switching on/of for
an egress interface you have to disable it "no ip route-cache cef"
on the ingress interface feeding the link.

per-packet just simply tells CEF for every single packet you
index in to the loadinfo/pathinfo table to see which egress
link is next in line for a prefix that has equal cost paths.

You can do "sh ip cef <dst> internal" to see the hash buckes.

Router#sh ip cef 5.5.5.1 internal
5.5.5.1/32, version 10, attached, per-destination sharing
0 packets, 0 bytes
  via Loopback1, 1 dependency
    traffic share 1
    valid discard adjacency
  via Loopback2, 0 dependencies
    traffic share 1
    valid discard adjacency

  0 packets, 0 bytes switched through the prefix
  tmstats: external 0 packets, 0 bytes
           internal 0 packets, 0 bytes
  Load distribution: 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 (refcount 2)

  Hash  OK  Interface                 Address         Packets
  1     Y   special                   UNKNOWN               0
  2     Y   special                   UNKNOWN               0
  3     Y   special                   UNKNOWN               0
  4     Y   special                   UNKNOWN               0
  5     Y   special                   UNKNOWN               0
  6     Y   special                   UNKNOWN               0
  7     Y   special                   UNKNOWN               0
  8     Y   special                   UNKNOWN               0
  9     Y   special                   UNKNOWN               0
  10    Y   special                   UNKNOWN               0
  11    Y   special                   UNKNOWN               0
  12    Y   special                   UNKNOWN               0
  13    Y   special                   UNKNOWN               0
  14    Y   special                   UNKNOWN               0
  15    Y   special                   UNKNOWN               0
  16    Y   special                   UNKNOWN               0


and if you want to see the statistics you need to enable them:

"ip cef accounting load"

Rodney

> 
> 
> 
> 
> 
> > 
> > Rodney
> > 
> 
> 
> -- 
> Warm Regds,
> 
> Amol Sapkal
> 
> --------------------------------------------------------------------
> An eye for an eye makes the whole world blind 
> - Mahatma Gandhi
> --------------------------------------------------------------------


More information about the cisco-nsp mailing list