Cisco switch Entry 1
I. Basic commands: 1.4 mode switch> User mode switch> enable input enable (abbreviated as en) Enter privileged mode switch # config terminal input config terminal (abbreviated as conf t) switch (config) # global configuration mode switch (config) # interface fastethernet 0/1 input interface fastethernet 0/1 (abbreviated as int f0/1) switch (config-if) in Interface Mode) # How to return or exit from the interface mode to the previous mode: the exit command can return to the previous mode. In the previous mode, the privileged mode is returned to the user mode. You can use disable to return to the privileges in the global or interface mode by using end. mode or use the shortcut key "Ctrl + Z" 2. you can enter hostname (abbreviated as host) in global mode to configure the host name. WKioL1X3oF2D4DtDAAAn21e9410364.jpg: Change the Switch name to SW show. Generally, the show version command is used in privileged mode to query information (abbreviated as sh ver) you can view the IOS name and version information of the system. Run the show mac-addess-table command and add the parameter "dynamic" to view the dynamically learned MAC address. sh run) view the current configuration of a vswitch. Show startup-config (abbreviated as sh star) is used to view saved configuration information. 3. configure duplex mode and speed sw # show interf f0/1 (abbreviated as sh int f0/1) View Interface duplex mode and speed sw (config) # int f0/1 Enter f0/1 sw (config-if) # duplex full is set to full duplex mode, the parameter "full" can be changed to "half" half Duplex or "auto" automatic coordination. Note: serious packet loss may occur when the interface duplex does not match. sw (config) # int f0/1 Enter f0/1 sw (config-if) # speed 10 sets the speed to 10 Mb/s, the parameter "10" can be changed to "100" 100 Mb/s, "1000" 1000 Mb/s, or "auto" for automatic coordination. Note: The interface speed does not match and the two switches cannot communicate with each other. copy running-config startup-config (abbreviated as copy run star) can also be saved using another command write (abbreviated as wr ). The current configuration information, because although the configuration for the switch will take effect in a timely manner, if it is not saved to NVRAM after the restart, it will be lost. Therefore, save the configuration in time. 5. erase nvram is equivalent to delete nvram: startup-config to delete saved configurations. 6. configure the Console port password (used when connecting to the console line) and the privileged mode password () 7. configure the encrypted plaintext password sw (config) # service password-encryption * Note: the Cisco device password cannot start with a space. configure an IP address for the vswitch (configure the IP address for the vswitch, instead of the physical interface as the vro, but on the Virtual Interface) # int vlan 1 enters the Virtual Interface vlan 1 switch (config-if) # ip address 192.168.1.1 255.255.255.255.0 configure the ip address and subnet mask (for example, 192) switch (config-if) # no shutdown activation II. Switch password recovery the switch password is saved in the configuration file config in flash. text, to restore the password, you must bypass config. text File, first enter the system, and then reset the password. Step 1: Because the factory settings of the Cisco switch do not have a password, you can restart the switch (unplug the switch and re-connect it) and immediately press and hold the "mode" key on the switch. When the configuration page is displayed () Step 2, use the "flash_init" command to initialize Flash step 3 and set the configuration file config. change the text file name to config. old, so that the switch will not load the configuration file, and then start switch: rename flash: config. text flash: config. old rename command switch: boot switch Step 4. After entering the system, change the name of the configuration file back (because the configuration file contains not only the password, but also many parameters) switch # rename flash: config. old flash: config. step 5: manually load the configuration file switch # copy flash: config. text system: running-config Step 6. After loading, go to global mode and change the password you want to change. For more information about how to configure the password, see the previous commands.