Computer Networks Interview Questions and Answers
The networking questions freshers should know, each answered in a sentence or two.
Q1. How many layers does the OSI model have?
- A. 7
- B. 4
- C. 6
- D. 5
Show answerHide answer
Answer: A. 7
Physical, Data Link, Network, Transport, Session, Presentation, Application.Q2. Which protocol is connection-oriented and reliable?
- A. TCP
- B. IP
- C. ICMP
- D. UDP
Show answerHide answer
Answer: A. TCP
TCP uses handshakes, acknowledgements and retransmission.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 answerHide answer
Answer: A. UDP
UDP has no handshakes or retransmission, so it's faster.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 answerHide answer
Answer: C. Translates domain names into IP addresses
skillpark.org → an IP address the browser can connect to.Q5. The default port for HTTPS is:
- A. 80
- B. 21
- C. 443
- D. 25
Show answerHide answer
Answer: C. 443
HTTP uses 80, FTP 21, SMTP 25.Q6. What does DHCP do?
- A. Automatically assigns IP addresses to devices
- B. Resolves domain names
- C. Encrypts data
- D. Routes email
Show answerHide answer
Answer: A. Automatically assigns IP addresses to devices
Your phone gets an IP from the Wi-Fi router via DHCP.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 answerHide answer
Answer: C. SYN, SYN-ACK, ACK
It sets up a connection before data flows.Q8. An IPv4 address has how many bits?
- A. 128
- B. 32
- C. 16
- D. 64
Show answerHide answer
Answer: B. 32
IPv6 addresses have 128 bits.Q9. Which device works at the Network layer and forwards packets between networks?
- A. Router
- B. Switch (layer 2)
- C. Repeater
- D. Hub
Show answerHide answer
Answer: A. Router
Switches forward frames inside a network using MAC addresses.Q10. Which HTTP method is meant for retrieving data without side effects?
- A. GET
- B. DELETE
- C. POST
- D. PATCH
Show answerHide answer
Answer: A. GET
GET should be safe and idempotent.Q11. What does HTTP status code 404 mean?
- A. Server Error
- B. OK
- C. Unauthorized
- D. Not Found
Show answerHide answer
Answer: D. Not Found
200 OK, 401 Unauthorized, 403 Forbidden, 500 Internal Server Error.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 answerHide answer
Answer: A. Encryption and server authentication using TLS
TLS certificates prove the site's identity and encrypt traffic.Q13. A MAC address identifies:
- A. A user account
- B. A website
- C. A network interface's hardware
- D. A program
Show answerHide answer
Answer: C. A network interface's hardware
48 bits, usually written as six hex pairs.Q14. Which layer of the OSI model handles end-to-end delivery and ports?
- A. Transport
- B. Network
- C. Data Link
- D. Session
Show answerHide answer
Answer: A. Transport
TCP and UDP live at the Transport layer.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 answerHide 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.Q16. How many layers does the OSI model have?
- A. 5
- B. 4
- C. 7
- D. 3
Show answerHide answer
Answer: C. 7
Physical, Data Link, Network, Transport, Session, Presentation, Application.Q17. How many layers does the TCP/IP model have (common version)?
- A. 5
- B. 4
- C. 7
- D. 3
Show answerHide answer
Answer: B. 4
Link, Internet, Transport, Application.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 answerHide answer
Answer: B. Network layer (3)
Routers forward packets using IP addresses.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 answerHide answer
Answer: A. Data link layer (2)
Switches forward frames using MAC addresses.Q20. Which device simply repeats signals to all ports?
- A. Hub
- B. Gateway
- C. Switch
- D. Router
Show answerHide answer
Answer: A. Hub
Hubs work at the physical layer and create collisions.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 answerHide 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.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 answerHide answer
Answer: C. SYN, SYN-ACK, ACK
It sets up a connection before data is sent.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 answerHide answer
Answer: B. Translates domain names into IP addresses
skillpark.org → an IP address.Q24. Which port does HTTPS use by default?
- A. 80
- B. 443
- C. 21
- D. 25
Show answerHide answer
Answer: B. 443
HTTP uses 80.Q25. Which port does SSH use by default?
- A. 22
- B. 23
- C. 443
- D. 21
Show answerHide answer
Answer: A. 22
Telnet uses 23 and is not encrypted.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 answerHide answer
Answer: A. Automatically assigns IP addresses to devices
Your phone gets an IP from the Wi-Fi router via DHCP.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 answerHide answer
Answer: B. Finds the MAC address for an IP address on a local network
Address Resolution Protocol.Q28. How many bits are in an IPv4 address?
- A. 128
- B. 32
- C. 64
- D. 48
Show answerHide answer
Answer: B. 32
Written as four numbers 0–255, e.g. 192.168.1.10.Q29. How many bits are in an IPv6 address?
- A. 128
- B. 64
- C. 256
- D. 32
Show answerHide answer
Answer: A. 128
IPv6 solves IPv4 address exhaustion.Q30. How many bits are in a MAC address?
- A. 32
- B. 48
- C. 64
- D. 128
Show answerHide answer
Answer: B. 48
Written as six pairs of hex digits.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 answerHide answer
Answer: B. 192.168.0.0 – 192.168.255.255
10.x.x.x and 172.16–31.x.x are private too.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 answerHide answer
Answer: B. Lets many private devices share one public IP address
Your home router performs NAT.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 answerHide answer
Answer: A. 255.255.255.0
24 bits of ones.Q34. How many usable host addresses are in a /24 network?
- A. 253
- B. 254
- C. 255
- D. 256
Show answerHide answer
Answer: B. 254
256 addresses minus the network and broadcast addresses.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 answerHide answer
Answer: C. The loopback address for the local machine
Also called localhost.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 answerHide answer
Answer: C. The router that forwards traffic to other networks
Packets for outside the local subnet go to it.Q37. What does HTTP status 404 mean?
- A. Unauthorized
- B. OK
- C. Not Found
- D. Server error
Show answerHide answer
Answer: C. Not Found
200 OK, 301 moved, 401 unauthorised, 500 server error.Q38. What does HTTP status 500 mean?
- A. Not Found
- B. Forbidden
- C. Internal Server Error
- D. Bad Request
Show answerHide answer
Answer: C. Internal Server Error
Something failed on the server.Q39. Which HTTP method is meant for retrieving data without changing it?
- A. PATCH
- B. DELETE
- C. GET
- D. POST
Show answerHide answer
Answer: C. GET
GET should be safe and idempotent.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 answerHide answer
Answer: B. HTTPS encrypts traffic using TLS
The padlock in the browser means HTTPS.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 answerHide answer
Answer: D. Allows or blocks network traffic based on rules
Can be hardware or software.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 answerHide answer
Answer: B. An encrypted tunnel over a public network
Virtual Private Network.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 answerHide answer
Answer: A. The time for data to travel from source to destination
Measured in milliseconds (ping).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 answerHide answer
Answer: C. The maximum data transfer rate of a connection
Measured in Mbps or Gbps.Q45. Which topology connects every device to a central device?
- A. Bus
- B. Star
- C. Mesh
- D. Ring
Show answerHide answer
Answer: B. Star
If the centre fails, the network fails.Q46. Which topology connects every device to every other device?
- A. Bus
- B. Star
- C. Full mesh
- D. Tree
Show answerHide answer
Answer: C. Full mesh
Very reliable but expensive.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 answerHide answer
Answer: A. An endpoint identified by an IP address and a port
Programs communicate through sockets.Q48. Which protocol sends email between mail servers?
- A. SNMP
- B. SMTP
- C. HTTP
- D. FTP
Show answerHide answer
Answer: B. SMTP
IMAP and POP3 retrieve email.Q49. Which protocol is used for file transfer and uses ports 20/21?
- A. SMTP
- B. FTP
- C. DNS
- D. DHCP
Show answerHide answer
Answer: B. FTP
SFTP is the secure alternative over SSH.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 answerHide answer
Answer: D. Limits how many hops a packet can make before being discarded
Prevents packets from looping forever.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 answerHide answer
Answer: C. Identifying a network interface on the local network
It is assigned to the network card.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 answerHide answer
Answer: C. A LAN covers a small area; a WAN spans large distances
The internet is the largest WAN.Q53. Which protocol does ping use?
- A. HTTP
- B. TCP
- C. UDP
- D. ICMP
Show answerHide answer
Answer: D. ICMP
Echo request and echo reply.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 answerHide answer
Answer: A. The browser resolves the domain name through DNS
Then TCP + TLS handshakes, the HTTP request, and rendering.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 answerHide answer
Answer: D. A network of servers that delivers content from locations close to users
Content Delivery Network; Cloudflare is an example.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 answerHide answer
Answer: B. Stop a fast sender from overwhelming a slow receiver
Uses a sliding window.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 answerHide answer
Answer: C. Slows sending when the network is congested
Slow start and congestion avoidance.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 answerHide 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.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 answerHide answer
Answer: C. Small data the server asks the browser to store and send back
Used for sessions, like staying signed in.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 answerHide 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