config-vlan vs. VLAN configuration cmds?

Answered Question
Jul 17th, 2007

I have so much conflicting information about these two configuration options. I have a 2950 guide that shows both config# vlan 1

config-vlan#

and the

switch#vlan database

switch(vlan)#

as options to set vtp mode and create a vlan.

Cisco press flash cards says to use vlan database cmd to enter vlan configuration mode on 2950 switches to set the vtp mode type and to create a vlan. vlan # to enter config-vlan mode is for 1900 switches.

Cisco Press ICND Volume 1 module 2 configuring vlans references a 2950 but never mentions the vlan database cmd at all.

To set the ip address for the switch in the ICND it shows

config)#interface vlan 1

config-if)#ip add 10.5.5.11 255.255.255.0

On the simulator for the Cisco Press flash cards and test it shows

config)#ip add 10.5.5.11 255.255.255.0

On a real switch Im sure I could figure it out but I dont want to miss an otherwise simple question on the exam.

When is one mode desirable over the other?

When is one mode the only option?

Which way do you set the ip address for the switch and on which models?

Confused and frustrated please help!!!

Thank You

Daryl

I have this problem too.
0 votes
Correct Answer by jcrussell about 9 years 4 months ago

When I try to enter vlan database on a 3550, it tells me:

"Switch3#vlan database

% Warning: It is recommended to configure VLAN from config mode, as VLAN database mode is being deprecated. Please consult user documentation for configuring VTP/VLAN in config mode."

That tells me that I should not use vlan database mode.

As far as the IP address, you cannot set an IP address on "the switch". It should be on an SVI.

[edit] Dang it, Anthony beat me to it!

Correct Answer by compsolv about 9 years 4 months ago

I do not have access to a 2950 right now, but I would be willing to bet that you can do both methods for VLAN manipulation. You could do the VLAN Database Mode or the VLAN configuration mode. I would be familiar with both methods for the exam just in case the simulation only supports one or the other.

Just so you know, Cisco prefers the VLAN configuration mode approach. I think they would like to kill off the legacy VLAN Database approach.

So the preferred Cisco config looks like this:

Sw1# configure terminal

Sw1(config)# vlan 10

Sw1(config-vlan)# name MYSPECIALVLAN

Sw1(config-vlan)# end

Sw1#

As far as assigning an IP address to a VLAN, the only way I know is to use a Switch Virtual Interface (I call it a VLAN Interface for short):

Sw1(config)# interface vlan 10

Sw1(config-if)# ip address 10.0.0.1 255.255.255.0

Anthony J. Sequeira

#15626

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (2 ratings)
Loading.
Correct Answer
compsolv Tue, 07/17/2007 - 17:04

I do not have access to a 2950 right now, but I would be willing to bet that you can do both methods for VLAN manipulation. You could do the VLAN Database Mode or the VLAN configuration mode. I would be familiar with both methods for the exam just in case the simulation only supports one or the other.

Just so you know, Cisco prefers the VLAN configuration mode approach. I think they would like to kill off the legacy VLAN Database approach.

So the preferred Cisco config looks like this:

Sw1# configure terminal

Sw1(config)# vlan 10

Sw1(config-vlan)# name MYSPECIALVLAN

Sw1(config-vlan)# end

Sw1#

As far as assigning an IP address to a VLAN, the only way I know is to use a Switch Virtual Interface (I call it a VLAN Interface for short):

Sw1(config)# interface vlan 10

Sw1(config-if)# ip address 10.0.0.1 255.255.255.0

Anthony J. Sequeira

#15626

Correct Answer
jcrussell Tue, 07/17/2007 - 17:14

When I try to enter vlan database on a 3550, it tells me:

"Switch3#vlan database

% Warning: It is recommended to configure VLAN from config mode, as VLAN database mode is being deprecated. Please consult user documentation for configuring VTP/VLAN in config mode."

That tells me that I should not use vlan database mode.

As far as the IP address, you cannot set an IP address on "the switch". It should be on an SVI.

[edit] Dang it, Anthony beat me to it!

darylbybee Tue, 07/17/2007 - 17:31

Thanks both of you for your quick responses. My simulator must be running an older version program even though I just bought it from Cisco Press. It also referred to setting the ip address of the switch. I assumed they meant the default vlan IP but the simulator does not allow you to enter int vlan 1 and there example is as I show above. Frustrating, but its great to get such quick feed back. Thanks again for clarifying.

chuckrenner Sat, 07/21/2007 - 08:40

I would also add a note to this! It partially depends on your purpose. You posted this in a certification forum, so I am going to assume that at least part of your purpose is certification.

If that is the case, I would make sure that you learn BOTH methods. You never know what you might be asked on an exam. It is possible that you might be asked a question about what a series of commands would do. It is my firm belief that you should have a mastery of every topic covered by the exam before taking it. If VLANs are on your next exam, then make sure you know every way to configure them.

Also, I believe that the vlan configuration mode did not exist until IOS 12.0 (would somebody please verify this). This means that you should still be familiar with the vlan database mode for older IOS versions that you may end up using.

Don't fear though. Both methods are very similar, and are not difficult to learn.

The bottom line:

I believe it is wise to learn BOTH, and know the differences.

Actions

This Discussion