CISCO>>基礎筆記1-2
從路由器使用者模式進入特權模式:Router>enable
從特權模式進入全域性配置模式:Router#configure terminal
全域性模式退出到特權模式:Router(config)#exit
各種子模式下退出到特權模式:Router(config)#end
特權模式退出到使用者模式:Router#disable
從全域性配置模式進入子配置模式:
進入線路配置模式:如控制檯口線路Router(config)#line console number
vty線路:Router(config)#line vty 0 4
進入介面配置模式:如乙太網介面Router(config)#interface fast 0/1
============================================================
- 交換機的命名:Switch(config)#hostname s1
- 特權明文密碼的設定:Switch(config)#enable password 123
- 特權加密密碼的設定:Switch(config)#enable secret 456
- 控制檯密碼的設定:
Switch(config-line)#line console 0
Switch(config-line)#password 1234
Switch(config-line)#login
- 虛擬線密碼的配置:
Switch(config-line)#line vty 0 15
Switch(config-line)#password 1234
Switch(config-line)#login
============================================================
- 全域性配置模式下設定密碼:
router(config)# enable password 設定特權明文密碼
router(config)# enable secret 設定特權加密密碼
注意:密碼區分大小寫,空格也可做密碼;
同時配置兩種密碼情況下,優先使用加密密碼。
- 配置線路模式下的密碼:
router(config)#line console | vty start-number end-number
router(config-line)#password ****
router(config-line)#login
注意:線路配置模式下,只能配置明文密碼。
- 明文密碼檔案加密:router(config)#service password-encryption
注意:開啟該服務後,即使將該命令取消或刪除,已加密的密碼效果不變。
- 檢視當前執行配置:show
特權模式下 router#show running-config --顯示RAM中起作用的路由配置資訊
全域性模式下 router(config )#do show running-config
- 刪除或取消命令:
no 需要刪除或取消的命令
- 儲存當前裝置配置
router(config )#copy running-config startup-config -- 把當前裝置的執行配置儲存到flash中
router(config )#write --儲存配置資訊(推薦)
============================================================
(一)交換機
1、交換機是工作在OSI模型第二層(資料鏈路層)的中間裝置,可識別通訊資料中MAC地址,並根據MAC地址與對應的埠進行資料轉發。
2、相關配置命令:
- 虛擬埠ip地址的分配:
Switch(config-if)#interface vlan1
Switch(config-if)#ip address 192.168.1.2 255.255.255.0
Switch(config-if)#no shutdown
- 給介面配地址:
Switch(config-if)#interface interface0/1
Switch(config-if)#ip address 192.168.1.2 255.255.255.0
Switch(config-if)#no shutdown
- 配置預設閘道器
Switch (config)#ip default gateway
(二)路由器
1、路由器是工作在OSI模型第三層(網路層)的中間網路裝置,是連線區域網與區域網、區域網與廣域網、廣域網與廣域網的裝置,具有判斷網路地址並選擇路由的功能。
2、相關配置命令:
- 檢視當前執行配置:show
特權模式下 router#show running-config --顯示RAM中起作用的路由配置資訊
全域性模式下 router(config )#do show running-config
============================================================
(一)交換機
1、二層交換機是工作在OSI模型第二層(資料鏈路層)的中間裝置,可識別通訊資料中MAC地址,並根據MAC地址與對應的埠進行資料轉發。
2、相關配置命令:
- 交換機的命名:Switch(config)#hostname s1
- 特權明文密碼的設定:Switch(config)#enable password 123
- 特權加密密碼的設定:Switch(config)#enable secret 456
- 控制檯密碼的設定:
Switch(config-line)#line console 0
Switch(config-line)#password 1234
Switch(config-line)#login
- 虛擬線密碼的配置:
Switch(config-line)#line vty 0 15
Switch(config-line)#password 1234
Switch(config-line)#login
- 進入全域性配置模式,設定標語資訊:Router(config)#banner motd # text#
- 虛擬埠ip地址的分配:
Switch(config-if)#interface vlan1
Switch(config-if)#ip address 192.168.1.2 255.255.255.0
Switch(config-if)#no shutdown
- 給介面配地址:
Switch(config-if)#interface interface0/1
Switch(config-if)#ip address 192.168.1.2 255.255.255.0
Switch(config-if)#no shutdown
- 配置預設閘道器
Switch (config)#ip default gateway
(二)路由器
1、路由器是工作在OSI模型第三層(網路層)的中間網路裝置,是連線區域網與區域網、區域網與廣域網、廣域網與廣域網的裝置,具有判斷網路地址並選擇路由的功能。
2、相關配置命令:
- 全域性配置模式下設定密碼:
router(config)# enable password 設定特權明文密碼
router(config)# enable secret 設定特權加密密碼
注意:密碼區分大小寫,空格也可做密碼;
同時配置兩種密碼情況下,優先使用加密密碼。
- 配置線路模式下的密碼:
router(config)#line console | vty start-number end-number
router(config-line)#password ****
router(config-line)#login
注意:線路配置模式下,只能配置明文密碼。
- 明文密碼檔案加密:router(config)#service password-encryption
注意:開啟該服務後,即使將該命令取消或刪除,已加密的密碼效果不變。
- 檢視當前執行配置:show
特權模式下 router#show running-config --顯示RAM中起作用的路由配置資訊
全域性模式下 router(config )#do show running-config
#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=
本文來自部落格園,作者:凡是過去,皆為序曲,轉載請註明原文連結:https://www.cnblogs.com/longhai3/p/15887699.html
如有疑問,歡迎提問
#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=