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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.