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#
分类:
Network
标签:
Packet Tracer
, 路由器基本配置
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· winform 绘制太阳,地球,月球 运作规律
· AI与.NET技术实操系列(五):向量存储与相似性搜索在 .NET 中的实现
· 超详细:普通电脑也行Windows部署deepseek R1训练数据并当服务器共享给他人
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 上周热点回顾(3.3-3.9)