cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3948
Views
10
Helpful
8
Replies

CLI vlan command does not work inside a config file

Heiko.Bialozyt
Level 1
Level 1

my environment:

IE-3000-8TC industry-switch

ios: ies-ipservicesk9-mz.150-2.SE2

if i do

vlan 12

name NextVLAN

state active

in putty, everything is ok. but if i set this lines in a config-file and use them by config net or copy tftp: running-config, then this commands are completely ignored.

does anybody know how to setup VLAN so that this are funktional. i dont need a "interface vlan xx"!

in addition manualy configured vlan are shown in show vlan command but there are no entries inside a sh running-config output even i user show running-config all.

whats wrong?

8 Replies 8

cadet alain
VIP Alumni
VIP Alumni

Hi,

The vlan configuration is saved in the vlan database ( vlan.dat file on flash).

Regards

Alain

Don't forget to rate helpful posts.

Don't forget to rate helpful posts.

Hi Alain

this is not helpful, because you dont have read my problem. the core is, that no vlan config works inside a config file. Why?

thanks for good ideas.

regards

Heiko

Hi Heiko,

Sorry if I have misunderstood your query now:

Could you please expain what exactly are you trying to tell here:

1- Do you mean that you tried to configure VLAN on the switch but this is not getting synchnonized?

2- You configure the VLAN on switch but it is not working as expected? If yes can you please throw some more light on this? How exactly you mean it is not working?

3- R you have configured the VLAN's on the switch but you dont see the vlans when you copy the running config on to any server and when open that file you dont see the vlans which you have configured?

We will try to help you once we have clear understanding of whats is required.

Thanks in advance and sorry for inconvience if caused any.

Regards

Inayath

to make sure that everybody can regognize, i send a complet log from console:

1. try to configure vlan from cfg-file by copy tftp: running-config

++++++++++++++++++++ session +++++++++++++++++++++++++

Switch#sh vlan

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Fa1/3, Fa1/4, Fa1/5, Fa1/6
                                                Fa1/7, Fa1/8, Gi1/2
1002 fddi-default                     act/unsup
1003 trcrf-default                    act/unsup
1004 fddinet-default                  act/unsup
1005 trbrf-default                    act/unsup

VLAN Type  SAID       MTU   Parent RingNo BridgeNo Stp  BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1    enet  100001     1500  -      -      -        -    -        0      0
1002 fddi  101002     1500  -      -      -        -    -        0      0
1003 trcrf 101003     4472  1005   3276   -        -    srb      0      0
1004 fdnet 101004     1500  -      -      -        ieee -        0      0
1005 trbrf 101005     4472  -      -      15       ibm  -        0      0


VLAN AREHops STEHops Backup CRF
---- ------- ------- ----------
1003 7       7       off

Remote SPAN VLANs
------------------------------------------------------------------------------


Primary Secondary Type              Ports
------- --------- ----------------- ------------------------------------------

Switch#copy tftp://192.168.106.111/ciscortr.cfg running-config
Destination filename [running-config]?
Accessing tftp://192.168.106.111/ciscortr.cfg...
Loading ciscortr.cfg from 192.168.106.111 (via Vlan1): !
[OK - 251 bytes]

251 bytes copied in 15.393 secs (16 bytes/sec)
Switch#
Apr 23 07:49:38.204: %SYS-5-CONFIG_I: Configured from tftp://192.168.106.111/ciscortr.cfg by console
Switch#sh vlan

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Fa1/3, Fa1/4, Fa1/5, Fa1/6
                                                Fa1/7, Fa1/8, Gi1/2
1002 fddi-default                     act/unsup
1003 trcrf-default                    act/unsup
1004 fddinet-default                  act/unsup
1005 trbrf-default                    act/unsup

VLAN Type  SAID       MTU   Parent RingNo BridgeNo Stp  BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1    enet  100001     1500  -      -      -        -    -        0      0
1002 fddi  101002     1500  -      -      -        -    -        0      0
1003 trcrf 101003     4472  1005   3276   -        -    srb      0      0
1004 fdnet 101004     1500  -      -      -        ieee -        0      0
1005 trbrf 101005     4472  -      -      15       ibm  -        0      0


VLAN AREHops STEHops Backup CRF
---- ------- ------- ----------
1003 7       7       off

Remote SPAN VLANs
------------------------------------------------------------------------------


Primary Secondary Type              Ports
------- --------- ----------------- ------------------------------------------

Switch#

+++++++++++++++++++++++++++++++++ session break ++++++++++++++++++++++

the file content of ciscortr.cfg:

vlan 12

name epool

state active

!

on next try i copy this lines to putty

+++++++++++++++++++++++++++++++++ session cont ++++++++++++++++++++++

Switch#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#vlan 12
Switch(config-vlan)#
Switch(config-vlan)# name epool
Switch(config-vlan)#
Switch(config-vlan)# state active
Switch(config-vlan)#
Switch(config-vlan)#!
Switch(config-vlan)#
Switch(config-vlan)#end
Switch#sh
Apr 23 07:59:52.587: %SYS-5-CONFIG_I: Configured from console by consolevlan

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Fa1/3, Fa1/4, Fa1/5, Fa1/6
                                                Fa1/7, Fa1/8, Gi1/2
12   epool                            active    Fa1/1
1002 fddi-default                     act/unsup
1003 trcrf-default                    act/unsup
1004 fddinet-default                  act/unsup
1005 trbrf-default                    act/unsup

VLAN Type  SAID       MTU   Parent RingNo BridgeNo Stp  BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1    enet  100001     1500  -      -      -        -    -        0      0
12   enet  100012     1500  -      -      -        -    -        0      0
1002 fddi  101002     1500  -      -      -        -    -        0      0
1003 trcrf 101003     4472  1005   3276   -        -    srb      0      0
1004 fdnet 101004     1500  -      -      -        ieee -        0      0
1005 trbrf 101005     4472  -      -      15       ibm  -        0      0


VLAN AREHops STEHops Backup CRF
---- ------- ------- ----------


VLAN AREHops STEHops Backup CRF
---- ------- ------- ----------
1003 7       7       off

Remote SPAN VLANs
------------------------------------------------------------------------------


Primary Secondary Type              Ports
------- --------- ----------------- ------------------------------------------

Switch#

+++++++++++++++++++++++++++++++++ session end ++++++++++++++++++++++

after this the vlan is created and active. it seems there is a problem whith config-file.

Regards

Heiko

Hi,

take a look here( it's not for same platform but the behaviour should be the same):

http://www.cisco.com/en/US/docs/switches/lan/catalyst2950/software/release/12.1_22ea/SCG/swvlan.html#wp1197664

Here is the interesting part:

"

Saving VLAN Configuration

The configurations of VLAN IDs 1 to 1005 are always saved in the VLAN  database (vlan.dat file). If VTP mode is transparent, they are also  saved in the switch running configuration file, and you can enter the copy running-config startup-config privileged EXEC command to save the configuration in the startup configuration file. You can use the show running-config vlan privileged EXEC command to display the switch running configuration file. To display the VLAN configuration, enter the show vlan privileged EXEC command.

When you save VLAN and VTP information (including extended-range VLAN  configuration information) in the startup configuration file and reboot  the switch, the switch configuration is determined as follows:

If  the VTP mode is transparent in the startup configuration, and the VLAN  database and the VTP domain name from the VLAN database matches that in  the startup configuration file, the VLAN database is ignored (cleared).  The VTP and VLAN configurations in the startup configuration file are  used. The VLAN database revision number remains unchanged in the VLAN  database.

If  the VTP mode or domain name in the startup configuration does not match  the VLAN database, the domain name and VTP mode and configuration for  the first 1005 VLAN IDs use the VLAN database information.

If  the VTP mode is server, the domain name and VLAN configuration for the  first 1005 VLAN IDs use the VLAN database information.

If  the switch is running Cisco IOS Release 12.1(9)EA1 or later and you use  an older startup configuration file to boot up the switch, the  configuration file does not contain VTP or VLAN information, and the  switch uses the VLAN database configurations.

If  the switch is running a Cisco IOS release earlier than 12.1(9)EA1 and  you use a startup configuration file from Cisco IOS Release 12.1(9)EA1  or later to boot up the switch, the image on the switch does not  recognize the VLAN and VTP configurations in the startup configuration  file, so the switch uses the VLAN database configuration. "

Regards

Alain

Don't forget to rate helpful posts.

Don't forget to rate helpful posts.

thank you for this copied parts. but i know already about. if you had read my first post, you would know about version and type of switch.

VTP mode is unchanged during all of my tests at server. but there are different results from doing same input by telnet or config file. is this a bug? or is'nt planned to config vlans from a config file?

sorry it's still not helpful

regards

heiko

I've read your first post and all the others by the way and if you read mine you'd see I told that it was not for the same platform you had.if you knew about this excerpt and the vlan database then you should know that  it ain't supposed to work the way you want at least in my humble opinion, I think you should read this excerpt more thoroughly once again.

Regards

Alain

Don't forget to rate helpful posts.

Don't forget to rate helpful posts.

fine. you've tried to reproduce my casse? from theory it seems to be easy. but in real life ... it's a bit tricky. it does not work.

thanks for ideas

Heiko

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card