09-22-2015 11:57 PM - edited 03-08-2019 01:54 AM
I am reading this tutorial:
First the vlan database is updated with the 3 vlans:
Switch#vlan database
Switch(vlan)#vlan 2
VLAN 2 added:
Name: VLAN0002
Switch(vlan)#vlan 3
VLAN 3 added:
Name: VLAN0003
Switch(vlan)#vlan 10
VLAN 10 added:
Name: VLAN0010
Switch(vlan)#exit
But when interfaces are defined, those exact vlan names are not used - e.g.:
Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#interface Vlan2
Switch(config-if)#ip address 10.1.2.1 255.255.255.0
Switch(config-if)#no shutdown
In one case "vlan 2" is used, while the interfaces has name "Vlan2".
Is the interface names in any way related to the vlan names? If yes - how can they be spelled differently?
Solved! Go to Solution.
09-23-2015 02:47 AM
When creating an SVI, the switch does not check to see if the VLAN exists within the database, however the SVI will remain in an Up/Down state until the corresponding Vlan is created in the database.
The only anomaly as far as I can see is that you cannot create a Layer 2 Vlan unless you put a space between 'vlan' and the 'ID'.
Switch_1(config)#vlan 90
Switch_1(config-vlan)#exit
Switch_1(config)#vlan130
^
% Invalid input detected at '^' marker.
However when creating the SVI, the switch doesn't seem to care whether there is a space or not:
Switch_1(config)#interface vlan 90
Switch_1(config-if)#exit
Switch_1(config)#i
*Mar 1 18:31:31.419: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan90, changed state to up
Switch_1(config)#interface vlan130
It is just Cisco being inconsistent with their naming to be honest.
You can have a Layer 2 Vlan in the database without an SVI.
You can also have an SVI without a Layer 2 VLAN in the database BUT the SVI remains in an Up/Down state until you create one in the database.
When creating L2 Vlan's or SVI's, the word 'VLAN' is not case sensitive/.
09-23-2015 02:03 AM
Unfortunately Cisco is not know for consistent naming conventions.
The first image you have posted is the creation of the Layer 2 VLAN itself. This will allow you to add switchports to those VLANs.
The second image is the creation of an SVI for the corresponding Layer 2 Vlan.
So, although the names do not match 'exactly' as such, they are related to each other. First you need to create a Layer 2 Vlan, then you can create a corresponding SVI for that Vlan.
Thanks
09-23-2015 02:28 AM
Thanks for your reply. Some follow-up question:
When creating the SVI, is the name "checked" towards the vlan database, or is the name given to the interface use choosen?
E.g. could I say:
#interface MyCoolVlanWithNumber2
or is there actually a check saying that interface name also must exist in the vlan database and Cisco internally knows that "Vlan2"="vlan 2"?
I find it very strange that a "strict relation" can exist - but the names does not need to be exact...
09-23-2015 02:47 AM
When creating an SVI, the switch does not check to see if the VLAN exists within the database, however the SVI will remain in an Up/Down state until the corresponding Vlan is created in the database.
The only anomaly as far as I can see is that you cannot create a Layer 2 Vlan unless you put a space between 'vlan' and the 'ID'.
Switch_1(config)#vlan 90
Switch_1(config-vlan)#exit
Switch_1(config)#vlan130
^
% Invalid input detected at '^' marker.
However when creating the SVI, the switch doesn't seem to care whether there is a space or not:
Switch_1(config)#interface vlan 90
Switch_1(config-if)#exit
Switch_1(config)#i
*Mar 1 18:31:31.419: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan90, changed state to up
Switch_1(config)#interface vlan130
It is just Cisco being inconsistent with their naming to be honest.
You can have a Layer 2 Vlan in the database without an SVI.
You can also have an SVI without a Layer 2 VLAN in the database BUT the SVI remains in an Up/Down state until you create one in the database.
When creating L2 Vlan's or SVI's, the word 'VLAN' is not case sensitive/.
09-24-2015 07:33 AM
Thank you for a very good answer to this question!
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide