配置路由器/交換機的Telnet登錄
1.配置路由器的Telnet登錄
第一步:配置路由器的名稱、接口IP地址和時鐘
Switch> Switch>en Switch# Switch#conf t
Switch(config)#hostname RouterA
!配置路由器的名稱
RouterA(config)#interface serial 4/0
!進入串口的接口配置模式
RouterA(config-if)#clock rate 512000
!設置 DCE 端的時鐘頻率
RouterA(config-if)#ip address 1.1.1.1 255.255.255.0
!配置接口 IP 地址
RouterA(config-if)#no shutdown
!啓用端口
RouterA(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
第三步:測試網絡連通性,以 Telnet 方式登錄路由器
RouterB#ping 1.1.1.1
Sending 5, 100-byte ICMP Echoes to 1.1.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 1.1.1.1
Trying 1.1.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 登錄
概要:1.路由器設置特權密碼和遠程登錄密碼及端口ip。 2.路由器在設置line vty 0 時,登錄線程可以改變,打問號查看。 3.臺式機設置ip和子網掩碼及網關 路由器和交換機設置區別在於ip設置和臺式機網關設置。