1

If I want to create 3 VLANs, I've to do it one by one like this.

conf t
vlan 2
vlan 3
vlan 4

Same thing goes with deletion.

conf t
no vlan 2
no vlan 3
no vlan 4

Is there a way to do it in a single line? Probably something like

conf t
vlan 2 3 4

!or

conf t
no vlan 2 3 4

!or

conf t
vlan 2, 3, 4

!or

conf t
no vlan 2, 3, 4

!or

conf t
vlan 2-4

!or

conf t
no vlan 2-4

Anyway I have tested those, but didn't work. Basically, that's the idea. If the question is not clear, please let me know.

1
  • Did any answer help you? if so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you could post and accept your own answer.
    – Ron Maupin
    Dec 31, 2020 at 4:02

3 Answers 3

3

I use the below all the time on Cisco Catalyst switches:

!
conf t
!
vlan 2-10
!
no vlan 2-10
!
vlan 2,3,4,5,6,7
!
no vlan 2,3,4,5,6,7
!

0

Actually creating vlans in range is not a good practice and this is not feasible too..

If we are creating a vlan means bottom to it we need to name the vlan for example

Switch (config)# vlan 10 Switch(configure)₹ name finances

If you wants to name vlan then vlans has to be created manually one by one ..

If scenario where naming is not mandatory then you can fallow as below

Switch (config)# vlan 10,20,30,40,50

Switch config) no vlan 10,20,30,40,50

-1

You might wanna try the following command:

config t delete vlan.dat

HTH,

1
  • 1
    That command does not create any VLANs at all.
    – Teun Vink
    Nov 17, 2020 at 18:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.