當我們用思科模拟器打開路由器的CLL或者通過終端序列槽和路由器的console口相連來進入到路由器指令行界面時。
第一次進入會彈出 “要輸入配置初始對話框嗎” 如果不進行配置,輸入 “no” 即可進行指令操作。
Would you like to enter the initial configuration dialog? [yes/no]: no
剛進入的時候我們處于使用者模式
Router>
目錄
enable(en) 進入特權模式
configure terminal(conf t) 進入全局配置模式
hostname(ho) 更改主機的名字
show running-config(sh r) 顯示已經路由器配置好的内容
enable password(ena p) 設定進入特權模式下的非加密密碼
enable secret(ena s) 設定進入特權模式下的加密密碼
exit(ex) 傳回到上一級
end 回到特權模式
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#
本文章為自己學習總結,僅供學習參考,如有錯誤請指出,會進行改正!!!