in reply to Re: comparing two ip addresses.
in thread comparing two ip addresses.

IP-addresses are numbers, and as such, they can be compared in terms of greater or lesser. And it makes sense. It happens to be that the lowest ip address in a given range is the network address, the highest is the broadcast address. How would you say that avoiding the words low and high, greater and lesser?

--shmem

_($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                              /\_¯/(q    /
----------------------------  \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}

Replies are listed 'Best First'.
Re^3: comparing two ip addresses.
by aquarium (Curate) on Sep 16, 2006 at 14:51 UTC
    your statement about IP addresses whilst true in general, is not technically correct. you can actually choose any address you like for the network and broadcast, as long as all the devices on this net know the same.
    also...as the other monks said...ip adresses are not lower or higher, when you are talking about IP addressing...they're either equal or not equal. although we may consider them in those terms (higher/lower) for purposes of sorting.
    the hardest line to type correctly is: stty erase ^H