Interview Q&A / Computer Networks
Computer Networks interview questions
What happens when you open a website, TCP vs UDP, DNS and HTTP.
Prefer rapid revision? Practise Computer Networks short interview answers →
- Convert 255.255.255.240 to CIDR notation, and /21 to a dotted mask.
255.255.255.240 has 28 one-bits (24 plus 4 from 240 = 11110000), so it is /28, giving 16 addresses and 14 usable hosts. A /21 is 255.255.248.0.
BeginnerQuick answer1 min read - Given 192.168.10.77/27, find the network address, broadcast address and host range.
A /27 has blocks of 32 addresses. 77 falls in the block starting at 64, so network is 192.168.10.64, broadcast is 192.168.10.95, and usable hosts are .65 to .94 (30 hosts).
BeginnerQuick answer1 min read - How do you check whether two IP addresses are in the same subnet?
Apply the subnet mask to both addresses (bitwise AND). If the network addresses match, they are in the same subnet and can talk directly. If not, traffic must go via the default gateway.
BeginnerQuick answer1 min read - How do you divide 192.168.1.0/24 into four equal subnets?
Borrow 2 host bits (2^2 = 4 subnets) to get /26. The subnets are 192.168.1.0/26, .64/26, .128/26 and .192/26, each with 64 addresses and 62 usable hosts.
BeginnerQuick answer1 min read - What is VLSM? Allocate subnets for 100, 50 and 20 hosts from 192.168.5.0/24.
VLSM (variable length subnet masking) lets each subnet use the mask that fits its size instead of one size for all. Allocate largest first: /25 for 100 hosts, /26 for 50, /27 for 20, and a /30 for a router link.
IntermediateQuick answer1 min read