On Sun, Mar 19, 2023 at 06:38:41PM +0800, cor...@free.fr wrote: [...]
> * 188.66.63.1/24 is a range, not a single host in SPF > * why it's not written as 188.66.63.0/24 which is more clear? My hunch is that they are meant to be equivalent, as, for example 192.168.63.42/24, or actually any 192.168.63.x for x in [0..255]. The problem with this notation is that its semantics are context dependent: it can denote a host address cum network mask (as in a CIDR interface spec) or a CIDR network range. The "context" is provided by the application trying to grok the notation, so it will vary :-) The canonical way to express the network part would be to set the host part to zero, which in this case would be, as you stated, 192.168.63.0/24. This goes along nicely with the convention [1] that the bottom address in CIDR is reserved for the network address, and the top for the broadcast address. But the non-canonical ways can be seen just as equivalent -- or erroneous. The software seems to prefer the former, and silently masks out the network part (I'd do that, too). Cheers [1] AFAIK this is just a convention. I think you can have IPv4 subnets where the bottom and the top addresses are actual host addresses; this is particularly useful when the subnet has just two addresses (i.e. /31), for example in a "transfer net". -- t
signature.asc
Description: PGP signature