Experiment 1 Switch startup and basic configuration:
Configuration on the 1924 switch:
sw1924_b#delete nvram----------------------------------------------------------------------------------------------------------------
sw1924_b#reload---------------------------------------------------------------------------------------------------------------------
sw1924_b<config>#hostname sw1924---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
sw1924_b<config>#enable password level 1 cisco1------------------------------Set level password (1 minimum)
sw1924_b<config>#enable password level 15 cisco15-------------------------------------------------------------------------------------------------------
sw1924_b<config>#ip address 192.168.14.1 255.255.255.0----Set the switch's management IP address
sw1924_b<config>#ip default-gateway 192.168.198.2---------------------Set the gateway address of the switch
sw1924_b<config>#ip domain-name -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
sw1924_b<config>#ip name-server 218.87.18.230---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
sw1924_b#show ip---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
sw1924_b#show version--------------------------------------------------------------------------------------------------------------------
sw1924_b#show running-config--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
sw1924_b#show int e0/1-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Configuration on the 2912 switch:
sw2912_a#erase nvram-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
sw2912_a#reload---------------------------------------------------------------------------------------------------------------------
sw2912_a<config>#int vlan 1---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
sw2912_a<config-if>#ip address 192.168.15.1 255.255.255.0----Set the switch's management IP address
sw2912_a<config>#ip default-gateway 192.168.198.2--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
sw2912_a<config>#ip domain-name -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
sw2912_a<config>#ip name-server 218.87.18.230-------------------------------------------------------------------------------------------------
sw2912_a#show int vlan 1-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
sw2912_a#show run----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Experiment 2 Settings of the switch's port and MAC address table:
1924 switch configuration port properties:
sw1924_b#conf t
sw1924_b<config>#interface ethernet 0/1-----------------------------------------------------------------------------------------------------------
sw1924_b<config-if>#description sw1924_b-e0/1-pc1-----------------------------------------------------------------------------------------------
sw1924_b<config-if>#duplex auto/full/full-flow-control/half-----Set the working mode of the port
sw1924_b<config-if>#port secure----------------------------------------------------------------------------------------------------------------
sw1924_b<config-if>#port secure max-mac-count 1--------------Set the corresponding number of MAC addresses allowed by this port (default 132)
sw1924_b#sh mac-address-table security-------------------------------------------------------------------------------------------------------------
2912 switch configuration port properties:
sw1912_a#conf t---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
sw1912_a<config>#interface fastethernet 0/1-------------------------Enter port 1
sw1912_a<config-if>#description sw2912_a-f0/1-pc1--------Write comment information to the port
sw1912_a<config-if>#duplex auto/full/half---------------------------------------------------------------------------------------------------------
sw1912_a<config-if>#port security------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
sw1912_a<config-if>#port security max-mac-count 1-------Set the corresponding number of MAC addresses allowed by this port (default 132)
sw1912_a<config-if>#end-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
sw1912_a<config-if>#sh port security---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Configure and view the MAC address table:
1924 switch configuration MAC address table:
sw1924_b<config>#mac-address-table aging-time 600------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
sw1924_b<config>#mac-address-table permanent 0000.0cdd.5a4d e0/3---Define a permanent MAC address (binding MAC address)
sw1924_b<config>#mac-address-table restricted static 0000. e0/6 e0/7--Define restricted MAC address
sw1924_b<config>#address-violation disable/ignore/suspend----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
sw1924_b#show mac-address-table---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
sw1924_b#clear mac-addr restrictive static------------------Clear restricted MAC address table entry
2912 switch configuration MAC address table:
sw2912_a<config>#mac-address-table aging-time 700----------------------------------------------------------------------------------------------------
sw2912_a<config>#mac-address-table static 0000.0cdd.5a4d e0/3---Define a permanent MAC address (binding MAC address)
sw2912_a<config>#mac-address-table secure 00d0.f80d.3333 f0/3 vlan 1--Define restricted MAC address
sw2912_a<config-if>#port security action shutdown/trap------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
sw2912_a#show port security---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Experiment 3 Configure VTP, VLAN, VLAN Trunk and STP:
Configure VTP:
sw1924_a#conf t
sw1924_a<config>#vtp server----------------------------------------------------------------------------------------------------------------
sw1924_a<config>#vtp domain cisco--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
sw1924_a<config>#trunk on----------------------------------------------------------------------------------------------------------------
sw1924_b<config>#vtp domain cisco---------------------------------Join the VTP domain
sw1924_b<config>#vtp client-------------------------------------Define the working mode of VTP
sw1924_b<config>#trunk on------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
sw1924_a#show trunk b
sw1924_a#show trunk b allowed-vlans-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Configure VLAN:
sw1924_a<config>#vlan 10 dept1
sw1924_a<config>#vlan 20 dept2
sw1924_a<config>#vlan 30 dept3
sw1924_a<config>#vlan 40 dept4------------------------------------------------------------------------------------------------------------
sw1924_a#show vlan---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
sw1924_b#show vlan
sw1924_b#show vtp--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
sw1924_b<config>#int e0/1
sw1924_b<config>#vlan-membership static 10
sw1924_b<config>#int e0/2
sw1924_b<config>#vlan-membership static 20
sw1924_b<config>#int e0/3
sw1924_b<config>#vlan-membership static 30
sw1924_b<config>#int e0/4
sw1924_b<config>#vlan-membership static 40----Grade the interface into the respective VLANs
Configure the spanning tree:
sw1924_b<config>#spantree 1-------------------------------------------------------------------------------------------------------------
sw1924_b#sh spantree 1------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
sw1924_b<config>#no spantree 1--------------------------------Switching spanning tree protocol
sw1924_b<config>#sh spantree 1--------------View spanning tree information Article entry: csh Editor in charge: csh
Configuration on the 1924 switch:
sw1924_b#delete nvram----------------------------------------------------------------------------------------------------------------
sw1924_b#reload---------------------------------------------------------------------------------------------------------------------
sw1924_b<config>#hostname sw1924---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
sw1924_b<config>#enable password level 1 cisco1------------------------------Set level password (1 minimum)
sw1924_b<config>#enable password level 15 cisco15-------------------------------------------------------------------------------------------------------
sw1924_b<config>#ip address 192.168.14.1 255.255.255.0----Set the switch's management IP address
sw1924_b<config>#ip default-gateway 192.168.198.2---------------------Set the gateway address of the switch
sw1924_b<config>#ip domain-name -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
sw1924_b<config>#ip name-server 218.87.18.230---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
sw1924_b#show ip---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
sw1924_b#show version--------------------------------------------------------------------------------------------------------------------
sw1924_b#show running-config--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
sw1924_b#show int e0/1-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Configuration on the 2912 switch:
sw2912_a#erase nvram-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
sw2912_a#reload---------------------------------------------------------------------------------------------------------------------
sw2912_a<config>#int vlan 1---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
sw2912_a<config-if>#ip address 192.168.15.1 255.255.255.0----Set the switch's management IP address
sw2912_a<config>#ip default-gateway 192.168.198.2--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
sw2912_a<config>#ip domain-name -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
sw2912_a<config>#ip name-server 218.87.18.230-------------------------------------------------------------------------------------------------
sw2912_a#show int vlan 1-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
sw2912_a#show run----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Experiment 2 Settings of the switch's port and MAC address table:
1924 switch configuration port properties:
sw1924_b#conf t
sw1924_b<config>#interface ethernet 0/1-----------------------------------------------------------------------------------------------------------
sw1924_b<config-if>#description sw1924_b-e0/1-pc1-----------------------------------------------------------------------------------------------
sw1924_b<config-if>#duplex auto/full/full-flow-control/half-----Set the working mode of the port
sw1924_b<config-if>#port secure----------------------------------------------------------------------------------------------------------------
sw1924_b<config-if>#port secure max-mac-count 1--------------Set the corresponding number of MAC addresses allowed by this port (default 132)
sw1924_b#sh mac-address-table security-------------------------------------------------------------------------------------------------------------
2912 switch configuration port properties:
sw1912_a#conf t---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
sw1912_a<config>#interface fastethernet 0/1-------------------------Enter port 1
sw1912_a<config-if>#description sw2912_a-f0/1-pc1--------Write comment information to the port
sw1912_a<config-if>#duplex auto/full/half---------------------------------------------------------------------------------------------------------
sw1912_a<config-if>#port security------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
sw1912_a<config-if>#port security max-mac-count 1-------Set the corresponding number of MAC addresses allowed by this port (default 132)
sw1912_a<config-if>#end-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
sw1912_a<config-if>#sh port security---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Configure and view the MAC address table:
1924 switch configuration MAC address table:
sw1924_b<config>#mac-address-table aging-time 600------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
sw1924_b<config>#mac-address-table permanent 0000.0cdd.5a4d e0/3---Define a permanent MAC address (binding MAC address)
sw1924_b<config>#mac-address-table restricted static 0000. e0/6 e0/7--Define restricted MAC address
sw1924_b<config>#address-violation disable/ignore/suspend----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
sw1924_b#show mac-address-table---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
sw1924_b#clear mac-addr restrictive static------------------Clear restricted MAC address table entry
2912 switch configuration MAC address table:
sw2912_a<config>#mac-address-table aging-time 700----------------------------------------------------------------------------------------------------
sw2912_a<config>#mac-address-table static 0000.0cdd.5a4d e0/3---Define a permanent MAC address (binding MAC address)
sw2912_a<config>#mac-address-table secure 00d0.f80d.3333 f0/3 vlan 1--Define restricted MAC address
sw2912_a<config-if>#port security action shutdown/trap------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
sw2912_a#show port security---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Experiment 3 Configure VTP, VLAN, VLAN Trunk and STP:
Configure VTP:
sw1924_a#conf t
sw1924_a<config>#vtp server----------------------------------------------------------------------------------------------------------------
sw1924_a<config>#vtp domain cisco--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
sw1924_a<config>#trunk on----------------------------------------------------------------------------------------------------------------
sw1924_b<config>#vtp domain cisco---------------------------------Join the VTP domain
sw1924_b<config>#vtp client-------------------------------------Define the working mode of VTP
sw1924_b<config>#trunk on------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
sw1924_a#show trunk b
sw1924_a#show trunk b allowed-vlans-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Configure VLAN:
sw1924_a<config>#vlan 10 dept1
sw1924_a<config>#vlan 20 dept2
sw1924_a<config>#vlan 30 dept3
sw1924_a<config>#vlan 40 dept4------------------------------------------------------------------------------------------------------------
sw1924_a#show vlan---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
sw1924_b#show vlan
sw1924_b#show vtp--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
sw1924_b<config>#int e0/1
sw1924_b<config>#vlan-membership static 10
sw1924_b<config>#int e0/2
sw1924_b<config>#vlan-membership static 20
sw1924_b<config>#int e0/3
sw1924_b<config>#vlan-membership static 30
sw1924_b<config>#int e0/4
sw1924_b<config>#vlan-membership static 40----Grade the interface into the respective VLANs
Configure the spanning tree:
sw1924_b<config>#spantree 1-------------------------------------------------------------------------------------------------------------
sw1924_b#sh spantree 1------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
sw1924_b<config>#no spantree 1--------------------------------Switching spanning tree protocol
sw1924_b<config>#sh spantree 1--------------View spanning tree information Article entry: csh Editor in charge: csh