Packet Tracer 5.0實驗(六) 路由器基本配置


一、實驗目標

  • 掌握路由器幾種常用配置方法;
  • 掌握采用Console線纜配置路由器的方法;
  • 掌握采用telnet方式配置路由器的方法;
  • 熟悉路由器不同的命令行操作模式以及各種模式之間的切換;
  • 掌握路由器的基本配置命令;

 

二、技術原理

路由器的管理方式基本分為兩種:帶內管理和帶外管理。通過路由器的Console口管理路由器屬於帶外管理,不占用路由器的網絡接口,其特點是需要使用配置線纜,近距離配置。第一次配置時必須利用Console端口進行配置。

 

三、實驗步驟

實驗拓撲

1、用標准console線纜連接計算機的串口和路由器的console口,在計算機上啟用超級終端,並配置超級終端的參數,使計算機與路由器通過console口建立連接;

2、配置路由器的管理IP地址,並為telnet用戶配置用戶名和登錄口令。配置計算機的IP地址(與路由器管理IP地址在同一個網段),通過網線將計算機和路由器相連,通過計算機telnet到路由器上進行查看配置;

3、更改路由器的主機名;

4、擦除配置信息、保存配置信息、顯示配置信息;

5、顯示當前配置信息;

6、顯示歷史命令;

Router>en
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#interface fa0/0
Router(config-if)#no shutdown                                //路由器端口默認關閉,開啟fa0/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)#exit
Router(config)#hostname R1                                   //修改路由器主機名
R1(config)#enable password 123456                            //設置進入特權模式密碼
R1(config)#line vty 0 4
R1(config-line)#password abc123                              //設置telnet遠程登錄密碼
R1(config-line)#login
R1(config-line)#exit
R1(config)#interface fa0/0
R1(config-if)#ip address 192.168.1.1 255.255.255.0           //配置路由器的管理IP地址
R1(config-if)#no shutdown                                    //開啟端口
R1(config-if)#end

%SYS-5-CONFIG_I: Configured from console by console
R1#

 

四、PC端登錄測試

Packet Tracer PC Command Line 1.0
PC>ipconfig

IP Address......................: 192.168.1.2
Subnet Mask.....................: 255.255.255.0
Default Gateway.................: 192.168.1.1

PC>ping 192.168.1.2

Pinging 192.168.1.2 with 32 bytes of data:

Reply from 192.168.1.2: bytes=32 time=12ms TTL=128
Reply from 192.168.1.2: bytes=32 time=0ms TTL=128
Reply from 192.168.1.2: bytes=32 time=1ms TTL=128
Reply from 192.168.1.2: bytes=32 time=1ms TTL=128

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

PC>telnet 192.168.1.1
Trying 192.168.1.1 ...Open


User Access Verification

Password:                    //輸入vty密碼
R1>en
Password:                    //輸入enable 密碼
R1#
R1#show running-config       //查看配置信息
Building configuration...

Current configuration : 501 bytes
!
version 12.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname R1
!
!
!
enable password 123456
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
 ip address 192.168.1.1 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet0/1
 no ip address
 duplex auto
 speed auto
 shutdown
!
interface Vlan1
 no ip address
 shutdown
!
ip classless
!
!
!
!
!
!
!
line con 0
line vty 0 4
 password abc123
 login
!
!
!
end


R1#


免責聲明!

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



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