《2022年路由器基本配置培训.doc》由会员分享,可在线阅读,更多相关《2022年路由器基本配置培训.doc(19页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。
1、南宁市教育城域网工程路由器根本配置培训神州数码网络2007年3月实验一:登陆路由器 一、实验目的1、 学习如何通过CONSOLE接口配置路由器2、 学习如何通过telnet 方式配置路由器3、 学习如何配置路由器的接口4、 学习如何配置路由器的enable密码和telnet 用户名和密码5、 保存配置二、应用环境1、 设备的初始设备一般都是通过CONSOLE接口进展。2、 给相应的接口配置了IP地址,开启了相应的效劳后,才能够通过telnet的方式治理路由器。三、实验设备1、 DCR-2626一台2、 PC机一台3、 CONSOLE线缆一条,网线一条四、实验拓扑CONSOLE 口TP0 网卡网
2、线RS-232串口五、实验要求TP0 IP地址:192.168.2.1 PC机IP地址:192.168.2.2六、实验步骤1、CONSOLE治理第一步:将配置线的一端与路由器的CONSOLE口相连,另一端与PC机的串口相连,如上图所示。第二步:在PC机上运转终端仿真程序,同时设置终端的硬件参数。(1)打开超级终端(2)设置连接名称(3)选择连接的接口,一般情况下为COM1(4)点击“复原默认值”设置端口属性,点击“确定”进入超级终端。第三步:路由器加电,超级终端会显示路由器的自检信息,自检完毕出现命令提示“Press RETURN to get started”System Bootstrap
3、, Version 0.4.4Serial num:8IRTC8107209000024, ID num:501926Copyright 2006 by Digital China Networks(BeiJing) LimitedDCR-2626 Series 2626Loading DCR26V1.3.3C.bin.Start Decompress DCR26V1.3.3C.bin# Decompress 4850012 byte,Please wait system up.Digitalchina Internetwork Operating System SoftwareDCR-262
4、6 Series Software , Version 1.3.3C, RELEASE SOFTWARESystem start up OKRouter console 0 is now availablePress RETURN to get startedJan 1 00:00:07 Router System started -Jan 1 00:00:16 Line on Interface Serial0/1, changed to downJan 1 00:00:16 Line on Interface Serial0/2, changed to down第四步:按回车键进入用户配置
5、形式。DCR-2626路由器出厂时没有设置密码,输入enable , 按回车键进入特权形式。需要协助能够随时键入“?”查看命令。 Welcome to DCR Multi-Protocol 2626 SeriesRouterena -进入特权形式Router#Jan 1 00:09:19 Unknown user enter privilege mode from console 0, level = 15Router#? -查看可用命令 cd - Change directory chinese - Help message in Chinese chmem - Change memory
6、of system chram - Change memory clear - Clear something config - Enter configurative mode connect - Open a outgoing connection copy - Copy configuration or image data debug - Debugging functions delete - Delete a file dir - List files in flash memory disconnect - Disconnect an existing outgoing netw
7、ork connection download - Download with ZMODEM enable - Turn on privileged commands english - Help message in English enter - Turn on privileged commands exec-script - Execute a script on a port or line exit - Exit / quit format - Format file system help - Description of the interactive help system
8、history - Look up history keepalive - Keepalive probe look - Display memory md - Create directory more - Display the contents of a file no - Negate configuration pad - Login to remote node using X.29 ping - Test network status pwd - Display current directory rd - Delete a directory reboot - Restart
9、router rename - Rename a file resume - Resume an active outgoing network connection rlogin - Open a rlogin connection show - Show configuration and status telnet - Open a telnet connection terminal - Set terminal line parameters traceroute - Trace route to destination upload - Upload with ZMODEM whe
10、re - Display all outgoing telnet connection write - Save current configurationRouter#Router#Chinese - 设置中文协助Router#? - 再次查看可用命令 cd - 改变当前目录 chinese - 中文协助信息 chmem - 修正系统内存数据 chram - 修正内存数据 clear - 去除 config - 进入配置态 connect - 打开一个向外的连接 copy - 拷贝配置方案或内存映像 debug - 分析功能 delete - 删除一个文件 dir - 显示闪存中的文件 di
11、sconnect - 断开活泼的网络连接 download - 通过ZMODEM协议下载文件 enable - 进入特权方式 english - 英文协助信息 enter - 进入特权方式 exec-script - 在指定端口运转指定的脚本 exit - 退回或退出 format - 格式化文件系统 help - 交互式协助系统描绘 history - 查看历史 keepalive - 保活探测 look - 显示内存数据 md - 创立目录 more - 显示某个文件的内容 no - 取消配置 pad - 通过X.29注册到远程节点 ping - 测试网络状态 pwd - 显示当前目录 r
12、d - 删除一个目录 reboot - 重启动路由器 rename - 改变文件名 resume - 恢复活泼的网络连接 rlogin - 远程登录 show - 显示配置和状态 telnet - 打开一个telnet连接 terminal - 设置终端参数 traceroute - 跟踪到目的地的路由 upload - 通过ZMODEM协议上载文件 where - 显示所有向外的telnet连接 write - 保存当前配置Router#2、通过telnet方式治理路由器第一步:设置路由器以太网接口地址并验证。Router#sh run正在搜集配置.当前配置:!version 1.3.3Cs
13、ervice timestamps log dateservice timestamps debug dateno service password-encryption!interface FastEthernet0/0 -查看TP0接口信息 no ip address no ip directed-broadcast!interface FastEthernet0/3 -More- Jan 1 00:16:41 Configured from console 0 by UNKNOWN no ip address no ip directed-broadcast!interface Seri
14、al0/1 no ip address no ip directed-broadcast!interface Serial0/2 no ip address no ip directed-broadcast!interface Async0/0 no ip address no ip directed-broadcast!ip set-wan-count 1!Router#config -进入全局配置形式Router_config#interface fastEthernet 0/0 -进入接口形式Router_config_f0/0#ip address 192.168.2.1 255.25
15、5.255.0 -设置IP地址Router_config_f0/0#no shutdown Router_config_f0/0#exitRouter_config#exitRouter#sh interface f0/0 -验证FastEthernet0/0 is up, line protocol is up -接口和协议都必须UPaddress is 00e0.0f9c.1e19 MTU 1500 bytes, BW 100000 kbit, DLY 10 usec Interface address is 192.168.2.1/24 Encapsulation ARPA, loopb
16、ack not set Keepalive not set ARP type: ARPA, ARP timeout 00:03:00 60 second input rate 0 bits/sec, 0 packets/sec! 60 second output rate 0 bits/sec, 0 packets/sec! Full-duplex, 100Mb/s, 100BaseTX, 11 ii, 1 oi 13 packets input, 1500 bytes, 200 rx_freebuf Received 0 unicasts, 0 lowmark, 11 ri, 0 input
17、 errors 0 overrun, 0 CRC, 0 framing, 0 busy, 0 long, 0 discard, 0 throttles 1 packets output, 46 bytes, 50 tx_freebd, 0 output errors 0 underrun, 0 collisions, 0 late collisions, 0 deferred, 0 reTx expired 0 resets, 0 lost carrier, 0 no carrier 0 grace stop 0 bus error0 output buffer failures, 0 out
18、put buffers swapped out 0 tx errors第二步:设置PC机的IP地址并测试连通性第三步:配置telnet的用户名和密码,以及enable密码Router_config#aaa authentication login default localRouter_config#aaa authentication enable default enableRouter_config#username admin password 0 adminRouter_config#enable password 0 admin第四步:在PC机telnet到路由器(1)运转 tel
19、net 192.168.2.1,出现如下结果: 七、保存配置Router_config#write 正在保存当前配置.OK!Router_config#八、考前须知1、 在超级终端中的配置是对路由器的操作,这时PC机只是输入输出设备。2、 在telnet治理时,先测试连通性。实验二:NAT 地址转换的配置一、实验目的1、 掌握地址转换配置2、 掌握私有地址访咨询internet的配置方法二、应用环境1、 学校内部使用私有地址的主机需要访咨询internet。三、实验设备1、 DCR-2626一台2、 PC机二台3、 CONSOLE线缆一条,网线二条四、实验拓扑PC2PC1TP0TP3网线网卡
20、五、实验要求 PC1模仿学校内部主机;PC2模仿外网网络设备。TP0 IP地址:192.168.2.1/24 PC1机IP地址:192.168.2.2/24TP3IP地址:222.159.80.1/24 PC2机IP地址:222.159.80.2/24配置效果:PC1能够PING通PC2六、实验步骤1、配置内网接口TP0 Router_config#interface fastEthernet 0/0 -进入连接内部局域网的接口内网口Router_config_f0/0#ip address 192.168.2.1 255.255.255.0 -定义内网口IP地址Router_config_f
21、0/0#ip nat inside -定义此端口为内网口Router_config_f0/0#exit2、配置外网接口TP3 Router_config#interface fastEthernet 0/3 -进入连接外部网络的接口外网口Router_config_f0/3#ip add 222.159.80.1 255.255.255.0 -定义外网口IP地址Router_config_f0/3#ip nat outside -定义此端口为外网口Router_config_f0/3#exit3、配置NAT访咨询操纵列表Router_config#ip access-list extended
22、 test -创立一个推断是否符合NAT处理的操纵列表Router_config_ext_nacl#permit ip 192.168.2.0 255.255.255.0 any-同意192.168.2.0/24网段能够访咨询出去Router_config_ext_nacl#exit4、配置地址翻译 Router_config#ip nat inside source list test interface fastEthernet 0/3-定义符合test的数据流的源地址在访咨询外网时翻译成外网口f0/3的IP地址。 5、配置静态路由 Router_config#ip route defau
23、lt 222.159.80.2 -设置一条默认路由同意内部网段能够访咨询出去。七、保存配置Router_config#write 正在保存当前配置.OK!Router_config#八、测试 C:Documents and Settingshuangweiping 222.159.80.2Pinging 222.159.80.2 with 32 bytes of data:Reply from 222.159.80.2: bytes=32 time1ms TTL=255Reply from 222.159.80.2: bytes=32 time1ms TTL=255Reply from 222
24、.159.80.2: bytes=32 time1ms TTL=255Reply from 222.159.80.2: bytes=32 time实验三:路由器其他常用配置一、实验目的1、 掌握路由器常用配置命令,提高日常维护的才能。三、实验设备1、 DCR-2626一台2、 PC机一台3、 CONSOLE线缆一条,网线二条四、实验拓扑PC2PC1TP0TP3网线网卡 六、实验步骤1、删除telnet用户和密码 删除telnet 用户和密码有三种方式:(1) Router_config#no username 123 (原用户名) -回车就能够删除原有用户名和密码(2) Router_conf
25、ig#no aaa authentication login default(3)假设无法通过Console监控路由器,则只能通过Console进入监控形式,通过more startup-config查找明文方式配置下的密码,假设非明文,只能保存有效配置,删除startup-config文件,重新配置。 测试:能够自行设置telnet的用户和密码,通过以上三种方法删除用户和密码。看是否有效果。2、enable密码删除重启路由器,按住ctrl+break 键,通过Console进入监控形式 Welcome to DCR Multi-Protocol 2626 Series Routermonit
26、or#?boot - reboot routercd - change directorychinese - help message in Chinesechram - change memorycopy - Copy file into the routerdate - set system datedelete - delete a filedir - list files in flash memorydownload - download with ZMODEMenglish - help message in Englishexit - exit / quitformat - fo
27、rmat file systemip - IP configuration commandsmd - create directorymore - Display the contents of a filenopasswd - remove enable passwordping - Test network statuspwd - display current directoryquit - exit / quitrd - delete a directoryreboot - restart routerrename - rename a fileshow - show configur
28、ation and statusupload - upload with ZMODEMmonitor#delete startup-config monitor#rebootDo you want to reboot the router(y/n)y通过Console进入监控形式,通过more startup-config查找明文方式配置下的密码,假设非明文,只能保存有效配置,删除startup-config文件,重新配置。测试:能够自行设置enable用户和密码,通过以上方法删除密码。看是否有效果。3、配置访咨询操纵表操纵网络病毒(1) 设置一条扩展访咨询操纵列表Router_config#
29、ip access-list extended attack-port(2)配置默认动作Router_config_ext_nacl# deny tcp any any eq 1433Router_config_ext_nacl# deny udp any any eq 1433Router_config_ext_nacl# deny tcp any any eq 1434Router_config_ext_nacl# deny udp any any eq 1434Router_config_ext_nacl# deny tcp any any eq 139Router_config_ext
30、_nacl# deny udp any any eq 139Router_config_ext_nacl# deny tcp any any eq 135Router_config_ext_nacl# deny udp any any eq 135Router_config_ext_nacl# deny tcp any any eq 136Router_config_ext_nacl# deny udp any any eq 136Router_config_ext_nacl# deny tcp any any eq 137Router_config_ext_nacl# deny udp an
31、y any eq 137Router_config_ext_nacl# deny tcp any any eq 138Router_config_ext_nacl# deny udp any any eq 138Router_config_ext_nacl# deny tcp any any eq 445Router_config_ext_nacl# deny udp any any eq 445Router_config_ext_nacl# deny tcp any any eq 4444Router_config_ext_nacl# deny tcp any any eq 5000Rout
32、er_config_ext_nacl# deny udp any any eq 5000Router_config_ext_nacl# permit ip any any(3)将accessl-list 绑定到特定端口的特定方向Router_config#interface f0/0Router_config_f0/0#ip access-group attack-port inRouter_config_f0/0#interface f0/3Router_config_f0/3#ip access-group attack-port inRouter_config_f0/3#exit4、撤销
33、命令要撤销某个已经键入的命令或者恢复某种默认值,通常是在进入命令的命令形式,直截了当在原命令前加上关键字no就能够。如:将以太接口Fastethernet0/0的配置全部去除,恢复至默认值。能够在全局形式做如下配置:Router_config#no interface fastethernet 0/05、恢复出厂设置命令形式:特权形式或者监控形式命令:delete例:Router#delete this file will be erased,are you sure?(y/n)yno such fileRouter#rebootDo you want to reboot the router
34、(y/n)?y确认后重新启动路由器,即恢复到出厂设置。6、查看版本信息命令形式:特权形式、全局配置形式、接口形式、路由形式命令:show Version例:Router#show version Digitalchina Internetwork Operating System Software2626 Series Software, Version 1.3.3C (MIDDLE), RELEASE SOFTWARECopyright 2006 by Digital China Networks(BeiJing) LimitedCompiled: 2006-11-01 17:33:15 by system, Image text-base: 0x6004ROM: System Bootstrap, Version 0.4.4Serial num:8IRTC8107209000024, ID num:501926System image file is DCR26V1.3.3C.binDCR-2626 (PowerPC) Processor65536K bytes of memory,8192K bytes of flashRouter uptime is 0:00:29:37, The