计算机网络课程设计子网划分_第1页
计算机网络课程设计子网划分_第2页
计算机网络课程设计子网划分_第3页
计算机网络课程设计子网划分_第4页
计算机网络课程设计子网划分_第5页
已阅读5页,还剩3页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

课 程 设 计报告 学年学期 课程名称 计算机网络课程设计 院 系 计算机系专 业 姓 名 学 号 指导教师 二一四 年 六 月 五 日子网规划与实现1 局域网划分子网的背景随着网络的发展,局域网的普遍使用,使得在局域网中子网划分也是最基本要求。在划分子网基于vlan的来划分。本篇就要为大家介绍交换机的一个最常见技术应用子网划分技术,并针对某一类公司子网划分配置以实例的方式向大家简单介绍其配置方法,以及利用路由器来访问控制从而达到最初级的安全策略。2 需求分析在一个网络上,通信量和主机的数量成比例,而且和每个主机产生的通信量的和成比例。随着网络的规模越来越大,这种通信量可能达到这样的一种地步,即超出了介质的能力,而且网络性能开始下降。在一个广域网中,减少广域网上不必要的通信量也是一个主要的话题。在研究这样的问题的过程中会发现,一组主机倾向于互相通信,而且和这个组外的通信非常少。这些分组可以按照一般的网络资源的用途来说明,或者按照几何距离来划分,它使局域网之间的低速广域网连接成为必要。通过使用子网,我们可以将网络分段,因而隔离各个组之间的通信量。为在这些网段之间通信,必须提供一种方法以从一个段向另一个段传递通信量。由于公司从ISP所获得的是一个地址块,为了更好的通信以及便于更好的管理,因此将本企业或者公司的一个局域网划分成一个个子网,将各个子网分配到不同的部门,这样便于各个从而达到管理网络高效的结果。设一个公司具有3个部门,生产部门、管理部门、销售部门,其中生产部门有主机220台,管理部门共有 128台主机,销售部门共有150主机。组网需要各个部门之间能够通信且相互独立,能够对外提供web服务,但是外网只能允许访问该公司的服务器,而不能访问各个部门的主机。并且以后能够网络升级3 逻辑设计由需求分析可知,该网络的要求比较简单,由于存在三个部门,三个部门相互独立,该公司需要对外提供web服务,因此该公司需要划分三个子网与一个DMZ区域,分别是生产部子网、管理部子网、销售部子网,而服务器放在DMZ区域,具体如下:生产部:子网为:192.168.2.0/24 网关为:192.168.2.1,子网内有192.168.2.2与192.168.2.3两个iP地址为代表。管理部:子网为:192.168.3.0/24 网关为:192.168.3.1,子网内有192.168.3.2与192.168.3.3两个iP地址为代表。销售部:子网为:192.168.4.0/24 网关为:192.168.4.1,子网内有192.168.4.2与192.168.4.3两个iP地址为代表。DMZ:子网为:192.168.254.0/24 网关为:192.168.254.1,子网内有ip 地址为192.168.254.2的主机提供web服务为代表。由于只有web服务提供,外网不能访问给公司的内网,因此需要在路由器添加访问控制列表,用来对源地址进行过滤,由于需要对源地址以及目的地址进行控制,因此需要用扩展的ACL。4 物理设计4.1 拓扑图是4.2 核心交换机的命令SwitchenSwitch#conf tEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#vlan 10Switch(config-vlan)#name vlan10Switch(config-vlan)#vlan 20Switch(config-vlan)#name vlan20Switch(config-vlan)#vlan 30Switch(config-vlan)#name vlan30Switch(config-vlan)#exitSwitch(config)#int f0/1Switch(config-if)#no swSwitch(config-if)#no switchport Switch(config-if)#ip add 192.168.6.2 255.255.255.0Switch(config)#int f0/2Switch(config-if)#swSwitch(config-if)#switchport mode trunkCommand rejected: An interface whose trunk encapsulation is Auto can not be configured to trunk mode.Switch(config-if)#switchport trunk allowed vlan allSwitch(config-if)#sSwitch(config-if)#swiSwitch(config-if)#switchport trunk enSwitch(config-if)#switchport trunk encapsulation dotSwitch(config-if)#switchport trunk encapsulation dot1q Switch(config-if)#int f0/3Switch(config-if)#switchport mode trunkCommand rejected: An interface whose trunk encapsulation is Auto can not be configured to trunk mode.Switch(config-if)#switchport trunk allowed vlan allSwitch(config-if)#switchport trunk encapsulation dot1q Switch(config-if)#int f0/4Switch(config-if)#switchport mode trunkCommand rejected: An interface whose trunk encapsulation is Auto can not be configured to trunk mode.Switch(config-if)#switchport trunk allowed vlan allSwitch(config-if)#switchport trunk encapsulation dot1q Switch(config-if)#exitSwitch(config)#int vlan10Switch(config-if)#ip add 192.168.2.1 255.255.255.0Switch(config-if)#int vlan20Switch(config-if)#ip add 192.168.3.1 255.255.255.0Switch(config-if)#int vlan30Switch(config-if)#ip add 192.168.4.1 255.255.255.0Switch(config-if)#exitSwitch(config)#ip route 0.0.0.0 0.0.0.0 192.168.6.1Switch(config)#ip rouSwitch(config)#ip routSwitch(config)#ip routingSwitch(config)#endSwitch#%SYS-5-CONFIG_I: Configured from console by consoleSwitch#wrBuilding configuration.OKSwitch#4.3 生产部门交换机的配置命令SwitchenSwitch#conf tEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#vlan 10Switch(config-vlan)#name vlan10Switch(config-vlan)#exitSwitch(config)#int f0/1Switch(config-if)#swiSwitch(config-if)#switchport accSwitch(config-if)#switchport access vlan 10Switch(config-if)#int f0/2Switch(config-if)#switchport access vlan 10Switch(config-if)#int f0/3Switch(config-if)#switchport access vlan 10Switch(config-if)#exitSwitch(config)#endSwitch#%SYS-5-CONFIG_I: Configured from console by consoleSwitch#wrBuilding configuration.OKSwitch#4.4 门交换机配置命令SwitchenSwitch#conf tEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#vlan 20Switch(config-vlan)#name vlan20Switch(config-vlan)#exitSwitch(config)#int f0/1Switch(config-if)#swiSwitch(config-if)#switchport accSwitch(config-if)#switchport access vlan 20Switch(config-if)#int f0/2Switch(config-if)#switchport access vlan 20Switch(config-if)#int f0/3Switch(config-if)#switchport access vlan 20Switch(config-if)#exitSwitch(config)#endSwitch#%SYS-5-CONFIG_I: Configured from console by consolewrBuilding configuration.OKSwitch#4.5 门交换机配置命令SwitchenSwitch#conf tEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#vlan 30Switch(config-vlan)#name vlan30Switch(config-vlan)#exitSwitch(config)#int f0/1Switch(config-if)#swiSwitch(config-if)#switchport accSwitch(config-if)#switchport access vlan 30Switch(config-if)#int f0/2Switch(config-if)#switchport access vlan 30Switch(config-if)#int f0/3Switch(config-if)#switchport access vlan 30Switch(config-if)#exitSwitch(config)#endSwitch#%SYS-5-CONFIG_I: Configured from console by consolewrBuilding configuration.OKSwitch#4.6的路由的配置命令RouterenRouter#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#int f0/0Router(config-if)#ip add 192.168.6.1 255.255.255.0Router(config-if)#int f0/1Router(config-if)#ip add 192.168.254.1 255.255.255.0Router(config-if)#int s0/1/0Router(config-if)#ip add % Incomplete command.Router(config-if)#ip add 172.16.1.1 255.255.255.0Router(config-if)#clRouter(config-if)#clock rate 64000Router(config-if)#no shut%LINK-5-CHANGED: Interface Serial0/1/0, changed state to downRouter(config-if)#int f0/1Router(config-if)#no shutRouter(config-if)#%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to upRouter(config-if)#int f0/0Router(config-if)#no shutRouter(config-if)#%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to upRouter(config-if)#int s0/1/0Router(config-if)#no shutRouter(config-if)#exitRouter(config)#ip route 192.168.0.0 255.255.0 192.168.6.2 % Invalid input detected at marker.Router(config)#ip route 192.168.0.0 255.255.0.0 192.168.6.2Router(config)#ip route 192.168.254.2 255.255.255.255 192.168.254.255Router(config)#ip route 192.168.5.0 255.255.0.0 172.16.1.2Router(config)#endRouter#%SYS-5-CONFIG_I: Configured from console by consolewrBuilding configuration.OKRouter#4.7 安全性的约束其命令是:SwitchenSwitch#cong t % Invalid input detected at marker.Switch#conf tEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#accSwitch(config)#access-list 101 permit icmp any host 192.168.254.2 eq 80Switch(config)#int f0/1Switch(config-if)#ip accSwitch(config-if)#ip access-group 101 inSwitch(config-if)#exitSwitch(config)#endSwitch#%SYS-5-CONFIG_I: Configured from console by consolewrBuilding configuration.OK5 测试结果如下5.1 外网测试Ping 内网服务器时PCping 192.168.254.2Pinging 192.168.254.2 with 32 bytes of data:Reply from 192.168.254.2: bytes=32 time=10ms TTL=126Reply from 192.168.254.2: bytes=32 time=1ms TTL=126Reply from 192.168.254.2: bytes=32 time=1ms TTL=126Reply from 192.168.254.2: bytes=32 time=2ms TTL=126Ping statistics for 192.168.254.2: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),Approximate round trip times in milli-seconds: Minimum = 1ms, Maximum = 10ms, Average = 3msPing内网的主机结果PCping 192.168.2.2Pinging 192.168.2.2 with 32 bytes of data:Reply from 192.168.6.2: Destination host unreachable.Reply from 192.168.6.2: Destination host unreachable.Reply from 192.168.6.2: Destination host unreachable.Reply from 192.168.6.2: Destination host unreachable.Ping statistics for 192.168.2.2: Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),5.2 内网测试内部主机ping服务器的内容是:PCping 192.168.254.2Pinging 192.168.254.2 with 32

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论