04-27-2017 09:30 AM - edited 03-08-2019 10:22 AM
Hello,
how can I create multiples vlan with one command?
I have to create a group of VLANs 1600-2700, and i dont want to tap every vlan command, is it a easiest way to do it? Its a 2960x switch version 15.2(3E)
Thanks!!
04-27-2017 09:44 AM
Hmm, I don't recall there being an easy command to do this, i.e. something like a range command.
What you might do is use a spreadsheet, or script, to create the entries needed, and either paste them or tftp/FTP them into the config.
04-27-2017 10:15 AM
thanks a lot, I'm doing that. I just tought that maybe there be any easiest way!!
Thanks again
04-27-2017 10:57 AM
If you device also support it, see Julio's post.
04-27-2017 10:56 AM
Hi, yes you can, using (,) or (-) between the vlans.
Example:
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#vlan 2-100
Switch(config-vlan)#
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#vlan 2,3,5,19,44,300
Switch(config-vlan)#
Switch(config)#vlan 1600-2700
Switch(config-vlan)#end
1600 VLAN1600 active
1601 VLAN1601 active
1602 VLAN1602 active
1603 VLAN1603 active
1604 VLAN1604 active
1605 VLAN1605 active
1606 VLAN1606 active
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1607 VLAN1607 active
1608 VLAN1608 active
1609 VLAN1609 active
1610 VLAN1610 active
1611 VLAN1611 active
1612 VLAN1612 active
1613 VLAN1613 active
1614 VLAN1614 active
1615 VLAN1615 active
1616 VLAN1616 active
1617 VLAN1617 active
1618 VLAN1618 active
and next...
It will create the all the vlans or range that you want.
Please rate the comment if it is useful
:-)
04-28-2017 07:37 AM
Hello,
Thanks for answer me. I've tried and it doesn't show me an error (which I suppose that means that the command works) but when I try with sh vlan 1602 (for example) the system returns Invalid input.. so I check with just sh vlan command and the vlans created before aren't there.
I think that maybe Switch 2960X doesn't support this option.
Thanks a lot anyway...
04-28-2017 07:50 AM
Hi
You are welcome, I have tried on one of my Cisco 2960X (WS-C2960X-24TD-L) and it works.
SWITCH(config)#vlan 1600-1602
SWITCH(config-vlan)#end
1600 VLAN1600 active
1601 VLAN1601 active
1602 VLAN1602 active
SWITCH#
The show vlan <vlan id> is not a valid command, you can use:
show vlan or show vlan brief
Are you using any VTP mode?
04-28-2017 08:57 AM
I have VTP in transparent mode because my Vlans are in extended-range.
My switchs model is 2960X-48TD-L software version 15.2 (3r)E1
04-28-2017 09:19 AM
Hi
this is on my switch 15.0(2a)EX5, but I have implemented this configuration on many switch models.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide