I've 2 Cisco switches that I configured at the same way, the have both the same IOS image, but when I do a "show run" in one of the switches the VLAN are shoed (not the VLAN interfaces) but in the other not.
What could be the problem?
! no aaa new-model ! vtp domain Z1_External vtp mode off ! ! ! power redundancy-mode redundant ! spanning-tree mode pvst spanning-tree extend system-id ! redundancy mode sso ! ! vlan 5 name VLAN5-TEST ! vlan 6 name VLAN6-TEST2 mtu 2000 ! #OTHER STUFF ! interface Vlan1 no ip address shutdown ! interface Vlan5 ip address 10.0.0.2 255.255.255.0 !
! no aaa new-model ! power redundancy-mode redundant ! spanning-tree mode pvst spanning-tree extend system-id ! redundancy mode sso ! #OTHER STUFF ! interface Vlan1 no ip address shutdown ! interface Vlan5 ip address 10.0.0.3 255.255.255.0 !
As I can see you have VTP configured with a domain in your first device, so you have to add this configuration in order to get the vlans from the VTP server and after that you can put the device in transparent mode, other way to type the vlans by your own.
Please do not forget to rate useful post.
Just to add on top:
VTP domains must match in order to make this consistent and work properly. And, as already pointed out, changes must be done in the switch posing as a VTP server.
The switch configured as a VTP client will get the same VLANs via VTP messages, only if configured as a client. Transparent mode will exempt it from assuming changes done via the VTP server.
I don't want to use VTP so I gave the command "vtp mode off". Is the domain set that let me to see the VLANs in the config file despite I deactivated VTP?
Not at all. They are just not configured.
You can issue "show vlan brief" and you will see the VLANs currently configured in the switch.
In that case you have to type all the vlans because are not configured.
In SW1 you explicitly set vtp mode to off. I do not see anything similar in SW2. What happens if you explicitly configure vtp mode to off in SW2?
Clearly in SW1 you explicitly configured vlan numbers and names. Can you verify that you also manually configured them on SW2?