Technorati label: Subnet Mask, Network
Subnet Mask and network address
A valid broadcast address is the network address of the host plus the largest host number. The network address is obtained by bitwise AND the machine's IP address and subnet mask. We take the IP address 10.78.202.175 subnet mask as 255.255.255.0 as an example to analyze the above concepts.
Problem 1: The subnet mask is 255.255.255.0.
First, convert these two items into binary code.
IP Address: 20171010.01001110.11001010.10101111
Subnet Mask: 11111111.111111.11111111.00000000
The bitwise AND subsequent network addresses are obtained: 20171010.01001110.11001010.0000000, Which is 10.78.202.0 in decimal format. In theory, this network address can have 255 hosts, except for network address 0 and broadcast address 255, in fact, there are only 253 hosts, so we can know that 175 is the host number of your machine, and the broadcast address is the largest host number, that is, 10.78.202.255.
Question 1: The subnet mask is 255.255.255.255.192.Number of Host IP addresses in the subnet
Convert subnet mask 255.255.255.255.192 into binary code
Subnet Mask: 11111111.111111.1111111111.11000000
The subnet mask is 1 for the network address, and the 0 for the IP address that we can allocate, that is, our address range is 000000 ~ 111111. The outgoing network address and broadcast address. The valid address range is 1 ~ 62
Question 3: Is there 255.255.255.255?It may be a legal broadcast address.
The answer is that it cannot be dropped because 0.0.0.0 is not a valid subnet mask.