cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1088
Views
9
Helpful
7
Replies

Netconfig VLAN Assignment - is this feasible?

gcossins
Level 1
Level 1

would it be feasible to create a netconfig template in order to change/move/assign ports into different vlans? I'm assuming it would need one per device. Any ideas or examples appreciated

7 Replies 7

Joe Clarke
Cisco Employee
Cisco Employee

Yes, this is possible. And no, you do not need to create one template per device. Instead, you can used a parameterized template, and create an input XML file that gives all of the devices' required assignments. For example, your template may be:

interface FastEthernet $int1

switchport access vlan $vlan1

interface FastEthernet $int2

switchport access vlan $vlan2

Then, your parameter file would be something like:

0/1

100

0/2

6

1/0/1

10

1/0/2

60

Consult the online help for Netconfig for more on Parameterized templates.

Thanks, have had ago but doesn't seem to be able do what I need -

What I want is to select a device, then select task e.g. 'Assign Port to Voice Vlan', then from a drop down list select the interface (like the pre-defined templates drop down lists).

A command list removing all possible previous interface commands and applying new ones such as vlan membership, cos parameters etc will then be applied to the interface.

This kind of thing is not possible in Netconfig. Building new interface widgets for custom templates is not doable. The parameterized templates are the closest thing. I know this kind of thing is possible in the Network Compliance Manager product.

Additionally, taking CoS, etc. out of the picture, Campus Manager provides a VLAN Port Assignment tool that allows you to pick the device, port, and VLAN from lists.

Thanks - at leat I know it cannot be done this way. Yes I looked at CM & vlan port assignment but discounted it because i need to assign & re-assign ports to voice & no voice vlans, also the voice ports have two vlans associated & cos so I need something a bit more advanced.

Ok have decided to create a script file that re-writes the parametized file as required.

Problem I have is that when I display the cli commands, the parameterized variable names e.g. $int1 are shown and not the actual values I want to use e.g. FastEthernet 1/0/2 Is this correct?

This is correct. Viewing the CLI for the instance will still show the variable. The parameter values are merged with the variables at deployment time.

Thanks - at leat I know it cannot be done this way. Yes I looked at CM & vlan port assignment but discounted it because i need to assign & re-assign ports to voice & no voice vlans, also the voice ports have two vlans associated & cos so I need something a bit more advanced.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: