收藏 分销(赏)

路由器基本配置培训.docx

上传人:pc****0 文档编号:8518038 上传时间:2025-02-16 格式:DOCX 页数:19 大小:930.86KB 下载积分:10 金币
下载 相关 举报
路由器基本配置培训.docx_第1页
第1页 / 共19页
路由器基本配置培训.docx_第2页
第2页 / 共19页


点击查看更多>>
资源描述
南宁市教育城域网项目 路由器基本配置培训 神州数码网络有限公司 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 网卡 网线 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, Version 0.4.4 Serial num:8IRTC8107209000024, ID num:501926 Copyright 2006 by Digital China Networks(BeiJing) Limited DCR-2626 Series 2626 Loading DCR26V1.3.3C.bin...... Start Decompress DCR26V1.3.3C.bin ############################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################ Decompress 4850012 byte,Please wait system up.. Digitalchina Internetwork Operating System Software DCR-2626 Series Software , Version 1.3.3C, RELEASE SOFTWARE System start up OK Router console 0 is now available Press RETURN to get started Jan 1 00:00:07 Router System started -- Jan 1 00:00:16 Line on Interface Serial0/1, changed to down Jan 1 00:00:16 Line on Interface Serial0/2, changed to down 第四步:按回车键进入用户配置模式。DCR-2626路由器出厂时没有设置密 码,输入enable , 按回车键进入特权模式。需要帮助可以随时键入“?”查看命令。 Welcome to DCR Multi-Protocol 2626 Series Router>ena -----进入特权模式 Router#Jan 1 00:09:19 Unknown user enter privilege mode from console 0, level = 15 Router#? -----查看可用命令 cd -- Change directory chinese -- Help message in Chinese chmem -- Change memory 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 network 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 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 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 where -- Display all outgoing telnet connection write -- Save current configuration Router# 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# 2、通过telnet方式管理路由器 第一步:设置路由器以太网接口地址并验证。 Router#sh run 正在收集配置... 当前配置: ! !version 1.3.3C service timestamps log date service timestamps debug date no 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 Serial0/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 http set-wan-count 1 ! ! Router#config -----进入全局配置模式 Router_config#interface fastEthernet 0/0 ----进入接口模式 Router_config_f0/0#ip address 192.168.2.1 255.255.255.0 ----设置IP地址 Router_config_f0/0#no shutdown Router_config_f0/0#exit Router_config#exit Router#sh interface f0/0 ----验证 FastEthernet0/0 is up, line protocol is up ----接口和协议都必须UP address is 00e0.0f9c.1e19 MTU 1500 bytes, BW 100000 kbit, DLY 10 usec Interface address is 192.168.2.1/24 Encapsulation ARPA, loopback 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 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 error 0 output buffer failures, 0 output buffers swapped out 0 tx errors 第二步:设置PC机的IP地址并测试连通性 第三步:配置telnet的用户名和密码,以及enable密码 Router_config#aaa authentication login default local Router_config#aaa authentication enable default enable Router_config#username admin password 0 admin Router_config#enable password 0 admin 第四步:在PC机telnet到路由器 (1)运行 telnet 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线缆一条,网线二条 四、实验拓扑 PC2 PC1 TP0 TP3 网线 网卡 五、实验要求 PC1模拟学校内部主机;PC2模拟外网网络设备。 TP0 IP地址:192.168.2.1/24 PC1机IP地址:192.168.2.2/24 TP3IP地址: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_f0/0#ip nat inside ----定义此端口为内网口 Router_config_f0/0#exit 2、配置外网接口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#exit 3、配置NAT访问控制列表 Router_config#ip access-list extended 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#exit 4、配置地址翻译 Router_config#ip nat inside source list test interface fastEthernet 0/3 ---定义符合test的数据流的源地址在访问外网时翻译成外网口f0/3的IP地址。 5、配置静态路由 Router_config#ip route default 222.159.80.2 ---设置一条默认路由允许内部网段可以访问出去。 七、保存配置 Router_config#write 正在保存当前配置... OK! Router_config# 八、测试 C:\Documents and Settings\huangwei>ping 222.159.80.2 Pinging 222.159.80.2 with 32 bytes of data: Reply from 222.159.80.2: bytes=32 time<1ms TTL=255 Reply from 222.159.80.2: bytes=32 time<1ms TTL=255 Reply from 222.159.80.2: bytes=32 time<1ms TTL=255 Reply from 222.159.80.2: bytes=32 time<1ms TTL=255 Ping statistics for 222.159.80.2: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 0ms, Maximum = 0ms, Average = 0ms C:\Documents and Settings\huangwei> 实验三:路由器其他常用配置 一、实验目的 1、 掌握路由器常用配置命令,提高日常维护的能力。 三、实验设备 1、 DCR-2626一台 2、 PC机一台 3、 CONSOLE线缆一条,网线二条 四、实验拓扑 PC2 PC1 TP0 TP3 网线 网卡 六、实验步骤 1、删除telnet用户和密码 删除telnet 用户和密码有三种方式: (1) Router_config#no username 123 (原用户名) ------回车就可以删除原有用户名和密码 (2) Router_config#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 Router monitor#? boot -- reboot router cd -- change directory chinese -- help message in Chinese chram -- change memory copy -- Copy file into the router date -- set system date delete -- delete a file dir -- list files in flash memory download -- download with ZMODEM english -- help message in English exit -- exit / quit format -- format file system ip -- IP configuration commands md -- create directory more -- Display the contents of a file nopasswd -- remove enable password ping -- Test network status pwd -- display current directory quit -- exit / quit rd -- delete a directory reboot -- restart router rename -- rename a file show -- show configuration and status upload -- upload with ZMODEM monitor#delete startup-config monitor#reboot Do you want to reboot the router(y/n)y 通过Console进入监控模式,通过more startup-config查找明文方式配置下的密码,若非明文,只能保存有效配置,删除startup-config文件,重新配置。 测试:可以自行设置enable用户和密码,通过以上方法删除密码。看是否有效果。 3、配置访问控制表控制网络病毒 (1) 设置一条扩展访问控制列表 Router_config#ip access-list extended attack-port (2)配置默认动作 Router_config_ext_nacl# deny tcp any any eq 1433 Router_config_ext_nacl# deny udp any any eq 1433 Router_config_ext_nacl# deny tcp any any eq 1434 Router_config_ext_nacl# deny udp any any eq 1434 Router_config_ext_nacl# deny tcp any any eq 139 Router_config_ext_nacl# deny udp any any eq 139 Router_config_ext_nacl# deny tcp any any eq 135 Router_config_ext_nacl# deny udp any any eq 135 Router_config_ext_nacl# deny tcp any any eq 136 Router_config_ext_nacl# deny udp any any eq 136 Router_config_ext_nacl# deny tcp any any eq 137 Router_config_ext_nacl# deny udp any any eq 137 Router_config_ext_nacl# deny tcp any any eq 138 Router_config_ext_nacl# deny udp any any eq 138 Router_config_ext_nacl# deny tcp any any eq 445 Router_config_ext_nacl# deny udp any any eq 445 Router_config_ext_nacl# deny tcp any any eq 4444 Router_config_ext_nacl# deny tcp any any eq 5000 Router_config_ext_nacl# deny udp any any eq 5000 Router_config_ext_nacl# permit ip any any (3)将accessl-list 绑定到特定端口的特定方向 Router_config#interface f0/0 Router_config_f0/0#ip access-group attack-port in Router_config_f0/0#interface f0/3 Router_config_f0/3#ip access-group attack-port in Router_config_f0/3#exit 4、撤销命令 要撤销某个已经键入的命令或者恢复某种默认值,通常是在进入命令的命令模式,直接在原命令前加上关键字no就可以。 如:将以太接口Fastethernet0/0的配置全部清除,恢复至默认值。可以在全局模式做如下配置: Router_config#no interface fastethernet 0/0 5、恢复出厂设置 命令模式:特权模式或者监控模式 命令:delete 例:Router#delete this file will be erased,are you sure?(y/n)y no such file Router#reboot Do you want to reboot the router(y/n)?y 确认后重新启动路由器,即恢复到出厂设置。 6、查看版本信息 命令模式:特权模式、全局配置模式、接口模式、路由模式 命令:show Version 例:Router#show version Digitalchina Internetwork Operating System Software 2626 Series Software, Version 1.3.3C (MIDDLE), RELEASE SOFTWARE Copyright 2006 by Digital China Networks(BeiJing) Limited Compiled: 2006-11-01 17:33:15 by system, Image text-base: 0x6004 ROM: System Bootstrap, Version 0.4.4 Serial num:8IRTC8107209000024, ID num:501926 System image file is "DCR26V1.3.3C.bin" DCR-2626 (PowerPC) Processor 65536K bytes of memory,8192K bytes of flash Router uptime is 0:00:29:37, The curr
展开阅读全文

开通  VIP会员、SVIP会员  优惠大
下载10份以上建议开通VIP会员
下载20份以上建议开通SVIP会员


开通VIP      成为共赢上传

当前位置:首页 > 应用文书 > 其他

移动网页_全站_页脚广告1

关于我们      便捷服务       自信AI       AI导航        抽奖活动

©2010-2025 宁波自信网络信息技术有限公司  版权所有

客服电话:0574-28810668  投诉电话:18658249818

gongan.png浙公网安备33021202000488号   

icp.png浙ICP备2021020529号-1  |  浙B2-20240490  

关注我们 :微信公众号    抖音    微博    LOFTER 

客服