CCNA学习-交换路由-配置路由器通过Telnet访问

配置路由器以太网接口的IP地址:

Router>enable
Router#config t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#int f0/1
Router(config-if)#ip add 192.168.0.1 255.255.255.0
Router(config-if)#no shutdown
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up

Router(config-if)#end

配置路由器密码:

Router#
Router#config t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#line vty 0 4        //进入vty 0到vty 4 共5个虚拟终端
Router(config-line)#password sisco      //配置vty的密码,即Telnet密码
Router(config-line)#login
Router(config-line)#exit
Router(config)#enable password sisco     //配置进入到路由器特权模式的密码
Router(config)#end

通过Telnet访问路由器:

在计算机上配置IP为192.168.0.100/255.255.255.0,打开CMD命令行窗口。
首先测试计算机和路由器的连通性,再进行Telnet远程登陆

C:\>ping 192.168.0.1
Pinging 192.168.0.1 with 32 bytes of data:
Reply from 192.168.0.1: bytes=32 time<1ms TTL=255
Reply from 192.168.0.1: bytes=32 time<1ms TTL=255
Reply from 192.168.0.1: bytes=32 time<1ms TTL=255
Reply from 192.168.0.1: bytes=32 time<1ms TTL=255
Ping statistics for 192.168.0.1:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),  //表明计算机能ping通路由器
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms

C:\>telnet 192.168.0.1       //Telnet 路由器以太网上的IP地址
Trying 192.168.0.1 ...Open
User Access Verification
Password:                             // 输入vty的密码sisco
Router>enable                     //进入特权模式
Password:                             //输入enable的密码sisco
Router# exit

[Connection to 192.168.0.1 closed by foreign host]

猜你喜欢

转载自blog.51cto.com/14416969/2421374