Experiment 1 vswitch startup and basic configuration:
1924 vswitch Configuration:
Sw1924_ B # delete nvram ---------- clear all vswitch configurations
Sw1924_ B # reload -------------- restart the switch (the initial prompt is>)
Sw1924_ B # hostname sw1924 --------------------------- set the vswitch Host Name
> Sw1924_ B # enable secret cisco ----------------------- set the encryption Password
Sw1924_ B # enable password level 1 cisco1 ----------- set the level password (1 is the lowest)
Sw1924_ B # enable password level 15 cisco15 ---------- set the level password (15 highest)
Sw1924_ B # ip address 192.168.14.1 255.255.255.0 ----- set the management ip address of the vswitch
Sw1924_ B # ip default-gateway 192.168.198.2 ---------- set the gateway address of the vswitch
Sw1924_ B # ip domain-name pctc.com.cn ---------------- set the domain name of the domain connected to the switch
Sw1924_ B # ip name-server 218.87.18.230 -------------- set the IP address of the Domain name server in the domain connected to the switch
Sw1924_ B # show ip ----------------------------------------------- view the preceding Environment
Sw1924_ B # show version ---------------------------------------- view the vswitch version and other information
Sw1924_ B # show running-config ------------------------------- view all information about the current running configuration of the switch.
Sw1924_ B # show int e0/1 ----------------------------------------- view information on the 1st ports of a vswitch
2912 vswitch Configuration:
Sw2912_a # erase nvram ----------- clear all configurations of the switch
Sw2912_a # reload -------------- restart the switch (the initial prompt is switch>)
Sw2912_a # int vlan 1 ---------------------------------- enter vlan 1 special interface configuration mode
Sw2912_a # ip address 192.168.15.1 255.255.255.0 ---- set the management ip address of the vswitch
Sw2912_a # ip default-gateway 192.168.198.2 ---------- set the gateway address of the vswitch
Sw2912_a # ip domain-name pctc.com.cn ---------------- set the domain name of the domain connected to the switch
Sw2912_a # ip name-server 218.87.18.230 -------------- set the IP address of the Domain name server in the domain connected to the switch
Sw2912_a # show int vlan 1 ------------------------------------- view VLAN 1 special interface configuration information of a switch
Sw2912_a # show run -------------------------------------------- view all information about the current running configuration of the switch.
Set the port and MAC address of the vswitch in Experiment 2:
1924 vswitch Configuration Port properties:
Sw1924_ B # conf t
Sw1924_ B # interface ethernet 0/1 ------------------------- enter port 1st
Sw1924_ B # description sw1924_b-e0/1-pc1 --------------- write comments to the port
Sw1924_ B # duplex auto/full-flow-control/half ----- set the port working mode
Sw1924_ B # port secure --------------------------------- enable port Security
Sw1924_ B # port secure max-mac-count 1 --------- set the number of MAC addresses allowed for this port (132 by default)
Sw1924_ B # sh mac-address-table security ---------------- view port security
2912 vswitch Configuration Port properties:
Sw1912_a # conf t ------------------------------------------- enter the global configuration mode
Sw1912_a # interface fastethernet 0/1 ------------- enter 1st ports
Sw1912_a # description sw2912_a-f0/1-pc1 ------- write comments to the port
Sw1912_a # duplex auto/full/half --------------- set the port working mode
Sw1912_a # port security ----------------------- enable port security
Sw1912_a # port security max-mac-count 1 ------- set the number of MAC addresses allowed for this port (132 by default)
Sw1912_a # end --------------------------------- return privileged Mode
Sw1912_a # sh port security -------------------- view port security
Configure and view the MAC address table:
1924 vswitch configuration MAC address table:
Sw1924_ B # mac-address-table aging-time 600 ----------------- set the Dynamic address timeout time
Sw1924_ B # mac-address-table permanent restart permanent cdd.5a4d e0/3 --- define a permanent MAC address (bind a MAC address)
Sw1924_ B # mac-address-table restricted static Comment comment cdd.aaed e0/6 e0/7 -- Define a restricted MAC address
Sw1924_ B # address-violation disable/ignore/suspend ------------------ defines address security violations
Sw1924_ B # show mac-address-table ---------------- view the preceding Configuration
Sw1924_ B # clear mac-addr restric static ----------- clear restricted MAC address table items
2912 vswitch configuration MAC address table:
Sw2912_a # mac-address-table aging-time 700 --------------- set the Dynamic address timeout time
Sw2912_a # mac-address-table static nodes cdd.5a4d e0/3 --- define a permanent MAC address (bind a MAC address)
Sw2912_a # mac-address-table secure 00d0. f80d. 3333 f0/3 vlan 1 --- define a restricted MAC address
Sw2912_a # port security action shutdown/trap ----------------- defines address security violations
Sw2912_a # show port security ---------------------------------------------- view the preceding Configuration
Tutorial 3 configure VTP, VLAN, VLAN Trunk, and STP:
Configure VTP:
Sw1924_a # conf t
Sw1924_a # vtp server ------------------- define the VTP Working Mode
Sw1924_a # vtp domain cisco ------------- define the VTP domain Name
Sw1924_a # trunk on --------------------- enable trunk
Sw1924_ B # vtp domain cisco ------------- add to VTP domain
Sw1924_ B # vtp client ------------------- define the working mode of VTP
Sw1924_ B # trunk on --------------------- enable trunk
Sw1924_a # show trunk B
Sw1924_a # show trunk B allowed-vlans ----------- view trunk Information
Configure VLAN:
Sw1924_a # vlan 10 dept1
Sw1924_a # vlan 20 dept2
Sw1924_a # vlan 30 dept3
Sw1924_a # vlan 40 dept4 ---------------- define the required VLAN
Sw1924_a # show vlan ---------------------------- view VLAN Information
Sw1924_ B # show vlan
Sw1924_ B # show vtp ----------------------------- view VTP Information
Sw1924_ B # int e0/1
Sw1924_ B # vlan-membership static 10
Sw1924_ B # int e0/2
Sw1924_ B # vlan-membership static 20
Sw1924_ B # int e0/3
Sw1924_ B # vlan-membership static 30
Sw1924_ B # int e0/4
Sw1924_ B # vlan-membership static 40 ---- route interfaces to their respective VLANs
Configure the spanning tree:
Sw1924_ B # spantree 1 ------------ enable the Spanning Tree Protocol
Sw1924_ B # sh spantree 1 ----------------- view the Spanning Tree Information
Sw1924_ B # no spantree 1 --------- disable the Spanning Tree Protocol
Sw1924_ B # sh spantree 1 --------- view the Spanning Tree Information