Page 1 of 1

PCC (per-connection-classifier) hash function

Posted: Wed Feb 09, 2011 7:00 pm
by exa
Hiho,

I was wondering if there's any documentation or description about what the exact hash function used in PCC (or the algorithm, or anything similar) is. I'd like to compute by hand which PCC division group does, say, given src-address fall into.

(my problem is that I use PCC to separate customers into several public IP addresses (not everyone has his own public IP, but there's still no need to squeeze all customers to one public IP, right?) and sometimes I need to know what IP they actually use. Determining it by the obvious way (like viewing findmyip.com from customer's endpoint) is terribly slow for my purpose, I sometimes need to do that for larger groups of IPs.)

Thanks
-exa

Re: PCC (per-connection-classifier) hash function

Posted: Wed Feb 09, 2011 8:13 pm
by fewi
As far as I know it is not. It is known that the algorithm is not deterministic across boots (there is the concept of a seed value that is randomly determined at boot time), so just knowing the algorithm wouldn't be helpful. Mikrotik would basically have to build functionality into the router that lets you input values and get a packet path back. That would be nice to have (for example, Cisco line cards let you 'test' link aggregates and will output what interface of a bundle a specific source/destination MAC/IP would be sent across).

Re: PCC (per-connection-classifier) hash function

Posted: Wed Feb 09, 2011 8:25 pm
by exa
Ah nice, thanks. It would be nice to have a hashing function that can be tuned by hand, simple u32 match against some bit of IP address would do. Are there some possible plans for u32?

Thanks