大连理工大学
本科实验报告
课程名称: 网络综合实验 学院(系): 软件学院 专 业: 数字媒体
2011年 7月 16 日
实验项目列表
序号 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 总计
实验项目名称 学分: 学时 成 绩 预习 操作 结果 指导教师
大连理工大学实验报告
实验八:路由综合实验与故障诊断
一、实验目的
在路由器上配置静态路由,RIP协议,OSPF协议,实现路由协议之间的互相引入和网络的连通;通过防火墙来控制访问;学习故障诊断技术。
二、实验原理和内容
1、路由器的基本工作原理 2、配置路由器的方法和命令 3、防火墙的基本原理及配置
4、静态路由,RIP协议,OSPF协议的基本原理及配置
三、实验环境以及设备
4台路由器、4台Pc机、双绞线若干 四、实验步骤(操作方法及思考题)
{警告:路由器高速同异步串口(即S口)连接电缆时,无论插拔操作,必须在路由器电源关闭情况下进行;严禁在路由器开机状态下插拔同/异步串口电缆,否则容易引起设备及端口的损坏。}
1、请在用户视图下使用“reset saved-configuration”命令和“reboot”命令分别将4台路由器的配置清空,以免以前实验留下的配置对本实验产生影响。
2、在确保路由器电源关闭情况下,按图1组建实验环境。配置路由器各接口和PC机的IP地址,以及配置各PC机的缺省网关。
AR28202.0.3.1/24E1交叉线DE0192.0.2.2/24交叉线192.0.2.1/24E0202.0.3.2/24AR18192.0.0.1/24S0192.0.0.2/24S0AR18AR28AE0202.0.0.1/24交叉线BS1192.0.1.1/24CS0192.0.1.2/24E0202.0.1.1/24交叉线202.0.2.1/24E1交叉线202.0.2.2/24202.0.0.2/24202.0.1.2/24
图 1
3、请执行下列步骤使整个网络连通:
(1) 将路由器A, B, C, D分别命名为RA, RB, RC, RD,以免在以后操作时
发生混淆;(15分)
[RTA] interface serial 5/0
[RTA -serial5/0] ip address 192.0.0.1 255.255.255.0 [RTA-serial5/0] interface g0/0
[RTA -g0/0] ip address 202.0.0.1 255.255.255.0
[RTB] interface serial 5/0
[RTB -serial5/0] ip address 192.0.0.2 255.255.255.0 [RTB -serial5/0] interface g0/0
[RTB -g0/0] ip address 192.0.2.1 255.255.255.0 [RTB -g0/0] ] interface serial 6/0
[RTB -serial6/0] ip address 192.0.1.1 255.255.255.0
[RTC] interface serial 5/0
[RTC -serial5/0] ip address 192.0.1.2 255.255.255.0 [RTC -serial5/0] interface g0/0
[RTC -g0/0] ip address 202.0.1.1 255.255.255.0 [RTC -g0/0] ] interface g 0/1
[RTC –g0/1] ip address 202.0.2.1 255.255.255.0
[RTD] interface g0/0
[RTD -g0/0] ip address 192.0.2.2 255.255.255.0 [RTD -g0/0] ] interface g0/1
[RTD –g0/1] ip address 202.0.3.1 255.255.255.0
(2) 在RA与RB之间封装PPP,RB与RC之间封装Frame Relay;(20分)
[RTA-Serial5/0] link-protocol ppp
[RTA] local-user 123
[RTA-local-user-123] service-type ppp [RTA-local-user-123] password simple123 [RTA-Serial5/0] shutdown
[RTA-Serial5/0] undo shutdown
[RTB-Serial6/0]link-protocol fr
[RTB-Serial5/0] fr interface-type dte [RTB-Serial6/0] shutdown
[RTB-Serial6/0] undo shutdown
[RTC] fr switching
[RTC –Serial5/0] link-protocol fr [RTC –Serial5/0] fr interface-type dce [RTC –Serial5/0] fr dlci 16
(3) 在RA与RB之间运行路由协议RIP, RB与RC之间使用静态路由,
RB与RD之间运行路由协议OSPF;(15分) [RTA]rip
[RTA]network 0.0.0.0
[RTB]rip
[RTB]network 192.0.0.2
[RTB] ip route-static 202.0.2.0 255.255.255.0 192.0.1.2 [RTB] ip route-static 202.0.1.0 255.255.255.0 192.0.1.2 [RTB] ip route-static 0.0.0.0 0 192.0.1.2 [RTB] ospf
[RTB -ospf-1] area 0
[RTB -ospf-1-area-0.0.0.0] network 192.0.0.2 0.0.0.255 [RTB -ospf-1-area-0.0.0.0] network 192.0.2.1 0.0.0.255 [RTB -ospf-1-area-0.0.0.0] network 192.0.1.1 0.0.0.255 [RTC] ip route-static 0.0.0.0 0 192.0.1.1
[RTD] ospf
[RTD -ospf-1] area 0
[RTD -ospf-1-area-0.0.0.0] network 192.0.2.2 0.0.0.255 [RTD -ospf-1-area-0.0.0.0] area 1
[RTD -ospf-1-area-0.0.0.1] network 202.0.3.1 0.0.0.255
(4) 在RB上执行必要的路由引入。(20分)
[RTB-rip] import-route static [RTB-rip] import-route ospf [RTB-rip] import-route direct [RTB] ospf
[RTB-ospf] import-route rip [RTB-ospf] import-route direct
在上述步骤执行完毕后,整个网络应该连通,请测试之。请将为完成上述步骤在各路由器上执行的命令分别写到实验报告中。
4、在RA上完成如下防火墙配置,目的是仅允许202.0.0.2一台PC机通过接口Serail0访问其它PC机:
[RA] acl number 3000 match-order auto
[RA-acl-3000] rule permit ip source 202.0.0.2 0.0.0.0 destination any [RA-acl-3000] rule deny ip source any destination any [RA] firewall enable
[RA-Serial0] firewall packet-filter 3000 outbound
在完成上述配置后,等待大概1分钟,然后在PC机202.0.0.2上执行“ping 202.0.1.2”,发现不通,请用课堂上介绍的方法找出故障所在,并修复之,请将查找故障的方法和修复的方法写到实验报告中。(30分)(注:修复后需仍能保持仅允许202.0.0.2一台PC机通过接口Serail0访问其它PC机)。 方法一:改用nat
[RA]nat address-group 1 192.0.0.1 192.0.0.1 [RA] acl 2000 match-order auto
[RA-acl-basic-2000] rule permit ip source 202.0.0.2 0.0.0.0 [RA-Serial5/0] nat outbound 2000 address-group 1
方法二:添加一项
[RA - acl -3000]rule permit ip source 192.0.0.1 0 destination 255.255.255.255 0
查找故障提示:
(1) 在PC机202.0.0.2和PC机202.0.1.2上都启动Ethereal进行观察,将发现:
PC机202.0.0.2能够发出Echo Request消息,并且该消息能够被PC机202.0.1.2所收到;PC机202.0.1.2返回了Echo Reply消息,但却不能被PC机202.0.0.2所收到。 PC机202.0.0.2抓到的报文:
PC机202.0.1.2抓到的报文:
(2) 在RA和RB上分别用“display ip routing-table”命令来查看路由表,将发
现:在RA上有通往202.0.1.0/24的路由表项,但在RB上却没有通往202.0.0.0/24的路由表项。 RB的路由表项:
RA的路由表项:
(3) 在RA和RB上分别启动debugging功能,察看RIP Packets的接收情况,
它们是否都从对方接收到了RIP Packets? RA:
RB:
故障修复提示:
(1) 上述防火墙配置禁止了RA从Serial0发出RIP消息,造成RB收不到来
自RA的路由信息。因此,RB上到达目的网络202.0.0.0/24的路由表项将因为超时而被删除。
(2) RA从Serial0发出的RIP消息具有源IP地址192.0.0.1、目的IP地址
255.255.255.255。
做本实验时请注意:
(1) 关闭PC机上的防火墙。
(2) 同异步串口配置完成后,一定要执行“shutdown”和“undo shutdown”
命令,从而使之生效。
五、讨论、建议、质疑
因篇幅问题不能全部显示,请点此查看更多更全内容