实验报告二
- 格式:doc
- 大小:72.00 KB
- 文档页数:6
南京晓庄学院《计算机网络》实验报告
班级:13软工转本1
学号:13131113
姓名:吕蒙
实验二路由器的基本配置
一、实验目的
(1)了解路由器的基本知识
(2)掌握路由器的基本配置方法
二、实验工具
Packet Tracker 6.0.1或6.1.1
三、实验过程
1.密码设置与恢复
密码设置:
设置特权模式密码:
Router(config)#enable secret cisco
设置console线连接密码:
Router(config)#line console 0
Router(config-line)#password cisco
Router(config-line)#login
设置虚拟终端连接密码:
Router(config)#line vty 0 15
Router(config-line)#password cisco
Router(config-line)#login
保存配置:
Router#copy running-config startup-config
恢复密码:
使开机跳过加载配置文件:
开机按ctrl+break/ctrl+c进入monitor模式
rommon 2 > confreg 0x2142
rommon 3 > reset
设置新密码,将起始位置改回来:
Router(config)#enable secret cisco2
Router(config)#config-register 0x2102
Router#copy running-config startup-config
2.IOS备份与恢复
1.设置端口的ip:
Router(config)#int f0/0
Router(config-if)#ip address 192.168.0.1 255.255.255.0
Router(config-if)#no shutdown
Router(config)#int f0/1
Router(config-if)#ip address 192.168.1.1 255.255.255.0
Router(config-if)#no shutdown
2.查看路由器镜像文件名:
Router#show flash:
c1841-advipservicesk9-mz.124-15.T1.bin
3.上传镜像到tftp服务器:
Router#copy flash: tftp
Source filename []? c1841-advipservicesk9-mz.124-15.T1.bin Address or name of remote host []? 192.168.0.254
4. 上传配置文件到tftp服务器
Router#copy running-config tftp
name of remote host []? 192.168.0.254
Destination filename [Router-confg]?
5.搞破坏删除系统
Router#delete flash:
Delete filename []?c1841-advipservicesk9-mz.124-15.T1.bin Delete flash:/c1841-advipservicesk9-mz.124-15.T1.bin? [confirm] 6.重启自动进入rommon模式:
Router#reload
Proceed with reload? [confirm]
7.看看下载镜像要设置哪些参数
rommon 2 > tftpdnld
8.从tftp服务器下载镜像文件
rommon 3 > IP_ADDRESS 192.168.0.1
monitor: command "IP_ADDRESS 192.168.0.1" not found rommon 4 > IP_ADDRESS=192.168.0.1
rommon 5 > IP_SUBNET_MASK=255.255.255.0
rommon 6 > DEFAULT_GATEWAY=192.168.0.254
rommon 7 > TFTP_SERVER=192.168.0.254
rommon 8 > TFTP_FILE=c1841-advipservicesk9-mz.124-15.T1.bin rommon 9 > tftpdnld
9.从rommon模式重启
rommon 8 > reset
3.路由器连接
静态路由:
1)路由器0:
设置端口ip:
Router(config)#int f0/1
Router(config-if)#ip address 192.168.0.1 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#int s0/0/0
Router(config-if)#ip address 172.16.0.1 255.255.255.0
Router(config-if)#no shutdown
设置时钟频率:
Router(config-if)#clock rate 64000
Router(config-if)#exit
设置静态路由:
Router(config)#ip route 10.0.0.0 255.255.255.0 172.16.0.2
2)路由器0:
设置端口ip:
Router(config)#int f0/1
Router(config-if)#ip address 10.0.0.1 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#int s0/0/0
Router(config-if)#ip address 172.16.0.2 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#exit
设置静态路由:
Router(config)#ip route 192.168.0.0 255.255.255.0 172.16.0.1
默认路由:
1) 路由器0:
取消静态路由:
Router(config)#no ip route 10.0.0.0 255.255.255.0 172.16.0.2
设置默认路由:
Router(config)#ip route 0.0.0.0 0.0.0.0 172.16.0.2
2) 路由器1:
取消静态路由:
Router(config)#no ip route 192.168.0.0 255.255.255.0 172.16.0.1 设置默认路由:
Router(config)#ip route 0.0.0.0 0.0.0.0 172.16.0.1
四、实验心得
(1)实验结果,截图;
(2)错误与改正;
tftp连接f0/1接口,下载不了镜像,连接f0/0后可以正常。
路由器网关没有配置。
(3)心得体会。
1.虽然删除系统,但是配置文件还在,所以恢复后不会丢失。
2.路由器恢复镜像设置IP的时候,会设置最小的端口,所以tftp要连接f0/0端口才好恢复。
3.端口配置完后不要忘记no shutdown。
4.要经常保存配置文档和备份,以防丢失。
5.在网络末端使用默认路由很方便。