Purpose:
(1) master switch configuration of several models and the basic configuration commands.
(2) master the principle and method of zoning VLAN-based VLAN switch port.
Laboratory equipment:
A switch, host three, three straight lines
Experimental Procedure:
1, and a switch division VLAN100 VLAN200.
(1) Open switch command line operation, first enter privileged mode
Switch>enable
(2) then enters the global mode
Switch#config
(3) to switch rename SwA (which can be arbitrarily taken away his name, this step as appropriate)
Switch(config)#hostname SwA
(4) (privileged mode needs to be performed) to the division VLAN switch
SwA(config)#vlan 100 SwA(config-vlan)#exit SwA(config)#vlan 200 SwA(config-vlan)#exit SwA(config)#
(5) View VLAN division is in effect (for viewing in a privileged mode)
SwA#show vlan
2,1-6 VLAN100,9-16 port to port to VLAN200.
? View command is
SwA(config)#interface ? Ethernet IEEE 802.3 FastEthernet FastEthernet IEEE 802.3 GigabitEthernet GigabitEthernet IEEE 802.3z Port-channel Ethernet Channel of interfaces Vlan Catalyst Vlans range interface range command
In global mode, first enter the port, in the division
SwA(config)#interface range fastEthernet 0/1-6 SwA(config-if-range)#Switchport access vlan 100
SwA(config-if-range)#interface range fastEthernet 0/9-16
SwA(config-if-range)#Switchport access vlan 200
Please view the status of VLAN division in privileged mode (back shortcut ctrl + z in privileged mode, or use the exit step by step to the back)
SwA#show vlan
3, the switch set to the IP address. (No shutdown does not restart, in order for the command to take effect)
SwA(config-if)#interface vlan 100
%LINK-5-CHANGED: Interface Vlan200, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan200, changed state to up
SwA(config-if)#ip address 192.168.100.1 255.255.255.0
SwA(config-if)#no shutdown
SwA(config-if)#interface vlan 200 %LINK-5-CHANGED: Interface Vlan200, changed state to up %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan200, changed state to up SwA(config-if)#ip address 192.168.200.1 255.255.255.0 SwA(config-if)#no shutdown
Please view the status of the set (the following command and pictures)
SwA#show running-config
4, to set the IP address of the host.
Click Host Configuration → → Select Desktop IP (static IP) (IP with the switch in the same network segment but can not conflict with)
5, connection test, a ping command. (Click on the desktop host → → Command Prompt)
Precautions:
(1) the connection between the host and the switch as a solid line, and the host should be connected to the corresponding ports in the VLAN assignment.
(2) Some view commands do not take effect in privileged mode (SwA #), for example, show vlan, show running-config
Experimental results:
(1) each as a separate broadcast domain VLAN
(2) between the two terminals at the same VLAN can communicate in two different VLAN communication terminals not