Submit a ticketCall us

Systems Monitoring for Dummies
Our new eBook will teach you the fundamentals and help you create monitors and alerts that are effective, meaningful, and actionable. Monitoring is more than a checkbox on your to-do list. This free eBook will give you practical advice to help you succeed in all aspects of monitoring – discovery, alerting, remediation, and troubleshooting. Don’t miss out on this indispensable resource for newbies, experienced IT pros, and everyone in between. Register Now.

Home > Success Center > Network Configuration Manager (NCM) > NCM 7.7 Administrator Guide > Config change template details

Config change template details

Created by Caroline Juszczak, last modified by Anthony.Rinaldi_ret on Oct 03, 2016

Views: 79 Votes: 0 Revisions: 5

A config change template named Change VLAN Membership on Ports Cisco IOS installs with SolarWinds NCM. Its purpose is to change VLAN membership on Cisco IOS device ports.

The following sections explain the specific components of a config change template by demonstrating how to use the Change VLAN Membership on Ports Cisco IOS template to make VLAN membership config changes on hypothetical Cisco device interfaces.

Viewed as parsable code, a config change template consists of two parts: parameters and commands. For more information, see Parts of a Config Change Template.


This section assumes that you know how to make VLAN membership changes to device interfaces from the Cisco IOS command line. This section also assumes that you are familiar with using variables, data arrays, foreach loops, if/else conditional statements, and logical operators in creating system administration scripts.

The following sections show the reference template broken up into parameter, command, and output sections.


These are the parameters for the Change VLAN Membership on Ports Cisco IOS template. Notice that the parameters already have values associated with them, which are either a string or a variable.

	This change template configures VLAN membership on
	Cisco IOS devices.  The template was verified on
	Cisco 2950 Catalyst Switch running IOS software
	version 12.1(12c).
	Cisco, IOS, VLAN Membership
	Cisco IOS

	NCM Node
	The node the template will operate on. All
	templates require this by default. The target
	node is selected during the first part of the
	wizard so it will not be available for selection
	when defining values of variables.

	Select Port(s)
	Select the port(s) for which you would like to
	change VLAN membership.

	VLAN(s) to remove
	Select the VLAN(s) to remove. Selecting VLANs
	irrelevant to interfaces results in no actions
	taken for those interfaces.

	VLAN to assign
	Select the VLAN you would like to assign.


There is one instance of the script command and multiple instances of the CLI{ } command, and all variables have declarations.

script ConfigureVLANmembershipCiscoIOS (    
 NCM.Nodes @ContextNode, 
 NCM.Interfaces[] @TargetPorts, 
 NCM.VLANs[] @VlansToRemove,
 NCM.VLANs @VlanToAssign )
 // Enter configuration mode
 { configure terminal }
 // Loop through selected ports
 foreach (@portItem in @TargetPorts)
  { interface @portItem.InterfaceDescription } 
 // Loop through list of vlans to remove
 foreach (@vlanRemove in @VlansToRemove)
   { no switchport access vlan @vlanRemove.VLANID }
   { switchport access vlan @VlanToAssign.VLANID }
   { exit }

 // Exit configuration mode
  { exit }

Output Commands

These are the commands that NCM executes after logging on to the NCM device(s) selected as the target for this config change template. We are changing VLAN membership on one interface of two different Cisco switches.

NCM Node bgp-2651-03configure terminalinterface FastEthernet0/0no switchport access vlan 1004

switchport access vlan 1002

exitendNCM Node cur-3725Configure terminalinterface FastEthernet0/1no switchport access vlan 1004

switchport access vlan



Last modified