Skip to content
dronacharya.ai

Computer networks interview questionswith answers and explanations

23 original computer networks questions of the kind asked in technical MCQ rounds and interviews, each with the answer and a short explanation. To answer them yourself first, open the CS fundamentals practice.

questions
23
easy
13
medium
7
hard
3
  1. Question 1

    Easy

    Which OSI layer is responsible for routing packets between different networks?

    1. AData link
    2. BNetworkAnswer
    3. CTransport
    4. DSession

    Explanation

    The network layer (IP) handles logical addressing and routing between networks.

  2. Question 2

    Easy

    Which statement about TCP and UDP is true?

    1. ATCP guarantees in-order delivery; UDP does not.Answer
    2. BUDP retransmits lost packets.
    3. CTCP is connectionless.
    4. DUDP uses a three-way handshake.

    Explanation

    TCP is connection-oriented with sequencing and retransmission. UDP is connectionless and gives no delivery or ordering guarantees.

  3. Question 3

    Medium

    How many usable host addresses does a /26 IPv4 subnet have?

    1. A64
    2. B62Answer
    3. C30
    4. D126

    Explanation

    A /26 leaves 6 host bits: 2⁶ = 64 addresses, minus the network and broadcast addresses = 62.

  4. Question 4

    Easy

    Which protocol turns a domain name such as www.example.com into an IP address?

    1. ADHCP
    2. BARP
    3. CDNSAnswer
    4. DFTP

    Explanation

    DNS (Domain Name System) resolves names to IP addresses. DHCP hands out addresses, ARP finds MAC addresses, and FTP transfers files.

  5. Question 5

    Easy

    On a local network, which protocol finds the MAC address for a known IPv4 address?

    1. ADNS
    2. BARPAnswer
    3. CICMP
    4. DNAT

    Explanation

    ARP (Address Resolution Protocol) broadcasts 'who has this IP?' and the owner replies with its MAC address.

  6. Question 6

    Easy

    What is the default port for HTTPS?

    1. A80
    2. B443Answer
    3. C22
    4. D8080

    Explanation

    HTTPS uses TCP port 443. Port 80 is plain HTTP, 22 is SSH, and 8080 is a common alternative HTTP port.

  7. Question 7

    Easy

    In what order are the segments of a TCP three-way handshake sent?

    1. ASYN, ACK, FIN
    2. BSYN, SYN-ACK, ACKAnswer
    3. CACK, SYN, SYN-ACK
    4. DSYN, ACK, SYN-ACK

    Explanation

    The client sends SYN, the server answers SYN-ACK (acknowledging and sending its own SYN), and the client confirms with ACK.

  8. Question 8

    Easy

    Which device works at the data link layer and forwards frames using MAC addresses?

    1. AHub
    2. BRouter
    3. CRepeater
    4. DSwitchAnswer

    Explanation

    A switch learns which MAC address is on which port and forwards each frame only there. Hubs and repeaters work at the physical layer, and routers at the network layer.

  9. Question 9

    Medium

    Which of these IPv4 addresses is a private address?

    1. A172.32.0.1
    2. B11.0.0.1
    3. C172.20.5.1Answer
    4. D192.169.1.1

    Explanation

    The private ranges are 10.0.0.0/8, 172.16.0.0/12 (172.16.0.0 to 172.31.255.255) and 192.168.0.0/16. Only 172.20.5.1 falls in one of them.

  10. Question 10

    Medium

    What is the network address of the host 192.168.10.77/27?

    1. A192.168.10.32
    2. B192.168.10.77
    3. C192.168.10.96
    4. D192.168.10.64Answer

    Explanation

    A /27 leaves 5 host bits, so subnets come in blocks of 32: 0, 32, 64, 96 and so on. 77 falls in the block 64 to 95, so the network address is 192.168.10.64.

  11. Question 11

    Medium

    What is the broadcast address of the subnet containing 10.0.5.130/25?

    1. A10.0.5.255Answer
    2. B10.0.5.127
    3. C10.0.5.128
    4. D10.0.255.255

    Explanation

    A /25 splits the last octet into blocks of 128. 130 is in the block 128 to 255, whose last address, 10.0.5.255, is the broadcast address.

  12. Question 12

    Medium

    Which subnet mask is the same as /20?

    1. A255.255.255.240
    2. B255.255.240.0Answer
    3. C255.255.248.0
    4. D255.240.0.0

    Explanation

    /20 means 20 one-bits: 8 + 8 + 4. The third octet is 11110000 = 240, so the mask is 255.255.240.0.

  13. Question 13

    Medium

    Live video calls usually carry their audio and video over UDP. Why?

    1. AUDP guarantees that every frame arrives
    2. BLate packets are useless, and UDP avoids the delay of retransmitting lost onesAnswer
    3. CUDP encrypts the media by default
    4. DUDP is the only protocol routers forward

    Explanation

    For live media, low delay matters more than perfect delivery. TCP would stall the stream to resend a lost packet; UDP lets the app skip it and carry on.

  14. Question 14

    Easy

    Which OSI layer does HTTP belong to?

    1. AApplicationAnswer
    2. BTransport
    3. CSession
    4. DNetwork

    Explanation

    HTTP is an application-layer protocol. It runs over TCP (or QUIC), which handles the transport layer.

  15. Question 15

    Easy

    Which statement about ICMP is true?

    1. AICMP runs on top of TCP
    2. BICMP assigns IP addresses to hosts
    3. Cping uses ICMP echo request and echo reply messagesAnswer
    4. DICMP encrypts IP packets

    Explanation

    ICMP carries control and error messages for IP, such as 'destination unreachable'. ping sends echo requests and waits for echo replies. ICMP sits directly on IP, not on TCP.

  16. Question 16

    Easy

    What is the main job of DHCP?

    1. ATurning domain names into IP addresses
    2. BRouting packets between networks
    3. CEncrypting web traffic
    4. DGiving hosts an IP address and network settings automaticallyAnswer

    Explanation

    A DHCP server leases each joining host an IP address along with the subnet mask, default gateway and DNS servers.

  17. Question 17

    Medium

    Eight computers are connected to one switch, with no VLANs configured. How many collision domains and broadcast domains are there?

    1. A8 collision domains and 1 broadcast domainAnswer
    2. B1 collision domain and 1 broadcast domain
    3. C8 collision domains and 8 broadcast domains
    4. D1 collision domain and 8 broadcast domains

    Explanation

    Each switch port is its own collision domain, giving 8. A switch forwards broadcasts out of every port, so without VLANs or a router they all share 1 broadcast domain.

  18. Question 18

    Hard

    Which TCP mechanism stops a fast sender from overwhelming a slow receiver?

    1. AThe congestion window grown by slow start
    2. BThe TTL field in the IP header
    3. CThe receive window advertised by the receiverAnswer
    4. DThe checksum

    Explanation

    This is flow control: the receiver advertises how much buffer space it has left, and the sender keeps its unacknowledged data within it. The congestion window protects the network, not the receiver.

  19. Question 19

    Hard

    How long does it take to put a 1,500-byte frame onto a 100 Mbps link (the transmission delay)?

    1. A15 µs
    2. B12 µs
    3. C1.2 ms
    4. D120 µsAnswer

    Explanation

    1,500 bytes = 12,000 bits. At 100,000,000 bits per second that takes 12,000 / 100,000,000 = 0.00012 s = 120 µs.

  20. Question 20

    Easy

    Which HTTP status code means the requested resource was not found?

    1. A401
    2. B500
    3. C301
    4. D404Answer

    Explanation

    404 is Not Found. 401 means authentication is needed, 500 is a server error, and 301 is a permanent redirect.

  21. Question 21

    Hard

    A /24 network is split into /28 subnets. How many subnets are there, and how many usable host addresses does each have?

    1. A16 subnets, 14 usable hosts eachAnswer
    2. B16 subnets, 16 usable hosts each
    3. C14 subnets, 16 usable hosts each
    4. D8 subnets, 30 usable hosts each

    Explanation

    Going from /24 to /28 borrows 4 bits: 2⁴ = 16 subnets. Each keeps 4 host bits: 2⁴ = 16 addresses, minus the network and broadcast addresses, leaves 14 usable.

  22. Question 22

    Easy

    What does NAT on a home router do?

    1. ATranslates the private addresses of home devices to the router's public address, so they can share itAnswer
    2. BAssigns MAC addresses to devices
    3. CTurns domain names into IP addresses
    4. DEncrypts all outgoing traffic

    Explanation

    NAT rewrites the source address (and usually the port) of outgoing packets to the public address, and keeps a table to send replies back to the right private device.

  23. Question 23

    Easy

    How long is an IPv6 address?

    1. A64 bits
    2. B32 bits
    3. C128 bitsAnswer
    4. D48 bits

    Explanation

    IPv6 addresses are 128 bits, written as eight groups of four hex digits. IPv4 uses 32 bits and a MAC address 48.

companies
222
rounds described
1,432
pieces of advice
3,771

Your next drive is closer than you think.

Start with the 15-minute mixed test: 13 questions that show where you stand in every section.