Message88692
In pre-CIDR days, assuming a prefixlen of 24 for a 192.168.x.x address
made sense. Nowadays it is better not to make that assumption. So I
find ipaddr's default of 32 to be "safer" than using a class based default.
The larger point, however, is that there _is_ a mask associated with the
address in ifconfig. There _must_ be one. So that is not an example
that shows that a separate address class is useful.
As for the == thing, I agreed with you that address compared to network,
if you had an address class, would yield false. My point was that
HypotheticalNetworkClass('192.168.1.1') ==
HypotheticalNetworkClass('192.168.1.1/32')
should yield True, because, as I said above, in a CIDR world using a
default of a hostmask for an otherwise unadorned address makes the most
sense.
As for an example of when the equivalence is useful, it is useful every
time I set up an access rule or route that applies to a single host.
Otherwise, I _must_ give a specific netmask, because in real life the
classfull default is often not the correct netmask. Most networking
software that I've dealt with requires explicit netmasks (often with a
shorthand to specify an ip/hostmask pair). It is true that when a
netmask isn't required it generally defaults to the classful netmask,
but having such a default is becoming more rare with time, in my
experience (because of CIDR). |
|
Date |
User |
Action |
Args |
2009-06-02 00:05:18 | r.david.murray | set | recipients:
+ r.david.murray, gvanrossum, loewis, gregory.p.smith, Rhamphoryncus, pitrou, giampaolo.rodola, benjamin.peterson, ezio.melotti, mattsmart, shields, pmoody, pnasrat, oubiwann, claymation |
2009-06-02 00:05:16 | r.david.murray | set | messageid: <1243901115.61.0.214333760642.issue3959@psf.upfronthosting.co.za> |
2009-06-02 00:05:14 | r.david.murray | link | issue3959 messages |
2009-06-02 00:05:12 | r.david.murray | create | |
|