路由器配置.docx
《路由器配置.docx》由会员分享,可在线阅读,更多相关《路由器配置.docx(76页珍藏版)》请在冰豆网上搜索。
路由器配置
目录
实验一路由器接口简介1
实验二路由器的基本管理方法3
实验三路由器的基本配置12
实验四路由器的文件维护21
实验五静态路由的配置26
实验六路由器RIP路由协议的配置40
实验七路由器OSPF路由协议的配置45
实验一路由器接口简介
实验目的:
掌握路由器各接口的外观
接口的功能
接口的表示方法
应用环境:
路由器与交换机相比,功能要丰富的多,这些功能在外观上的就是接口、模块的类型比较多,当然价格有很大差异,通常高端的设备都是模块化的,支持的模块类型也很丰富。
实验设备:
1.DCR—2650E一台
实验拓扑:
图1---1
实验要求:
以太网接口有100M和10M之分。
注意观察接口和模块上的标志。
注意插槽上标号,从靠近电源开始,依次是0、1、2、3。
各接口标号也从0开始的。
实验步骤:
路由器接口标准配置和作用:
(以DCR2650E为例)
一个固定的Console接口,用于本地配置路由器或路由器的软件升级
分别有10/100M自适应的RJ45以太网接口,主要用来连接以太网。
注意事项和排错:
加装和拆卸模块一定要先关闭电源。
串口不要带电插拔。
配置序列:
无
共同思考:
实验二路由器的基本管理方法
实验目的
掌握带外的管理方法,通过console接口配置。
掌握带内的管理方法,通过telnet方式配置。
掌握带内的管理方法,通过web方式配置。
应用环境
设备的初始配置一般都通过console接口进行。
远程管理通常通过带内的方式。
给相应得接口配置了IP地址,开启了相应的服务以后,才能进行带内的管理。
实验设备
1.DCR-2650E一台
2.PC机一台
3.Console线缆、网线各一条
实验拓扑
图2---1
实验要求
路由器和pc机连接的对应端口
DCR-2650E
PC机
Console
串口
F0/0192.168.2.1
网卡192.168.2.2
配置表
接口
Ip地址
F0/0
192.168.2.1
Pc机
192.168.2.3
配置模式
1、初始配置模式(Setup)
Ø首次使用时需进行
Ø必须通过控制台(Console)进行
2、用户模式(Usermode)
Ø提示符:
>
3、特权模式(Priviligedmode)
Ø提示符:
#
4、全局模式(Globalmode)
Ø提示符:
(config)#
5、组件配置模式
实验步骤
(带外管理方法--通过Console口配置管理)
第一步:
将配置线的一端与路由器的Console口相连,另一端与PC的串口相连,如图2--1所示。
第二步:
在PC上运行终端仿真程序。
点击“开始”,找到“程序”,选择“附件”下的“通讯”,运行“超级终端”程序,同时需要设置终端的硬件参数(包括串口号):
(1)在windows下运行超级终端程序,如下图所示:
图2—2
(2)为建立的超级终端连接取名字。
图2—3
(3)选择所使用的端口号:
图2—4
(4)设置端口属性,如下图所示:
波特率:
9600
数据位:
8
奇偶校验:
无
停止位:
1
流控:
无
图2--5
(5)回车后,将会出现下图所示的界面,表示已经进入到路由器,可以进行配置。
图2--6
第三步:
路由器加电,超级终端会显示路由器自检信息,自检信息结束后出现命令提示“PressRETURNtogetstarted”。
SystemBootstrap,Version0.3.8
Serialnum:
8IRT74105C15000002,IDnum:
008729
Copyright(c)1996-2004byChinaDigitalchinaCO.LTD
DCR-2650Series2650E
Loading2650-1.3.3A-full.bin......
StartDecompress2650-1.3.3A-full.bin
##############################################################################
Decompress7155054byte,Pleasewaitsystemup..
DigitalchinaInternetworkOperatingSystemSoftware
DCR-2650SeriesSoftware,Version1.3.3A,RELEASESOFTWARE
DCR-2650SeriesSoftware,Version1.3.3A,RELEASESOFTWARE
Routerconsole0isnowavailable
PressRETURNtogetstarted
第四步:
“按回车键进入用户配置模式。
DCR-2650E系列路由器出厂时没有设定密码,用户按回车键直接进入普通用户模式,可以使用权限允许分为内的命令,需要帮助可以随时键入“?
”,输入enable,敲回车则进入特权模式。
这时候用户拥有最大的权限,可以任意配置,需要帮助可以随时键入“?
”。
Router>enable!
进入特权模式
Router#Jan100:
16:
14Unknownuserenterprivilegemodefromconsole0,level=15
Router#?
!
查看可用的命令
cd--Changedirectory
chinese--HelpmessageinChinese
chmem--Changememoryofsystem
chram--Changememory
clear--Clearsomething
config--Enterconfigurativemode
connect--Openaoutgoingconnection
copy--Copyconfigurationorimagedata
debug--Debuggingfunctions
delete--Deleteafile
dir--Listfilesinflashmemory
disconnect--Disconnectanexistingoutgoingconnection
download--DownloadwithZMODEM
enable--Turnonprivilegedcommands
english--HelpmessageinEnglish
enter--Turnonprivilegedcommands
exec-script--Executeascriptonaportorline
exit--Exit/quit
format--Formatfilesystem
help--Descriptionoftheinteractivehelpsystem
history--Lookuphistory
keepalive--K
look--Displaymemory
md--Createdirectory
more--Displaythecontentsofafile
no--Negateconfiguration
pad--LogintoremotenodeusingX.29
ping--Testnetworkstatus
pwd--Displaycurrentdirectory
rd--Deleteadirectory
reboot--Restartrouter
rename--Renameafile
resume--Resumeanactiveoutgoingnetworkconnection
rlogin--Openarloginconnection
show--Showconfigurationandstatus
telnet--Openatelnetconnection
terminal--Setterminallineparameters
traceroute--Traceroutetodestination
upload--UploadwithZMODEM
where--Displayalloutgoingtelnetconnection
write--Savecurrentcon
Router#ch?
!
使用?
帮助
chinese--HelpmessageinChinese
chmem--Changememoryofsystem
chram--Changememory
Router#chinese!
设置中文帮助
Router#?
!
再次查看可用命令
cd--改变当前目录
chinese--中文帮助信息
chmem--修改系统内存数据
chram--修改内存数据
clear--清除
config--进入配置态
connect--打开一个向外的连接
copy--拷贝配置方案或内存映像
debug--分析功能
delete--删除一个文件
dir--显示闪存中的文件
disconnect--断开活跃的网络连接
download--通过ZMODEM协议下载文件
enable--进入特权方式
english--英文帮助信息
enter--进入特权方式
exec-script--在指定端口运行指定的脚本
exit--退回或退出
format--格式化文件系统
help--交互式帮助系统描述
history--查看历史
keepalive--保活探测
look--显示内存数据
md--创建目录
more--显示某个文件的内容
no--取消配置
pad--通过X.29注册到远程节点
ping--测试网络状态
pwd--显示当前目录
rd--删除一个目录
reboot--重启动路由器
rename--改变文件名
resume--恢复活跃的网络连接
rlogin--远程登录
show--显示配置和状态
telnet--打开一个telnet连接
terminal--设置终端参数
traceroute--跟踪到目的地的路由
upload--通过ZMODEM协议上载文件
where--显示所有向外的telnet连接
write--保存当前配置
第五步:
设置路由器以太网接口地址并验证
Router#enable!
进入特权模式
Router#config!
进入全局配置模式
Router_config#interfacef0/0!
进入接口模式
Router_config_f0/0#ipaddress192.168.2.1255.255.255.0!
设置ip地址
Router_config_f0/0#noshutdown
Router_config_f0/0#^Z
Router#Jan100:
07:
02Configuredfromconsole0b
Router#showinterfacef0/0!
验证
FastEthernet0/0isup,lineprotocolisup!
接口和协议必须都up
addressis00e0.0f27.10c0
MTU1500bytes,BW100000kbit,DLY10usec
Interfaceaddressis192.168.2.1/24
EncapsulationARPA,loopbacknotset
Keepalivenotset
ARPtype:
ARPA,ARPtimeout00:
03:
00
60secondinputrate0bits/sec,0packets/sec!
60secondoutputrate0bits/sec,0packets/sec!
Half-duplex,10Mb/s,100BaseTX,0ii,0oi
0packetsinput,0bytes,200rx_freebuf
Received0unicasts,0lowmark,0ri,0inputerrors
0overrun,0CRC,0framing,0busy,0long,0discard,0throttles
0packetsoutput,0bytes,50tx_freebd,0outputerrors
0underrun,0collisions,0latecollisions,0deferred,0reTxexpired
0resets,0lostcarrier,0nocarrier0gracestop0buserror
0outputbufferfailures,0outputbuffersswappedout0txerrors
第六步:
设置路由器AAA认证
router-a_config#aaaauthenticationlogindefaultnone!
不使用AAA认证
router-a_config#aaaauthenticationenabledefaultnone!
不使用AAA认证
第七步:
设置PC机的ip地址并测试连通性
图2---7
使用PING测试连通性:
图2---8
第八步:
在PC机上telnet到路由器
运行telnet192.168.2.1:
图2---9
图2---10
注意事项和排错
在超级终端中的配置是对路由器的操作,这时的PC只是输入输出设备
在telent和web方式管理时,先测试连通性
配置序列
无
共同思考:
带内和带外管理方式各有什么优点和缺点?
Telnet和web的端口号是什么?
实验三路由器的基本配置
实验目的:
掌握路由器配置前的准备。
掌握路由器的机器名和配置。
接口IP地址、基本封装类型。
应用环境:
在执行配置之前,本节学习的基本配置,是其他任务的基础。
主要学习机器名、接口地址、特权模式密码等方法。
实验设备:
1.DCR-26502台
2.CR—V35MT1条
3.CR—V35FC1条
4.网线2条
实验拓扑
图3---1
实验要求
配置表
Router—A
Router—B
接口
类型
Ip地址
接口
类型
Ip地址
S0/3
DCE
192.168.2.1
S0/3
DTE
192.168.2.2
F0/0
192.168.1.1
Pc机
192.168.1.3
实验步骤
路由器A的基本配置
第一步:
恢复出厂设置
Router>
Router>enable!
进入特权模式
Router#Jan100:
50:
54Unknownuserenterprivilegemodefromconsole0,level=15
Router#showrunning-config!
查看当前配置
Buildingconfiguration...
Currentconfiguration:
!
!
version1.3.3A
servicetimestampslogdate
servicetimestampsdebugdate
noservicepassword-encryption
!
interfaceFastEthernet0/0
noipaddress
noipdirected-broadcast
!
interfaceFastEthernet0/1
noipaddress
noipdirected-broadcast
!
interfaceSerial0/2
noipaddress
noipdirected-broadcast
!
interfaceSerial0/3
noipaddress
noipdirected-broadcast
!
interfaceAsync0/0
noipaddress
noipdirected-broadcast
gateway-cfg
gatewaykeepAlive60
shutdown
!
ivr-cfg
!
h323proxy-cfg
shutdown
!
Router#
Router#
Router#
Router#delete!
删除配置文件
thisfilewillbeerased,areyousure?
(y/n)y
Router#
Router#reboot!
重新启动
Doyouwanttoreboottherouter(y/n)?
y
Pleasewait..
第二步:
设置接口IP地址,DCE的时钟频率及其验证
Router>
Router>enable!
进入特权模式
Router#Jan100:
07:
33Unknownuserenterprivilegemodefromconsole0,level=15
Router#config
Router_config#!
进入全局配置模式
Router_config#hostnamerouter-a!
修改机器名
router-a_config#interfaces0/3!
进入接口模式
router-a_config_s0/3#ipaddress192.168.2.1255.255.255.0!
配置ip地址
router-a_config_s0/3#physical-layerspeed9600!
配置DCE的时钟频率
router-a_config_s0/3#Jan100:
10:
03LineonInterfaceSerial0/2,changedtodown
router-a_config_s0/3#noshutdown
router-a_config_s0/3#^Z!
按ctrl+z进入特权模式
router-a#Jan100:
11:
10Configuredfromconsole0by
router-a#showinterfaces0/3!
查看接口状态
Serial0/3isup,lineprotocolisdown
!
当DTE端的s0/3端口配置好之后,此处的down会自动改为up
Mode=SyncDCESpeed=9600
DTR=UP,DSR=UP,RTS=UP,CTS=DOWN,DCD=UP
MTU1500bytes,BW64kbit,DLY2000usec
Interfaceaddressis192.168.2.1/24
EncapsulationprototolHDLC,linkcheckintervalis10sec
OctetsReceived0,OctetsSent0
FramesReceived0,FramesSent0,Link-checkFramesReceived0
Link-checkFramesSent8,LoopBacktimes0
FramesDiscarded0,UnknownProtocolsFramesReceived0,Sentfailuile0
Link-checkTimeout0,QueueError0,LinkError0,
60secondinputrate0bits/sec,0packets/sec!
60secondoutputrate20bits/sec,0packets/sec!
0packetsinput,0bytes,8unused_rx,0nobuffer
0inputerrors,0CRC,0frame,0overrun,0ignored,0abort
8packetsoutput,192bytes,0unused_tx,0underruns
error:
0clock,0grace
PowerQUICCSCCspecificerrors:
0recvallocbmblkfail0recvnobuffer
0transmitterqueuefull0transmitterhwqueue_full
router-a#config
router-a_config#interfacef0/0
router-a_config_f0/0#ipaddress192.168.1.1255.255.255.0
router-a_config_f0/0#noshutdown
router-a_config_f0/0#^Z
router-a#Jan100:
07:
10Configuredfromconsole0by
router-a#showinterfacef0/0
FastEthernet0/0isup,lineprotocolisup
addressis00e0.0f27.1148
MTU1500bytes,BW100000kbit,DLY10usec
Interfaceaddressis192.168.1.1/24
EncapsulationARPA,loopbacknotset
Keepalivenotset
ARPtype:
ARPA,ARPtimeout00:
03:
00
60sec