Switching and Cisco
VLAN List Comparator
Paste the VLANs a trunk should carry and the VLANs it carries. You get what matches, what is missing, what is extra, and the commands that close the gap.
10,20,40-42,100
30,43-45
50,200
switchport trunk allowed vlan add 30,43-45 switchport trunk allowed vlan remove 50,200
Enter these in interface configuration mode on the trunk. Keep the add and remove keywords: without one, the command replaces the whole allowed list.
switchport trunk allowed vlan 10,20,30,40-45,100
What you can paste
A typed list such as 10,20,30-40, or lines copied from a running configuration. A long allowed list that continues on lines beginning switchport trunk allowed vlan add is read as one list.
The add and remove keywords
On Cisco IOS and NX-OS, switchport trunk allowed vlan followed by a list replaces the whole allowed list. To change a list you use add or remove. Leaving the keyword out on a working trunk removes every VLAN that is not in the new list. Every change this tool writes includes the keyword.
Before you paste
The tool compares two lists and knows nothing else about your switches. Check that the VLANs exist, that the other end of the trunk agrees, and what spanning tree will do, and follow your change process.