Static configuration:
It was performed manually by an administrator assigned to the respective ports VLANs. By default all ports belong to VLAN1 until the administrator change these settings.
Dynamic configuration:
The IOS Catalyst switches support dynamic configuration through a server belonging to VLAN (VMPS). The VMPS server can be a high end switch that is running an operating system based on set (CatOS).
Configuring VLANs on a Switch 2950
Switch # vlan database
Switch (vlan) # vlan [vlan number] name [name vlan]
Switch (vlan) # exit
Switch (config) # interface fastethernet port 0/numero
Switch (config-if) # switchport access vlan [vlan number]
Example of creating a Vlan 3 Sales and its corresponding association with the Port 0 / 12:
Switch # vlan database
Switch (vlan) # vlan 3 name Sales
VLAN 3 added:
Name: Sales
Switch (vlan) # exit
Switch (config) # interface fastethernet 0 / 12
Switch (config-if) # switchport access vlan 3
Removing Vlan:
Switch # vlan database
Switch (vlan) # no vlan 3
Switches 2900 and 2950 series is necessary to remove the file information database of the VLAN that is stored in flash memory. Take special care to remove the file VLAN.dat and not another.
The command to remove the file:
Switch # delete flash: vlan.dat
Delete filename [vlan.dat]? [Enter]
Delete flash: vlan.dat? [Confirm] [Enter]
If no VLAN file, the following message:
% Error deleting flash: vlan.dat (No such file or directory)
Enabling a trunk port:
Switch (config) # interface fastethernet 0 / 24
Switch (config-if) # switchport mode trunk
The 2950 switches have only 802.1q encapsulation, in the case of a 2900 switch to specify the desired encapsulation:
Switch (config) # interface fastethernet 0 / 24
Switch (config-if) # switchport mode trunk
Switch (config-if) # switchport trunk encapsulation [dot1q | ISL]
Configuring VLANs on a switch 1900
Example of creating a VLAN 6 Administration and its corresponding association with the Port 0 / 10:
Sw_1900 (config) # vlan 6 name management
Sw_1900 (config) # interface ethernet 0 / 10
Sw_1900 (config-if) # vlan-membership static 6
Enabling a trunk on a switch port 1900:
The 1900 switches only have two Fast Ethernet ports, 26 and 27. These ports are called A and B respectively. Only supports ISL encapsulation.
Sw_1900 (config) # interface fastethernet 0 / 26
Sw_1900 (config-if) # trunk on
Sw_1900 (config-if) # exit
Sw_1900 (config) # exit
Sw_1900 # show trunk A
DISL state: On, Trunking: On, Encapsulation type: ISL