Logging in the Device
8
VLAN networking
Figure 3-1
Configuration Procedure
To configure the switch, do the following:
Create the VLAN.
Step 1
SWITCH #configure terminal
SWITCH (config)#vlan 2
SWITCH (config-vlan)# exit
SWITCH (config)#vlan 3
SWITCH (config-vlan)# exit
Allocate the ports into the VLAN.
Step 2
SWITCH(config)# interface GigabitEthernet 1/1
SWITCH (config-if)# switchport access vlan 2
SWITCH (config-if)# exit
SWITCH (config)# interface GigabitEthernet 1/2
SWITCH (config-if)# switchport access vlan 3
SWITCH (config-if)# exit
Configure the VLAN IP address.
Step 3
SWITCH #configure terminal
SWITCH (config)# interface vlan 2
SWITCH (config-if-vlan)# ip address 192.168.2.1 255.255.255.0
SWITCH (config-if-vlan)#exit
SWITCH (config)#interface vlan 3
SWITCH (config-if-vlan)# ip address 192.168.3.1 255.255.255.0
SWITCH (config-if-vlan)#exit