cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1181
Views
0
Helpful
4
Replies

Layer 3 InterVLAN switching

Stein Rune Risa
Level 1
Level 1

I am reading this tutorial:

 

http://www.cisco.com/c/en/us/support/docs/lan-switching/inter-vlan-routing/41860-howto-L3-intervlanrouting.html

 

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?

 

 

 

 

 

1 Accepted Solution

Accepted Solutions

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/.

View solution in original post

4 Replies 4

devils_advocate
Level 7
Level 7

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

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...

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/.

Thank you for a very good answer to this question!