← Back to quizzesFree quiz

Fundamentals of Network Devices and CIDR

Media Access Control (MAC) addresses are unique identifiers assigned to every network interface card (NIC). They operate at the Data Link layer (Layer 2) of the OSI model and are essential…

10 questions~5 min
Fundamentals of Network Devices and CIDR — Qwi
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 statement best explains why this problem occurs?

2

When a NIC receives a frame addressed to the broadcast MAC address, what action does it take?

3

A LAN uses a hub to connect four computers. Which of the following statements about bandwidth usage is correct?

4

In a switched network, how does a switch determine the outgoing port for a frame?

5

A router receives a packet whose destination IP address belongs to a different LAN. Which part of the packet is changed at each hop?

6

Given the CIDR block 192.168.1.0/24, how many usable host IP addresses are available?

7

A network uses the private IP range 172.16.0.0 – 172.31.255.255. Which of the following statements about NAT in this scenario is accurate?

8

Which device forwards packets based on IP addresses and does not forward broadcast traffic by default?

9

A network engineer needs to create a subnet that provides exactly 30 usable host addresses. Which CIDR prefix should be used?

10

When comparing hubs, switches, and routers, which statement correctly matches each device with its primary forwarding unit?

Understanding MAC Addresses and Their Role in LAN Communication

Media Access Control (MAC) addresses are unique identifiers assigned to every network interface card (NIC). They operate at the Data Link layer (Layer 2) of the OSI model and are essential for frame delivery within a local area network (LAN). Because switches and bridges forward frames based on MAC addresses, any duplication can cause serious problems.

Why Duplicate MAC Addresses Break Communication

When two NICs share the same MAC address, the switch’s forwarding table (also called a CAM table) becomes confused. The table can store only one port per MAC address, so the switch will constantly overwrite the entry each time it sees a frame from either device. The result is that frames intended for one computer may be sent to the other, or the switch may drop the frames altogether.

  • Correct statement: Duplicate MAC addresses cause the NICs to reject each other's frames. The NICs see frames with a destination MAC that matches its own, but because the switch cannot reliably deliver them, the frames are often discarded.
  • Routers do not block traffic based on duplicate MACs; they operate on IP addresses.
  • Promiscuous mode is unrelated to MAC duplication; it simply tells a NIC to accept all frames.
  • Switches do not automatically drop frames from duplicate MACs, but the resulting table instability leads to loss of connectivity.

To prevent this issue, always ensure each NIC has a unique MAC address—most operating systems generate them automatically, and manufacturers embed a unique value in the hardware.

Broadcast Frames: How NICs React to the Broadcast MAC Address

A broadcast MAC address is FF:FF:FF:FF:FF:FF. It signals that the frame is intended for all devices on the LAN. When a NIC receives such a frame, it behaves as follows:

  • Accepts and processes the frame regardless of its own MAC address.
  • Passes the payload up the protocol stack for higher‑layer handling (e.g., ARP, DHCP).

This behavior is analogous to a public announcement over a loudspeaker: everyone hears it, not just the person who shouted it.

Which of these statements best matches the idea of a broadcast frame?

  • It’s like a group text sent to everyone.
  • It’s like a private email to one person.

Hub vs. Switch: Understanding Bandwidth Sharing

Both hubs and switches connect multiple devices, but they differ dramatically in how they handle bandwidth.

Hubs: Shared‑Medium Devices

A hub operates at the Physical layer (Layer 1). It simply repeats incoming electrical signals to all other ports. Because of this:

  • All devices share the same total bandwidth.
  • Only one device can successfully transmit at a time; simultaneous transmissions cause collisions.
  • Full‑duplex communication is not possible; the hub works in half‑duplex mode.

Switches: Intelligent Frame Forwarders

Switches work at Layer 2 and maintain a MAC address table. They forward frames only to the port where the destination device resides, enabling:

  • Dedicated bandwidth per port (e.g., 100 Mbps or 1 Gbps).
  • Full‑duplex communication, allowing simultaneous send and receive.
  • Reduced collisions and higher overall network efficiency.

How Switches Determine the Outgoing Port

When a switch receives a frame, it follows a precise algorithm:

  1. Read the destination MAC address from the frame header.
  2. Lookup the MAC address in its switching table (also called a CAM table).
  3. If the address is found, forward the frame out the associated port.
  4. If the address is unknown, flood the frame to all ports except the incoming one (a temporary broadcast).

The switch does not use the IP address for forwarding decisions; that is the router’s job at Layer 3.

Correct answer: It looks up the destination MAC address in its switching table and forwards to the matching port.

Routers and the Evolution of Packet Headers

Routers operate at the Network layer (Layer 3) and are responsible for moving packets between different LANs or subnets. At each hop, a router performs the following actions:

  • Decrements the TTL (Time‑to‑Live) field.
  • Recalculates the IP header checksum.
  • Replaces the source and destination MAC addresses with the MAC of the next‑hop interface.

Only the MAC header changes at each hop; the IP header (including source and destination IP addresses) remains unchanged until the packet reaches its final destination.

Correct answer: Only the MAC address header is replaced with the next‑hop MAC address.

Classless Inter‑Domain Routing (CIDR) Basics

CIDR notation combines an IP address with a prefix length, indicating how many bits belong to the network portion. For example, 192.168.1.0/24 means the first 24 bits are the network ID, leaving 8 bits for host addresses.

Calculating Usable Host Addresses

To determine the number of usable hosts:

  1. Calculate the total number of addresses: 2^(32‑prefix). For /24, that’s 2^8 = 256.
  2. Subtract the network address (all host bits 0) and the broadcast address (all host bits 1).
  3. Result: 256 - 2 = 254 usable host addresses.

Correct answer: 254 usable addresses.

Which part of the address do we subtract to get the usable count: the network address, the broadcast address, or both?

Network Address Translation (NAT) and Private IP Ranges

Private IP ranges, such as 172.16.0.0 – 172.31.255.255, are not routable on the public Internet. NAT enables devices using these private addresses to communicate externally by translating them to a single public IP address.

How NAT Works

  • When an internal host sends a packet to the Internet, the router replaces the source private IP with its own public IP.
  • The router keeps a translation table mapping internal private addresses to the public address and a unique source port.
  • Incoming responses are matched to the table and forwarded back to the correct internal host.

This mechanism is similar to a receptionist handing out a single office number to all visitors; the receptionist knows which visitor is which based on the internal extension numbers.

Correct answer: The router translates internal private addresses to a single public address for Internet traffic.

Which part of NAT do you find most confusing: the address swapping, the single‑public‑IP idea, or the fact that private ranges aren’t routable on the Internet?

Device Types and Their Primary Functions

Understanding the role of each network device helps you design efficient and secure networks.

  • Hub: Repeats incoming signals to all ports; operates at Layer 1; no MAC awareness.
  • Repeater: Extends the physical reach of a network segment; also Layer 1.
  • Switch: Forwards frames based on MAC addresses; maintains a switching table; operates at Layer 2.
  • Router: Forwards packets based on IP addresses; does not forward broadcast traffic by default; operates at Layer 3.

Correct answer to the quiz question: Router—it routes packets using IP addresses and, unlike switches, does not forward broadcast frames unless explicitly configured.

Key Takeaways for Network Professionals

Mastering the fundamentals of network devices and CIDR is essential for any aspiring network engineer. Below are the most important concepts covered in this course:

  • Each NIC must have a unique MAC address; duplicates cause frame‑delivery failures.
  • Broadcast MAC frames are accepted by every NIC on the LAN, enabling protocols like ARP and DHCP.
  • Hubs share bandwidth among all ports, while switches provide dedicated, full‑duplex channels.
  • Switches forward frames by looking up destination MAC addresses in their switching tables.
  • Routers rewrite only the MAC header at each hop; the IP header stays constant until the destination is reached.
  • CIDR calculations: total hosts = 2^(32‑prefix); subtract network and broadcast addresses for usable hosts.
  • NAT allows many private‑address devices to share a single public IP, making private ranges usable for Internet access.
  • Routers operate at Layer 3 and do not forward broadcast traffic by default, distinguishing them from switches.

By internalizing these principles, you’ll be better equipped to troubleshoot LAN issues, design scalable networks, and implement secure routing policies.