The older routing protocols, such as RIP, relayed routes as a single 32-bit address. The high-order bits allowed each address to split into its network and host fields. A simple convention was then followed. If the host field contained all 0 bits, then the address was a network route that matched every address within that classful network, the equivalent of a /8, /16, or /24 prefix, depending on the address class. Any 1 bits in the host field caused it to be interpreted as a host route, matching only the exact address specified, the equivalent of /32 prefix. This is why the all-zeros address is reserved - it was used by the routing protocols to match the entire classful network.
The advent of subnetting undermined this scheme, but the designers of subnetting decided against any changes to the format of the routing protocols. This meant that there was still only a single 32-bit address to work with, though its interpretation became much more complex. Addresses in foreign networks (classful networks not directly attached to the router processing the information) were interpreted as before. Addresses in local networks were processed using the subnet mask programmed into the router. The address was first split into its three fields. If both subnet and host fields were all 0s, it was a network route, as before. An address with 1 bits in the subnet field, but all 0 bits in the host field was a subnet route, matching all addresses within that subnet. Finally, addresses with 1 bits in the host field were interpreted as host routes, as before. This lead to more reserved addresses - both the all-0s subnet and the all-0s host in each subnet were reserved.
CIDR finally forced the original routing protocols to be abandoned completely. A new breed of classless routing protocols, such as OSPF, was introduced. These protocols explicitly communicated both a 32-bit address and a prefix length, vastly simplifying the interpretation of this information. Instead of three types of routes, a classless routing protocol uses a single type, the prefix route, more general than any of the older types. OSPF allows complex prefixes such as 195.13.128/19 to be explicitly conveyed without any external assumptions.
However, sometimes network engineers must use legacy routing protocols and operating systems that don't fully support CIDR. In this case, several restrictions must be keep in mind.