剛開始接觸實體機器,必需更改一些基本設定,方便日後維護。
一、設定Hostname
二、設定可Telnet,Telnet、enable密碼皆為cisco
三、設定時間為TW的時間
四、取消Console Timeout的設定
五、若出現訊息時,會重覆剛剛打的字
六、Log加上時間
七、不使用DNS
八、設定Vlan IP
DSW2#
DSW2#sh run
Building configuration...
Current configuration : 1646 bytes
!
! Last configuration change at 13:19:51 TW Sun Dec 12 2010
!
version 12.1
no service pad
service timestamps debug uptime
service timestamps log datetime 在Log加上時間
datetime:目前的時間;uptime:設定開機多久的時間
no service password-encryption
!
hostname DSW2 定義設備名稱
!
enable password cisco 設定enable密碼
!
clock timezone TW 8 時區設定 +8
ip subnet-zero
!
no ip domain-lookup 不使用DNS
vtp domain rlab
vtp mode transparent
!
spanning-tree mode pvst
no spanning-tree optimize bpdu transmission
spanning-tree extend system-id
!
interface Vlan1
ip address 172.16.1.222 255.255.255.0 設定Vlan1的IP
no ip route-cache
!
ip default-gateway 172.16.1.222
ip http server
!
line con 0
exec-timeout 0 0 把Timeout設定成0分0秒 (取消Timeout設定)
(許多新手通常會誤打成 「no exec」,這樣會使console不能連線)
logging synchronous 指令輸入一半有訊息打斷時會重新補上輸入到一半的指令
line vty 0 4
exec-timeout 0 0
password cisco 登入時的密碼為cisco
logging synchronous
login
line vty 5 15
exec-timeout 0 0
password cisco
logging synchronous
login
!
end