Suppose you have two switches (switch a and b) and one router performing the routing. Each of the two switches hosts a single unique vlan. What is the best practice with regard to pruning the vlans from the trunks? Should you leave the default as is or prune? Obviously in a large environment, pruning select vlans could become a management nightmare. Is it a bad idea to leave the default (allow all vlans on the trunk)?
So if you want to restrict vlans on trunks on VTP transparent switches you would need to use the "switchport trunk vlan allowed ..." command.
From a best practice standpoint, is that advised?
Yes it is. It limits STP for example which is always a good thing. So if you have a vlan that is not needed on a switch why run an STP instance for that vlan on the switch.
It is also good practice from the point of security. Again why have a vlan on a switch when it is not needed there.
And it also limits traffic across the trunks that is not needed.
The only problem with both VTP transparent and "switchport trunk vlan allowed ..." is they do require a lot of manual administration. If you have the time and staff it is recommended but if you don't have either or both then VTP server/client with VTP pruning is acceptable.
This is the case if you are operating in VTP client/server mode, but what about transparent mode?
VTP transparent requires that you manually configure the vlans on each switch and the VTP updates may be passed onwards by a VTP transparent switch (v2) but they won't be used by the VTP switch.
VTP pruning is not applicable to VTP transparent switches ie. it only works in a VTP server/client environment. So if you want to restrict vlans on trunks on VTP transparent switches you would need to use the "switchport trunk vlan allowed ..." command.