Dva způsoby implementace:
Vytvoření VLANy:
Switch(config)# vlan vlan_number
Switch(config-vlan)# name vlan_name
* vlan-name - nepovinné, až 32 zanků bez mezer
Smazání VLANy:
Switch(config)# no vlan vlan-num
Přiřazení portu do VLANy:
Switch(config)# interface type module/number
Switch(config-if)# switchport
Switch(config-if)# switchport mode access
Switch(config-if)# switchport access vlan vlan-num
Switch# show vlan
Switch# show vlan brief
VLAN Name Status Ports ---- ---------------- ------- ------ 1 default active Fa0/1,Fa0/2,Fa0/3,Fa0/10,Fa0/11,Fa0/12 20 VLAN0020 active Fa0/5,Fa0/6,Fa0/7 21 VLAN0021 active Fa0/8,Fa0/9 1002 fddi-default active 1003 trcrf-default active 1004 fddinet-default active 1005 trbrf-default active
Switch# show vlan id id_number
Switch# show vlan name vlan_name
ASW# show run interface fa0/5
Building configuration... Current configuration 64 bytes interface FastEthernet 0/5 switchport access vlan 20 switchport mode access
ASW# show mac address-table interface fa0/1
Mac Address Table ————————————————————— Vlan Mac Address Type Ports ---- ----------- ---- ----- 1 0030.b656.7c3d DYNAMIC Fa0/1 Total Mac Addresses for this criterion: 1
ASW# show interfaces fa0/1 switchport
Name: Fa0/1 Switchport: Enabled Administrative Mode: dynamic desirable Operational Mode: static access Administrative Trunking Encapsulation: negotiate Operational Trunking Encapsulation: native Negotiation of Trunking: On Access Mode VLAN: 1 (default) Trunking Native Mode VLAN: 1 (default) Trunking VLANs Enabled: ALL Pruning VLANs Enabled: 2-1001 Protected: false Unknown unicast blocked: false Unknown multicast blocked: false Broadcast Suppression Level: 100 Multicast Suppression Level: 100 Unicast Suppression Level: 100
Switch(config)# interface vlan 1
Switch(config-if)# ip address x.x.x.x y.y.y.y
Switch(config-if)# no shutdown
Switch(config-if)# exit
Switch(config)# ip default gateway X.X.X.X