Community discussions

MikroTik App
 
exa
newbie
Topic Author
Posts: 37
Joined: Sat Jul 04, 2009 2:07 pm

PCC (per-connection-classifier) hash function

Wed Feb 09, 2011 7:00 pm

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
 
fewi
Forum Guru
Forum Guru
Posts: 7734
Joined: Tue Aug 11, 2009 3:19 am

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

Wed Feb 09, 2011 8:13 pm

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).
Specific answers require specific questions. When in doubt, post the output of "/ip address print detail", "/ip route print detail", "/interface print detail", "/ip firewall export", and an accurate network diagram.
 
exa
newbie
Topic Author
Posts: 37
Joined: Sat Jul 04, 2009 2:07 pm

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

Wed Feb 09, 2011 8:25 pm

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

Who is online

Users browsing this forum: No registered users and 99 guests