Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

Netconfig VLAN Assignment - is this feasible?

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
Cisco Employee

Re: Netconfig VLAN Assignment - is this feasible?

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.

New Member

Re: Netconfig VLAN Assignment - is this feasible?

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.

Cisco Employee

Re: Netconfig VLAN Assignment - is this feasible?

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.

New Member

Re: Netconfig VLAN Assignment - is this feasible?

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.

New Member

Re: Netconfig VLAN Assignment - is this feasible?

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?

Cisco Employee

Re: Netconfig VLAN Assignment - is this feasible?

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.

New Member

Re: Netconfig VLAN Assignment - is this feasible?

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.

249
Views
9
Helpful
7
Replies