cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1425
Views
10
Helpful
5
Replies

Unable to understand how a VLAN has been created on a 3650 switch

johnmcl7
Level 1
Level 1

I've recently completed my CCNA but generally new to the world of Cisco networking and a bit stumped with a VLAN issue.  I've been trying to back up a Cisco 3650 switch (specifically ws-c3650-24pd and one running with a series of others) which I've copied the startup-config from which I've restored to another switch then swapped them over however on the replacement switch layer3 didn't seem to come up and when I checked the interfaces, the SVI was down/down.  I read posts that suggested the VLAN needed to be defined on the switch before the SVI would come up so I added a definition for the management VLAN and the SVI came up fine and the switch appeared to work normally.

 

I went back to the original switch (only one has been powered up and connected at a time) and checked the vlans, it showed there were two with all the ports in VLAN 100 labelled 'Workstations' and a VLAN 200 labelled 'Management'.  However neither seem to be defined as I'd expect in the config file, there's an entry for each port specifying them to be port VLAN 100, there's a section 'interface Vlan1' which shuts it down and disables ip address and one entry interface vlan200 which has a description and the IP address and subnet mask.  There is no VLAN 100 Name Workstations and VLAN 200 Name Management as I'd expect and there's no VTP settings either, when I run show vtp status it shows running as a server which I believe is the default.

 

On the replacement switch when I run show vlan brief it identifies all the ports as being in VLAN 100 but the name shows as VLAN0100 and VLAN 200 doesn't show at all.  When I run the commands VLAN 200 Name Management it then behaves like the original switch.

 

I don't understand how the original switch is working and it's not a one-off since each of them functions this way, I thought VLANs could only be defined manually in the config file or through VTP but neither seems the case.  I  know Vlans are stored in the vlan.dat file but thought there should still be something that created them in the first place.  I'd appreciate any help as I've not been able to work this out after a lot of searching.

 

 

1 Accepted Solution

Accepted Solutions

Cristian Matei
VIP Alumni
VIP Alumni

Hi,

 

    Regardless of your VLAN definition method (manual definition or dynamic learning via VTP), the VLAN's don't show up in the running-configuration (they show up in the VLAN database in order for it to be synched via VTP), unless you run VTP transparent. In VTP transparent, your locally defined VLANs show up in running-config, so that they aren't synchronised via VTP, which synchronises the information from the VLAN database (vlan.dat) and not information from running-configuration.

     If you run transparent or server mode (the default), both modes supporting the VLAN database manual modification, whenever you configure something like "switchport access vlan 100", vlan 100 is automatically created, cause otherwise the port cannot function. If you run VTP client mode, the VLAN is not automatically created, as client mode cannot manually modify the VLAN database.

 

Regards,

Cristian Matei.

View solution in original post

5 Replies 5

Richard Burts
Hall of Fame
Hall of Fame

Generally speaking this kind of switch you create the vlan in config mode and it creates an entry in the vlan data base but does not necessarily show the command in the running config.  If you want to copy the config to a different switch you can either also copy the vlan.dat along with the config file or you can issue the vlan command in config mode on the new switch.

HTH

Rick

Cristian Matei
VIP Alumni
VIP Alumni

Hi,

 

    Regardless of your VLAN definition method (manual definition or dynamic learning via VTP), the VLAN's don't show up in the running-configuration (they show up in the VLAN database in order for it to be synched via VTP), unless you run VTP transparent. In VTP transparent, your locally defined VLANs show up in running-config, so that they aren't synchronised via VTP, which synchronises the information from the VLAN database (vlan.dat) and not information from running-configuration.

     If you run transparent or server mode (the default), both modes supporting the VLAN database manual modification, whenever you configure something like "switchport access vlan 100", vlan 100 is automatically created, cause otherwise the port cannot function. If you run VTP client mode, the VLAN is not automatically created, as client mode cannot manually modify the VLAN database.

 

Regards,

Cristian Matei.

Thanks for the responses although I'm still not understanding why it would be done this way, it was a different company that set up the switches and on another range of switches (there's a general range and this is one for more specialised devices) they are using VTP transparent and defining each VLAN manually on each switch as I'd expect.

I guess ultimately what I'm looking for is the best practice for backing up a switch like this which isn't in a stack to be restored to another switch in case of failure? Should I copy the config and the vlan.dat file for each switch or modify the startup-config to add the VLAN definitions?

Hi,

 

   If you don't run VTP so that any new switch automatically gets provisioned with the VLAN database from the existing VTP server in the network, i would add the VLAN definitions in the startup-config file that you back up in order to restore the configuration.

 

Regards,

Cristian Matei.


@Cristian Matei wrote:

Hi,

 

    Regardless of your VLAN definition method (manual definition or dynamic learning via VTP), the VLAN's don't show up in the running-configuration (they show up in the VLAN database in order for it to be synched via VTP), unless you run VTP transparent. In VTP transparent, your locally defined VLANs show up in running-config, so that they aren't synchronised via VTP, which synchronises the information from the VLAN database (vlan.dat) and not information from running-configuration.

     If you run transparent or server mode (the default), both modes supporting the VLAN database manual modification, whenever you configure something like "switchport access vlan 100", vlan 100 is automatically created, cause otherwise the port cannot function. If you run VTP client mode, the VLAN is not automatically created, as client mode cannot manually modify the VLAN database.

 

Regards,

Cristian Matei.


Sorry for the long delay in replying in which time I've been testing with this on and off.  This I now appreciate as the answer and just didn't realise it at the time, I've updated two switches for testing adding the vtp mode transparent and the vlan definitions (which show in the config) and will test just copying the config file again to a replacement switch which I think will work fine this time.


Thanks again for the help.