Networking - MCQ Practice Questions
Computer networks MCQs — OSI, TCP/IP, routing & protocols.
168 questions | 100% Free
Which network device operates at the Data Link layer (Layer 2) of the OSI model and uses MAC addresses to forward frames to the correct port?
Understanding:
We need to identify the network device that works at OSI Layer 2 and uses MAC addresses for frame forwarding decisions.
Step 1: Analyse each device by its OSI layer
A Hub operates at Layer 1 (Physical) and simply broadcasts all incoming signals to every port without any address-based decision making.
Step 2: Eliminate Layer 1 devices
Repeaters and Hubs work at Layer 1; they do not examine MAC or IP addresses.
Step 3: Identify Layer 2 vs Layer 3
Routers operate at Layer 3 (Network) and use IP addresses to make forwarding decisions. A Switch operates at Layer 2 (Data Link) and maintains a MAC address table (CAM table) to forward frames only to the port associated with the destination MAC address.
Answer:
A Switch is the device that operates at OSI Layer 2 and uses MAC addresses to intelligently forward frames to the correct port.
Quick Tip:
Remember the OSI layer mapping: Hub = Layer 1, Switch = Layer 2, Router = Layer 3. This is a very frequently tested concept in Indian competitive exams.
A network administrator wants to connect two different network segments that use separate IP address ranges. Which device is most appropriate for this task?
Understanding:
We need to find the device that connects two networks with different IP address ranges, meaning it must make decisions based on IP (Layer 3) information.
Step 1: Identify what connecting different IP networks requires
Connecting two networks with separate IP address ranges requires a device that can interpret IP addresses, determine the correct path between networks, and route packets accordingly.
Step 2: Evaluate each option
A Hub broadcasts data to all ports and operates at Layer 1 — it cannot distinguish between networks. A Switch uses MAC addresses at Layer 2 and can segment a single broadcast domain but cannot connect different IP networks. A Bridge operates at Layer 2 and connects similar network segments, not different IP networks. A Router operates at Layer 3 (Network layer), reads IP addresses, and routes packets between different logical networks.
Step 3: Confirm the correct choice
Only a Router has the capability to interconnect networks with different IP address schemes by using routing tables and IP-level forwarding.
Answer:
A Router is the correct device to connect two different IP network segments.
Quick Tip:
A key exam distinction: Switches connect devices within the same network (same subnet); Routers connect different networks (different subnets).
Which of the following network devices creates a separate collision domain for each of its ports but keeps all ports within the same broadcast domain by default?
Understanding:
We need to identify the device where each port is its own collision domain, but all ports share a single broadcast domain.
Step 1: Define collision domain and broadcast domain
A collision domain is a network segment where simultaneous data transmissions can collide. A broadcast domain is the area within which a broadcast frame is forwarded.
Step 2: Analyse the Hub
A Hub places ALL ports in the same collision domain AND the same broadcast domain — it simply repeats signals to every port.
Step 3: Analyse the Switch
A Switch creates a separate collision domain per port because it buffers and forwards frames individually to each port. However, by default (without VLANs), all ports on a switch belong to the same broadcast domain, meaning a broadcast frame is sent to all ports.
Step 4: Analyse the Router
A Router creates both separate collision domains AND separate broadcast domains per interface — it does not forward broadcasts between interfaces.
Answer:
A Switch creates a separate collision domain per port while keeping all ports in the same broadcast domain by default.
Quick Tip:
To break up broadcast domains, you need either a Router or VLANs configured on a switch. This distinction is a classic exam trap.
What is the primary function of a network gateway?
Understanding:
We need to identify the primary function that distinguishes a gateway from other network devices.
Step 1: Eliminate clearly incorrect options
Amplifying and regenerating signals is the function of a Repeater. Assigning IP addresses dynamically is the role of a DHCP server. Filtering based on MAC addresses is the function of a Layer 2 Switch or Bridge.
Step 2: Define a Gateway
A Gateway is a network device that operates at multiple layers of the OSI model (up to Layer 7 in some implementations). Its primary and defining function is to connect two networks that may use entirely different communication protocols and perform the necessary protocol translation between them.
Step 3: Contextualise the role
For example, a gateway can connect a LAN using TCP/IP to a legacy network using a different protocol suite. In modern home networks, the term gateway often refers to a combined router and modem device, but the classical definition emphasises protocol translation.
Answer:
The primary function of a gateway is to connect networks using different communication protocols and translate between them.
Quick Tip:
A gateway is sometimes called a protocol converter. It is the most functionally complex of all basic network devices and can operate at all seven OSI layers if needed.
A network administrator notices that a device on the network is sending excessive broadcast traffic, causing performance issues. Which device, when added to the network, would most effectively limit the propagation of these broadcast frames?
Understanding:
We need to identify which device stops broadcast frames from propagating beyond a network segment, thereby containing broadcast storms.
Step 1: Understand how each device handles broadcasts
A Hub forwards all signals, including broadcasts, to every connected port — it does not limit broadcasts at all.
Step 2: Evaluate Switch and Bridge
Both Switches and Bridges forward broadcast frames to all ports within their broadcast domain. They do not block broadcasts; they only separate collision domains. So they do not solve the broadcast propagation problem.
Step 3: Evaluate the Router
A Router, by design, does NOT forward broadcast frames between its interfaces. Each router interface defines a separate broadcast domain. Therefore, a broadcast originating on one side of a router will not cross to the other side.
Answer:
A Router is the most effective device to limit broadcast propagation, as it defines and separates broadcast domains.
Quick Tip:
This is a classic exam question. Remember: Switches separate collision domains; Routers separate broadcast domains. VLANs on a managed switch can also create separate broadcast domains without a physical router.
Which of the following best describes the operation of a network bridge?
Understanding:
We need to identify the correct description of how a network bridge operates, including its OSI layer and addressing mechanism.
Step 1: Identify the OSI layer of a bridge
A Bridge operates at Layer 2 (Data Link layer) of the OSI model. It is not a Layer 1, Layer 3, or Layer 7 device.
Step 2: Understand the MAC-based filtering mechanism
A Bridge learns MAC addresses of devices on each of its segments by inspecting incoming frames. It builds a MAC address table and uses it to decide whether to forward a frame to the other segment or filter (drop) it if the destination is on the same segment as the source.
Step 3: Contrast with other devices
Option A describes a Router (Layer 3, IP addresses). Option B describes a Repeater (Layer 1, signal regeneration). Option D describes a Gateway (Layer 7, application protocol translation).
Answer:
A Bridge operates at OSI Layer 2 and uses MAC addresses to selectively filter and forward frames between two network segments.
Quick Tip:
A modern multi-port bridge is essentially what we call a Switch today. The bridge was the predecessor to the switch in network evolution.
Which type of network device is a wireless access point (WAP) most similar to in terms of its core function?
Understanding:
We need to determine which wired network device a Wireless Access Point (WAP) most closely resembles in its fundamental operation.
Step 1: Understand what a WAP does
A WAP connects wireless devices to a wired network infrastructure. It operates at OSI Layer 2 (Data Link layer) and uses MAC addresses to manage communication between wireless clients and the wired network segment it is attached to.
Step 2: Compare to a Hub or Switch
A Hub (Layer 1) or Switch (Layer 2) connects multiple devices within the same network. A WAP performs an equivalent function for wireless devices — it acts as a central connection point for wireless clients, much like a switch or hub does for wired clients. Most modern WAPs function more like switches (forwarding based on MAC), but conceptually they serve the same aggregation/connection role.
Step 3: Eliminate other options
A Router connects different networks (Layer 3). A Firewall filters traffic based on security policies. A Repeater only regenerates signals. None of these match the core access-point role.
Answer:
A WAP is most similar to a Hub or Switch because it connects multiple end devices to a network at Layer 2 and provides network access, but does so wirelessly.
Quick Tip:
A home Wi-Fi router is actually a combination device: WAP + Switch + Router + often a DHCP server all in one box. Knowing this helps you answer combination-device questions.
A managed switch has the ability to create VLANs. What is the primary benefit of configuring VLANs on a managed switch?
Understanding:
We need to identify the primary benefit of configuring VLANs (Virtual Local Area Networks) on a managed switch.
Step 1: Define VLAN
A VLAN is a logical grouping of network devices configured on a switch, independent of their physical location. Devices in one VLAN cannot directly communicate with devices in another VLAN without a Layer 3 device (router or Layer 3 switch).
Step 2: Identify the primary benefit
By default, all ports on a switch are in the same broadcast domain. VLANs allow network administrators to divide a single physical switch into multiple logical segments, each acting as its own separate broadcast domain. This improves security, reduces unnecessary broadcast traffic, and simplifies network management.
Step 3: Eliminate incorrect options
VLANs do not affect physical cable speed. IP address assignment is the role of DHCP. VLANs do not eliminate the need for routing between different network segments — inter-VLAN communication still requires a router or Layer 3 switch.
Answer:
The primary benefit of VLANs is that a single physical switch can be logically divided into multiple separate broadcast domains.
Quick Tip:
For inter-VLAN routing (allowing devices in different VLANs to communicate), you need either a physical router using a router-on-a-stick configuration or a Layer 3 (multilayer) switch.
Which network device is specifically designed to inspect incoming and outgoing network traffic and block or allow packets based on a defined set of security rules?
Understanding:
We need to identify the network device whose primary purpose is traffic inspection and enforcement of security rules to block or permit packets.
Step 1: Analyse each device
A Switch operates at Layer 2 and forwards frames based on MAC addresses — its purpose is efficient frame delivery, not security policy enforcement. A Repeater only regenerates signals at Layer 1. A Modem converts digital signals to analogue and vice versa for transmission over telephone or cable lines.
Step 2: Identify the Firewall
A Firewall is a dedicated network security device (or software) that monitors all incoming and outgoing network traffic. It evaluates each packet against a set of security rules (Access Control Lists, stateful inspection tables, or application-layer policies) and either permits or blocks the traffic accordingly.
Step 3: Confirm the role
Firewalls can operate at multiple OSI layers — packet-filtering firewalls work at Layer 43, while next-generation firewalls (NGFWs) can inspect traffic up to Layer 7. Their defining characteristic is security policy enforcement.
Answer:
A Firewall is the device specifically designed to inspect network traffic and enforce security rules to allow or block packets.
Quick Tip:
Firewalls can be hardware-based (a dedicated appliance) or software-based (installed on a host). Stateful firewalls track connection state, making them more effective than simple stateless packet filters.
A Load Balancer is commonly deployed in enterprise networks. Which of the following best describes its primary function?
Understanding:
We need to identify the primary function of a Load Balancer in an enterprise network environment.
Step 1: Eliminate other network functions
Converting domain names to IP addresses is the function of a DNS server. Translating private IP addresses to a public IP address is the function of NAT (Network Address Translation), typically performed by a router or firewall. Caching web content to reduce bandwidth is the function of a Proxy Server or Web Cache.
Step 2: Define Load Balancer
A Load Balancer is a network device (hardware or software) that sits in front of a group of servers and intelligently distributes client requests across those servers. Its primary goals are to maximise throughput, minimise response time, avoid overloading any single server, and ensure high availability.
Step 3: Understand Load Balancing algorithms
Common algorithms used by load balancers include Round Robin, Least Connections, IP Hash, and Weighted Round Robin. The load balancer monitors server health and redirects traffic away from servers that are down or overloaded.
Answer:
A Load Balancer distributes incoming network traffic across multiple servers to prevent any single server from being overwhelmed and to ensure high availability.
Quick Tip:
Load Balancers are essential in data centres and cloud environments. They operate at Layer 4 (Transport — based on TCP/UDP) or Layer 7 (Application — based on HTTP content), and Layer 7 load balancers are more intelligent but computationally heavier.