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

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

For an introduction to the new site, click here. And see here for current known issues.

New Member

VLAN configuration on Router

Hi All

can any1 help me regarding configuring VLAN on router.

currently i am working on 2951 router of Cisco and i need to know how to configure a vlan on router and also change the native vlan.

As by default vlan 1 is native vlan on router.




You will be configuring sub

You will be configuring sub interfaces on the router or router-on-a-stick. There is plenty of information for this configuration with simple google search. This looks like:

interface GigabitEthernet0/0.10

encapsulation dot1q 10

ip address

interface GigabitEthernet0/0.20

encapsulation dot1q 20 native

ip address


New Member

Well Michael O'Nan,Thanks for

Well Michael O'Nan,

Thanks for showing your concern.

Well i know abt this already but i guess you ppl didnt get my question actually i was asking about configuring VLAN on the router.

Wow...good luck in finding

Wow...good luck in finding your answer.

New Member

Create VlansMethod 1Switch

Create Vlans

Method 1


Switch#sh vlan brief

#vlan database

(vlan)#vlan 55 name Sales

(vlan)#vlan 80 name HR


%Check if apply completed or not%

Method 2

Switch#conf t

(config)#vlan 425

(config-vlan)#name Accounts


(config)#vlan 600

(config-vlan)#name Manager


Assigning Members

Switch#conf t

(config)#int fa0/5

(config-if)#switchport access vlan 55


(config)#int fa0/22

(config-if)#switchport access vlan 80


Assigning Range of Members

(config)#interface range int fa0/10 - 15 , fa0/17, fa0/24

(config-range)#switchport access vlan 600

To verify

Switch#sh vlan brief

Before Deleting the VLANS make sure to remove Membership First

Deleting all VLANS

Switch#delete flash:vlan.dat

New Member

Surender Singh thanks alot

Surender Singh thanks alot.

Well you know i guess you didnt get my question actually i was asking about configuring VLAN on the router.

Like when check interfaces on the router its shows vlan1 as well

so i wanted to ask about how to configure vlan on 2951 router.

and how to assign interface to the vlan configured,

Hall of Fame Super Silver

Perhaps you need to explain

Perhaps you need to explain more clearly what your environment is and what you are trying to achieve. You seem to be focused on how to configure a vlan on a 2951 router. And the technically correct answer is that you can not configure a vlan on the 2951 router.


If the router has a switch module installed you can configure vlans on the switch module (but that is on the switch module and not on the router itself). If you do not have the switch module then you can configure a router interface to connect to a trunk port on a switch (which is what previous posts were explaining).


So if you explain more clearly what is your environment and what you need to accomplish then perhaps we can provide better responses.





New Member

Well Richard Burts

Well Richard Burts thanks

Currently i have a vlan 99 configured on a switchA which is connect to my routerA and my routerA is connected to an other routerB my routerB is connected to switchB now i want to configure Vlan 99 on my routers to reach switchB.

Hall of Fame Super Silver

OK you have clarified that

OK you have clarified that router A is connected to switch A and router B is connected to switch B. Can you clarify for us how the routers are connected to each other?


Also can you clarify whether the routers have switch modules installed on the router? Perhaps the output of show version and of show inventory might help with this.





New Member

Well Richardmy two routers

Well Richard

my two routers are interconnected via an other switch

Yes i do have switch module internally embedded to the router.

2 ports on router 2/0 and 2/1 are connected to switch module and 2 switch ports 0/25 and 0/26 are connected to router.


Only one port on router 2/1 is switchport you can configure it either trunk or access.

But the other port on router 2/0 cannt be configured neither trunk nor access.

Hall of Fame Super Silver

It is helpful to know that

It is helpful to know that you have switch modules on both of the routers. You should be able to configure vlan 99 on the switch modules of both routers and to configure appropriate ports of the switch module to be in vlan 99. If there is another switch that connects Router A to Router B then you also probably need to configure its ports to be in vlan 99 also.





New Member

R1(config)#interface vlan

R1(config)#interface vlan 10
*Mar  1 00:03:23.371: %LINK-5-CHANGED: Interface Vlan10, changed state to administratively down
R1(config-if)#ip add
*Mar  1 00:03:26.223: %LINK-3-UPDOWN: Interface Vlan10, changed state to up
R1(config-if)#ip add



CreatePlease login to create content