Vswitch startup and basic configuration

Source: Internet
Author: User


Vswitch startup and basic configuration Experiment 1 vswitch startup and basic configuration: configuration on the www.2cto.com 1924 vswitch: sw1924_ B # delete nvram ---------- clear all configurations of the switch sw1924_ B # reload -------------- restart the switch (the initial prompt is>) sw1924_ B <config> # hostname sw1924 ← set the switch Host Name> sw1924_ B <config> # enable secret cisco secret set the encryption password sw1924_ B <config> # enable password level 1 cisco1 ----------- set the level password (1) sw1924_ B <config> # enable password level 15 cisco15 ---------- set the level password (15 highest) sw1924_ B <config> # ip address 192.168.14.1 255.255.255.0 ----- set the vswitch's management ip address sw1924_ B <config> # ip default-gateway 192.168.198.2 ---------- set the vswitch's gateway address sw1924_ B <config> # ip domain-name pctc.com.cn -------------- set the domain name sw1924_ B of the domain connected to the switch <config> # ip name-server certificate -------------- set the Domain name server IPsw1924_ B of the domain name connected to the switch # show ip address environment view vswitch version and other information sw1924_ B # show running-config --------------------------------- view all information about the current running configuration of the vswitch, such as sw1924_ B # show int e0/1. View vswitch port information 1st 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 <config> # int vlan 1 subnet enter vlan 1 special interface configuration mode sw2912_a <config-if> # ip address 192.168.15.1 255.255.255.0 ---- set the management ip address of the switch sw2912_a <config> # ip default -gateway 192.168.198.2 ---------- set the gateway address sw2912_a <config> # ip domain-name pctc.com.cn ---------------- set the domain name sw2912_a <config> # ip name-server certificate ------------ set the switch the Domain Name Server IPsw2912_a # show int vlan 1 --------------------------------------- view the VLAN 1 special interface configuration information of the switch sw2912_a # show run configurations view all the information such as the current running configuration of the switch Experiment 2 port and MAC address table settings: 1924 vswitch Configuration Port properties: sw1924_ B # conf tsw1924_ B <config> # interface ethernet 0/1 ingress enter 1st port sw1924_ B <config-if> # description sw1924_b-e0/1-pc1 --------------- write comments to the port sw1924_ B <config-if> # duplex auto/full-flow-control/half ----- set the port working mode sw1924_ B <config-if> # port secure ------------------------------- enable port security sw1924_ B <config-if> # 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 switch Configuration Port properties: sw1912_a # conf t configure enter global configuration mode sw1912_a <config> # interface fastethernet 0/1 ------------- enter 1st port sw1912_a <config-if> # description sw2912_a-f0/1-pc1 ------- write comments to the port sw1912_a <config-if> # duplex auto/full/half --------------- set the port working mode sw1912_a <config-if> # port security --------------------- enable port security sw1912_a <config-if> # port security max-mac-count 1 ------- set the number of MAC addresses allowed for this port (132 by default) sw1912_a <config-if> # end ------------------------------- return privileged mode sw1912_a <config-if> # sh port security ------------------ view port security configuration and view MAC Address Table: 1924 vswitch configuration MAC address table: sw1924_ B <config> # mac-address-table aging-time 600 ----------------- set the Dynamic address timeout value sw1924_ B <config> # mac-address-table permanent expires cdd.5a4d e0/3 --- define permanent MAC address (bind a MAC address) sw1924_ B <config> # mac-address-table restricted static Comment comment cdd.aaed e0/6 e0/7 -- Define the restricted MAC address sw1924_ B <config> # address-violation disable/ignore/suspend comment security Violation sw1924_ B # show mac-address-table ---------------- view the preceding configuration sw1924_ B # clear mac-addr restric static ----------- clear restricted MAC address table item 2912 vswitch configuration MAC address table: sw2912_a <config> # mac-address-table aging-time 700 --------------- set the Dynamic address timeout value sw2912_a <config> # mac-address-table static hosts 1_cdd.5a4d e0/3 --- define a permanent MAC address (bind a 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 ----------------- Define address security violation sw2912_a # show port security Violation view the preceding configuration experiment 3 configure VTP, VLAN, VLAN Trunk, and STP: configure VTP: sw1924_a # conf example <config> # vtp server example defines the VTP working mode sw1924_a <config> # vtp domain cisco ------------- defines the VTP domain name sw1924_a <config> # trunk on example to enable the trunk path sw1924 _ <config> # vtp domain cisco ----------- Add the VTP domain sw1924_ B <config> # vtp client worker defines the VTP working mode sw1924_ B <config> # trunk on worker enable sw1924_a # show trunk bsw1924_a # show trunk B allowed-vlans ----------- view trunk track information and configure VLAN: sw1924_a <config> # vlan 10 then <config> # vlan 20 dept2sw1924_a <config> # vlan 30 then <config> # vlan 40 dept4 -------------- define the required VLANsw1924_a # show vlan overview to view VLAN Information sw1924_ B # show region # show vtp region view VTP information sw1924_ B <config> # int e0/1sw1924_ B <config> # vlan-membership static 10sw1924_ B <config> # int e0/2sw1924_ B <config> # vlan-membership static 20sw1924_ B <config> # int e0/3sw1924_ B <config> # vlan-membership static 30sw1924_ B <config> # int e0/4sw1924_ B <config> # vlan-membership static 40 ---- route interfaces to their respective VLANs to configure the spanning tree: sw1924_ B <config> # spantree 1 ------------ enable the Spanning Tree Protocol sw1924_ B # sh spantree 1 ← view spanning tree information sw1924_ B <config> # no spantree 1 --------- disable the Spanning Tree Protocol sw1924_ B <config> # sh spantree 1 --------- view the Spanning Tree Information

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.