实验:通过Telnet访问路由器

1、学习目标

  1)掌握路由器的用户模式和特权模式的使用

  2)掌握配置路由器以太网接口的IP地址,并启用接口

  3)配置路由器的enable及vty密码

  4)telnet程序的使用

2、实战操作

2.1 实验拓扑

 

2.2 配置操作

# 路由器启动
System Bootstrap, Version 12.3(8r)T8, RELEASE SOFTWARE (fc1)
Cisco 1841 (revision 5.0) with 114688K/16384K bytes of memory.

Self decompressing the image :
########################################################################## [OK]
              Restricted Rights Legend

Use, duplication, or disclosure by the Government is
subject to restrictions as set forth in subparagraph
(c) of the Commercial Computer Software - Restricted
Rights clause at FAR sec. 52.227-19 and subparagraph
(c) (1) (ii) of the Rights in Technical Data and Computer
Software clause at DFARS sec. 252.227-7013.

           cisco Systems, Inc.
           170 West Tasman Drive
           San Jose, California 95134-1706



Cisco IOS Software, 1841 Software (C1841-ADVIPSERVICESK9-M), Version 12.4(15)T1, RELEASE SOFTWARE (fc2)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2007 by Cisco Systems, Inc.
Compiled Wed 18-Jul-07 04:52 by pt_team
Image text-base: 0x60080608, data-base: 0x6270CD50


This product contains cryptographic features and is subject to United
States and local country laws governing import, export, transfer and
use. Delivery of Cisco cryptographic products does not imply
third-party authority to import, export, distribute or use encryption.
Importers, exporters, distributors and users are responsible for
compliance with U.S. and local country laws. By using this product you
agree to comply with applicable laws and regulations. If you are unable
to comply with U.S. and local laws, return this product immediately.

A summary of U.S. laws governing Cisco cryptographic products may be found at:
http://www.cisco.com/wwl/export/crypto/tool/stqrg.html

If you require further assistance please contact us by sending email to
export@cisco.com.


Cisco 1841 (revision 5.0) with 114688K/16384K bytes of memory.
Processor board ID FTX0947Z18E
M860 processor: part number 0, mask 49
2 FastEthernet/IEEE 802.3 interface(s)
191K bytes of NVRAM.
63488K bytes of ATA CompactFlash (Read/Write)
Cisco IOS Software, 1841 Software (C1841-ADVIPSERVICESK9-M), Version 12.4(15)T1, RELEASE SOFTWARE (fc2)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2007 by Cisco Systems, Inc.
Compiled Wed 18-Jul-07 04:52 by pt_team


         --- System Configuration Dialog ---

Continue with configuration dialog? [yes/no]: no


Press RETURN to get started!



Router>enable       # 进入特权模式
Router#conf t         # 进去全局配置模式
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#interface fastEthernet 0/1  # 第0个插槽 第1个接口
Router(config-if)#ip address 172.16.0.1 255.255.255.0  # 配置IP地址
Router(config-if)#no shutdown   # 打开端口,默认都是关闭状态 交换机默认都是打开状态

%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
Router(config-if)#end
Router#
%SYS-5-CONFIG_I: Configured from console by console

# 配置路由器密码
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#line vty 0 4
Router(config-line)#password strong   # telnet密码
Router(config-line)#login
Router(config-line)#exit
Router(config)#enable password strong     # 路由器特权密码
Router(config)#end
Router#
%SYS-5-CONFIG_I: Configured from console by console    

通过telnet访问路由器

 第一步:配置PC机IP地址为172.16.0.1/255.255.255.0

 第二步:telnet登陆路由器

PC>ping 172.16.0.1

Pinging 172.16.0.1 with 32 bytes of data:

Reply from 172.16.0.1: bytes=32 time=15ms TTL=255
Reply from 172.16.0.1: bytes=32 time=9ms TTL=255
Reply from 172.16.0.1: bytes=32 time=8ms TTL=255

Ping statistics for 172.16.0.1:
    Packets: Sent = 3, Received = 3, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 8ms, Maximum = 15ms, Average = 10ms

PC>telnet 172.16.0.1
Trying 172.16.0.1 ...Open


User Access Verification

Password: 
Router>enable 
Password: 
Router#show running-config 
Building configuration...

Current configuration : 504 bytes
!
version 12.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Router
!
!
!
enable password strong
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
 no ip address
 duplex auto
 speed auto
 shutdown
!
interface FastEthernet0/1
 ip address 172.16.0.1 255.255.255.0
 duplex auto
 speed auto
!
interface Vlan1
 no ip address
 shutdown
!
ip classless
!
!
!
!
!
!
!
!
!
line con 0
line vty 0 4
 password strong
 login
!
!
!
end
Router(config)#exit

 

posted @ 2017-06-29 11:32  每天进步一点点!!!  阅读(10078)  评论(0编辑  收藏  举报