Now on switch 1, sh spanning-tree vlan 1
shows me that gigabit 0/1, 2 and 3 are blocking
so spanning tree are blocking those ports
but when I use the command show cdp neighbors
I do see my neighboring switches even though those ports are blocked.
So management traffic such as CDP, VTP, DTP, LLDP
and others are not blocked through Spanning Tree.
In this example, show lldp neighbor shows me
that I have a neighboring switch
switch 2 connected to gigabit 0/0 as well as to gigabit 0/1.
Gigabit 0/1 is blocking in Spanning Tree
but I'm still receiving those LLDP messages on that blocking port.
Now I don’t see switch 3 and switch 4 in LLDP
because these 2 switches are not running LLDP
but if I went to switch 3 as an example
and enabled Link Layer Discovery Protocol
I should see that switch become available as a neighbor and there you go.
Switch 3 is available as neighbor on gigabit 0/2
even though Spanning Tree is blocking on that port.
By the same token going to switch 4
enable lldp go on to switch 1 show lldp neighbor
I can see switch 4 as an LLDP neighbor
I can also see that switch as a CDP neighbor.
CDP is enabled by default
LLDP is not but both those protocol are received on a Spanning Tree
blocking port so even though this port once again are blocking.
LLDP and CDP are received on that port as well as transmitted.
So back on switch 2
sh cdp neighbor
I can still see switch 1 as a CDP neighbor and as an LLDP neighbor
even though this port is blocking in Spanning Tree
so management traffic such as LLDP and CDP is transmitted
and received on blocking ports or to use industry standard term
on ports that are discarding.