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

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

Router>enable
Router#config t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#int f0/1               //进入f0/1接口
Router(config-if)#ip add 192.168.0.1 255.255.255.0           //设置IP及子网掩码
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]
  • 1
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值