cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
589
Views
0
Helpful
3
Replies

Query about creating VLANs

fabbasi
Level 1
Level 1

Could anyone pls explain the diffence between creating a VLAN through command 'Vlan database' and creating a VLAN directly using the 'interface VLAN' command on a switch.

I am aware of the different command syntax, but want to clarify if the end behaviour of VLANs created by each of these methods have any special properties or limitations.

Thanks in advance.

1 Accepted Solution

Accepted Solutions

Kevin Dorrell
Level 10
Level 10

The two methods you cite are really rather different.

The first, using the vlan database, creates a layer-2 VLAN. This is purely a switched VLAN. The hosts on the VLAN can talk to each other, but there is no way for traffic to get into or out of the VLAN.

The second, interface vlan n is the layer-3 representation of the VLAN. It is the gateway (literally) for traffic to get into and out of the VLAN. If you will, it presents the VLAN to the router.

You actually need both.

But maybe for your second method you actually mean the vlan command, without the interface. In that case, you are right, there is no fundamental difference - they do the same thing. I fact, I think I heard that Cisco are planning to abandon the separate vlan database method in the long term, and make do with just the vlan command.

Hope this helps.

Kevin Dorrell

Luxembourg

View solution in original post

3 Replies 3

Prashanth Krishnappa
Cisco Employee
Cisco Employee

1)When you create the VLAN in VLAN database, you are creating layer 2 VLAN in the database. Or you could also create it in config term mode using

6500(config)#vlan ?

WORD ISL VLAN IDs 1-4094

access-log Configure VACL logging

access-map Create vlan access-map or enter vlan access-map command mode

accounting VLAN accounting configuration

dot1q dot1q parameters

filter Apply a VLAN Map

internal internal VLAN

mapping Set a VLAN mapping on this device

2)The "interface vlan x" command only creates a layer 3 Switched VLAN interface(SVI) to which you can configure layer 3 parameters.

You need to create the VLAN as in step 1 before you so step 2

Kevin Dorrell
Level 10
Level 10

The two methods you cite are really rather different.

The first, using the vlan database, creates a layer-2 VLAN. This is purely a switched VLAN. The hosts on the VLAN can talk to each other, but there is no way for traffic to get into or out of the VLAN.

The second, interface vlan n is the layer-3 representation of the VLAN. It is the gateway (literally) for traffic to get into and out of the VLAN. If you will, it presents the VLAN to the router.

You actually need both.

But maybe for your second method you actually mean the vlan command, without the interface. In that case, you are right, there is no fundamental difference - they do the same thing. I fact, I think I heard that Cisco are planning to abandon the separate vlan database method in the long term, and make do with just the vlan command.

Hope this helps.

Kevin Dorrell

Luxembourg

Thank you for that explanation. Indeed, in the second method I meant Layer 2.

I think I have it - using 'vtp database' I create vlan5 and with 'vlan n' I create vlan 6, these are L2 VLANs and regardless of which method is used 'show vlan' will list them both.

Now if I only want to route vlan5, I then need L3 and so on a router or MSFC I would create an interface VLAN using the same VLAN ID as for vlan5.

Cheers

Review Cisco Networking for a $25 gift card