An address with an all-zero host portion refers to the network itself, rather than to any particular host.
Historically, this zero host address has served as an alternative broadcast address, and devices still respond that way.
So, I have to disagree with some other answers: no, zero is not a perfectly usable host address. If you need more than 254 addresses, you have to create a larger subnet.
Look, my Linksys router, whose address is
.1 responds to pings of
.0. (The netmask is
255.255.255.0, so the last octet corresponds to the host number.)
webserver:~# ping 192.168.1.0
Do you want to ping broadcast? Then -b
webserver:~# ping -b 192.168.1.0
WARNING: pinging broadcast address
PING 192.168.1.0 (192.168.1.0) 56(84) bytes of data.
64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=1.46 ms
64 bytes from 192.168.1.1: icmp_seq=2 ttl=64 time=0.812 ms
64 bytes from 192.168.1.1: icmp_seq=3 ttl=64 time=0.819 ms
If I assigned the
.0 address to some host, I wouldn't be able to ping it without the router chiming in with its responses also. And as you can see, some tools like that router's version of
0 as a broadcast.
You can bend the rules, if you're willing to patch all protocol stacks and other software which is affected by such a bending. Otherwise, stick to the rules.
Case in point.
I worked at a company which designed a network node built in a 14 slot chassis, running numerous independent OS images on several types of cards, all communicating via a backplane. There was a networking setup over the backplane with a convention that
127.X.0.Y is the internal IP address of node Y in slot X, all numbered from 1.
We basically subnetted the loopback address for our own purposes. To make it work, we had to patch the Linux kernel here and there, and IIRC, a little bit of user space.
Since that network was only used within the box, and most programs that require loopback use the
127.0.* network (and in fact the specific address
127.0.0.1) which continued to work normally, everything was cool.