First, the basic command
1.4 Different modes
switch> User Mode
Switch>enable input enable (EN) into privileged mode
switch# Privileged Mode
Switch#config terminal Input Config terminal (abbreviated conf t) into the full configuration board mode
switch (config) # Global configuration Mode
switch (config) #interface fastethernet 0/1 Input Interface fastethernet 0/1 (abbreviated int F0/1) Enter interface mode
switch (config-if) # interface mode
how to return or exit to the previous mode
The exit command can be returned to a previous pattern
Privileged mode return to user mode can use disable
In global or interface mode you can use end to return to privileged mode or use the shortcut key "Ctrl + Z"
2. Common commands
Enter hostname in privileged mode to configure host name
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/73/30/wKioL1X3oF2D4DtDAAAn21e9410364.jpg "title=" C.png "alt=" wkiol1x3of2d4dtdaaan21e9410364.jpg "/> renamed switch to SW
The Show command is typically used to query information in privileged mode
Show version (Sh ver) to view the system iOS name and version information
Show Mac-addess-table view MAC Address Table command followed by parameter "dynamic" for viewing dynamically learned MAC address
Show Running-config (abbreviated as SH run) is used to view the current configuration information for the switch.
Show Startup-config (abbreviated as SH star) is used to view the saved configuration information.
3. Configure Duplex Mode and rate
Sw#show Interf F0/1 (abbreviated to SH int f0/1) View interface Duplex mode and rate
SW (config) #int f0/1 into F0/1 interface
SW (config-if) #duplex full is set to fully-duplex mode, and the parameter "complete" can be changed to "half" half-duplex or "Auto" auto-reconcile
Note: A serious packet loss may occur when the interface duplex mismatch
SW (config) #int f0/1 Enter the F0/1 interface
SW (config-if) #speed set at a rate of 10mb/s, the parameter "10" can be changed to "up to" TenMB/s,
"1000MB/S" or Auto Reconcile
Note: The interface rate does not match and the two switches will not be able to communicate
4.copy Running-config Startup-config (abbreviated as copy run Star) You can also use another command , write (WR), to save the current configuration information, as the configuration of the switch takes effect in a timely manner , but after the restart if not saved to the NVRAM will be lost, so after the configuration should be saved in time.
5.erase NVRAM is equivalent to delete nvram:startup-config for deleting saved configuration information.
6. Configure the console port password (used when connecting to the console line)
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/73/28/wKioL1X20XziQ6ALAAC0R5NvtT8490.jpg "title=" 6.png " alt= "Wkiol1x20xziq6alaac0r5nvtt8490.jpg"/>
7. Configure the privileged mode password
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/73/28/wKioL1X21P-xVPfwAABc4R1O3Qg673.jpg "title=" 7.png " alt= "Wkiol1x21p-xvpfwaabc4r1o3qg673.jpg"/>
Note: When both passwords are set, only the secret password takes effect
8. Configure the encrypted plaintext password
SW (config) #service password-encryption
* Note: Cisco device passwords cannot start with a space
Second, switch password recovery
The password of the switch is saved in the Flash configuration file config.text, want to recover the password, it is necessary to bypass Config.text this file, first enter the system, then reset the password.
Step one, because the Cisco switch Factory settings are no password, so you can restart the switch (unplug the switch and then reconnect) immediately press and hold the "mode" button on the switch. When you see the Configuration Interface display ()
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/73/31/wKiom1X3isGAxEYjAADRPmjk2nk025.jpg "title=" a.jpg " alt= "Wkiom1x3isgaxeyjaadrpmjk2nk025.jpg"/>
Step two, initialize the Flash with the "flash_init" command
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/73/2E/wKioL1X3jY_yAeJdAADlnHvgsAg181.jpg "title=" B.jpg " alt= "Wkiol1x3jy_yaejdaadlnhvgsag181.jpg"/>
Step three, change the profile Config.text file name to Config.old so that the switch does not load the configuration file, and then start the switch
Switch:rename flash:config.text flash:config.old Rename rename command
switch:boot Starting the switch
Step four, after entering the system, the name of the configuration file is changed back (because there are not only passwords in the configuration file, there are many parameters)
switch#rename flash:config.old Flash:config.text
Step five, manually load the configuration file
switch#copy flash:config.text system:running-config
Step six, after the load is complete, go to the global mode to modify the password you want to change, configure the password reference before the command
The third article, feel a little bit small state, refueling ~
Getting started with Cisco switches 1