[Xorp-users] Question about bsr hash-mask-length for i pv6 pim

Pavlin Radoslavov pavlin at icir.org
Sat Apr 28 14:14:43 PDT 2007


> 2000:38:50::2        2000:50:51::2          2000:50:95::2      2000:95:50::2     2000:95:51::2
> are five crp for  FF00::/8 with the same priority.
>  
> When I use hash mask length 128,  cisco 7200 map all group to one rp.
> which is different from XORP,  is this right ?

The CandRP hash function is described in RFC 4601 Section 4.7.2:

   Value(G,M,C(i))=
   (1103515245 * ((1103515245 * (G&M)+12345) XOR C(i)) + 12345) mod 2^31

       where C(i) is the RP address and M is a hash-mask.
       ...
       The hash-mask allows a small number of consecutive groups (e.g., 
       4) to always hash to the same RP.
       ...
       For address families other than IPv4, a 32-bit digest to be used
       as C(i) and G must first be derived from the actual RP or group
       address.  Such a digest method must be used consistently
       throughout the PIM domain.  For IPv6 addresses, we recommend
       using the equivalent IPv4 address for an IPv4-compatible address,
       and the exclusive-or of each 32-bit segment of the address for
       all other IPv6 addresses.  For example, the digest of the IPv6
       address 3ffe:b00:c18:1::10 would be computed as 0x3ffe0b00 ^
       0x0c180001 ^ 0x00000000 ^ 0x00000010, where ^ represents the
       exclusive-or operation.

   2.  The candidate RP with the highest resulting hash value is then
       the RP chosen by this Hash Function.  If more than one RP has the
       same highest hash value, the RP with the highest IP address is
       chosen.

Hence, if you use hash mask length of 128 (instead of the default
126 for example), then the result should be that you can't guarantee
that 4 consecutive groups will match to the same CandRP.

Of course, it could be possible that the output of the hash function
for the groups you have tried is such that one particular CandRP is
the chosen one, but the probability for that should be low.

The best thing would be to write a short test program that
implements the above hash function and calculates what the RP should
be. Then match the output to what Cisco and XORP think. This should
tell you whether the problem is in Cisco or XORP.

Regards,
Pavlin



More information about the Xorp-users mailing list