Newer catalyst IOS releases allow creating VLAN(s) at the interface level.
|Step-1: configure terminal
Step-3: switchport mode access
Step-4: switchport access vlan
Switch(config-if)# switchport mode access
Switch(config-if)# switchport access vlan 12
On catalyst 3560, the default interface configuration is “dynamic auto” which is the passive mode for DTP negotiation. On catalyst 3550, DTP negotiation mode is “dynamic desirable” that is, switch actively tries to negotiate a trunk link. To override this behavior, “switchport mode access” command is used. This will set the port to access mode unconditionally and always operate as a non-trunking port, set for only one VLAN.
The “switchport mode access vlan ” statically assigns a VLAN to a specified switch port. By default, all ports use VLAN 1. If no VLAN is specified explicitly, the port becomes automatically a member of VLAN 1.
To modify the parameters of a VLAN or to create a new VLAN, “vlan <vlan-id”< style=”box-sizing: border-box;” em=””></vlan-id”<> is used in global configuration mode.
|Step-1: configure terminal
Step-3: name (optiona)
Step-4: shutdown (optional)
[active | suspend] (optional)
Switch(config-vlan)# name Engineering
Switch(config-vlan)# state suspend
The above example creates a VLAN with ID 100, name Engineering, and its state is set to suspend. The suspend command is applied when the user exits from VLAN configuration mode.
An important thing to note is that the VLAN database is not maintained in NVRAM. instead, this information is stored in the file named “VLAN.DAT” on the flash file-system. Even if the NVRAM configuration is erased, the VLAN information is not lost. To override the previous VLAN information, VLAN.DAT must be deleted from flash file-system.
Another method of VLAN configuration is the VLAN database mode in privilege mode. This section applies to legacy switches or IOS releases. Below is configuration example.
Switch(config-vlan)# name Marketing
Verification: show vlan brief
|VLAN Name Status Ports
—- ——————– ——- —————————–
1 default active Fa0/2, Fa0/3, Fa0/4,
Fa0/6, Fa0/7, Fa0/8,
Fa0/9, Fa0/10, Gi0/1
100 Engineering active Fa0/11, Fa0/12, Gi0/2 505 VLAN0505 active 986 VLAN0986 active 1002 fddi-default active 1003 token-ring-default active
1004 fddinet-default active1005 trnet-default active
VLAN 100 is active and assigned ports Fa0/11, Fa0/12 and Gi0/2. VLAN 505 and 986 are active, this means that the STP instance for VLAN 505 and 986 is working fine. These VLAN were either statically configured on this switch or heard via VTP advertisements. Also, note that the remaining ports are already on VLAN 1. VLAN 1002 to 1005 are reserved.
If active is not displayed in-front of the VLAN, always check if:
1- the trunk between switches is working fine or ports are not assigned at all
– show interfaces trunk
– show interfaces status
2- VTP mode of the switch. If mode is transparent, VLAN must be statically configured on each switch.
– show vtp status command
3- If still the status is down or VLAN is not showing at all, check that STP status for the specified VLAN.
– show stp vlan brief