Interview Q&A / Computer Networks

INTERVIEW Q&A · 55 QUESTIONS

Computer Networks interview questions

What happens when you open a website, TCP vs UDP, DNS and HTTP.

  1. What is an IP address, a subnet and CIDR notation like /24?

    An IPv4 address is a 32-bit number that identifies a device on a network. CIDR notation such as 192.168.1.0/24 says how many leading bits are the network part; the rest identify hosts. A /24 has 256 addresses (254 usable), a /16 has 65,536, and each extra bit halves the size of the subnet.

    IntermediateIn-depth4 min read
  2. 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
  3. 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
  4. 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
  5. How many usable hosts are in a /26 subnet, and what is the general formula?

    A /26 leaves 6 host bits, so 2^6 = 64 addresses, of which 62 are usable because the first is the network address and the last is the broadcast address. The formula is 2^(32 - prefix) minus 2.

    BeginnerQuick answer1 min read
  6. What is route summarization? Summarize 192.168.0.0/24 and 192.168.1.0/24.

    Summarization replaces several contiguous routes with one shorter-prefix route. 192.168.0.0/24 and 192.168.1.0/24 combine into 192.168.0.0/23, which covers 192.168.0.0 to 192.168.1.255, so routers keep one entry instead of two.

    IntermediateQuick answer1 min read