How can I create Vlans when I upload a new startup-config?

Unanswered Question
Apr 29th, 2008

I need to create vlans on a router via a new startup-config file. Anyone know the syntax?

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
william.caban Tue, 04/29/2008 - 20:27

It will all depend on your actual router and modules.

If it is a switch+router you will either have the "vlan database" exec option or the "vlan XYZ" config option.

! Old style

vlan database

vlan 100

apply

exit

show vlan-switch

!

! New Style

config t

vlan 100

exit

show vlan

!

If it is a pure router, most probably, you will have to define the vlans "indirectly" using subinterfaces. (Note: If you don't define a native VLAN then, VLAN 1 will be assumed).

!

interface Ethernet0

description Physical Interface

!

interface Ethernet0.50

description Interface for VLAN 50 (native)

encapsualtion dot1Q 50 native

!

interface Ethernet0.100

description Interface for VLAN 100

encapsulation dot1Q 100

!

HTH,

-W

/rate post if it helps

jay77jay77 Tue, 04/29/2008 - 22:20

hi

I have this experience - even if you dont create vlan using vlan database or conf t - vlan x command - eg. in c2811 with HWIC-4ESW, if i simply make one of the HWIC port as switch port access vlan xx and create interface vlanxx. I can assign ip address to the Vlanxx and use it as a layer 3 port. So in this what is the purpose of creating vlan with vlan database or conf t command?

Tks

Jay

Actions

This Discussion