网络课程设计
![网络课程设计](https://img.360docs.net/imgbf/05qtxhtp9mhxbthanzks-f1.webp)
![网络课程设计](https://img.360docs.net/imgbf/05qtxhtp9mhxbthanzks-72.webp)
福建农林大学计算机与信息学院
信息工程类
课程实习报告
课程名称:计算机网络
实习题目:企业网络构建方案设计
姓名:郑铭洪
系:计算机系
专业:计算机科学与技术
年级:08
学号:081150051
指导教师:周术诚
职称:副教授
2011年05月31 日
福建农林大学计算机与信息学院信息工程类课程实习报告结果评定
目录
1.实习的目的和任务 (1)
2.实习要求 (1)
3.实习地点 (1)
4.主要仪器设备(实验用的软硬件环境) (1)
5.实习内容 (2)
5.1首先构建企业网络的拓扑,可以用GNS3模拟实验环境,可以得到网络拓
扑如下所示: (2)
5.2步骤1:起路由协议 (3)
5.3步骤2:做重分布,使全网络能互通 (10)
5.4步骤3:实现路由隐蔽 (11)
5.5 步骤4:E区域配置 (12)
5.6步骤5:R7上新增用户的功能 (13)
5.7 步骤6:数据流的不同走向的设计 (15)
5.8步骤7:路由走向的实现 (16)
6.问题讨论与分析 (17)
7.结束语 (17)
企业网络构建方案设计
1.实习的目的和任务
当今社会,无论是大型企业还是中小型企业都需要有网络的支持才能进行正常日常办公。因此,正确的构建企业网络对于每一个企业来说都是至关重要的。运用igp的知识构建一个企业内部网络。
2.实习要求
构建一个中小型企业内部网络,使这个企业能够正常的处理日常事务。
3.实习地点
宿舍
4.主要仪器设备(实验用的软硬件环境)
PC机、GNS3模拟器、SecureCRT
5.实习内容
5.1首先构建企业网络的拓扑,可以用GNS3模拟实验环境,可以得到网络拓扑如下所示:
实验拓扑简介:此企业由于业务的需求,将内网分为三个区,其中区域1起eigrp协议,区域2起ospf协议,区域3起RIP协议。其中区域1是企业的主管区域,区域2是企业的事务部门,区域3是企业的财务部门。应企业的要求,我们需要解决以下几个问题:
(1)在路由器R2、R4上做双向重分布,R5把RIP重分布到EIGRP中,并且在重分布时EIGRP的metric值一致;关闭所有的自动汇总,OSPF
指明RID为LOOP0,即直接相连的用户,要求此时全网能够ping通,
即全网能够互通。
(2)在主机A1上有一个http server,IP地址为55.55.55.100/24,配置使得此server只对管理部门和事务部门开放,而对财务部门隐蔽;
(3) E区域新增加一些用户,网段为:11.11.1.0/24到11.11.3.0/24,
在R2上配置最小路由汇总使得3区域可以访问到E区域。
(4)此时在R7上增加一个用户(用环回口loop10模拟),IP地址为
10.10.10.1/24,配置R7,使得R6上的用户无法收到新增用户的路
由。
(5) A区上两个用户有数据流,要求A1到F区时走R4,并将报文优先级改为1,A2到G区走R6路由器。
(6)在R4路由器上配置,要求访问G区时走1区域-3区域的路线。
(7)注明,在每个路由器上起的环回口即用来模拟企业的用户。
5.2步骤1:起路由协议
在区域1,2,3上分别起eigrp、ospf和rip协议,使得每个区域内部能够想通。配置R1,如下
en
conf t
no ip domain-lookup
line con 0
logg syn
exec-timeout 0 0
exit
int loop0
ip add 1.1.1.1 255.255.255.0
no shut
exit
int e1/0
ip add 41.41.41.1 255.255.255.0
no shut
exit
int s0/0
ip add 12.12.12.1 255.255.255.0
no shut
exit
router ospf 50 //在R1上起ospf协议network 1.1.1.0 0.0.0.255 area 1 network 41.41.41.0 0.0.0.255 area 14 network 12.12.12.0 0.0.0.255 area 0
配置R2
en
conf t
no ip domain-lookup
line con 0
logg syn
exec-timeout 0 0
exit
int loop0
ip add 2.2.2.2 255.255.255.0
no shut
exit
int s0/0
ip add 12.12.12.2 255.255.255.0
no shut
exit
int s0/1
ip add 23.23.23.1 255.255.255.0
no shut
exit
router ospf 50
network 2.2.2.0 0.0.0.255 area 0 network 12.12.12.0 0.0.0.255 area 0
exit
router rip //在R2上起rip协议version 2 //规定rip版本号为2 no auto-summary
network 23.23.23.0
配置R3
en
conf t
no ip domain-lookup
line con 0
logg syn
exec-timeout 0 0
exit
int loop0
ip add 3.3.3.3 255.255.255.0
no shut
exit
int s0/0
ip add 23.23.23.2 255.255.255.0 no shut
exit
int e1/0
ip add 35.35.35.1 255.255.255.0 no shut
exit
router rip
version 2
network 3.3.3.0
network 23.23.23.0
network 35.35.35.0
no auto-summary
en
conf t
no ip domain-lookup
line con 0
logg syn
exec-timeout 0 0
exit
int loop0
ip add 4.4.4.4 255.255.255.0
no shut
exit
int e1/0
ip add 41.41.41.2 255.255.255.0
no shut
exit
int s0/0
ip add 47.47.47.1 255.255.255.0
no shut
exit
router ospf 50
network 41.41.41.0 0.0.0.255 area 14 exit
router eigrp 100
network 4.4.4.0 0.0.0.255
network 47.47.47.0 0.0.0.255
配置R5
en
conf t
no ip domain-lookup
logg syn
exec-timeout 0 0
exit
int loop0
ip add 5.5.5.5 255.255.255.0
no shut
exit
int e1/0
ip add 35.35.35.2 255.255.255.0 no shut
exit
int s0/0
ip add 57.57.57.1 255.255.255.0 no shut
exit
router rip
version 2
no auto-summary
network 35.35.35.0
exit
router eigrp 100
network 5.5.5.0 0.0.0.255 network 57.57.57.0 0.0.0.255
配置R6
en
conf t
no ip domain-lookup
line con 0
logg syn
exec-timeout 0 0
exit
int loop0
ip add 66.66.66.66 255.255.255.0 no shut
exit
int loop1
ip add 77.77.77.77 255.255.255.0 no shut
exit
int s0/0
ip add 67.67.67.1 255.255.255.0 no shut
exit
router eigrp 100
network 67.67.67.0 0.0.0.255 network 66.66.66.0 0.0.0.255 network 77.77.77.0 0.0.0.255
配置R7
en
conf t
no ip domain-lookup
line con 0
logg syn
exec-timeout 0 0
exit
int s0/0
ip add 67.67.67.2 255.255.255.0 no shut
exit
int s0/1
ip add 47.47.47.2 255.255.255.0
no shut
exit
int s0/2
ip add 57.57.57.2 255.255.255.0
no shut
exit
router eigrp 100
network 47.47.47.0 0.0.0.255
network 57.57.57.0 0.0.0.255
network 67.67.67.0 0.0.0.255
no auto-summary
到这里为止,只有各个协议之间才可以通,跨协议之间不能互通。
在路由器R4上show ip route,可得到以下效果:
其中D代表eigrp协议中的路由,C代表与路由器R4直连的路由,O IA代表ospf 内部区域的路由。
在R5上show ip route,可得到以下效果:
其中C代表与R5直连的路由,D代表eigrp协议中的路由,R代表RIP协议中的路由。
在R2上show ip route,可得到以下效果:
C代表与R2直连的路由,R代表RIP协议中的路由,O IA代表ospf内部协议的路由。
5.3步骤2:做重分布,使全网络能互通
在路由器R2、R4上做双向重分布,R5把RIP重分布到EIGRP中,并且在重分布时EIGRP的metric值一致;关闭所有的自动汇总,OSPF指明RID为LOOP0,即直接相连的用户,要求此时全网能够ping通,即全网能够互通。
在R2上配置:
router rip
redistribute ospf 50 metric 6 //将ospf重分发到rip中
exit
router ospf 50
redistribute rip subnets
在R5上配置:
router eigrp 100
redistribute rip metric 1000 100 255 1 1500 //重分发到eigrp时后面的五个数值
分别为带宽、延时、可靠性、负载、
与MDU
在R4上配置:
router eigrp 100
redistribute ospf 50 metric 1000 100 255 1 1500
exit
router ospf 50
redistribute eigrp 100 subnets
到这里,企业内部网络就能够全部互通了。
在R6上pingR3:
在R1上pingR3:
5.4步骤3:实现路由隐蔽
在主机A1上有一个http server,IP地址为55.55.55.100/24,配置使得此server 只对管理部门和事务部门开放,而对财务部门隐蔽。
在R2上配置:
access-list 1 deny 66.66.66.0 0.0.0.255 //用控制列表的方法来实现这一要求
access-list 1 permit any
router rip
distribute-list 1 out s0/1
在R3上使用命令clear ip route *清空路由表,此时用show ip route查看路由表:
由此可知,R3学不到66.66.66.66/24这一条路由,即R3上的用户不能访问到用户A1。
5.5 步骤4:E区域配置
E区域新增加一些用户,网段为:11.11.1.0/24到11.11.3.0/24,在R2上配置最小路由汇总使得3区域可以访问到E区域。
在R1上配置:
int loop1
ip add 11.11.1.1 255.255.255.0
no shut
exit
int loop2
ip add 11.11.2.1 255.255.255.0
exit
int loop3
ip add 11.11.3.1 255.255.255.0
no shut
exit
router ospf 50
network 11.11.1.1 0.0.0.0 area 1
network 11.11.2.1 0.0.0.0 area 1
network 11.11.3.1 0.0.0.0 area 1
在R2上配置:
int s0/1
ip summary-address rip 11.11.0.0 255.255.252.0
no shut
在R2上可以看到:
而在R3上只能看到一条有关11.11.0.0/22的路由:
5.6步骤5:R7上新增用户的功能
此时在R7上增加一个用户(用环回口loop10模拟),IP地址为10.10.10.1/24,配置R7,使得R6上的用户无法收到新增用户的路由。
在R7上配置:
int loop0
ip add 10.10.10.1 255.255.255.0
exit
router eigrp 100
network 10.10.10.0
no auto-summary
exit
ip prefix-list sf deny 10.10.10.0/24
ip prefix-list sf permit 0.0.0.0/0 le 32
router eigrp 100
distribute-list prefix sf out s0/0
在R6上show ip route可知R6没有学到有关10.10.10.0的路由,如下图所示:
在R5上show ip route可知R5有学到有关10.10.10.0的路由,如下图所示:
在R5上ping10.10.10.1是可以通的,如下图所示:
在R6上ping10.10.10.1是不通的,如下图所示:
5.7 步骤6:数据流的不同走向的设计
A区上两个用户有数据流,要求A1到F区时走R4,并将报文优先级改为1,A2到G区走R6路由器。
在R7上配置:
access-list 1 permit 66.66.66.0 0.0.0.255
access-list 2 permit 77.77.77.0 0.0.0.255
route-map sf permit 10
match ip address 1
set ip precedence 1
set interface s0/1
exit
route-map sf permit 20
match ip address 2
set interface s0/2
exit
route-map sf permit 30
exit
int s0/0
ip policy route-map sf
在R6上查询所走路径,如下图所示:
5.8步骤7:路由走向的实现
在R4路由器上配置,要求访问G区时走1区域-3区域的路线。在R4上配置:
router ospf 50
distance 180
在R4上查询所走路线,如下图所示:
6.问题讨论与分析
本次的实习采用了有关igp的知识来实现企业网络构建的实现,其中大量运用到了EIGRP、OSPF以及RIP协议的知识。在做的时候遇到一些问题,但经过查询资料,最终这些问题都一一解决。
问题举例:
(1)比如redistribute rip metric 1000 100 255 1 1500这条命令,他后面的五个数字分别是代表什么意思。经过查询资料后面五个数值分别为带宽、延时、可靠性、负载与MDU。
(2)比如清空路由表的命令clear ip route *能在eigrp和rip协议下使用,但是在ospf协议下却只能使用命令clear ip ospf process这条命令。这是因为ospf协议建立路由表是由LSA决定的。
(3)有时候会发现路由器的路由表中没有学到某条应该学到的路由,经过查询,原来是路由器的端口是up的,但是protocol确实down的。此时可以将这个端口先shutdown,然后再no shutdown就行了。
7.结束语
经过这一次的课程设计,让我懂得企业网络设计的重要性,并且我也更加深刻的了解了ospf、eigrp、rip协议的区别。
参考文献
【1】谢希仁,计算机网络(第5版),电子工业出版社,2007
【2】Diane Teare,Catherine Paquet,CCNP学习指南:组建可扩展的Cisco互联网络(BSCI),人民邮电出版社,2007