Cisco switch Common Commands

Source: Internet
Author: User
Tags domain name server cisco switch

Cisco switch Basic configuration: Console Port connection

User mode hostname#;

Privileged mode hostname (config) #;

Global configuration mode hostname (CONFIG-IF) #;


Switch Password settings:

switch>enable; Enter privileged mode

Switch#config terminal; Go to global configuration mode

Switch (config) #hostname Csico; Set the host name of the switch

Switch (config) #enable secret csico1; set privileged encryption password

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

Switch (config) #line console 0, enter the console port

Switch (config-line) #line vty 0 4; Enter virtual terminal

Switch (config-line) #login; Virtual Terminal allows login

Switch (config-line) #password Csico6; Set the virtual terminal login password Csico6

switch#exit; return command


Switch VLAN creation, deletion, setting of port properties, configuring the trunk port, adding a port to the VLAN, configuring VTP:

Switch#vlan database; Enter VLAN settings

Switch (VLAN) #vlan 2; Building VLAN 2

Switch (VLAN) #vlan 3 name vlan3; build VLAN 3 and name Vlan3

Switch (VLAN) #no VLAN 2; Delete VLAN 2

Switch (config) #int f0/1; Enter Port 1

Switch (config) #speed? To view the subcommands of the speed command

Switch (config) #speed 100 to set the port rate to 100mb/s (10/auto)

Switch (config) #duplex? To view Duplex subcommands

Switch (config) #duplex full to set the port to fully duplex (auto/half)

Switch (config) #description TO_PC1 This is the port described as TO_PC1

Switch (config-if) #switchport access VLAN 2; When the front port joins VLAN 2

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

Switch (config-if) #switchport trunk allowed VLAN, set allowed VLANs

Switch (config-if) #switchport trunk encap dot1q; set VLAN trunking

Switch (config) #vtp domain vtpserver; Set the same VTP domain name

Switch (config) #vtp password; set the VTP password

Switch (config) #vtp server, setting VTP server mode

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



Switch set IP address, default gateway, domain name, domain name server, configure and view MAC Address table:

Switch (config) #interface vlan 1; go to VLAN 1

Switch (config-if) #ip address 192.168.1.1 255.255.255.0; Set IP address

Switch (config) #ip default-gateway 192.168.1.6; Set default gateway

Switch (config) #ip domain-name cisco.com set the domain name

Switch (config) #ip name-server 192.168.1.18 set up the name server

Switch (config) #mac-address-table? To view Mac-address-table subcommands

Switch (config) #mac-address-table aging-time 100 setting Time-Out is 100ms

Switch (config) #mac-address-table permanent 0000.0C01.BBCC F0/3 join permanent address on F0/3 Port

Switch (config) #mac-address-table restricted static 0000.0C02.BBCC F0/6 F0/7 Add the address destination port F0/6 Source Port F0/7

Switch (config) #end

Switch#show mac-address-table View the entire MAC address table

Switch#clear mac-address-table restricted static clear restrictive static address


The switch displays the command:

Switch#write; Saving configuration information

Switch#show VTP; View VTP configuration information

Switch#show run; View current configuration information

Switch#show VLAN; View VLAN configuration information

Switch#show interface; viewing port information

switch#show int f0/0; View specified port information

switch#show int f0/0 status; View specified port status

Switch#dir flash:; View Flash


Cisco switch Common Commands

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.