I have 40+ switches including 4 CatOs 6513 switches in VTP server mode with more than 100 vlans.
Most of the access switches don't have all vlan configured in their access ports. when I issue SHOW SPANTREE VLAN 4 on the access switch which is vtp client ( CONSIDERING no access port configured on this switch with vlan 4) it claims itself as root switch for vlan 4.
When I issue same command on the other switch having access port configured in vlan 4, shows actual root switch ( on of the core switch) for vlan 4.
Please anyone help me out from this.
I guess that when you do "show spantree vlan 4" on your access switch, you are indeed seeing some ports active in vlan 4 (whether they are access or not is irrelevant).
If you switch is showing itself as a root for vlan 4, it simply means that it does not receive the superior information generated by the root bridge on the core. This, probably because you manually pruned vlan 4 from the uplink leading to this core bridge. On the bridge where you are using vlan 4, you probably enabled vlan 4 on the uplink, hence the correct root information.
That should not cause any problem. Your network is de facto partitioned for vlan 4, it is normal to have one root bridge per partition.