路由交换实验一——CISCO路由器的基本配置
CISCO路由器的基本配置
- 实验要求
- 开始实验
- 1.初始化配置:
- 2.搭建网络:
- 3.测试网络:
- 4.配置密码:
- 5.查看信息:
实验要求
- 初始化相关配置;
- 设置接口IP地址; ( F0/0 S1/0 )
- 测试; ( ping 、 telnet )
- 设置密码; ( console口、VTY接口和特权 )
- 查看相关信息。 ( show 命令 )
开始实验
1.初始化配置:
1.1使用PC进入配置面板:拉出一个2811路由器,以及一台PC设备,用配置线链接路由器的Console接口和PC的RS 232接口。
点击PC——选择Desktop选项卡——选择Terminal窗口——点击“确定”。
即可进入配置界面。
1.2使用路由器进入控制面板(现实操作无此方法):拉出一个2811路由器。
选择路由器——选择CLI选项卡即可进入配置界面。
Router>
箭头即为用户模式,权限最小,在用户模式下输入en并回车,进入特权模式Router#
井号即为特权模式,可以进行所有的查看、信息的清楚、重启等。在特权模式下输入config进入配置模式Router(config)#
此为配置模式,可以进行相关参数的配置
用户之间的切换如下所示:
Router>en
Router#config
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#exit
Router#
%SYS-5-CONFIG_I: Configured from console by console
Router#exit
Router con0 is now available
Press RETURN to get started.
Router>
接下来进行初始化配置,在配置模式下输入host *即为对路由器命名。
Router(config)#host R1
R1(config)#
输入no ip domain-lookup关闭域名解析。
(如果忘记关闭,可在进行解析时按下Ctrl+Shift+6终止解析)
R1(config)#no ip domain-lookup
输入line con 0进入Console线路口。
R1(config)#line con 0
R1(config-line)#
输入logging synchronous实现日志自动同步(自动换行)。
R1(config-line)#logging synchronous
输入exec-time 0 0实现会话永不超时(默认10分钟)。
R1(config-line)#exec-time 0 0
2.搭建网络:
拉出两个2811路由器,一个2950交换机,4台PC,如下图摆放。
为两台路由器添加广域网接口,点击路由器——点击标红处断电(不断电无法添加模块)。
将A区域用直通线连接起来,B区域用交叉线连接起来(相同设备用交叉线,不用设备用直通线,路由器与PC均有网卡,所以此处视为相同设备),两个路由器用DCE串口线连接起来(先连接的一段为DCE端)。
接下来进入R1服务器配置端口,在配置模式下输入int f0/0进入对应端口。
R1(config)#int f0/0
R1(config-if)#
输入ip add 192.168.1.251 255.255.255.0为该端口配置IP及子网掩码。
R1(config-if)#ip add 192.168.1.251 255.255.255.0
输入no shutdown启用该端口。
R1(config-if)#no shutdownR1(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
接下来输入int s1/0进入广域网端口。
R1(config-if)#int s1/0
输入ip add 192.168.2.1 255.255.255.0为该端口配置IP及子网掩码。
R1(config-if)#ip add 192.168.2.1 255.255.255.0
输入clock rate 64000为DCE配置同步时钟(仅DCE端需要进行此配置)
R1(config-if)#clock rate 64000
输入no shutdown启用该端口。
R1(config-if)#no shutdown%LINK-5-CHANGED: Interface Serial1/0, changed state to down
R2服务器配置端口与R1相同,不再分开累述。
R2(config-if)#ip add 192.168.3.1 255.255.255.0
R2(config-if)#no shutR2(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to upR2(config-if)#int s1/0
R2(config-if)#ip add 192.168.2.2 255.255.255.0
R2(config-if)#no shutR2(config-if)#
%LINK-5-CHANGED: Interface Serial1/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0, changed state to up
为PC配置IP,点开PC1——选择Desktop选项卡——选择IP Configuration——输入内容如下。
PC2输入内容如下。
PC3输入内容如下。
PC4输入内容如下。
3.测试网络:
使用PC2ping路由器R1的f0/0端口。
使用PC2telnet连接路由器R1的f0/0端口。
4.配置密码:
为路由器R1的console接口配置密码(进入用户模式时需要输入的密码)。
R1(config)#line con 0R1(config-line)#password 123456R1(config-line)#login
为路由器R1的VTY接口配置密码(telnet连接路由器时需要输入的密码)。
先输入line vty ? 显示0-15共16个接口可配置。
R1(config)#line vty ?<0-15> First Line number
为0-4这5个接口设置密码(开启接口)。
R1(config)#line vty 0 4R1(config-line)#password 654321R1(config-line)#login
为路由器R1配置特权密码(从用户模式进入特权模式时需要输入的密码)。
设置特权明文密码:
R1(config)#enable password aaa
设置特权密文密码(明文密码与密文密码同时存在时,明文密码失效):
R1(config)#enable secret bbb
加密前查询配置显示结果:
对明文密码进行加密:
R1(config)#service password-encryption
加密后查询配置显示结果:
此时,使用PC2telnet连接路由器:
输入VTY接口密码:654321,进入到用户模式。
输入特权密文密码:bbb(因为明文密码与密文密码同时启用,明文密码失效),进入到特权模式。
在配置服务器时,会话超时时,会要求输入console接口密码:123456,即可进入用户模式。
R1 con0 is now availablePress RETURN to get started.User Access VerificationPassword:
5.查看信息:
- 查看当前内存中的配置
R1#show running-config Building configuration...Current configuration : 978 bytes
!
version 12.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
service password-encryption
!
hostname R1
!
enable secret 5 $1$mERr$MBmafWD9.kwwwgArTAUad0
enable password 7 08204D4F
!
no ip cef
no ipv6 cef
!
spanning-tree mode pvst
!
interface FastEthernet0/0ip address 192.168.1.251 255.255.255.0duplex autospeed auto
!
interface FastEthernet0/1no ip addressduplex autospeed autoshutdown
!
interface Serial1/0ip address 192.168.2.1 255.255.255.0clock rate 64000
!
interface Serial1/1no ip addressclock rate 2000000shutdown
!
interface Serial1/2no ip addressclock rate 2000000shutdown
!
interface Serial1/3no ip addressclock rate 2000000shutdown
!
interface Vlan1no ip addressshutdown
!
ip classless
!
ip flow-export version 9
!
line con 0password 7 08701E1D5D4C53login
!
line aux 0
!
line vty 0 4password 7 0877191A5A4B54login
!
end
- 查看初始配置
R1#show startup-config Using 844 bytes
!
version 12.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname r1
!
no ip cef
no ipv6 cef
!
spanning-tree mode pvst
!
interface FastEthernet0/0ip address 192.168.1.251 255.255.255.0duplex autospeed auto
!
interface FastEthernet0/1no ip addressduplex autospeed autoshutdown
!
interface Serial1/0ip address 192.168.2.1 255.255.255.0clock rate 64000
!
interface Serial1/1no ip addressclock rate 2000000shutdown
!
interface Serial1/2no ip addressclock rate 2000000shutdown
!
interface Serial1/3no ip addressclock rate 2000000shutdown
!
interface Vlan1no ip addressshutdown
!
ip classless
!
ip flow-export version 9
!
line con 0
!
line aux 0
!
line vty 0 4login
!
end
- 查看版本号(包含启动顺序)
R1#show version Cisco IOS Software, 2800 Software (C2800NM-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 06:21 by pt_rel_teamROM: System Bootstrap, Version 12.1(3r)T2, RELEASE SOFTWARE (fc1)
Copyright (c) 2000 by cisco Systems, Inc.System returned to ROM by power-on
System image file is "c2800nm-advipservicesk9-mz.124-15.T1.bin"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.htmlIf you require further assistance please contact us by sending email to
export@cisco.com.cisco 2811 (MPC860) processor (revision 0x200) with 60416K/5120K bytes of memory
Processor board ID JAD05190MTZ (4292891495)
M860 processor: part number 0, mask 49
2 FastEthernet/IEEE 802.3 interface(s)
4 Low-speed serial(sync/async) network interface(s)
239K bytes of NVRAM.
62720K bytes of processor board System flash (Read/Write)Configuration register is 0x2102
- 查看闪存大小及IOS文件名
R1#show flash: System flash directory:
File Length Name/status3 50938004 c2800nm-advipservicesk9-mz.124-15.T1.bin2 28282 sigdef-category.xml1 227537 sigdef-default.xml
[51193823 bytes used, 12822561 available, 64016384 total]
63488K bytes of processor board System flash (Read/Write)
- 查看接口的简略信息
R1#show ip interface brief Interface IP-Address OK? Method Status ProtocolFastEthernet0/0 192.168.1.251 YES manual up upFastEthernet0/1 unassigned YES unset administratively down downSerial1/0 192.168.2.1 YES manual up upSerial1/1 unassigned YES unset administratively down downSerial1/2 unassigned YES unset administratively down downSerial1/3 unassigned YES unset administratively down downVlan1 unassigned YES unset administratively down down
- 查看某接口的详细信息
R1#show interfaces s1/0Serial1/0 is up, line protocol is up (connected)Hardware is HD64570Internet address is 192.168.2.1/24MTU 1500 bytes, BW 128 Kbit, DLY 20000 usec,reliability 255/255, txload 1/255, rxload 1/255Encapsulation HDLC, loopback not set, keepalive set (10 sec)Last input never, output never, output hang neverLast clearing of "show interface" counters neverInput queue: 0/75/0 (size/max/drops); Total output drops: 0Queueing strategy: weighted fairOutput queue: 0/1000/64/0 (size/max total/threshold/drops)Conversations 0/0/256 (active/max active/max total)Reserved Conversations 0/0 (allocated/max allocated)Available Bandwidth 96 kilobits/sec5 minute input rate 0 bits/sec, 0 packets/sec5 minute output rate 0 bits/sec, 0 packets/sec4 packets input, 196 bytes, 0 no bufferReceived 4 broadcasts, 0 runts, 0 giants, 0 throttles0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort0 packets output, 0 bytes, 0 underruns0 output errors, 0 collisions, 1 interface resets0 output buffer failures, 0 output buffers swapped out0 carrier transitionsDCD=up DSR=up DTR=up RTS=up CTS=up
路由交换实验一——CISCO路由器的基本配置相关推荐
- 实验一 CISCO路由器的基本配置
要求: 1. 初始化配置: 2. 设置接口IP地址: ( F0/0 S1/0 ) 3. 测试: ( ping . telnet ) 4. 设置密码: ( consol ...
- 使用GNS3和Cisco IOU搭建路由交换实验-安装篇
如何使用GNS3和Cisco IOU搭建路由交换实验-安装篇 GNS3软件的安装 建议大家从官网直接下载最新版本的GNS3,官网连接http://www.gns3.com/ 根据系统类型选择相应的版本 ...
- 【路由交换技术】Cisco Packet Tracer路由器子接口
文章目录 路由器虚拟子接口 配置步骤 配置过程 交换机配置 路由器接口配置 动态路由配置 同系列文章 基础入门教程 具体功能文章 路由器虚拟子接口 我们知道,与终端相连的路由器的端口要设置为终端的网关 ...
- (Router)路由交换实验
(Router)路由交换实验 文章目录 (Router)路由交换实验 实验00 模拟器HCL 实验01 常用设备管理操作 实验03 文件操作与设备调试 任务一 使用FTP上传下载系统文件 任务二 使用 ...
- 计算机网络原理实验实验九:路由器的基本配置,路由器单臂路由配置
计算机网络原理实验实验九:路由器的基本配置,路由器单臂路由配置 任务1. 路由器的基本配置 实验目标 掌握路由器几种常用配置方法: 掌握采用Console线缆配置路由器的方法: 掌握采用T ...
- 思科cisco路由器动态路由协议配置方法
思科cisco路由器动态路由协议配置方法 配置IGRP动态路由协议 IGRP是EIGRP协议的前身,虽然现在基本被EIGRP协议所取代,但在一些特殊场合我们仍然会用到该动态路由协议.他的使用配置和EI ...
- Cisco路由器的安全配置简易方案
Cisco路由器的安全配置简易方案 Author: BluShin Auditor: Amy E-mail:Yangtonguang@163.com Version 1.0 Date: 2002-12 ...
- Cisco路由器的安全配置方案
Cisco路由器的安全配置方案 标签: cisco 配置 安全 路由器 方案 Cisco路由器的安全配置方案 Author: BluShin Auditor: Amy E-mail:Yangtongu ...
- 【路由交换实验】VLAN
VLAN基础 1.VLAN 为什么要用vlan?用vlan隔离广播域 划分vlan的方法: 端口类型: 交换机的每个端口都有所属的vlan id,叫做PVID,最开始,缺省的情况下,所有端口都是被划分 ...
- 【路由交换实验】生成树STP(stp,rstp,mstp)
理论 冗余的重要性 叫做MAC地址表的震荡 为了增加网络的可靠性,有必要引入双链路的备份,但是引入冗余链路以后,网络里面又产生了环路,产生一系列广播风暴的问题,可以使用STP生成树协议来解决这个问题. ...
最新文章
- Python设计模式-中介者模式
- [译]从零开始成为数据科学家的9个步骤
- 十二、解析H.264码流的宏块结构(上)
- flutter text 左对齐_Flutter基础篇之九-Text文本展示
- 数学图形(2.18)Hyperbolical conical spiral双曲圆锥螺线
- 安装paddlepaddle-GPU 报libcudnn.so和libcublas.so找不到的解决方案
- php 增加mysql 索引,【PHP】为什么 MySQL 添加索引后就可以提高查询速度
- mysql null 优化_MySQL如何优化IS NULL?
- androidstudio jni开发_高考失利落榜,7年Android开发现已年薪60w,我的逆袭之路想说给你听...
- python cls方法
- 数值计算软件有哪些?一款国产软件非常亮眼。
- 迷你屏+OLED好屏:个性专业两手抓 华硕灵耀X 14专业好屏体验
- Cookie与Session基本使用
- 小程序包大小超过限制
- 椭圆曲线上的加密算法——MV(Menezes-Vanstone)算法的具体实现
- 计算机开机出现alert,开机提示alert! cover was previously removed(主机盖被移动)
- 调整SumatraPDF暗黑模式
- golang中的字符串
- UE4材质 制作UV贴图
- 面试技巧: 轻松过关10种方法