9.6.4 Packet Tracer – Switch Operation Answers

9.6.4 Packet Tracer – Switch Operation Answers

Topology

9.6.4 Packet Tracer - Switch Operation Answers 2

Learning Objectives

  • Observe how a switch processes a broadcast
  • Observe how a switch processes a known unicast
  • Observe how a switch processes an unknown unicast

Introduction:

A switch operates at Layer 2, learns the physical address of devices connected to each port, and stores this information in a table. Switches learn addresses from frames received by the switch. If the switch receives a frame destined for a device with a physical address that is in its table, it only sends the frame out the port the device is on. This is called a known unicast. If the switch receives a broadcast, it floods the frame out all ports except the incoming port. Also, if the switch receives a frame destined for a MAC address it does not have in its table, called an unknown unicast, it also floods that frame out all ports except the incoming port. When a switch floods a frame out all ports except the incoming port, it appears to behave as a hub does. Strictly speaking, the PDU that a switch processes is a frame, but, in this lab, ping and ARP packets are what are encapsulated in the frames, and may be thought of as packets as well.

Task 1: Observe how a switch processes a broadcast and a known unicast

Step 1. Complete the Spanning Tree protocol.

Complete the Spanning Tree protocol by toggling between Realtime and Simulation modes 4 times. All link lights should turn green. Leave PT in Simulation mode.

Step 2. Open ARP and MAC tables.

Using the Inspect Tool (magnifying glass), open the ARP tables for PC A and PC B, and the MAC table for the switch. We are not interested in the ARP table for the switch at this time. It is related to the switch management interface, which will be covered later in Chapter 11. Move the selection arrow over the switch to view a summary of the switch ports and their interface MAC addresses. Please note that this is not the table of addresses that the switch learns. Arrange the windows above the topology.

Step 3. Add a Simple PDU to ping from PC A to PC B.

Use the Add Simple PDU (the closed envelope) to send a single ping from PC A to PC B. Click on PC A, the source, and then, click on PC B, the destination. Two events appear in the Event List, an ICMP echo request and an ARP request to learn the MAC address of PC B. Click on the colored boxes in the Info column to examine these events.

Step 4. Step through the simulation.

Use the Capture / Forward button to trace the resulting sequence of packets. Since the PC A ARP table has no entry for PC B, in order to complete the ping it must first issue an ARP request. The switch learns the MAC address of PC A, and the port to which it is connected, from the ARP request. It learns the MAC address of PC B, and the port to which it is connected, from the ARP reply. The switch floods the ARP request out all ports because ARP requests are always broadcasts. Once PC A receives the ARP reply, it can complete the ping. From the perspective of the switch, the ping is a known unicast. When you are done tracing the packets, click the Reset Simulation button.

Task 2: Observe how a switch processes unknown unicasts

Step 1. Clearing the switch MAC address table.

Click on the switch. Click on the CLI tab. At the command prompt, press the Enter key a few times, the Switch> prompt will appear. Type enable and press the Enter key. This should change the prompt to Switch#. Type the command clear mac-address-table dynamic and press the Enter key. Note that the MAC table for the switch that you displayed earlier is once again empty. However, the PC ARP tables are still populated. Close the switch configuration window.

Step 2. Resend the packet.

You should still be in Simulation mode. The user created PDU (the ping from PC A to PC B that you created in Task 1) is still in the Event List. Use the Capture / Forward button to trace the resulting sequence of packets. Because the ARP tables are populated, no ARP request broadcast is necessary. But the when the echo request packet reaches the switch with its empty MAC address table, it is now considered an unknown unicast. In this case, the switch, as in the case of the broadcast, floods the packet out all ports, except the port it was received on. When done, delete Scenario 0 by clicking the Delete button.

Task 3: Observe switch behavior in other situations.

Step 1. Ping through a hub.

Now try pinging from PC E to PC F using the Add Simple PDU button. Trace the packets to try to understand what is happening. Note the switch learns that two MAC addresses exist through one of its ports, and it learned this because the hub is forwarding all packets to the switch.

Step 2. Experiment.

Try other experiments to learn about the algorithm the switch is using to process frames.

Download Packet Tracer (.pka) file:

Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x