Question : Can fourth octet be 0 or 255 for a host?

Can the right most octet in an IP address ever be zero or 255 for a valid host address?

I feel the answer should be "no" as this would be reserved for the network ID and broadcast address. But then I thought about CIDR subnetting. You could have a network 10.10.0.0 and the subnet mask 255.255.128.0 (/17). That would make the broadcast address 10.10.127.255, the first address 10.10.0.1 and the last address 10.10.127.254. So surely any address in between is valid? E.g. 10.10.1.0? 10.10.2.0? Or even 10.10.1.255?

Are these valid? Or they reserved and if so why? (They're not the network ID and they're not the broadcast address).

Thanks,

leonst

Answer : Can fourth octet be 0 or 255 for a host?

Yes.

Say you have a network 10.1.1.0/23.  In this case, 10.1.1.255 would be a valid host address.
Random Solutions  
 
programming4us programming4us