Skip to main content

GATE CSE 2026Computer Networks › Network Layer, Routing & IP AddressingVerified

GATE CSE 2026 PYQ: If an IP network uses a subnet mask of 255.255.240.0 255.255.240.0 255.255.240.0 , the maximum number of IP…

If an IP network uses a subnet mask of 255.255.240.0255.255.240.0, the maximum number of IP addresses that can be assigned to network interfaces is ____\_\_\_\_. (answer in integer)

    Answer

    4094

    Approach

    Convert the given subnet mask to binary, count the number of host bits (the zero bits), compute the total address space as a power of two, then subtract the two reserved addresses (subnet/network address and directed broadcast address) because they cannot be assigned to interfaces.

    The mask /20 leaves 12 host bits, yielding a 4096-address block; removing the network and broadcast addresses leaves 4094 addresses that can actually be assigned to network interfaces.

    Reviewed by GateIQ Editorial Team: IIT & IISc Alumni.