Now.
How do switches learn about each other?
As mentioned, bridge protocol data units or BPD use are sent out of all ports on switches by default
every 2 seconds when running spanning tree.
So switches will learn about each other when they receive BPD use from other switches on their ports.
As an example, in this topology switch, one will know that there's a loop because it's receiving a
BPD due from switch two on port two as well as port three.
So BPD use from a switch with the same bridge ID are received on multiple ports and thus switch.
One knows that there's a loop between itself and switch two in the same way.
Switch two knows that there's a loop because it receives BPD use from switch one on both Port one and
port three.
In other words, it's receiving BPD use from the same switch on multiple ports.
Hence there must be a loop.
Now, BP does contain lots of information, and I'll demonstrate that in a moment.
One of the pieces of information that a BPU contains is the bridge ID of the sending switch.
A spending tree bridge ID is an eight byte of value unique to the switch.
It consists once again of a two byte priority field and a six byte system ID, with the system ID being
based on the burnt in Mac address of the switch.
So in other words, the bridge ID consists of the property 32768 by default in decimal or 8000 in hexadecimal.
And the MAC address of the switch.
That means that the bridge ID is going to be unique in spending tree so bpd use contain information
about spending tree switches send BPD use using their unique mac address to a destination multicast
address of zero one ATC 2000000 or if using per VLAN spanning tree 01000c cc cc cd they have three kinds
of BPD use a configuration BPU which is used by spending tree to provide information to switches, a
topology change BPU to tell switches of a change and an acknowledgement BPU which is used to confirm
the receipt of a topology change notification beads are sent by default every 2 seconds once again.