I think what you wanted to do was to look at the prefix digits in common
between the two IP addresses. That's an ok but questionable idea. IP addresses
that are in the same AS will share some number of prefix digits. Looking at the
prefix digits will give you some sense of whether the two IPs belong to the
same AS (not really but we'll let it slide). Better than nothing but will not work
in the general case.
What you proposed to do was to take the absolute value of the difference
between two IP addresses. That's a bad idea. There is a huge difference
between IP addresses (represented in hex): (0x80000000, 0x7fffffff) and
(0x12345678, 0x12345677) that your metric fails to capture.
Bob.
On 10/16/06, David Barrett <[EMAIL PROTECTED]> wrote:
Ah, excellent, this is just what I was hoping to hear. Thanks, Matt.
(Incidentally, the latter case you mentioned -- evaluating A-B vs A-C --
isn't what I'm doing, and I agree, won't work.)
-david
On Mon, 16 Oct 2006 4:51 pm, Matthew Kaufman wrote:
>> Can you
>> contrive a network situation where my algorithm fails?
>>
>> -david
>
> There's many. Here's just one off the top of my head (that I've
> actually
> seen, though the addresses are changed slightly to protect the
> innocent):
>
> Company uses RFC1918 addressing internally for its LAN and WAN. Used
> to
> just use 192.168.0.0, now is also using the 10.0.0.0 network.
>
> Computer 1 is here in the US, at 192.168.1.1 internally, 64.1.1.1
> externally
> on ISP A.
>
> Computer 2 is in India, at 10.0.0.1 internally, and 62.1.1.1 externally
> on
> ISP B.
>
> An MPLS WAN connects the two internal networks, but each uses its own
> local
> ISP. Each ISP is a 2nd-tier player providing service to the company (T3
> here, DSL in India).
>
> Obviously the MPLS path with RFC1918 addresses is a win, though your
> algorithm fails.
>
> It also fails (and much worse) for the general case where peer A needs
> to
> decide if peer B or peer C is better based on addressing, given how
> nearly-random the worldwide assignment of IP addresses is.
>
> Matthew Kaufman
> [EMAIL PROTECTED]
>
>
>
> _______________________________________________
> p2p-hackers mailing list
> [email protected]
> http://lists.zooko.com/mailman/listinfo/p2p-hackers
_______________________________________________
p2p-hackers mailing list
[email protected]
http://lists.zooko.com/mailman/listinfo/p2p-hackers
_______________________________________________ p2p-hackers mailing list [email protected] http://lists.zooko.com/mailman/listinfo/p2p-hackers
