Начальная настройка
Switch> enableSwitch#Switch# configure terminalSwitch(config)# hostname S1S1(config)# line console 0S1(config-line)# password letmeinS1(config-line)# loginS1(config-line)# exitS1(config)# exit%SYS-5-CONFIG_I: Configured from console by consoleS1#S1# configure terminalS1(config)# enable password c1$c0S1(config)# exit%SYS-5-CONFIG_I: Configured from console by consoleS1# show running-configS1# config tS1(config)# enable secret itsasecretS1(config)# exitS1#show running-config\\Примечание. Пароль enable secret имеет приоритет перед паролем enable password. Если для коммутатора заданы оба пароля, для перехода в привилегированный режим EXEC нужно ввести пароль enable secret.
S1# config tS1(config)# service password-encryptionS1(config)# exitS1# config tS1(config)# banner motd "This is a secure system. Authorized Access Only!"S1(config)# exit%SYS-5-CONFIG_I: Configured from console by consoleS1#baner ? #Authorized access only. Violators will be prosecuted to the full extent of the law.#Чтобы настроить IP-адрес на коммутаторе S1, используйте следующие команды:
S1# configure terminalEnter configuration commands, one per line. End with CNTL/Z.S1(config)# interface vlan 1S1(config-if)# ip address 192.168.1.253 255.255.255.0S1(config-if)# no shutdown%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to upS1(config-if)#S1(config-if)# exitS1#show ip interface briefЭта команда позволяет проверить состояние
Наконец, чтобы конфигурация не была потеряна после перезагрузки коммутатора, выполняется команда
copy running-config startup-config. После этого текущая конфигурация сохраняется в загрузочную конфигурацию.