| Sw1924_ B # Delete NVRAM Clear allVswitchAllConfiguration Sw1924_ B # reload RepeatStartSwitch (the initial prompt is>) Sw1924_ B # hostname sw1924 SetVswitch Host Name Sw1924_ B # enable secret Cisco Set encryption Password Sw1924_ B # enable password Level 1 cisco1 Set Level Password (1 minimum) Sw1924_ B # enable password level 15 cisco15 Set the grade password (15 highest) Sw1924_ B # IP address 192.168.14.1 255.255.0 Set the management IP address of a vswitchAddress 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 vswitch Sw1924_ B # IP name-server 218.87.18.230 Set the IP address of the Domain Name Server in the domain connected to the vswitch Sw1924_ B # Show IP View the preceding Environment Sw1924_ B # Show version View vswitch version and other information Sw1924_ B # Show running-config View All information such as the current running configuration of the vswitch. Sw1924_ B # Show int E0/1 View the 1st ports of a vswitch 2912 vswitch Configuration
Sw2912_a # erase NVRAM Clear all configurations of the vswitch Sw2912_a # reload Restart the switch (switch> at the initial prompt) 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 a 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 vswitch Sw2912_a # IP name-server 218.87.18.230 Set the IP address of the Domain Name Server in the domain connected to the vswitch Sw2912_a # Show int VLAN 1 View VLAN 1 special interface configuration information of a vswitch Sw2912_a # Show run View All information such as the current running configuration of the vswitch.
Vswitch port and MAC address table settings
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 global configuration mode Sw1912_a # interface fastethernet 0/1 Enter port 1st 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 Back to 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 Dynamic Address timeout Sw1924_ B # Mac-address-Table permanent restart 1_cdd.5a4d E0/3 Define a permanent MAC address (bind a MAC address) Sw1924_ B # Mac-address-Table restricted static login Login cdd.aaed E0/6 E0/7 Define restricted MAC addresses Sw1924_ B # address-violation disable/ignore/Suspend Define address security violation 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 Dynamic Address timeout Sw2912_a # Mac-address-Table static partition 1_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 restricted MAC addresses Sw2912_a # Port Security Action shutdown/trap Define address security violation Sw2912_a # Show Port Security View the preceding Configuration
Configure VTP, VLAN, VLAN trunk, and STP
Configure VTP Sw1924_a # conf t Sw1924_a # VTP SERVER Define the working mode of VTP Sw1924_a # VTP domain Cisco Define the VTP Domain Name Sw1924_a # trunk on Enable trunk
Sw1924_ B # VTP domain Cisco Join 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 Spanning Tree Protocol Sw1924_ B # sh spantree 1 View Spanning Tree Information Sw1924_ B # No spantree 1 Disable the Spanning Tree Protocol Sw1924_ B # sh spantree 1 View Spanning Tree Information Http://pan.baidu.com/s/1bns376R (Responsible editor: Admin) |