1. 設定Console Password及相關介面
Switch# config t Enter configuration commands, one per line. End with CNTL/Z. Switch(config)# line console 0 //設定console介面 Switch(config-line)# password 123456 //設定密碼 Switch(config-line)# login //套用設定 Switch(config-line)# exec-timeout 0 0 //取銷Timeout設定 Switch(config-line)# logging synchronous //啟用游標跟隨 |
2. 設定Hostname
Switch(config)# hostname JLAB JLAB(config)#^Z JLAB# |
3. 設定時間日期及時區
JLAB# clock set 12:51:00 29 sep 2012 JLAB# sh clock 12:51:14.722 UTC Sat Sep 29 2012 JLAB(config)# clock timezone TW +8 JLAB(config)# do sh clock 21:13:19.073 TW Sat Sep 29 2012 JLAB(config)# ntp server 172.20.142.20 source vlan 1 //設定NTP Server |
4. 設定標語資訊
JLAB(config)# banner motd # Enter TEXT message. End with the character '#'. This is test for JLAB~# |
5. 設定特權模式密碼(密碼有區分大小寫)
JLAB(config)# enable password 123456 //明文密碼 JLAB(config)# enable secret 123456 //MD5加密 |
6. 關閉DNS查詢功能
JLAB(config)# no ip domain lookup //預設DNS查詢是啟用的,錯誤的輸入一條Cisco IOS軟體無法識別的命令的時候,路由器會把這個命令當作主機名,然後向DNS伺服器進行查詢。 |
7. 把目前的設定儲存至NVRAM
JLAB# copy running-config startup-config Destination filename [startup-config]? Building configuration... [OK] |
or
JLAB# write memory Building configuration... [OK] |
8. 檢視設定
JLAB# sh running-config //顯示正在使用的設定檔 JLAB# sh startup-config //顯示設備在啟動時用來取得設定參數的設定檔 |
9. 對所有未加密的密碼加密
JLAB(config)# service password-encryption |
10. 清除設定
JLAB# del flash:vlan.dat //刪除Vlan設定 JLAB# wr erase //清除設定檔後,reload重開機才會生效 JLAB# reload |
reference:
http://www.james-tw.com/cisco/cisco-switch-base-setting