實驗:通過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

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2026 CODEPRJ.COM