Skip to content
  • Home
  • Software Engineering Jobs
  • Internship Opportunities
  • Remote Jobs
  • Layoffs Tracker
  • Interview Preparation
  • Resume Score Checker
  • Tech News
logo1
  • Software Engineering Jobs
  • Latest Jobs
  • Internships
  • Remote Job
  • Interview Preparation
  • Paid courses
  • Technology News

Computer Networks Interview

Computer Networks Interview Questions

Computer Networks Interview Questions

Question Answer
What is the OSI model? Explain its layers. The OSI (Open Systems Interconnection) model is a conceptual framework that defines network communication into seven layers: Physical, Data Link, Network, Transport, Session, Presentation, and Application.
What is the difference between TCP and UDP? TCP is connection-oriented, reliable, and ensures data integrity. UDP is connectionless and doesn't guarantee delivery or order of packets.
What is an IP address? An IP address is a unique identifier assigned to each device connected to a network. It allows devices to communicate over the internet or a local network.
What is a subnet mask? A subnet mask is used to divide an IP address into network and host portions. It determines which part of the IP address refers to the network and which part refers to the host.
What is NAT (Network Address Translation)? NAT is a method used in networks to allow multiple devices on a local network to share a single public IP address for communication over the internet.
What is ARP (Address Resolution Protocol)? ARP is a protocol used to map an IP address to a MAC address in a local network. It allows devices to find each other on the network.
What is a router and how does it work? A router is a networking device that forwards data packets between computer networks. It uses routing tables and protocols to determine the best path for forwarding the packets.
What is a switch and how does it work? A switch is a device that connects devices on a network and uses MAC addresses to forward data to the correct destination device within a local area network (LAN).
What is DNS (Domain Name System)? DNS is a system that translates human-readable domain names (like www.example.com) into IP addresses that computers can understand and use for communication.
What is the difference between HTTP and HTTPS? HTTP (Hypertext Transfer Protocol) is an unsecured protocol, while HTTPS (HTTP Secure) uses encryption (SSL/TLS) to ensure secure data transfer over the internet.
What is a VLAN (Virtual Local Area Network)? A VLAN is a logical grouping of devices within a network, allowing them to communicate as if they are on the same physical network, even if they are geographically dispersed.
What is the function of a firewall? A firewall is a security system designed to monitor and control incoming and outgoing network traffic based on predetermined security rules to protect networks from unauthorized access.
What is a gateway in networking? A gateway is a network device that acts as a bridge between two different networks, typically connecting a local network to the internet or another remote network.
What is the purpose of a load balancer? A load balancer distributes incoming network traffic across multiple servers to ensure no single server becomes overwhelmed, enhancing performance and availability.
What is the purpose of a proxy server? A proxy server acts as an intermediary between clients and servers, forwarding requests from clients to servers and returning the response, often used for security and caching purposes.
What is the difference between IPv4 and IPv6? IPv4 uses a 32-bit address space, which limits the number of available IP addresses, whereas IPv6 uses a 128-bit address space, allowing for a virtually unlimited number of addresses.
What is the function of ICMP (Internet Control Message Protocol)? ICMP is used by network devices to send error messages and operational information about network conditions, such as unreachable hosts or network congestion.
What is a DHCP server? A DHCP (Dynamic Host Configuration Protocol) server automatically assigns IP addresses and other network configuration settings to devices on a network.
What is a VPN (Virtual Private Network)? A VPN is a secure, encrypted connection over a public network, often used to connect remote users or networks to a private network.
What is TCP/IP? TCP/IP (Transmission Control Protocol/Internet Protocol) is a suite of communication protocols used to interconnect network devices on the internet. It allows devices to communicate over long distances.
What is a data packet? A data packet is a small unit of data transmitted over a network. It contains both the data being sent and control information such as destination and source addresses.
What is a collision domain? A collision domain is a network segment where data packets can collide with one another if two devices transmit simultaneously. This occurs in shared network environments such as Ethernet hubs.
What is a broadcast domain? A broadcast domain is a network segment where a broadcast packet sent by any device can be received by all other devices. Routers typically separate broadcast domains.
What is a MAC address? A MAC (Media Access Control) address is a unique identifier assigned to network interfaces for communications on the physical network segment. It operates at Layer 2 of the OSI model.
What is a socket in networking? A socket is an endpoint for communication between two machines in a network. It is used by applications to communicate with each other over a network using protocols such as TCP or UDP.
What is the difference between a hub and a switch? A hub is a simple device that broadcasts data to all devices on the network, while a switch sends data only to the device it is intended for, increasing network efficiency.
What is the purpose of the Layer 3 switch? A Layer 3 switch is a network device that performs routing functions along with switching, typically used to route data between different subnets within a large network.
What is the purpose of a DNS server? A DNS (Domain Name System) server translates human-readable domain names into IP addresses, allowing browsers to locate websites on the internet.
What is a subnet in networking? A subnet is a logically segmented portion of an IP network, created by dividing the network into smaller parts to improve efficiency and security.
What is a MAC flooding attack? MAC flooding is a network attack where a large number of fake MAC addresses are sent to a switch, causing it to overflow its MAC table and broadcast all packets, potentially leading to security vulnerabilities.
What is SSL/TLS and its role in security? SSL (Secure Sockets Layer) and TLS (Transport Layer Security) are cryptographic protocols used to secure communication over a network, primarily used in web browsers to establish secure HTTPS connections.
What is the difference between a firewall and a proxy server? A firewall is used to monitor and control incoming and outgoing network traffic based on security rules, while a proxy server acts as an intermediary between a client and a server to forward requests and responses.
What is a ping command and how is it used? The ping command is used to test the reachability of a host on a network and measures the round-trip time for packets to travel from the source to the destination.
What is the OSI model and what are its seven layers? Explain each layer and their respective functions. The layers are: Physical, Data Link, Network, Transport, Session, Presentation, and Application.
What is the purpose of the Transport layer in the OSI model? The Transport layer ensures reliable data transfer. Protocols such as TCP and UDP function at this layer. Example: TCP provides reliable, connection-oriented communication.
Can you explain the Data Link layer and what role it plays in the OSI model? The Data Link layer is responsible for error detection and correction, as well as node-to-node data transfer. Example: Ethernet operates at the Data Link layer.
How does the Network layer differ from the Transport layer in the OSI model? The Network layer is responsible for routing and forwarding data across the network, while the Transport layer ensures error-free data transfer between hosts. Example: IP is a Network layer protocol, and TCP is a Transport layer protocol.
What is the function of the Application layer in the OSI model? The Application layer provides network services directly to the user, including protocols like HTTP, FTP, and SMTP. Example: HTTP is used for web browsing.
What is the role of the Physical layer in the OSI model? The Physical layer handles the transmission of raw bits over a physical medium, such as cables. Example: Ethernet cables and fiber optics operate at this layer.
What is the main difference between the OSI model and the TCP/IP model? The OSI model has seven layers, while the TCP/IP model has four layers. The TCP/IP model combines the OSI's Application, Presentation, and Session layers into one.
How does the Session layer work in the OSI model? The Session layer is responsible for establishing, maintaining, and terminating communication sessions between applications. Example: NetBIOS and RPC are Session layer protocols.
What is the difference between TCP and UDP at the Transport layer? TCP (Transmission Control Protocol) is reliable, connection-oriented, and ensures error-free data transfer, while UDP (User Datagram Protocol) is connectionless and does not guarantee delivery. Example: Web browsing uses TCP, while streaming uses UDP.
Can you explain the concept of segmentation in the Transport layer? Segmentation is the process of breaking large data chunks into smaller units for easier transmission across the network. Example: TCP divides data into segments.
What is the role of the Presentation layer in the OSI model? The Presentation layer ensures that the data is in a readable format and performs data compression, encryption, and translation. Example: SSL/TLS for encryption works at this layer.
What is an example of a protocol that operates at the Data Link layer? Ethernet, which handles framing and physical addressing, operates at the Data Link layer.
What is the purpose of error detection and correction at the Data Link layer? Error detection and correction ensure that data is transmitted correctly over the physical medium. Example: CRC (Cyclic Redundancy Check) is used for error detection in Ethernet frames.
What are the key responsibilities of the Network layer in the OSI model? The Network layer is responsible for routing and logical addressing. Example: The IP protocol operates at this layer, providing logical addressing for devices on a network.
What is the purpose of the Application layer in OSI? The Application layer interacts directly with software applications to provide network services. Example: SMTP and HTTP operate at this layer to send emails and browse websites.
Explain the concept of flow control at the Transport layer. Flow control ensures that data is sent at a rate that the receiving device can handle. Example: TCP uses sliding window protocol to manage flow control.
What is the purpose of the Data Link layer's MAC address? The MAC address is used for physical addressing to identify devices on the local network. Example: Ethernet uses MAC addresses to transmit data to specific devices.
What is the role of the Routing protocol at the Network layer? Routing protocols like OSPF and RIP determine the best path for data to travel across the network from source to destination.
Can you explain the difference between IPv4 and IPv6 at the Network layer? IPv4 uses a 32-bit address, while IPv6 uses a 128-bit address, allowing for a much larger address space. IPv6 also introduces better routing and security features.
What is the importance of TCP/IP model and how does it relate to the OSI model? The TCP/IP model is a more practical and simplified model that has been widely adopted in networking. It has four layers, and it works in conjunction with the OSI model, with its layers mapping closely to OSI's layers.
What is the role of TCP in computer networks? TCP (Transmission Control Protocol) ensures reliable, ordered, and error-free data transmission between devices over a network. It is used for applications where reliability is crucial, such as web browsing.
What is the role of UDP in computer networks? UDP (User Datagram Protocol) is used for applications where speed is more important than reliability. It is often used for streaming media or real-time applications where some data loss is acceptable.
What is the concept of 'routable IP addresses'? Routable IP addresses are IP addresses that can be used to route data across the internet. These addresses are public and assigned by the IANA (Internet Assigned Numbers Authority).
What is the difference between stateful and stateless firewalls? A stateful firewall monitors the state of active connections and makes decisions based on the context of the traffic, while a stateless firewall makes decisions based only on static information, such as IP addresses and port numbers.
What is a routing table? A routing table is a data table stored in a router or networked computer that contains information about the paths to various destinations in the network and the routing protocols used to access them.
What is the difference between a router and a gateway? A router forwards data packets between different networks, whereas a gateway connects different network protocols or systems. Example: A router connects devices within your home network to the internet, while a gateway might be used to connect a local network to a different kind of network like a cloud-based service.
Explain the concept of CIDR and its benefits. CIDR (Classless Inter-Domain Routing) allows more flexible and efficient IP address allocation by eliminating the class-based system. Example: With CIDR, a network might use the address 192.168.0.0/24, which means the first 24 bits define the network, allowing for more subnets and reducing wastage of IP addresses.
What is an autonomous system (AS)? An Autonomous System (AS) is a collection of IP networks and routers under the control of a single organization that presents a common routing policy to the internet. Example: A large ISP like AT&T or a corporation like Google owns an AS to manage its routing on the internet.
What is the purpose of the ICMP protocol, and how is it used in troubleshooting? ICMP (Internet Control Message Protocol) is used for sending error messages and operational information. Example: The "ping" command uses ICMP to check the availability of a network host by sending Echo Request messages and awaiting Echo Reply messages.
How does TCP ensure reliable data transmission? TCP ensures reliable transmission by establishing a connection, sending data in ordered segments, and using acknowledgments and retransmissions in case of packet loss. Example: When you download a file, TCP ensures that all segments are delivered correctly and in the correct order.
Explain the concept of sliding window protocol in networking. The sliding window protocol controls the flow of data between two devices. It allows the sender to send multiple packets before receiving an acknowledgment, improving efficiency. Example: In TCP, the sender can send several packets before needing an acknowledgment, but the window size controls how many unacknowledged packets can be in transit.
What is BGP, and how does it differ from OSPF? BGP (Border Gateway Protocol) is a path vector protocol used for inter-domain routing, whereas OSPF (Open Shortest Path First) is a link-state protocol used within an Autonomous System. Example: BGP is used to route data between ISPs on the internet, while OSPF routes data within an enterprise network.
What are the differences between a Layer 2 and Layer 3 switch? Layer 2 switches operate based on MAC addresses and manage traffic within the same subnet, while Layer 3 switches can also route traffic between different subnets using IP addresses. Example: A Layer 2 switch is used within a single network, while a Layer 3 switch can handle traffic between multiple VLANs.
What is a SYN flood attack, and how can it be mitigated? A SYN flood attack exploits the TCP handshake by sending a large number of SYN requests and not completing the handshake, consuming resources. Mitigation can be done using SYN cookies or rate-limiting. Example: A malicious attacker may send incomplete requests to a server, overwhelming it and causing denial of service.
What is DNS poisoning, and how does it affect network security? DNS poisoning is when malicious data is inserted into a DNS resolver's cache, redirecting users to malicious sites. Example: A user may be redirected to a phishing website that looks identical to their bank's login page due to DNS poisoning.
What is the purpose of an anycast address in networking? An anycast address allows multiple devices to share the same address, with the network routing the data to the nearest or best destination. Example: Anycast is used in CDN services, where users are routed to the nearest server to load content quickly.
What is QoS, and how is it used in networking? Quality of Service (QoS) refers to managing network resources to ensure the performance of critical applications by prioritizing traffic. Example: A VoIP service may use QoS to prioritize voice packets over regular data traffic to ensure clear calls.
Explain the difference between a public and a private IP address. A public IP address is assigned to devices accessible from the internet, whereas a private IP address is used within a local network and is not routable over the internet. Example: A home router uses a private IP address (like 192.168.1.1), while websites use public IP addresses.
What is the purpose of the Spanning Tree Protocol (STP)? The Spanning Tree Protocol (STP) prevents network loops by dynamically blocking redundant paths in Ethernet networks. Example: In a network with multiple switches, STP ensures only one active path exists between any two devices, avoiding broadcast storms.
What are the different types of network topologies? Common network topologies include star, bus, ring, mesh, and hybrid. Example: A star topology has a central hub or switch that connects all devices, while a mesh topology allows every device to be connected to every other device for high redundancy.
What is the difference between full-duplex and half-duplex communication? In full-duplex communication, data can be transmitted in both directions simultaneously, whereas in half-duplex, data transmission happens in one direction at a time. Example: A phone conversation is full-duplex, while a walkie-talkie is half-duplex, as only one person can speak at a time.
What is the role of ARP in IP networking? ARP (Address Resolution Protocol) maps an IP address to its corresponding MAC address on a local network. Example: When your computer sends a packet to an IP address, ARP is used to determine the MAC address of the destination device in the same network.
Explain the concept of VLAN tagging. VLAN tagging adds a tag to Ethernet frames to specify which VLAN the frame belongs to. Example: When data passes through a switch, VLAN tags ensure that the data is directed to the correct virtual LAN.
What is a man-in-the-middle (MITM) attack, and how can it be prevented? A MITM attack intercepts and possibly alters communications between two parties. It can be prevented by using encryption like HTTPS. Example: An attacker intercepting communication between a user and a website to steal sensitive data can be mitigated by using TLS/SSL encryption.
What is the role of SSL/TLS in securing communications? SSL/TLS encrypts data exchanged between the client and server to ensure privacy and integrity. Example: When browsing a website using HTTPS, SSL/TLS ensures that all data, including passwords and credit card information, is encrypted and cannot be intercepted.

© 2025 Geeksprep

  • Privacy Policy
  • Terms of Use
  • DMCA
  • CCPA