How it works...

The STP prevents a loop in the local area networks. A loop can happen if you connect two or more switches with multiple connections, as shown in the following diagram:

Figure 8.7: Spanning tree: how a loop is created

Let's see how a loop is created:

  • Station A sends a broadcast to the network. A broadcast can be an ARP, NetBIOS, or any other packet with all fs in the destination MAC address.
  • Since broadcasts are forwarded to all ports of the switch, SW1 receives the broadcast from port and forwards it to ports and 3.
  • SW2 and SW3 will forward the packets to their other ports, which will get them to ports and of SW4

Get Network Analysis Using Wireshark 2 Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.