Computer Networking Basics
A host has IP address 192.168.1.10 and subnet mask 255.255.255.0. What is the network address of the network it belongs to?
- A192.168.0.0
- B192.168.1.0
- C192.168.1.255
Show answer and explanation
Answer: B. 192.168.1.0
A subnet mask is a 32-bit value showing how many upper bits of an IP address represent the network (the network part): the run of 1s is the network part and the 0s are the host part. 255.255.255.0 has its upper 24 bits set, so in CIDR notation it is written "/24", as in 192.168.1.0/24. A bitwise AND of the IP address and the subnet mask clears the host part and gives the network address 192.168.1.0. 192.168.1.255, with the host part all 1s, is the broadcast address and is not assigned to hosts.
- A. This treats only the upper 16 bits as the network part (as for /16).
- B. Correct. It is the address with the host part (lower 8 bits) set to 0.
- C. This is the broadcast address, with the host part all 1s.