I understand that vlan's can be created on cisco switches but last day I was looking on the configuration of my office cisco router and I saw configuration on vlans interfaces. I ran the command "sh int vlan20" and I saw the interface. My questions
1-what are these vlan interfaces on router ?( if they are virtual , what is physical interface looks like for actual connection to router)
2-Is vlan interfaces different than virtual interfaces and how ?
3-How to configure vlan interfacs on router and for what purpose ?
4-What cisco router models that we can define vlans on ?
Thanks for reply. If someone knows a website the above explanation, I would appriciate.
modern IOS routers like 1800, 2800, 3800 series but also 3700 series and late 2600 can host small LAN switches modules.
My guess is that your router has one of them.
There two types of these modules:
those that are configured from the router itself
those that are a separate logical device with its own configuration.
in your case should be a module of first type.
So the questions can now be answered:
1) They are logical L3 interfaces so called SVI = switched virtual interfaces they provide layer 3 services (a gateway) to corresponding L2 Vlan.
the L2 vlan can be associated to one or multiple switch ports of the module and they are configured like in an IOS LAN switch.
2) Vlan interfaces are a form of logical interfaces like loopbacks but: an SVI vlan 10 can be up/up only if at least one switch port is up and associated to vlan 10 (including trunk ports and actually the correct definition is at least one port in Spanning tree state forwarding). Note: this is true for real switches it can be false for these modules on routers (the internal trunk between router and module can be enough to make the L3 SVI to stay up)
First of all the corresponding L2 object Vlan has to be created, it is likely that you should use vlan database context
router# vlan database
router(vlan)# vlan 10
router(vlan)# name test10
apply or exit are needed to have the new vlan created
then interface vlan 10 can be configured
interface vlan 10
ip address 10.10.10.1 255.255.255.0
! you need to enable with no shut
ports in module can be associated to L2 broadcast domain vlan 10
switchport mode access
switchport access vlan 10
the port can be used as a LAN switch port
4) as stated above multiservice routers (C3700, C2600) and ISR routers (1800,2800,3800) and new ISR G2 (1900,2900,3900) can host these modules
Hope to help