cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
714
Views
15
Helpful
8
Replies

Multiples VLANs

habana1020131
Level 1
Level 1

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!!

8 Replies 8

Joseph W. Doherty
Hall of Fame
Hall of Fame

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.

thanks a lot, I'm doing that. I just tought that maybe there be any easiest way!!

Thanks again

If you device also support it, see Julio's post.

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

:-)




>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<

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... 

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?




>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<

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

Hi

this is on my switch 15.0(2a)EX5, but I have implemented this configuration on many switch models. 




>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<
Review Cisco Networking for a $25 gift card