Reprinted from http://cisco.chinaitlab.com/TCP/12553.html
If you have an IP address of class C, such as 192.168.10.0, you want to divide it into eight CIDR blocks. Each CIDR block can contain 32 hosts,
Subnetmask: zookeeper Upload Failed:
192.168.10.0-31, network address: 192.168.10.0, broadcast address: 192.168.10.31
192.168.10.32-63, network address: 192.168.10.32, broadcast address: 192.168.10.63
192.168.10.64-95, network address: 192.168.10.64, broadcast address: 192.168.10.95
192.168.10.96-127, network address: 192.168.10.96, broadcast address: 192.168.10.127
192.168.10.128-159, network address: 192.168.10.128, broadcast address: 192.168.10.159
192.168.10.160-191, network address: 192.168.10.160, broadcast address: 192.168.10.191
192.168.10.192-223, network address: 192.168.10.192, broadcast address: 192.168.10.223
192.168.10.20.- 255, network address: 192.168.10.20., broadcast address: 192.168.10.255
That is, each CIDR block has 32 IP addresses. The first is the network address, which is used to mark the network and the last is the broadcast address, which represents all hosts on the network.
These two IP addresses are reserved by TCP/IP and cannot be assigned to the host.
In addition, the first subnet 192.168.10.0-31 and the last subnet 192.168.10.20.- 255 are also retained and cannot be used. the reason is that the network address 192.168.10.0 of the first subnet and the multicast address 192.168.10.255 of the last subnet have two meanings.
First look at the network address and broadcast address of this big C. 192.168.10.0 is its network address, and 192.168.10.255 is its broadcast address. obviously, they are the same as the network address of the first subnet and the broadcast address of the last subnet.
So how can we tell the network address of 192.168.10.0? The answer is: add the subnet mask!
192.168.10.0 255.255.255.0 is the network address of a large C,
192.168.10.0 subnet mask is the network address of the first subnet.
192.168.10.255 255.255.255.255.0 is the broadcast address of large C,
192.168.10.255 multicast bandwidth is the broadcast address of the last subnet.
With a mask, their two meanings will not exist.
Therefore, in an environment that strictly classifies IP addresses according to TCP/IP ABCD, all 0 and 1 CIDR blocks are not allowed to be used to avoid ambiguity. this type of environment is called classful. in this environment, the subnet mask is valid only in the defined vro, And the mask information cannot reach other vrouters. for example, rip-1 does not contain mask information during route broadcast. The router that receives the route broadcast has to follow the standard because it does not know the mask of the network.
The TCP/IP definition gives it a mask. for example, get 10. x. x. X indicates that it is a class, and the mask is 255.0. 0.0; get a 204. x. x. x, and the mask is 255.255.255.0.
However, in the classless environment, the mask is paired with the IP address at any time, so that the two mentioned above will not exist.
Whether it is classful or classless depends on the routing protocol you run on the vro. A vro can run both classful and classless routing protocols. Rip is classful,
It does not contain mask information during route broadcast. OSPF, OSPF, and bgp4 are classless. They carry mask information during route broadcast and can run on the same vro at the same time.
On a Cisco router, you can use full 1 CIDR block by default, but not all 0 CIDR blocks. therefore, when you define an IP address for a port on the CIS Co router, the IP address cannot be in the full 0 CIDR block. if your configuration is correct, you will get an error message. after using the IP SUBNET-ZERO command, you can use all 0 CIDR blocks.
It should also be emphasized that, after using the IP SUBNET-ZERO command, if the routing protocol uses classf ul (such as rip), although your definition is successful, however, the subnet mask will not be taken to its route update message by RIP. that is, the IP SUBNET-ZERO command does not work about the routing protocol.
In short, in TCP/IP, all 0 and 1 CIDR blocks cannot be used because of their two meanings. cisco default enables full 1 CIDR blocks to be used, but full 0 CIDR blocks can only be used after an IP SUBNET-ZERO is configured.