Submit a ticketCall us

Training ClassThe Orion® Platform Instructor-led Classes

Provided by SolarWinds® Academy, these trainings will introduce users to the Orion Platform and its features, management, and navigation. These courses are suitable for users looking to discover new tips, tricks, and ways to adapt their Orion products to better suit their monitoring needs:
Deploying the Orion Platform
Configuring Orion views, maps, and accounts
Configuring Orion alerts and reports

Reserve your seat.

Home > Success Center > Network Configuration Manager (NCM) > NCM Documentation > NCM 7.9 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: 961 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.


     configure terminal
     interface FastEthernet0/0
     no switchport access vlan 1004
     switchport access vlan 1002


     configure terminal
     interface FastEthernet0/1
     no switchport access vlan 1004
     switchport access vlan 1002


Last modified