<Router介面IP設定>
(config)#int fa0/0
(config-if)#ip address 192.168.10.254 255.255.255.0
(config-if)#no shutdown(啟動fa0/0網路介面,預設是關閉)

查詢網路介面指令:
#show ip interface brief
第一個up:OSI L1啟動正常
第二個up:OSI L2啟動正常
當L1出現down,L2一定也是down
administratively down:
管理者關閉,要輸入no shutdown

網路介面加註解:
維護方便,註解存在組態檔中
(config)#int fa0/0
(config)#description this is fa0/0

<遠端登入Router IOS>
telnet:
Router網路介面需啟動
需設定vty密碼
enable密碼
PC的dos模式指令:telnet 192.168.10.254


虛擬終端機VTY(Virtual terminal):
一個telnet連線,佔用一個路由器的vty
設定vty密碼(telnet密碼):
未設定密碼,路由器預設將telnet斷線
(config)#line vty 0 4(可使用vty0到vty4,5個虛擬終端機)
(config-line)#password ccnatel
(config-line)#login(啟動密碼)
各別設定vty密碼(不實用):
(config)#line vty 0
(config-line)#password ccna0
(config-line)#login
(config)#line vty 1 2
(config-line)#password ccna12
(config-line)#login

查詢登入狀況:
#show users

建立本地帳號:
show users會顯示使用者資訊
當啟動本地帳號,則不使用vty介面密碼
(config)#username ccna1 password cisco1
(config)#username ccna2 password cisco2
(config)#line vty 0 4
(config)#login local(啟動本地帳號)

啟動console本地帳號:
(config)#line console 0
(config-line)#login local

*注意*
若沒設定本地帳號,在console或vty啟動login local
會導致console和telnet無法登入

SSH(Secure Shell):
加密連線,Router使用RSA加密方式
(config)#ip domain-name sju.com.tw(設定網域名稱)
(config)#username ccna secret cisco(設定本地帳密)
(config)#cryto key generate rsa(產生加密的key,先使用1024bits)

啟動vty測試ssh連線:
(config)#ip ssh version 2(使用ssh version 2)
(config)#line vty 0 4
(config-line)#login local
(config-line)#transport input ssh(限定只有ssh能夠與vty連線)

PC使用ssh連線:
dos模式指令
ssh -l ccna 192.168.10.254(-l為使用者參數,l為L)

文章標籤
全站熱搜
創作者介紹
創作者 motan 的頭像
motan

炭老弟家常菜

motan 發表在 痞客邦 留言(0) 人氣(3,405)