Computer Networks Interview Questions and Answers

The networking questions freshers should know, each answered in a sentence or two.

  1. Q1. How many layers does the OSI model have?

    • A. 7
    • B. 4
    • C. 6
    • D. 5
    Show answer

    Answer: A. 7
    Physical, Data Link, Network, Transport, Session, Presentation, Application.

  2. Q2. Which protocol is connection-oriented and reliable?

    • A. TCP
    • B. IP
    • C. ICMP
    • D. UDP
    Show answer

    Answer: A. TCP
    TCP uses handshakes, acknowledgements and retransmission.

  3. Q3. Which protocol is used for video calls and live streaming where speed matters more than reliability?

    • A. UDP
    • B. SMTP
    • C. FTP
    • D. TCP
    Show answer

    Answer: A. UDP
    UDP has no handshakes or retransmission, so it's faster.

  4. Q4. What does DNS do?

    • A. Encrypts web traffic
    • B. Assigns IP addresses automatically
    • C. Translates domain names into IP addresses
    • D. Sends email
    Show answer

    Answer: C. Translates domain names into IP addresses
    skillpark.org → an IP address the browser can connect to.

  5. Q5. The default port for HTTPS is:

    • A. 80
    • B. 21
    • C. 443
    • D. 25
    Show answer

    Answer: C. 443
    HTTP uses 80, FTP 21, SMTP 25.

  6. Q6. What does DHCP do?

    • A. Automatically assigns IP addresses to devices
    • B. Resolves domain names
    • C. Encrypts data
    • D. Routes email
    Show answer

    Answer: A. Automatically assigns IP addresses to devices
    Your phone gets an IP from the Wi-Fi router via DHCP.

  7. Q7. What happens in TCP's three-way handshake?

    • A. SYN, FIN, RST
    • B. GET, POST, PUT
    • C. SYN, SYN-ACK, ACK
    • D. HELLO, DATA, BYE
    Show answer

    Answer: C. SYN, SYN-ACK, ACK
    It sets up a connection before data flows.

  8. Q8. An IPv4 address has how many bits?

    • A. 128
    • B. 32
    • C. 16
    • D. 64
    Show answer

    Answer: B. 32
    IPv6 addresses have 128 bits.

  9. Q9. Which device works at the Network layer and forwards packets between networks?

    • A. Router
    • B. Switch (layer 2)
    • C. Repeater
    • D. Hub
    Show answer

    Answer: A. Router
    Switches forward frames inside a network using MAC addresses.

  10. Q10. Which HTTP method is meant for retrieving data without side effects?

    • A. GET
    • B. DELETE
    • C. POST
    • D. PATCH
    Show answer

    Answer: A. GET
    GET should be safe and idempotent.

  11. Q11. What does HTTP status code 404 mean?

    • A. Server Error
    • B. OK
    • C. Unauthorized
    • D. Not Found
    Show answer

    Answer: D. Not Found
    200 OK, 401 Unauthorized, 403 Forbidden, 500 Internal Server Error.

  12. Q12. What does HTTPS add on top of HTTP?

    • A. Encryption and server authentication using TLS
    • B. Faster speed only
    • C. Compression only
    • D. A different port number only
    Show answer

    Answer: A. Encryption and server authentication using TLS
    TLS certificates prove the site's identity and encrypt traffic.

  13. Q13. A MAC address identifies:

    • A. A user account
    • B. A website
    • C. A network interface's hardware
    • D. A program
    Show answer

    Answer: C. A network interface's hardware
    48 bits, usually written as six hex pairs.

  14. Q14. Which layer of the OSI model handles end-to-end delivery and ports?

    • A. Transport
    • B. Network
    • C. Data Link
    • D. Session
    Show answer

    Answer: A. Transport
    TCP and UDP live at the Transport layer.

  15. Q15. What is the purpose of a subnet mask?

    • A. To speed up DNS
    • B. To hide your IP address
    • C. To encrypt packets
    • D. To separate the network part of an IP address from the host part
    Show answer

    Answer: D. To separate the network part of an IP address from the host part
    e.g. 255.255.255.0 means the first 24 bits are the network.

  16. Q16. How many layers does the OSI model have?

    • A. 5
    • B. 4
    • C. 7
    • D. 3
    Show answer

    Answer: C. 7
    Physical, Data Link, Network, Transport, Session, Presentation, Application.

  17. Q17. How many layers does the TCP/IP model have (common version)?

    • A. 5
    • B. 4
    • C. 7
    • D. 3
    Show answer

    Answer: B. 4
    Link, Internet, Transport, Application.

  18. Q18. At which OSI layer does a router work?

    • A. Data link layer (2)
    • B. Network layer (3)
    • C. Transport layer (4)
    • D. Physical layer (1)
    Show answer

    Answer: B. Network layer (3)
    Routers forward packets using IP addresses.

  19. Q19. At which OSI layer does a switch usually work?

    • A. Data link layer (2)
    • B. Network layer (3)
    • C. Application layer (7)
    • D. Physical layer (1)
    Show answer

    Answer: A. Data link layer (2)
    Switches forward frames using MAC addresses.

  20. Q20. Which device simply repeats signals to all ports?

    • A. Hub
    • B. Gateway
    • C. Switch
    • D. Router
    Show answer

    Answer: A. Hub
    Hubs work at the physical layer and create collisions.

  21. Q21. What is the main difference between TCP and UDP?

    • A. They are the same
    • B. TCP is only for video
    • C. TCP is reliable and connection-oriented; UDP is fast and connectionless
    • D. UDP is reliable; TCP is not
    Show answer

    Answer: C. TCP is reliable and connection-oriented; UDP is fast and connectionless
    UDP suits video calls and games; TCP suits web pages and files.

  22. Q22. What is the TCP three-way handshake?

    • A. HELLO, OK, BYE
    • B. GET, POST, PUT
    • C. SYN, SYN-ACK, ACK
    • D. SYN, FIN, RST
    Show answer

    Answer: C. SYN, SYN-ACK, ACK
    It sets up a connection before data is sent.

  23. Q23. What does DNS do?

    • A. Speeds up downloads
    • B. Translates domain names into IP addresses
    • C. Assigns MAC addresses
    • D. Encrypts web traffic
    Show answer

    Answer: B. Translates domain names into IP addresses
    skillpark.org → an IP address.

  24. Q24. Which port does HTTPS use by default?

    • A. 80
    • B. 443
    • C. 21
    • D. 25
    Show answer

    Answer: B. 443
    HTTP uses 80.

  25. Q25. Which port does SSH use by default?

    • A. 22
    • B. 23
    • C. 443
    • D. 21
    Show answer

    Answer: A. 22
    Telnet uses 23 and is not encrypted.

  26. Q26. What does DHCP do?

    • A. Automatically assigns IP addresses to devices
    • B. Resolves domain names
    • C. Routes packets between networks
    • D. Encrypts Wi-Fi
    Show answer

    Answer: A. Automatically assigns IP addresses to devices
    Your phone gets an IP from the Wi-Fi router via DHCP.

  27. Q27. What does ARP do?

    • A. Assigns IP addresses
    • B. Finds the MAC address for an IP address on a local network
    • C. Finds the IP for a domain name
    • D. Encrypts packets
    Show answer

    Answer: B. Finds the MAC address for an IP address on a local network
    Address Resolution Protocol.

  28. Q28. How many bits are in an IPv4 address?

    • A. 128
    • B. 32
    • C. 64
    • D. 48
    Show answer

    Answer: B. 32
    Written as four numbers 0–255, e.g. 192.168.1.10.

  29. Q29. How many bits are in an IPv6 address?

    • A. 128
    • B. 64
    • C. 256
    • D. 32
    Show answer

    Answer: A. 128
    IPv6 solves IPv4 address exhaustion.

  30. Q30. How many bits are in a MAC address?

    • A. 32
    • B. 48
    • C. 64
    • D. 128
    Show answer

    Answer: B. 48
    Written as six pairs of hex digits.

  31. Q31. Which of these is a private IP address range?

    • A. 1.1.1.0 – 1.1.1.255
    • B. 192.168.0.0 – 192.168.255.255
    • C. 100.0.0.0 – 100.0.0.255
    • D. 8.8.8.0 – 8.8.8.255
    Show answer

    Answer: B. 192.168.0.0 – 192.168.255.255
    10.x.x.x and 172.16–31.x.x are private too.

  32. Q32. What does NAT do?

    • A. Encrypts traffic
    • B. Lets many private devices share one public IP address
    • C. Detects viruses
    • D. Assigns domain names
    Show answer

    Answer: B. Lets many private devices share one public IP address
    Your home router performs NAT.

  33. Q33. What is a subnet mask of /24 in dotted decimal?

    • A. 255.255.255.0
    • B. 255.255.255.255
    • C. 255.0.0.0
    • D. 255.255.0.0
    Show answer

    Answer: A. 255.255.255.0
    24 bits of ones.

  34. Q34. How many usable host addresses are in a /24 network?

    • A. 253
    • B. 254
    • C. 255
    • D. 256
    Show answer

    Answer: B. 254
    256 addresses minus the network and broadcast addresses.

  35. Q35. What is 127.0.0.1?

    • A. A public DNS server
    • B. The default gateway
    • C. The loopback address for the local machine
    • D. A broadcast address
    Show answer

    Answer: C. The loopback address for the local machine
    Also called localhost.

  36. Q36. What is the purpose of a default gateway?

    • A. The Wi-Fi name
    • B. The DNS server
    • C. The router that forwards traffic to other networks
    • D. The firewall password
    Show answer

    Answer: C. The router that forwards traffic to other networks
    Packets for outside the local subnet go to it.

  37. Q37. What does HTTP status 404 mean?

    • A. Unauthorized
    • B. OK
    • C. Not Found
    • D. Server error
    Show answer

    Answer: C. Not Found
    200 OK, 301 moved, 401 unauthorised, 500 server error.

  38. Q38. What does HTTP status 500 mean?

    • A. Not Found
    • B. Forbidden
    • C. Internal Server Error
    • D. Bad Request
    Show answer

    Answer: C. Internal Server Error
    Something failed on the server.

  39. Q39. Which HTTP method is meant for retrieving data without changing it?

    • A. PATCH
    • B. DELETE
    • C. GET
    • D. POST
    Show answer

    Answer: C. GET
    GET should be safe and idempotent.

  40. Q40. What is the difference between HTTP and HTTPS?

    • A. HTTPS is faster always
    • B. HTTPS encrypts traffic using TLS
    • C. There is no difference
    • D. HTTP uses port 443
    Show answer

    Answer: B. HTTPS encrypts traffic using TLS
    The padlock in the browser means HTTPS.

  41. Q41. What does a firewall do?

    • A. Stores web pages
    • B. Speeds up the internet
    • C. Assigns IP addresses
    • D. Allows or blocks network traffic based on rules
    Show answer

    Answer: D. Allows or blocks network traffic based on rules
    Can be hardware or software.

  42. Q42. What is a VPN?

    • A. A faster internet plan
    • B. An encrypted tunnel over a public network
    • C. A web browser
    • D. A type of router
    Show answer

    Answer: B. An encrypted tunnel over a public network
    Virtual Private Network.

  43. Q43. What is latency?

    • A. The time for data to travel from source to destination
    • B. The size of a packet
    • C. The number of devices on a network
    • D. The amount of data per second
    Show answer

    Answer: A. The time for data to travel from source to destination
    Measured in milliseconds (ping).

  44. Q44. What is bandwidth?

    • A. The number of open ports
    • B. The delay of a connection
    • C. The maximum data transfer rate of a connection
    • D. The distance between devices
    Show answer

    Answer: C. The maximum data transfer rate of a connection
    Measured in Mbps or Gbps.

  45. Q45. Which topology connects every device to a central device?

    • A. Bus
    • B. Star
    • C. Mesh
    • D. Ring
    Show answer

    Answer: B. Star
    If the centre fails, the network fails.

  46. Q46. Which topology connects every device to every other device?

    • A. Bus
    • B. Star
    • C. Full mesh
    • D. Tree
    Show answer

    Answer: C. Full mesh
    Very reliable but expensive.

  47. Q47. What is a socket?

    • A. An endpoint identified by an IP address and a port
    • B. A browser tab
    • C. A type of router
    • D. A physical cable
    Show answer

    Answer: A. An endpoint identified by an IP address and a port
    Programs communicate through sockets.

  48. Q48. Which protocol sends email between mail servers?

    • A. SNMP
    • B. SMTP
    • C. HTTP
    • D. FTP
    Show answer

    Answer: B. SMTP
    IMAP and POP3 retrieve email.

  49. Q49. Which protocol is used for file transfer and uses ports 20/21?

    • A. SMTP
    • B. FTP
    • C. DNS
    • D. DHCP
    Show answer

    Answer: B. FTP
    SFTP is the secure alternative over SSH.

  50. Q50. What does the TTL field in an IP packet do?

    • A. Encrypts the packet
    • B. Sets the packet size
    • C. Marks the packet's priority
    • D. Limits how many hops a packet can make before being discarded
    Show answer

    Answer: D. Limits how many hops a packet can make before being discarded
    Prevents packets from looping forever.

  51. Q51. What is a MAC address used for?

    • A. Naming websites
    • B. Encrypting data
    • C. Identifying a network interface on the local network
    • D. Routing across the internet
    Show answer

    Answer: C. Identifying a network interface on the local network
    It is assigned to the network card.

  52. Q52. What is the difference between a LAN and a WAN?

    • A. They are the same
    • B. A WAN is wireless only
    • C. A LAN covers a small area; a WAN spans large distances
    • D. A LAN uses the internet
    Show answer

    Answer: C. A LAN covers a small area; a WAN spans large distances
    The internet is the largest WAN.

  53. Q53. Which protocol does ping use?

    • A. HTTP
    • B. TCP
    • C. UDP
    • D. ICMP
    Show answer

    Answer: D. ICMP
    Echo request and echo reply.

  54. Q54. What happens when you type a URL into a browser (first step)?

    • A. The browser resolves the domain name through DNS
    • B. The page is printed
    • C. The browser clears its cache
    • D. The server sends an email
    Show answer

    Answer: A. The browser resolves the domain name through DNS
    Then TCP + TLS handshakes, the HTTP request, and rendering.

  55. Q55. What is a CDN?

    • A. A firewall
    • B. A programming language
    • C. A type of database
    • D. A network of servers that delivers content from locations close to users
    Show answer

    Answer: D. A network of servers that delivers content from locations close to users
    Content Delivery Network; Cloudflare is an example.

  56. Q56. What is the purpose of TCP flow control?

    • A. Assign ports
    • B. Stop a fast sender from overwhelming a slow receiver
    • C. Encrypt the data
    • D. Route packets
    Show answer

    Answer: B. Stop a fast sender from overwhelming a slow receiver
    Uses a sliding window.

  57. Q57. What does TCP congestion control do?

    • A. Chooses the shortest route
    • B. Blocks hackers
    • C. Slows sending when the network is congested
    • D. Compresses data
    Show answer

    Answer: C. Slows sending when the network is congested
    Slow start and congestion avoidance.

  58. Q58. What is a broadcast address?

    • A. An address that sends a packet to every host on a subnet
    • B. The router's address
    • C. A loopback address
    • D. A public IP
    Show answer

    Answer: A. An address that sends a packet to every host on a subnet
    In 192.168.1.0/24 it is 192.168.1.255.

  59. Q59. What is a cookie in web browsing?

    • A. A virus
    • B. A type of cache server
    • C. Small data the server asks the browser to store and send back
    • D. An encrypted password
    Show answer

    Answer: C. Small data the server asks the browser to store and send back
    Used for sessions, like staying signed in.

  60. Q60. What is the difference between a stateless and a stateful protocol?

    • A. There is no difference
    • B. A stateless protocol is encrypted
    • C. A stateless protocol keeps no memory of previous requests
    • D. A stateful protocol is faster
    Show answer

    Answer: C. A stateless protocol keeps no memory of previous requests
    HTTP is stateless; cookies add state on top of it.

Practised these? Now prove it.

Take a timed mock test with new questions every attempt, earn a verified certificate at 70%+, and get noticed by employers.

Start a mock test