[c-nsp] Per packet Load balancing
Amol Sapkal
amolsapkal at gmail.com
Tue Sep 7 14:26:47 EDT 2004
Hi,
On Tue, 7 Sep 2004 13:53:06 -0400, Rodney Dunn <rodunn at cisco.com> wrote:
> On Tue, Sep 07, 2004 at 11:08:08PM +0530, Amol Sapkal wrote:
> > On Tue, 7 Sep 2004 12:46:33 -0400, Rodney Dunn <rodunn at cisco.com> wrote:
> > > On Tue, Sep 07, 2004 at 10:09:59PM +0530, Amol Sapkal wrote:
> > > > Seems the post went in too early.
> > > > I checked after few minutes, the incoming load balancing doesnt work
> > > > now. I think I am missing something.
> > > >
> > > > This was what was done:
> > > > ip cef enabled globally.
> > > > Following command added to the physical interfaces which have the
> > > > sub-interfaces supposed to 'static load balance' the downlink traffic.
> > > >
> > > > ip load-sharing per-packet
> > > >
> > > >
> > > > What is it that I am missing?
> > >
> > > Put that command on the "ingress" interface that feeds the downstream
> > > PVC's.
> > >
> > > ie: Your links coming in from the internet.
> >
> > Ok. I put this on the incoming interface ( to Internet) but still it
> > didnt seem to load balance. But after I re-put it on the outgoing
> > interfaces, it is load-balancing closely( but not as accurately close
> > as process switched).
> > Any reason for this?
>
> No. Assuming you had it configured with process switching everywhere
> there is absolutely no difference from a load sharing perspective of
> that and cef per packet.
>
>
Yeah, but for some reason, it is not exact and accurate as
process-switching. But it does solve the problem. Because the value
are close within a range of 10%
(like 340K and 353K or 224K and 198K)
> >
> > The hash table shows me the 2 outgoing interfaces for each IP of the /28 pool.
> > In the 'ip cef accounting' , I dont have the 'load' option.
>
> It's hidden for no reason...just type it.
>
Done, it worked.
> Then do 'sh ip cef <dstprefix> internal' and see if you are using
> equal amounts over the buckets.
>
>
Sorry for this again, but I tried to get the meaning of the terms of
the output of the command. I couldnt egt what the term bucket means
here. (The IPs are changed for obvious reasons)
my_router#sh ip cef 2.2.2.134 int
2.2.2.128/28, version 446, per-packet sharing
0 packets, 0 bytes
Flow: AS 0, mask 28
tag information set
local tag: 4
via 2.2.2.2, 0 dependencies, recursive
traffic share 1, current path
next hop 2.2.2.2, Serial9/1/5.3 via 2.2.2.0/30
valid adjacency
via 1.1.1.1, 0 dependencies, recursive
traffic share 1
next hop 1.1.1.1, Serial9/1/3.100 via 1.1.1.1/32
valid 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 1)
Hash OK Interface Address Packets Tags imposed
1 Y Serial9/1/5.3 point2point 6437 none
2 Y Serial9/1/3.100 1.1.1.1 6438 none
3 Y Serial9/1/5.3 point2point 6438 none
4 Y Serial9/1/3.100 1.1.1.1 6438 none
5 Y Serial9/1/5.3 point2point 6438 none
6 Y Serial9/1/3.100 1.1.1.1 6438 none
7 Y Serial9/1/5.3 point2point 6438 none
8 Y Serial9/1/3.100 1.1.1.1 6438 none
9 Y Serial9/1/5.3 point2point 6438 none
10 Y Serial9/1/3.100 1.1.1.1 6435 none
11 Y Serial9/1/5.3 point2point 6437 none
12 Y Serial9/1/3.100 1.1.1.1 6437 none
13 Y Serial9/1/5.3 point2point 6437 none
14 Y Serial9/1/3.100 1.1.1.1 6436 none
15 Y Serial9/1/5.3 point2point 6437 none
16 Y Serial9/1/3.100 1.1.1.1 6437 none
my_router#
>
> >
> > Thanks - Amol
> >
> >
> > >
> > >
> > >
> > > >
> > > >
> > > >
> > > > On Tue, 7 Sep 2004 22:04:49 +0530, Amol Sapkal <amolsapkal at gmail.com> 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?
> > > > >
> > > > > >
> > > > > > 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