![]() | Cisco Systems |
Basic ConfigurationsConfiguration ModesModes
Global ConfigurationsSwitch(config)#hostname newname Rename DeviceSwitch(config)#hostname Lab-Switch Lab-Switch(config)# banner motd # mon mot de bienvenue# Display message fefore CLI access Display time Switch#sh clock *0:0:19.387 UTC Mon Mar 1 1993 Lab-CCNA#clock set hh:mm:ss month dd yyyy Set Time Lab-CCNA#clock set 20:10:30 October 12 2023 Set a gateway on Switch S2(config)#ip default-gateway 192.168.1.1 Create Local Users username name password pass username name privilege 15 secret pass create a local user with level 15 privilege which allow him direct access in privilege mode Privileged Mode SecuritySecure privileged mode access:enable password passname or enable secret passname (more secured than the first) service password-encryption Encrypt all passwords on device show history Shows last 20 commands entered by default show terminal Shows terminal configurations and history buffer size Lab-Switch#terminal history size 256 Changes buffer size (max 256) Configuration FilesFilesrunning-configurationstartup-configuration Commandsshow running-configurationshow startup-configuration copy running-config startup-config: save changes erase startup-config: erase all configurations erase nvram: erase all configurations copy running-config tftp Les fichiers de configuration peuvent être stockés sur un serveur TFTP (Trivial File Transfer Protocol) ou sur un support conservé en lieu sûr, par exemple un CD-ROM, une clé USB ou une disquette. Line console ConfigurationLine Console Channels
![]() Console SettingsLab-Switch(config)#line console 0 Access line console 0 specific ConfigurationLab-Switch(config-line)#exec-timeout min secondes You can set the console to go from never timing out (0 0) to timing out in 35,791 minutes and 2,147,483 seconds. Remember that the default is 10 minutes. Lab-Switch(config-line)# logging synchronous Synchroniser la sortie du terminal et la ligne de commande pour éviter que les messages syslog dérangent la commande en cours Lab-Switch(config-line)#password password Set console access password Lab-Switch(config-line)#login Set console Access by password authentication Lab-Switch(config-line)#login local Set console Access by local user account authentication Console AccessSetting Console Access with local user account Authentication![]() ![]() Setting Console Access (Simple Authentication with a password) Lab-Switch(config)#line console 0 Lab-Switch(config-line)#password password Lab-Switch(config-line)#login TelnetSetting Telnet (Simple Authentication with a password)line vty 0 n password passname login Setting Telnet with local user account Authentication line vty 0 n login local |