quiz Computer Science · 10 questions

Fundamentals of Network Devices and CIDR

help_outline 10 questions
timer ~5 min
auto_awesome AI-generated
0 / 10
Score : 0%
1

A network administrator notices that two computers on the same LAN cannot communicate because their NICs share the same MAC address. Which of the following statements best explains the problem?

2

In a LAN using a hub, what is the most likely impact on network performance as more devices are added?

3

A switch receives a frame with destination MAC address unknown in its table. What does the switch do next?

4

Given the CIDR block 172.22.20.159/21, which of the following is the correct network address?

5

A router receives a packet whose destination IP belongs to a different LAN. Which header field does the router modify before forwarding the packet to the next hop?

6

Which device type forwards traffic based on IP addresses rather than MAC addresses?

7

A network uses the private IP range 192.168.0.0/16. Which of the following IP addresses is valid for a host in this network?

8

When a NIC operates in promiscuous mode, what is the primary effect on frame reception?

9

In a switched LAN, why does broadcast traffic still reach all devices despite the switch’s selective forwarding?

10

A network administrator wants to reduce unnecessary traffic in a LAN. Which device should replace hubs to achieve this goal?

menu_book

Fundamentals of Network Devices and CIDR

Review key concepts before taking the quiz

Fundamentals of Network Devices and CIDR

In modern computer networks, understanding how devices interact at the data‑link and network layers is essential for troubleshooting and design. This course breaks down the core concepts tested in the quiz, providing clear explanations, real‑world analogies, and actionable takeaways.

Why Unique MAC Addresses Matter

Duplicate MAC Addresses on the Same LAN

Every network interface card (NIC) is assigned a Media Access Control (MAC) address that should be globally unique. When two NICs share the same MAC address, the switch or hub cannot reliably determine which port should receive a frame destined for that address.

  • Frame delivery conflict: Both NICs may accept the same unicast frame, causing duplicate processing and potential data corruption.
  • Collision and loss: Switches use MAC tables to forward frames. A duplicate entry creates ambiguity, often leading the switch to flood the frame to all ports, increasing unnecessary traffic.
  • Security risk: An attacker could deliberately clone a MAC address to intercept traffic (a technique known as MAC spoofing).

To resolve the issue, ensure each device has a distinct MAC address—most operating systems allow you to change the address temporarily for testing, but the permanent solution is to replace the faulty NIC or correct the manufacturing error.

Hub vs Switch: Collision Domains and Bandwidth Sharing

Impact of Adding Devices to a Hub

A hub operates at Layer 2 but is essentially a multi‑port repeater. All ports share a single collision domain, meaning that when two devices transmit simultaneously, their frames collide and must be retransmitted.

  • Shared bandwidth: The total available bandwidth (e.g., 100 Mbps) is divided among all connected devices. Adding more devices reduces the effective bandwidth per host.
  • Performance degradation: As the number of active stations grows, the probability of collisions rises, leading to exponential back‑off delays.
  • Contrast with switches: A switch creates a separate collision domain for each port, allowing full‑duplex communication and preserving bandwidth.

In practice, hubs are rarely used in new installations because they limit scalability and increase latency.

Switch Behavior with Unknown Destination MAC

Flooding Mechanism Explained

When a switch receives a frame whose destination MAC address is not present in its forwarding table, it cannot determine the correct outbound port. The standard response is flooding:

  • The switch forwards the frame out all ports except the one on which it arrived.
  • This ensures the intended recipient receives the frame, while the switch simultaneously learns the source MAC address and the associated port.
  • After the first successful delivery, the switch updates its MAC address table, preventing future floods for that address.

Flooding is a normal, efficient mechanism for unknown destinations, but excessive flooding can indicate a misconfigured network or a broadcast storm.

CIDR Basics: Calculating Network Addresses

Example: 172.22.20.159/21

Classless Inter‑Domain Routing (CIDR) replaces the old class‑based system, allowing flexible subnet sizes. The /21 prefix means the first 21 bits of the address identify the network.

To find the network address:

  1. Convert the IP to binary: 172.22.20.159 → 10101100.00010110.00010100.10011111.
  2. Keep the first 21 bits (the first two octets and the high 5 bits of the third): 10101100.00010110.00010 followed by zeros.
  3. Translate back to decimal: the third octet becomes 00010000 (16), and the fourth octet is 00000000 (0).

The resulting network address is 172.22.16.0. Think of the third octet as a ruler marked every 8 units (because 2^(8‑5)=8). Any address in the /21 block snaps to the nearest lower mark, just like a car parking in the first spot of a row.

Router Packet Forwarding: What Changes?

Layer‑2 vs Layer‑3 Modifications

When a router forwards a packet to a different LAN, it must update the Layer‑2 (Ethernet) header while preserving the original Layer‑3 (IP) header. The key change is the destination MAC address:

  • The router replaces the original destination MAC with the MAC address of the next‑hop device (usually the upstream router or switch).
  • The source MAC is also updated to the router's own interface MAC.
  • The IP header—including source and destination IP addresses—remains unchanged, ensuring end‑to‑end transparency.
  • Additionally, the router decrements the TTL (Time‑to‑Live) field, but this is a separate operation that does not affect address fields.

This behavior is analogous to handing a letter to the next post office: the street address stays the same, but the envelope’s carrier information (the MAC) changes to reflect the new hand‑off point.

Device Types and Their Forwarding Logic

Routers vs Switches vs Hubs

Understanding which device forwards traffic based on IP addresses versus MAC addresses is fundamental:

  • Router: Operates at Layer 3, makes forwarding decisions using the IP address. It connects different IP subnets and implements routing protocols.
  • Switch: Operates primarily at Layer 2, forwarding frames based on the destination MAC address. Some modern switches have Layer 3 capabilities (multilayer switches), but the basic function is MAC‑based.
  • Hub: A physical layer device that simply repeats incoming electrical signals to all ports; it has no intelligence about MAC or IP.
  • Repeater: Also a Layer 1 device, regenerates signals without any address awareness.

When designing a network, choose the appropriate device for the required level of intelligence and performance.

Private IP Address Ranges and Host Validation

Understanding 192.168.0.0/16

The private IP space defined by RFC 1918 includes 192.168.0.0/16, 10.0.0.0/8, and 172.16.0.0/12. Addresses within these ranges are not routable on the public Internet and are intended for internal use.

To verify whether an address belongs to the 192.168.0.0/16 block, check the first two octets:

  • If they are 192.168, the address is valid for a host in that private network.
  • Examples: 192.168.45.23 is valid; 192.169.10.5 is not because the second octet is 169.
  • Similarly, 10.0.0.1 belongs to the 10.0.0.0/8 private range, not the 192.168 block.

Using the correct private range simplifies NAT configuration and avoids address conflicts with external networks.

Promiscuous Mode: Seeing All Traffic

How NICs Behave in Promiscuous Mode

By default, a NIC discards frames whose destination MAC does not match its own address or a broadcast/multicast address. Promiscuous mode disables this filter:

  • The NIC forwards every frame it receives to the operating system, regardless of the destination MAC.
  • This capability is essential for network monitoring tools (e.g., Wireshark) and intrusion detection systems.
  • While powerful, promiscuous mode can expose sensitive traffic if misused, so it should be enabled only on trusted hosts.

In practice, enabling promiscuous mode turns the NIC into a passive observer, much like a security camera that records everything passing by, not just the events addressed to it.

Putting It All Together: Quick Review

  • MAC address uniqueness prevents frame delivery ambiguity.
  • Hubs share a single collision domain, causing bandwidth to shrink as devices increase.
  • Switches flood unknown destinations, then learn MAC‑to‑port mappings.
  • CIDR /21 network address for 172.22.20.159 is 172.22.16.0.
  • Routers replace only the Layer‑2 MAC addresses when forwarding across subnets.
  • Routers forward based on IP, while switches forward based on MAC.
  • Private IP validation for 192.168.0.0/16 includes any address beginning with 192.168.
  • Promiscuous mode lets a NIC accept all frames, enabling deep packet inspection.

Mastering these fundamentals equips you to design robust networks, diagnose common problems, and prepare for advanced topics such as VLANs, routing protocols, and network security.

Stop highlighting.
Start learning.

Join students who have already generated over 50,000 quizzes on Quizly. It's free to get started.