復習:設備初始化配置命令
Router> //剛開始進入設備,處於用戶模式
Router>enable //通過該命令進入到“特權模式”;
Router#
Router#config terminal //進入到設備的“全局配置模式”
Router(config)#
Router(config)#hostname R1 //更改設備主機名;
R1(config)#
R1(config)# no ip domain-lookup // 關閉設備的域名查詢功能;
R1(config)# exit // 退出到上一個模式;
R1#
R1(config)# end // 無論在什麽模式,直接回退到“特權模式”
R1#
R1#show ip interface brief //查看當前設備上的接口的狀態信息;
interface ip-address ok? method status protocol
gi0/0 un yes unset admin down down
R1#config terminal //進入全局配置模式;
R1(config)# interface gi0/0 // 進入接口 gi0/0 的配置模式;
R1(config-if)# no shutdown // 打開該端口;
R1(config-if)# ip address 192.168.1.1 255.255.255.0 //配置IP地址;
R1(config-if)# end //返回到特權模式,為了驗證接口的配置命令;
R1#show ip interface brief // 驗證之前的配置命令是否成功;
R1#show running-config //查看設備當前的運行配置文件(位於RAM中)
R1#write //保持設備的配置內容到“啟動配置文件”(位於NVRAM中)
R1#show startup-config // 查看啟動配置文件內容;
============================================================
設備管理方式:
本地管理
-通過console口進行管理,使用console 線;
-默認情況下,是不需要密碼的;
-為了安全,配置密碼:
1、確定當前的設備管理方式 :show user
2、在 console 口下配置密碼;
line console 0
password nihao
3、在 console 口下啟用認證功能;
line console 0
login
4、驗證與測試
show running-config
退出設備,再次登錄,應該是需要密碼的;
遠程管理
-通過網絡進行管理,使用的是 vty 線路;
-默認情況下,是需要遠方訪問密碼的;
-同時,以遠程方式訪問時,必須配置“特權密碼”;
-配置命令如下:
line vty 0 4 //進入 vty 線路模式,配置遠程密碼
password cisco
enable secret ccnaccnp //配置特權密碼;
-------------------------------------------------------------
特權密碼配置:
-默認情況下,用戶模式進入特權模式,是不需要密碼的;
-為了安全考慮,配置特權密碼:
R1(config)#
1、enable password nihao ,該方式配置的密碼是明文;
2、enable secret wobuhao ,配置的密碼以密文方式存儲;
-enable secret 優先級高於 enable password;
-刪除“特權密碼”:
R1(config)# no enable password | no enable secret
註意:
為了設備中的所有的密碼,都能夠以加密的方式存在內存中:
我們為設備開啟“密碼加密服務”:(默認該服務沒有開啟)
R1(config)# service password-encrytion
當開啟該服務以後,line console 和 vty 下面的密碼都以加密
的形式存在於 running-config 中。
復習:設備初始化配置命令