🚀The diameter is the maximum number of switches that you cross in order to link any two switches in the bridged #network (which includes source and destination), if you assume the worst cases. You do not cross the same#switch twice when you determine the diameter.
Now, look at the diagram (next picture). The diagram contains some access switches (switches C, D, and E) that connect to two distribution switches (switches A and B). There is a Layer 3 (L3) boundary between the distribution switches and the core. The bridged domain is stopped at the distribution switches. The STP diameter is 5:
You can see from the diagram that there is no pair of switches that gives a diameter that is greater than 5.
Examples and configs see on the comments🔜🔜🔜🔜🔜🔜🔜🔜🔜🔜🔜