配置路由器或交換機的telnet


實驗名稱:在路由器或交換機上配置telnet

實驗目的:掌握怎麼在路由器或交換機上配置telnet,以實現路由器遠程登錄訪問或者telnet遠程登陸訪問交換機

實驗步驟:

spacer.gif 

2選擇一個顯色的的路由器進行啓動

spacer.gif 

不能用時,可以在開始界面cmd,出現下圖界面

spacer.gif 

順便在控制面板程序打開或關閉程序勾選telnet客戶端

3在打開的管理員界面,輸入172.28.15.102 2004進入銳捷界面

spacer.gif 

此時可以輸入show version可以顯示你進入的是路由器配置界面還是交換機界面

下圖依次爲路由器界面和交換機界面

spacer.gif 

下面就是配置(僅以路由器上配置telnet爲例

第一步:配置路由器的名稱、接口 IP 地址和時鐘

 

R3740#configure terminal

 

Enter configuration commands, one per line. End with CNTL/Z. R3740(config)#hostname RouterA

!配置路由器的名稱

 

RouterA(config)#interface serial 4/0

 

!進入串口的接口配置模式

 

RouterA(config-if)#clock rate 512000

 

!設置 DCE 端的時鐘頻率

 

RouterA(config-if)#ip address 192.168.1.1 255.255.255.0

 

!配置接口 IP 地址

 

RouterA(config-if)#no shutdown

 

!啓用端口

 

RouterA(config-if)#exit

 

R3740#configure terminal

 

Enter configuration commands, one per line. End with CNTL/Z. R3740(config)#hostname RouterB

 

RouterB(config)#interface serial 4/0 RouterB(config-if)#ip address 192.168.1.2 255.255.255.0 RouterB(config-if)#no shutdown

 

RouterB(config-if)#exit

 

 

第二步:配置 Telnet

 

RouterA(config)#enable password ruijie

 

!配置路由器的特權模式密碼

 

RouterA(config)#line vty 0 4

 

!進入線程配置模式

 

RouterA(config-line)#password star !配置 Telnet 密碼 RouterA(config-line)#login

 

!設置 Telnet 登錄時進行身份驗證

 

RouterA(config-line)#end

 

RouterB(config)#enable password ruijie

 

RouterB(config)#line vty 0 4

 

RouterB(config-line)#password star

 

RouterB(config-line)#login

 

RouterB(config-line)#end

第三步:測試網絡連通性,以 Telnet 方式登錄路由器

 

RouterB#ping 192.168.1.1

 

Sending 5, 100-byte ICMP Echoes to 192.168.1.1, timeout is 2 seconds: < press Ctrl+C to break >

 

!!!!!

 

Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/10 ms

 

RouterB#telnet 192.168.1.1

 

Trying 192.168.1.1, 23...

 

User Access Verification

 

Password:

 

!提示輸入 Telnet 密碼,此處輸入 ruijie

 

RouterA>en

 

Password:

 

!提示輸入特權模式密碼,此處輸入 star

 

RouterA#en

 

!遠程登錄路由器 A,可進行配置

 

RouterA# RouterA#conf t

 

Enter configuration commands, one per line. End with CNTL/Z. RouterA(config)#exit

RouterA#

 

RouterA# RouterA#exit

 

!使用 exit 命令退出 Telnet 登錄 RouterB#

 

RouterA#ping 192.168.1.2

 

Sending 5, 100-byte ICMP Echoes to 192.168.1.2, timeout is 2 seconds: < press Ctrl+C to break >

!!!!!

 

Success rate is 100 percent (5/5), round-trip min/avg/max = 1/4/10 ms

 

RouterA#telnet 192.168.1.2

 

Trying 192.168.1.2, 23...

 

User Access Verification

 

Password:

 

RouterB>en

 

Password:

 

RouterB#

 

RouterB#conf t

 

Enter configuration commands, one per line.End with CNTL/Z.

 

RouterB(config)#exit

 

RouterB#

 

RouterB#exit

 

RouterA#

 

【注意事項】

 

1、如果兩臺路由器通過串口直接互連,則必須在其中一端設置時鐘頻率(DCE)。

 

2、如果沒有配置 Telnet 密碼,則登錄時會提示“Password required, but none set”。

 

3、 如果沒有配置 enable 密碼,則遠程登錄到路由器上後不能進入特權模式,提示

 

Password required, but none set”。


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章