--- id: 04. Intro to the CLI aliases: [] tags: - CCNA --- # Intro to the CLI, Introduction to the [[CISCO IOS]] ## How to connect to a [[Cisco]] device connect via a console port with [[RJ45]] or [[USB-mini]] Use a Rollover cable ## Terminal Emulator access with a Terminal Emulator (ex: PuTTy) default configuration: speed: 9600 data bits: 8 stop bits: 1 parity: none flow control: none ## user Exec Mode User Exec mode is very limited. Users can look at some things, but can't make any changes to the configuration. also called 'user mode' ```Cisco Router> ``` ## Privileged Exec mode Provide complete access to view the device's configuration, restart the device, etc.. Cannot change the configuration, but can change the time on the device, save the configuration, etc... ```Cisco Router>enable Router# ``` ## ? "list command available" for the full list of all the command available just type *?* ```Cisco Router>? Router#? // to display abiguous command Router>e? enable exit ``` ## Global configuration mode To enter configuration mode ```Cisco Router#configure termianl Router(config)# //shortcut Router>enable Router#con? configure connect Router#conf t? terminal Router#conf t Router(config)# ``` ## Enable password To enable password in the config mode **passwords are case-sensitive** if you type 3 time a false password it exit ```Cisco Router (config)# enable password |your password| // ex: Router (config)# enable password CCNA Router (config) #exit Router>enable Password: Router# ``` ## Running-config / startup-config There are two separate configuration files kept on the device at once. - *Running-config* : the current, active configuration file on the device. As you enter commands in the CLI, you edit the active configuration. - *Startup-config* : The configuration file that will be loaded upon restart of the device. ### Show running-config/ show startup-config ```Cisco Router#show running-config Router#show startup-config ``` ## Saving the configureation there are three ways to save the running configuration to the startup-config ```Cisco //1. Router#write //2. Router#write memory //3. Router#copy running-config startup-config ``` ## Service password-encryption for security purpose always save the password with password-encryption enable ```Cisco Router (config) # service password-encryption //when using the show running-config it return enable password 7 |hash of the password| ``` note: the number 7 is the type of encryption used for the encryption 7 is the proprietary Cisco encryption [[algorithm]] with the first method is easy to decrypt the password with a deencryption tool ## Enable secret for more security use the method enable secret ```Cisco Router (config) #enable secret |Your password| ex: Router (config) #enable secret Cisco //when using the show running-config it return enable secret 5 |hash of the password| ``` note : number 5 is the number for the [[MD5]] encryption ### sercice password-encryption if you enable service password-encryption - current passwords will be encrypted - future passwords will be encrypted - the enbalbe secret will not be effected if you disables service password-encryption - current passwords will not be decrypted - future passwords will not be decrypted - the enable secret will not be effected ## Canceling commands for canceling a command with the device type *no* + the name of the command ```Cisco Router (config) #no service password-encryption ```