A technician, Joe, has been tasked with assigning two IP addresses to WAN interfaces on connected routers. In order to conserve address space, which of the
following subnet masks should Joe use for this subnet?
An IPv4 address consists of 32 bits. The first x number of bits in the address is the network address and the remaining bits are used for the host addresses. The
subnet mask defines how many bits form the network address and from that, we can calculate how many bits are used for the host addresses.
In this question, the /30 subnet mask dictates that the first 30 bits of the IP address are used for network addressing and the remaining 2 bits are used for host
addressing. The formula to calculate the number of hosts in a subnet is 2n – 2. The “n” in the host’s formula represents the number of bits used for host addressing.
If we apply the formula (22 – 2), a /30 subnet mask will provide 2 IP addresses.