Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

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

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

2 REPLIES
New Member

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

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

New Member

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

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

98
Views
0
Helpful
2
Replies