πŸ“š Networking Practice Questions

Reinforce Your Understanding with Variant Problems

πŸ“‹ How to Use This Guide

These are practice problems to test your understanding of networking concepts. Try to solve them on your own first by clicking "Show Answer" buttons only after you've attempted the problem. This will help reinforce your understanding of the concepts.

Practice Question 1: MAC Address Learning Variant [15 points]
Network Topology (MODIFIED)
NETWORK LAYOUT: B | S4 | C--S1--S2--S3--A (horizontal line) | S4 | D (below S2) 4 Hosts: A, B, C, D 4 Switches: S1 (between C-S2), S2 (center), S3 (between S2-A), S4 (below S2)

πŸ”‘ Important Reminder

Remember: Switches ONLY learn SOURCE addresses, NOT destination addresses. A host only appears in a switch's table after that host has SENT a frame.

Events to Analyze:

For each event below, determine what MAC addresses each switch has learned.

  1. A sends to D
  2. C sends to A
  3. C sends to D
  4. B sends to C
  5. D sends to B
Event 1: A sends to D
πŸ’‘ Think About:

Where is A? (right side now, not left) Where is D? (below S2, still unknown initially) Which switches will see this frame? Will any switches learn D?

βœ… Answer for Event 1: A sends to D

S1: A | S2: A | S3: A | S4: A

Explanation: A sends a frame, so all switches on the path learn A as a source. D is unknown, so the frame is flooded. D doesn't appear in any table because D hasn't sent anything yet.

Event 2: C sends to A

βœ… Answer for Event 2: C sends to A

S1: A, C | S2: A, C | S3: A, C | S4: A

Explanation: C sends a frame with A as destination. A is known (from Event 1), so the frame is forwarded directly without flooding. S4 doesn't see this frame because it's not on the path from C to A.

Event 3: C sends to D

βœ… Answer for Event 3: C sends to D

S1: A, C | S2: A, C | S3: A, C | S4: A, C

Explanation: C is already known. D is still unknown, so the frame floods. S4 receives the flood and learns C as a source. D doesn't appear in any table (still hasn't sent anything).

Event 4: B sends to C

βœ… Answer for Event 4: B sends to C

S1: A, B, C | S2: A, B, C | S3: A, C | S4: A, B, C

Explanation: B sends with C as destination. C is known (via S1), so the frame is forwarded directly. B is learned by S4, S2, and S1. S3 never sees this frame, so S3 doesn't learn B.

Event 5: D sends to B

βœ… Answer for Event 5: D sends to B

S1: A, B, C | S2: A, B, C, D | S3: A, C | S4: A, B, C, D

Explanation: This is the FIRST time D sends! D's frame passes through S4 and S2 on its way to B, so both learn D. This is the first event where D appears in any forwarding table.

Event S1 S2 S3 S4
Event 1: A→D A A A A
Event 2: C→A A, C A, C A, C A
Event 3: C→D A, C A, C A, C A, C
Event 4: B→C A, B, C A, B, C A, C A, B, C
Event 5: D→B A, B, C A, B, C, D A, C A, B, C, D
🎯 Key Insight:

Notice how S3 only learns A and C, never B or D. This is because B never sends through S3 and D doesn't send at all until the end. The position of the hosts mattersβ€”what each switch learns depends entirely on which frames actually pass through it.

Practice Question 2: Ethernet Distance Variant [5 points]

❓ The Problem

Can we use a very long network cable to connect two offices that are 4 kilometers (4 km) apart via regular Ethernet? If we can't, what do we need to add to connect the two offices?

βœ… Answer for Question 2

Can we use regular Ethernet? NO

Why not?

  • Standard copper Ethernet: maximum 100 meters
  • 4 km = 4000 meters, which is 40 times the limit!
  • Signal would severely attenuate over this distance
  • CSMA/CD collision detection would fail due to excessive propagation delay

What do we need to add?

Option 1 (Recommended): Use fiber optic cables with appropriate Ethernet standards:

  • 100BASE-FX (multimode fiber): up to 2 km β€” NOT enough for 4 km
  • 10GBASE-LR (single-mode fiber): up to 10 km β€” Perfect for 4 km!
  • 10GBASE-ER (single-mode fiber): up to 40 km β€” Also works

Option 2: Use a series of switches (Layer 2) with fiber optic cable segments connecting them at regular intervals.

Option 3: Use repeaters (Layer 1), but would need many of them (potentially 40+) which is impractical.

Best Practice Answer: "For 4 km distance, we would use single-mode fiber optic cable with a long-distance Ethernet standard such as 10GBASE-LR or 10GBASE-ER. These standards natively support distances well beyond 4 km."

πŸ’‘ Key Lesson:

For 4 km, standard multimode fiber (100BASE-FX with 2 km limit) is NOT sufficient. You must use single-mode fiber with a longer-range standard like 10GBASE-LR or 10GBASE-ER.

The key takeaway: Always check the specifications carefully and match the technology to your distance requirements!

πŸ”‘ Key Specifications to Remember

Standard Type Max Distance
10BASE-T Copper (UTP) 100 m
100BASE-TX Copper (UTP) 100 m
1000BASE-T Copper (UTP) 100 m
100BASE-FX Multimode Fiber 2 km
10GBASE-LR Single-mode Fiber 10 km
10GBASE-ER Single-mode Fiber 40 km
πŸ’‘ Study Tips & Concepts to Master
For MAC Address Learning Questions
βœ“ Principle 1: Source-Based Learning

Switches learn from SOURCE addresses only. They do NOT learn from destination addresses. This is the most critical concept to internalize.

βœ“ Principle 2: Temporal Dependency

A host only appears in a switch's table after that host has sent at least one frame through that switch. If a host only receives frames but never sends, it will never appear in any forwarding table.

βœ“ Principle 3: Path Determines Learning

Switches only learn about hosts that send frames through them. If a host's frame takes a different path, switches not on that path will never learn about that host.

βœ“ Principle 4: Flooding vs. Forwarding

When destination is known: Forward to specific port (unicast). When destination is unknown: Flood to all ports except incoming (broadcast/unknown unicast).

For Ethernet Distance Questions
βœ“ Physics Matters

Networking has real physical limitations. Signal attenuation and propagation delay are not arbitrary rulesβ€”they're based on physics.

βœ“ CSMA/CD Timing is Key

The 100m limit for copper Ethernet is primarily determined by CSMA/CD collision detection timing requirements, not just signal strength.

βœ“ Technology Selection

Always match the technology to the distance requirement. For long distances, fiber optics are the standard solution in modern networks.

Practice Strategy

πŸ“ Recommended Approach

  1. Read the question carefully and identify which hosts/switches are involved
  2. Draw or visualize the network topology
  3. For each event, trace which switches receive the frame
  4. Apply the rule: switches learn SOURCE addresses from frames they receive
  5. Ask yourself: "Has this host sent a frame yet? If yes, what path did it take?"
  6. Verify your answer matches the provided solution
  7. If incorrect, identify where your reasoning went wrong