I would like to see a show trunk command which can show me which vlans/trunk are actually alive, showing signs that devices are sending traffic through a certain Vlan.
For example, on port f0/48 on SwitchA I have configured as "switchport mode trunk / switchport trunk allow vlan 300,400". Same config is on SwitchB.
If I do 'show int trunk' for example, I can see that "vlan allowed and active in management domain' lists f0/48 = 300,400. My question:
Does this information from 'show in trunk' really means that I have traffic flowing thru Vlan 300 and 400?
In neither SwitchB nor SwitchA, I have devices currently assigned to vlan 400.
Therefore I am not sure which command can show me that vlan 400 yes it is configured, but I have 0% traffic flowing through it. Let me know if you know such show command.
If such command is available, it could be much easier to clean up configuration and leave on the "allow vlan x" only the vlans which contain active devices.
first of all Vlans that are really active are those in the last section
"Vlans in spanning tree forwarding state and not pruned"
if you have enabled pruning and no users in vlan 400 are on the switch you shouldn't see vlan400 in last section on the switch that is upstream meaning that is not going to propagate broadcast, multicast, unknown unicast received in vlan 400 out that port.
if pruning is not enabled all the above types of traffic in vlan400 will flow to the switch even if no user is present.
sh int trunk tells you what Vlans have the right to send or receive frames over the link.
You have configured a list of allowed vlans and this helps in containing useless traffic (that of not permitted vlans).
Also it helps in keeping as low as possible the number of STP instances running on downstream switch.
automatic pruning does not help in STP scalability: even if a vlan is pruned the downstream switch still runs the STP instance for it (in PVST+ or Rapid PVST scenarios)
Hope to help