Start learning →

What is the function of the SUBNET MASK in IPv4?

AEncrypts the IP address
BSeparates the network portion from the host
CCounts the number of hops to a destination
DSelects which protocol to use
Answer & Solution
Correct answer: B. Separates the network portion from the host
1. An IPv4 address is divided into NETWORK and HOST portions. The subnet mask says where the division is. 2. Example: address 192.168.1.42 with mask 255.255.255.0 (or /24): - The first 24 bits (192.168.1) is the NETWORK identifier. - The last 8 bits (42) is the HOST within that network. 3. The mask consists of $1$-bits for the network portion, $0$-bits for the host portion (always contiguous). 4. CIDR notation /24 means 24 network bits. Common masks: /16, /24, /28, /30 for point-to-point links. 5. Other options misstate the role. _Source: RFC 1180 "A TCP/IP Tutorial", §5 (IP — Addressing and Subnetting)._
Practise this question with Quill — GATE CSE →

Keep practising Computer Networks

Browse all Computer Networks questions for GATE CSE, or explore more Computer Science topics.

Start a Computer Networks lesson →
Related questions