cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
12638
Views
5
Helpful
2
Replies

How to create a batch of vlans using a single command / how to put sevral vlans into a trunk using a single command

paratrooper
Level 1
Level 1

Hi dears 

i do some exersices in packetracer 

im a bit puzzeled, for example for Huawei switches there is a command to create a banch of vlans at once 

like : vlan vlan batch 2 to 9 10 and etc 

and a command like : trunk port allow vlan 2,5,7-20 and etc 

why i can see some similar sort of command in Cisco ?

to crete a vlan at least in packet tracer i have to do it one by one repeating vlan command

and the same in true for adding vlans in to trunk port 

there is no way to add required vlan in one command

and one more Huawei has a so called hybrid interface where it is possible to process different packets from different vlans for example using "untag" command it is possible to remove vlan tag from reuqired packets and etc is there any analog in Cisco ?

 

could some one please tell me is there any solution to this ?

Thanks 

2 Replies 2

Mark Malone
VIP Alumni
VIP Alumni
Yes in global config just do this vlan 1,2,3,4,5 that would create 5 vlans
and the switchport trunk allowed vlan 1,2,3,4,5 , adds them all to the trunk

emulators are restricted , not sure about last option , Huaweii was based on Cisco IOS , near exact same when it first came out they were sued over it and Cisco based theres of another vendor before that , you will find most vendors are similar syntax these days with slight variations , some have proprietary commands that others may not alright but most general setups are available

Hello,

 

As Mark mentioned, this is possible. You can also use a dash to specify a range:

 

vlan 50-60

 

The above command will create vlans 50 through 60 in one command.

 

Hope that helps!

-Bradley Selzer
CCIE# 60833
Review Cisco Networking for a $25 gift card