cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
679
Views
5
Helpful
5
Replies

Load sharing w/ multiple CEs in a WCCPv2 environment

mindnich
Level 1
Level 1

Hi,

can someone help me understand how to configure load balancing based on source ip addresses in a WCCPv2 environment? I´m using several Cisco Content engines (565, 510, 507, ACNS 5.2.1.7) attached via a L2 connection to a pair of 6509 Sup2/MSFC2 doing WCCPv2 L2-redirect. On the CE I configure "mask assign" as the recommended L2 method for PFC2:

wccp wmt router-list-num 1 l2-redirect mask-assign

With that the default assignment method for several CEs is based on destination address. Changing that to be based on src-ip as I understand is done via:

wccp wmt mask src-ip-mask 0x???

The command line gives you a hint that the 1´s in that hex number are the "care" bits. But what does it care for in the original address, a 1 or a 0 because it´s only a mask?

How should I calculate those masks to get an equal distribution to two CEs, for let´s say all even source ip's to one and all odd ip's to the other CE?

Any help appreciated

Andy

1 Accepted Solution

Accepted Solutions

seilsz
Level 4
Level 4

You set mask bits to one (1) to determine which bits in the src IP address are used to evaluate the "uniqueness" of an address. It [the mask] doesn't necessarily care that it's a one (1) or a zero (0).

How you calculate the mask is *highly* dependent on your environment. For example, if you are using the CE's inside an Enterprise, and the first two (2) octets of all src IP addresses are the same, you would specify a mask that only looks at a subset of the last 16 bits. However, if you're using the CE's to reverse-proxy cache to the Internet, src IP addresses may be random enough that you don't care what any of the bits are (mask = 0x00000000).

~Zach

View solution in original post

5 Replies 5

seilsz
Level 4
Level 4

You set mask bits to one (1) to determine which bits in the src IP address are used to evaluate the "uniqueness" of an address. It [the mask] doesn't necessarily care that it's a one (1) or a zero (0).

How you calculate the mask is *highly* dependent on your environment. For example, if you are using the CE's inside an Enterprise, and the first two (2) octets of all src IP addresses are the same, you would specify a mask that only looks at a subset of the last 16 bits. However, if you're using the CE's to reverse-proxy cache to the Internet, src IP addresses may be random enough that you don't care what any of the bits are (mask = 0x00000000).

~Zach

the mask is used the specify which bit to look into the address.

For example, with a mask of 0x1, you can look at the first bit only.

Each bit can then have 2 values.

The CE will then negotiate which value it will take.

CE1 will take value 0 and CE2 will take value 1.

Like this you have splitted the traffic based on even/odd addresses.

You have to care about at least 1 bit and I would not recommend to set more than 10 care bits.

10 bits is 1024 possible values to be splitted among the CE.

If you set all care bits to 1, then you have entry for each possible ip address - you won't have enough memory.

So your solution even/odd seems to be fine and only requires 1 care bit - the first one.

Regards,

Gilles.

Thanks guys for your quick help! That was excactly what I´ve been looking for because the documentation is not very comprehensive when it comes to that details.

After reading the first response I´ve tried excactly the 0x1 mask and it worked fine.

Having achieved that I started looking into dynamic load sharing, like dynamic distribution when one of the boxes gets overloaded (I´m using them as WMT stream splitters currently) but with the mask setup it´s like black and white, even IPs to machine A, odd IPs to machine B.

I assume that would be too much of a wish ?

this is for sure not dynamic.

But if you have 1 cache more powerfull you could split the load like 2/3 - 1/3.

another solutin - more expensive - is to use a loadbalancer to forward the traffic to the cache instead of using wccp.

The loadbalancer will give you more options to select the leastloaded cache.

Regards,

Gilles.

And a correction to my initial post ...

As Gilles mentioned, you must specify at least one (1) bit that you care about. Using a mask of 0x0 basically says ignore the src IP address.

~Zach

Review Cisco Networking for a $25 gift card