当我们用思科模拟器打开路由器的CLL或者通过终端串口和路由器的console口相连来进入到路由器命令行界面时。
第一次进入会弹出 “要输入配置初始对话框吗” 如果不进行配置,输入 “no” 即可进行命令操作。
Would you like to enter the initial configuration dialog? [yes/no]: no
刚进入的时候我们处于用户模式
Router>
目录
configure terminal(conf t) 进入全局配置模式
show running-config(sh r) 显示已经路由器配置好的内容
enable password(ena p) 设置进入特权模式下的非加密密码
enable secret(ena s) 设置进入特权模式下的加密密码
enable(en) 进入特权模式
Router>enable
Router#
configure terminal(conf t) 进入全局配置模式
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#
进入全局配置模式下,我们就可以进行一些设备配置。
hostname(ho) 更改主机的名字
Router(config)#hostname user
user(config)#
show running-config(sh r) 显示已经路由器配置好的内容
Router#show running-config
Building configuration...
Current configuration : 604 bytes
!
version 15.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Router
!
!
!
!
!
!
!
!
ip cef
no ipv6 cef
!
!
--More--
我们在特权模式下使用show running-config命令去查看已经完成的配置,随着配置的增多,内容也会随之增加。“空格”会查看下一页,“回车”查看下一行,“q”退出。
enable password(ena p) 设置进入特权模式下的非加密密码
Router(config)#enable password 123
未加密的密码在运行show running-config时会查到密码,缺乏保密性。
Router#show running-config
Building configuration...
Current configuration : 626 bytes
!
version 15.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Router
!
!
!
enable password 123
!
!
!
!
!
!
ip cef
no ipv6 cef
--More--
enable secret(ena s) 设置进入特权模式下的加密密码
Router(config)#enable secret 123
加密的密码在运行show running-config时为一串乱码,增加了保密性。
Router#show running-config
Building configuration...
Current configuration : 653 bytes
!
version 15.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Router
!
!
!
enable secret 5 $1$mERr$3HhIgMGBA/9qNmgzccuxv0
!
!
!
!
!
!
ip cef
no ipv6 cef
--More--
当加密与未加密同时设置的时候,未加密的密码会失效,加密的密码会作为进入特权模式的密码。
exit(ex) 返回到上一级
Router(config-if)#exit
Router(config)#
end 回到特权模式
Router(config-if)#end
Router#
%SYS-5-CONFIG_I: Configured from console by console
Router#
本文章为自己学习总结,仅供学习参考,如有错误请指出,会进行改正!!!