Cisco switch command

Source: Internet
Author: User
Tags config cisco switch

Switch Password settings:

Switch>enable into privileged mode

Switch#config terminal into global configuration mode

Switch (config) #hostname set the host name of the Exchange

Switch (config) #enable secret XXX To set the privileged encryption password

Switch (config) #enable password Xxa set privileged non-secret password

Remote Management Using Telnet

Switch (config) #interface vlan 1 into VLAN 1

Switch (CONFIG-IF) #ip address set IP addresses

Switch (config-if) #ip Default-gateway Set the default gateway

Switch (config) #line vty 0 4 into the virtual terminal

Switch (config-line) #login allow login

Switch (config-line) #password xx Set Login password

Switch#exit return command

Console password

Switch (config) #line console 0 into the console port

Switch (config-line) #login allow login

Switch (config-line) #password xx Set Login password

Switch#exit return command

Basic Interface Configuration

Switch (config) #interface F0/1 into the F0/1 interface

Switch (config-if) #duplex full configured Full-duplex mode

Switch (config-if) #speed 100 configuration Rate

Switch (CONFIG-IF) #description to * * * Interface description

Switch (config) #ip domain-name ***.com settings or a name server

Switch (config) #mac-address-table aging-time set the Mac table timeout

Switch#write Save configuration information

Switch#copy Running-config Startup-config Save the current configuration nvram

Switch#erase startup-config Clear Configuration file

Switch VLAN settings:

Switch#vlan database into VLAN settings

Switch (VLAN) #vlan 2 build VLAN 2

Switch (VLAN) #name name to build VLAN 2

Switch (VLAN) #no VLAN 2 Delete VLAN 2

Note: The ports originally belonging to this VLAN when the VLAN was deleted are inactive until redistributed

Switch (config) #int f0/1 into Port 1

Switch (CONFIG-IF) #switchport mode access current port work Mo try

Switch (config-if) #switchport Access VLAN 2 current port join VLAN 2

Switch (config-if) #switchport mode trunk set to trunk

Switch (config-if) #switchport trunk encapsulation dot1q set VLAN relay protocol

Switch (config-if) #no switchport mode or (switchport mode access) disables the trunk

Switch (config-if) #switchport trunk allowed VLAN add 1,2; add trunk from VLANs

Switch (config-if) #switchport trunk allowed VLAN Remove 1,2; remove trunk from VLANs

Switch (config-if) #switchport trunk pruning vlan Remove 1,2; turn off local trim from trunk

Ethernet Channel Configuration

Switch (config) #interface range FASTERNET0/1-2 bundle FASTERNET0/1 and 0/2 (double not single)

Switch (config-if) #channel-group 1 mode on configure Ethernet channel mode

Switch (config-if) #port-channel load-balance {dst-mac | src-mac} to achieve load balancing between links

Switch#show EtherChannel 1 Summary View channel information

Switch#show EtherChannel load-balance View channel information

VTP configuration

Switch (config) set VTP domain name #vtp domain

Switch (config) #vtp password set VTP password

Switch (config) #vtp mode server to set VTP server modes

Switch (config) #vtp mode client set VTP client model

Switch (config) #vtp mode transparent set VTP transparent mode

Switch (config) #vtp version set VTP versions

Switch (config) #vtp pruning enable VTP repair

Switch (config) #no VTP pruning close VTP repair

Note: To reduce a switch from VTP, you only need to change the VTP name of the switch

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.