路由器的基本配置——通过telnet访问路由器
原创
©著作权归作者所有:来自51CTO博客作者homechen的原创作品,请联系作者获取转载授权,否则将追究法律责任
路由器的基本配置
1、通过telnet访问路由器
1、通过telnet访问路由器
要通过telnet访问路由器,需要先通过console口对路由器进行基本配置,例如:IP地址、密码等。
实验拓扑图如图1所示。
图1、通过telnet访问路由器拓扑图
路由器的配置:
Router>enable ...................................进入路由器的特权模式
Router#configure terminal ................................进入路由器的全局配置模式
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface f0/0 ...............................进入路由器的f0/0端口
Router(config-if)#ip address 192.168.1.1 255.255.255.0 ...配置路由器f0/0端口的Ip地址
Router(config-if)#no shutdown .......................启用f0/0端口
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
Router(config-if)#end ..............................退出配置模式
Router#
%SYS-5-CONFIG_I: Configured from console by console
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#line vty 0 4 ...................进入路由器的VTY虚拟终端
Router(config-line)#password homechen
Router(config-line)#login .....................以上两行配置VTY(即telent)的密码
Router(config-line)#exit
Router(config)#enable password homechen ..............配置进入路由器特权模式的密码
Router(config)#end
Router#
%SYS-5-CONFIG_I: Configured from console by console
Router#
在PC上测试是否可以和路由器连通:
C:\>ipconfig
IP Address......................: 192.168.1.100
Subnet Mask.....................: 255.255.255.0
Default Gateway.................: 0.0.0.0
C:\>>ping 192.168.1.1
Pinging 192.168.1.1 with 32 bytes of data:
Reply from 192.168.1.1: bytes=32 time=21ms TTL=255
Reply from 192.168.1.1: bytes=32 time=8ms TTL=255
Reply from 192.168.1.1: bytes=32 time=8ms TTL=255
Reply from 192.168.1.1: bytes=32 time=8ms TTL=255
Ping statistics for 192.168.1.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 8ms, Maximum = 21ms, Average = 11ms
以上可以看出计算机和路由器能够连通了。
使用telent登录的路由器上
C:\>telnet 192.168.1.1 ..............远程登录到路由器上
Trying 192.168.1.1 ...Open
User Access Verification
Password: .........................输入telent密码
Router>enable
Password: .........................输入进入特权模式的密码
Router#show interface f0/0 ........................查看路由器f0/0端口的信息(注意红色的up)
FastEthernet0/0 is up, line protocol is up (connected)
Hardware is Lance, address is 0001.96b9.6501 (bia 0001.96b9.6501)
Internet address is 192.168.1.1/24
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
一、通过Telnet访问路由器
从今天开始每天花点时间学习思科技术,不知道这次能坚持多久;马上要去广西柳州了...
职场 路由器 telnet 休闲