RouteDuck

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.

What the trunk should carry. A list, or lines from a running configuration.
What the trunk carries now.
Matching6

10,20,40-42,100

Missing from actual4

30,43-45

Extra on actual2

50,200

Make the actual trunk match the expected list
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.

Or set the whole list, which replaces whatever is there
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.

Related tools