Computer Network Interview Questions & Answers

Top questions asked in interviews for freshers & experienced developers

1. What is Computer Network?
A computer network is a collection of interconnected devices that share resources.
  • Enables communication
  • Data sharing
  • Resource sharing
2. What are the types of networks?
  • LAN – Local Area Network
  • MAN – Metropolitan Area Network
  • WAN – Wide Area Network
3. What is LAN?
LAN connects devices in a small geographic area like an office or home.
  • High speed
  • Low cost
4. What is WAN?
WAN covers a large geographical area.
  • Internet is the biggest WAN
  • Uses leased lines
5. What is MAN?
MAN covers a city or metropolitan area.
  • Larger than LAN
  • Smaller than WAN
6. What is a protocol?
Protocol is a set of rules for communication.
  • Defines data format
  • Controls data transmission
7. What is OSI Model?
OSI is a 7-layer reference model.
  • Helps understand networking
  • Standardized communication
8. Name OSI layers?
  • Physical
  • Data Link
  • Network
  • Transport
  • Session
  • Presentation
  • Application
9. What is TCP/IP model?
TCP/IP is a practical networking model.
  • Application
  • Transport
  • Internet
  • Network Access
10. Difference between OSI and TCP/IP?
  • OSI has 7 layers
  • TCP/IP has 4 layers
  • OSI is theoretical
  • TCP/IP is practical
11. What is IP address?
IP address uniquely identifies a device.
  • IPv4 – 32 bit
  • IPv6 – 128 bit
12. What is IPv4?
IPv4 is a 32-bit address.
  • Written in decimal format
  • Example: 192.168.1.1
13. What is IPv6?
IPv6 solves IPv4 exhaustion problem.
  • 128-bit address
  • Uses hexadecimal
14. What is MAC address?
MAC address is a physical address.
  • 48-bit
  • Assigned by manufacturer
15. What is DNS?
DNS converts domain name to IP address.
  • Human readable names
  • Faster access
16. What is DHCP?
DHCP automatically assigns IP addresses.
  • Reduces manual work
  • Avoids IP conflicts
17. What is HTTP?
HTTP is used for web communication.
  • Stateless protocol
  • Port 80
18. What is HTTPS?
HTTPS is a secure version of HTTP.
  • Uses SSL/TLS
  • Encrypted communication
19. What is FTP?
FTP transfers files over a network.
  • Port 21
  • Client-server model
20. What is SMTP?
SMTP is used to send emails.
  • Port 25
  • Outgoing mail server
21. What is POP3?
POP3 is a protocol used to receive emails.
  • Port 110
  • Downloads emails to local device
22. What is IMAP?
IMAP is an email receiving protocol.
  • Port 143
  • Emails stay on server
23. Difference between POP3 and IMAP?
  • POP3 downloads emails
  • IMAP syncs emails
  • IMAP supports multiple devices
24. What is bandwidth?
Bandwidth is the maximum data transfer rate.
  • Measured in bps
  • Higher bandwidth = more data transfer
25. What is latency?
Latency is the delay in data transmission.
  • Measured in milliseconds
  • Lower latency is better
26. What is packet?
Packet is a small unit of data sent over network.
  • Contains header and data
  • Improves transmission efficiency
27. What is packet switching?
Data is sent in small packets.
  • Efficient
  • Used by Internet
28. What is circuit switching?
Dedicated path is established before transmission.
  • Used in telephone networks
  • Reliable but costly
29. Difference between packet and circuit switching?
  • Packet switching is flexible
  • Circuit switching is fixed
  • Packet switching is cost-effective
30. What is a router?
Router forwards data between networks.
  • Works at network layer
  • Uses IP address
31. What is a switch?
Switch connects devices within LAN.
  • Uses MAC address
  • Faster than hub
32. Difference between hub and switch?
  • Hub broadcasts data
  • Switch sends data to specific device
33. What is a firewall?
Firewall protects network from unauthorized access.
  • Monitors traffic
  • Blocks malicious data
34. What is NAT?
NAT converts private IP to public IP.
  • Improves security
  • Saves IP addresses
35. What is subnetting?
Subnetting divides network into smaller networks.
  • Efficient IP usage
  • Improves performance
36. What is CIDR?
CIDR is Classless Inter-Domain Routing.
  • Flexible IP addressing
  • Reduces routing table size
37. What is congestion?
Congestion occurs when network is overloaded.
  • Causes delay
  • Packet loss
38. What is error detection?
Identifies errors during transmission.
  • Checksum
  • CRC
39. What is error correction?
Corrects errors in received data.
  • ARQ
  • Forward Error Correction
40. What is flow control?
Controls data transmission rate.
  • Prevents receiver overflow
  • Used in TCP
41. What is TCP?
TCP is a reliable transport protocol.
  • Connection-oriented
  • Error-free delivery
42. What is UDP?
UDP is an unreliable transport protocol.
  • Connectionless
  • Fast transmission
43. Difference between TCP and UDP?
  • TCP is reliable
  • UDP is faster
  • TCP uses handshake
44. What is three-way handshake?
TCP connection establishment process.
  • SYN
  • SYN-ACK
  • ACK
45. What is ARP?
ARP maps IP address to MAC address.
  • Works in LAN
46. What is RARP?
RARP maps MAC address to IP address.
  • Reverse of ARP
47. What is ICMP?
ICMP is used for error reporting.
  • Used by ping
48. What is ping?
Ping tests network connectivity.
  • Uses ICMP
49. What is traceroute?
Traceroute finds path to destination.
  • Shows hop count
50. What is topology?
Topology defines network structure.
  • Star
  • Bus
  • Ring
51. What is star topology?
All devices connect to central hub.
  • Easy to manage
  • Hub failure affects network
52. What is bus topology?
Single cable connects all devices.
  • Low cost
  • Hard to troubleshoot
53. What is ring topology?
Devices connected in circular form.
  • Data flows in one direction
54. What is mesh topology?
Each device connects to every other device.
  • High reliability
  • Expensive
55. What is hybrid topology?
Combination of multiple topologies.
  • Flexible
56. What is VPN?
VPN creates secure network over internet.
  • Encrypted communication
57. What is proxy server?
Proxy acts as intermediary between client and server.
  • Improves security
  • Caching
58. What is load balancing?
Distributes traffic among servers.
  • Improves performance
  • High availability
59. What is QoS?
Quality of Service manages bandwidth.
  • Reduces latency
  • Priority traffic
60. What is network security?
Protecting network from attacks.
  • Firewalls
  • Encryption
  • Authentication