cisco 交换机 第2堂课

{{ open device }} : 开机
#sh version
#sh ip int bri
=======================================
{{ recovery password }}: 密码强行重置
((mode key 10 second)), enter"switch" mode
switch:flash_init
switch:dir flash
switch:delete flash:config.text
switch:boot
---------------
would you like to enter the initial configuration dialog? [yes/no]
NO
==================================================================
{{ ip address }}: 设定特定port 和IP 地址
>enable
#?
#configure terminal
(config)#do show ip int bri
(config)#interface fastEthernet 0/1
(config-if)#ip add 1.1.1.1 255.255.255.0
(config-if)#no shutdown
(config-if)#end
#show startup-config
#wirte
===============================================
{{ set password form > to # }}: 设定用户模式到特权模式的密码
#configure terminal
(config)#enable password cisco
(config)#enable secret cisco=cisco
(config)#exit
#sh run
Building configuration...

Current configuration : 2666 bytes
!
version 12.4
...
!
enable secret 5 $1$GFHV$ZWz9GFGeOXc6xf7EgbBsj/
enable password cisco
===============================================
{{ set telnet,ssh }}: 开启telnet 端口,和密码,
#configure terminal
(config)#interface loopback 0
(config-if)#ip add 11.11.11.11 255.255.255.0
(config-if)#exit
(config)#line vty 0 4
(config-line)#login
(config-line)#transport input telnet ssh
(config-line)#password vty
(config-line)#exit
(config)#ctrl+Z
-----------------------------------------------
{{ testing telnet }}: 交换机中测试telnet,
#telnet 11.11.11.11
Trying 11.11.11.11 ... Open

User Access Verification

Password:vty                  (连接telnet时的密码)
>
>en                           
Password: cisco
Password: cisco=cisco         (进入特权模式时的密码,且hash值密码优先)
#who
    Line       User       Host(s)              Idle       Location
   0 con 0                11.11.11.11          00:00:00
 226 vty 0                11.11.11.11          00:00:00 11.11.11.11
*227 vty 1                idle                 00:00:00 11.11.11.11
#
#
#exit

[Connection to 11.11.11.11 closed by foreign host]
====================================================================
{{ banner }}: 欢迎词
#hostname LAB
LAB(config)#banner motd #
Enter TEXT message.  End with the character '#'.
Welcome Your LAB.CCNP.COM ! #
LAB(config)#end
LAB#
=====================================================================
{{ auto logout time }}: 自动登出时间
#conf t
#(config)#line console 0
#(config-line)#exec-timeout 0 10
=====================================================================
{{ port description }}: 描述端口
#conf t
(config)#interface fastEthernet 0/1
(config-if)#description "This is frist test port!"
(config-if)#exit
#sh run interface f 0/1
Building configuration...
...
 description "This is frist test port!"
==========================================

posted @ 2020-11-12 15:51  k98091518  阅读(106)  评论(0编辑  收藏  举报