![[计算机硬件及网络]网络实验.doc_第1页](http://file.renrendoc.com/FileRoot1/2019-1/5/1477cfb5-c295-4e69-b3da-5fb9104fa793/1477cfb5-c295-4e69-b3da-5fb9104fa7931.gif)
![[计算机硬件及网络]网络实验.doc_第2页](http://file.renrendoc.com/FileRoot1/2019-1/5/1477cfb5-c295-4e69-b3da-5fb9104fa793/1477cfb5-c295-4e69-b3da-5fb9104fa7932.gif)
![[计算机硬件及网络]网络实验.doc_第3页](http://file.renrendoc.com/FileRoot1/2019-1/5/1477cfb5-c295-4e69-b3da-5fb9104fa793/1477cfb5-c295-4e69-b3da-5fb9104fa7933.gif)
![[计算机硬件及网络]网络实验.doc_第4页](http://file.renrendoc.com/FileRoot1/2019-1/5/1477cfb5-c295-4e69-b3da-5fb9104fa793/1477cfb5-c295-4e69-b3da-5fb9104fa7934.gif)
![[计算机硬件及网络]网络实验.doc_第5页](http://file.renrendoc.com/FileRoot1/2019-1/5/1477cfb5-c295-4e69-b3da-5fb9104fa793/1477cfb5-c295-4e69-b3da-5fb9104fa7935.gif)
已阅读5页,还剩16页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
网络技术 实验报告【实验编号】3 【实验名称】 VLAN配置-802.1Q(本交换机隔离)【实验内容】 一实验目的 掌握在交换机上进行VLAN 划分的基本方法,熟悉802.1Q 协议。 二实验环境 实验拓扑结构如图3.1 所示。 三实验要求 (1)在交换机上创建VLAN (2)交换机的VLAN 划分 (3)掌握实现交换机端口隔离的基本技术。 四实验原理 1.VLAN 的作用 虚拟局域网VLAN 逻辑上把网络资源和网络用户按照一定的原则进行划分, 把一个物理上的网络划分成多个小的逻辑网络。这些小的逻辑网络形成各自的广播域,也就是VLAN。如下图所示。几个部门都使用一个中心交换机,但是各个部门属于不同的VLAN,形成各自的广播域,广播报文不能跨越这些广播域传送。 2.VLAN 的帧格式 标准规定,在原有的标准以太网帧格式中,增加一个特殊的标志域-Tag 域, 用于标识数据帧所属的VLAN ID,其帧格式如下图所示。【实验步骤】1.设置PC1 和PC2 的地址为 和 PC1:C:ipconfig /ip PC2: C:ipconfig /ip 在未划分VLAN前两台PC可以 ping通。 从PC1测试PC2: C:ping Pinging with 32 bytes of data: Reply from : bytes=32 time=60ms TTL=241 Reply from : bytes=32 time=60ms TTL=241 Reply from : bytes=32 time=60ms TTL=241 Reply from : bytes=32 time=60ms TTL=241 Reply from : bytes=32 time=60ms TTL=241 从PC2测试PC1: C:ping Pinging with 32 bytes of data: Reply from : bytes=32 time=60ms TTL=241 Reply from : bytes=32 time=60ms TTL=241 Reply from : bytes=32 time=60ms TTL=241 Reply from : bytes=32 time=60ms TTL=241 Reply from : bytes=32 time=60ms TTL=241 2.创建VLAN。 配置交换机SW1; Switchenable Switch#vlan database !进入vlan模式 Switch(vlan)#vlan 10 !创建vlan 10 VLAN 10 added: Name:VLAN0010 Switch(vlan)#vlan 20 !创建vlan 20 VLAN 20 added: Name:VLAN0020 Switch(vlan)#exit APPLY completed. Exiting. Switch#show vlan !查看VLAN划分情况 VLAN Name Status Ports - - - - 1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4 Fa0/5, Fa0/6, Fa0/7, Fa0/8 Fa0/9, Fa0/10, Fa0/11, Fa0/12 10 VLAN0010 active 20 VLAN0020 active 3.将接口分配到VLAN。 Switch#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Switch(config)#interface fastethernet 0/1 !进入fastethernet 0/1的接口配置模式 Switch(config-if)#switchport access vlan 10 !将fastethernet 0/1端口加入vlan 10中 Switch(config-if)#exit Switch(config)#interface fastethernet 0/10 !进入fastethernet 0/10的接口配置 Switch(config-if)#switchport access vlan 20 !将fastethernet 0/10端口加入vlan 20中 Switch(config-if)#exit Switch(config)#exit Switch#show vlan !查看VLAN的端口划分情况 VLAN Name Status Ports - - - - 1 default active Fa0/2, Fa0/3, Fa0/4, Fa0/5 Fa0/6, Fa0/7, Fa0/8, Fa0/9 Fa0/11, Fa0/12 10 VLAN0010 active Fa0/1 20 VLAN0020 active Fa0/10 4.测试vlan隔离 将PC1和PC2互相ping,可发现通信阻断。 从PC1测试PC2: C:ping Pinging with 32 bytes of data: Request timed out. Request timed out. Request timed out. Request timed out. 从PC2测试PC1: C:ping Pinging with 32 bytes of data: Request timed out. Request timed out. Request timed out. Request timed out. Request timed out. 5.将一组接口分配到VLAN(F0/1和F0/10放入同一VLAN) Switch#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Switch(config)#interface range fastethernet 0/1 10 !进入接口组配置模式,配置F0/1至F0/10接口 Switch(config-if)#switchport access vlan 10 !将接口组加入vlan 10中 Switch(config-if)#exit Switch(config)#exit Switch#show vlan VLAN Name Status Ports - - - - 1 default active Fa0/11, Fa0/12 10 VLAN0010 active Fa0/1, Fa0/2, Fa0/3, Fa0/4 Fa0/5, Fa0/6, Fa0/7, Fa0/8 Fa0/9, Fa0/10 20 VLAN0020 active 此时 F0/1和 F0/10均属于VLAN 10,PC1和PC2之间可以通信,使用Ping可进行测试。 注意事项: (1) VLAN 1属于系统默认的VLAN,不可以被删除 (2) 删除某个VLAN,使用no命令。例如:switch(config)#no vlan 10 (3) 删除当前某个VLAN时,注意先将属于该VLAN的端口加入别的VLAN,再删除VLAN。【实验结果】实验三Number of Devices =3Number of Routers =0Number of Switches=1Number of PCs=2实验三1!Version 12.1service timestamps debug uptimeservice timestamps log uptimeno service password-encryption!hostname Switchip name-server !ip subnet-zero!spanning-tree extend system-id!interface FastEthernet0/1 switchport access vlan 10 bandwidth 100000!interface FastEthernet0/2 switchport access vlan 10 bandwidth 100000!interface FastEthernet0/3 switchport access vlan 10 bandwidth 100000!interface FastEthernet0/4 switchport access vlan 10 bandwidth 100000!interface FastEthernet0/5 switchport access vlan 10 bandwidth 100000!interface FastEthernet0/6 switchport access vlan 10 bandwidth 100000!interface FastEthernet0/7 switchport access vlan 10 bandwidth 100000!interface FastEthernet0/8 switchport access vlan 10 bandwidth 100000!interface FastEthernet0/9 switchport access vlan 10 bandwidth 100000!interface FastEthernet0/10 switchport access vlan 10 bandwidth 100000!interface FastEthernet0/11 bandwidth 100000!interface FastEthernet0/12 bandwidth 100000! vtp domain bigdomaininterface Vlan 1 no ip address no ip route-cache shutdownvlan 10 name VLAN0010vlan 20 name VLAN0020!ip classlessno ip http server!line con 0 transport input noneline aux 0line vty 0 15!no scheduler allocateend实验三2!Version 12.1service timestamps debug uptimeservice timestamps log uptimeno service password-encryption!hostname C:!ip subnet-zero!interface Ethernet0 ip address no ip directed-broadcast bandwidth 10000!ip classlessno ip http server!line con 0 transport input noneline aux 0line vty 0 4!no scheduler allocateendexit实验三3!Version 12.1service timestamps debug uptimeservice timestamps log uptimeno service password-encryption!hostname C:!ip subnet-zero!interface Ethernet0 ip address no ip directed-broadcast bandwidth 10000!ip classlessno ip http server!line con 0 transport input noneline aux 0line vty 0 4!no scheduler allocateendexit【思考题】(1) 请说出以太网的三种以太网标准。并指出他们分别支持的端口速度。答: 10Base5 使用粗同轴电缆,最大网段长度为500m,基带传输方法; 1Base5 使用双绞线电缆,最大网段长度为500m,传输速度为1Mbps; 10BaseF 使用光纤传输介质,传输速率为10Mbps;(2)请说出单工、半双工,全双工的区别。答:单工是指消息只能单方向传输的工作方式。例如遥控、遥测,就是单工通信方式,单工通信信道是单向信道,发送端和接收端的身份是固定的,发送端只能发送信息,不能接收信息;接收端只能接收信息,不能发送信息,数据信号仅从一端传送到另一端,即信息流是单方向的。半双工(Half Duplex)定义:信息在两点之间能够在两个方向上进行发送,但不能同时发送的工作方式。是指在通信过程的任意时刻,信息既可由A传到B,又能由B传A,但只能由一个方向上的传输。举个简单例子,一条窄窄的马路,同时只能有一辆车通过,当目前有两辆车对开,这种情况下就只能一辆先过,等到头儿后另一辆再开,这个例子就形象的说明了半双工的原理。早期的对讲机、以及早期集线器等设备都是基于半双工的产品。全双工(Full Duplex)是指在发送数据的同时也能够接收数据,两者同步进行,这好像我们平时打电话一样,说话的同时也能够听到对方的声音。目前的网卡一般都支持全双工。在全双工方式下,通信系统的每一端都设置了发送器和接收器,因此,能控制数据同时在两个方向上传送。全双工方式无需进行方向的切换,因此,没有切换操作所产生的时间延迟,这对那些不能有时间延误的交互式应用(例如远程监测和控制系统)十分有利。这种方式要求通讯双方均有发送器和接收器,同时,需要2根数据线传送数据信号。【实验编号】4【实验名称】 VLAN配置-802.1Q(跨交换机VLAN)【实验内容】 一实验目的 掌握跨交换机的VLAN 配置方法。 二实验环境 实验拓扑结构如图4.1 所示。两台交换机的f0/12 互联,其中一台交换机的f0/1 和f0/10 连接PC1 和PC2,另一台交换机的f0/1 接PC3。 三实验要求 (1)交换机VLAN 划分 (2)将端口划分到VLAN 中 (3)设置端口为Trunk 模式 (4)实现跨交换机间VLAN,使在同一VLAN 里的计算机系统能跨交换机进行相互通信,而在不同VLAN 里的计算机系统不能进行相互通信。 四实验原理 从交换机处理VLAN 数据帧的不同,我们可以将交换机的端口分为两类:一类是只能传送标准以太网帧的端口,被称为Access 端口;另一类是既可以传送有VLAN标签的数据帧,也可以传送标准以太网帧的端口,称为Trunk端口。 Access端口一般是指那些连接不支持VLAN技术的终端设备的端口,这些端口收到的数据帧都不包含VLAN标签,发送帧中也必须不包含VLAN标签。 Trunk端口一般是指那些连接支持VLAN技术的网络设备的端口。这些端口接收到的数据帧一般都包含VLAN标签,而向外发送数据帧时也常常需要添加VLAN标签。【实验步骤】1.配置交换机SwitchA。 (1)创建vlan: CLI session with the switch is open. To end the CLI session, enter Exit.Switch%LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down%LINK-3-UPDOWN: Interface FastEthernet0/2, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to down%LINK-3-UPDOWN: Interface FastEthernet0/3, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to down%LINK-3-UPDOWN: Interface FastEthernet0/4, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to down%LINK-3-UPDOWN: Interface FastEthernet0/5, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/5, changed state to down%LINK-3-UPDOWN: Interface FastEthernet0/6, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/6, changed state to down%LINK-3-UPDOWN: Interface FastEthernet0/7, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/7, changed state to down%LINK-3-UPDOWN: Interface FastEthernet0/8, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/8, changed state to down%LINK-3-UPDOWN: Interface FastEthernet0/9, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/9, changed state to down%LINK-3-UPDOWN: Interface FastEthernet0/10, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/10, changed state to down%LINK-3-UPDOWN: Interface FastEthernet0/11, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/11, changed state to down%LINK-3-UPDOWN: Interface FastEthernet0/12, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/12, changed state to down%LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up%LINK-3-UPDOWN: Interface FastEthernet0/10, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/10, changed state to up%LINK-3-UPDOWN: Interface FastEthernet0/12, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/12, changed state to upSwitchenableSwitch#vlan databaseSwitch(vlan)#vlan 10 name VLAN10VLAN 10 added: Name:VLAN10Switch(vlan)#vlan 20 name VLAN20VLAN 20 added: Name:VLAN20Switch(vlan)#exitAPPLY completed.Exiting.(2)将端口放入相应vlan:Switch#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#interface fastethernet 0/1Switch(config-if)#switchport access vlan 10Switch(config-if)#exitSwitch(config)#interface fastethernet 0/10Switch(config-if)#switchport access vlan 20Switch(config-if)#exit(3)配置trunk端口Switch(config)#interface fastethernet 0/12Switch(config-if)#switchport mode trunkSwitch(config-if)#exitSwitch(config)#exit(4)查看配置Switch#show vlanVLAN Name Status Ports- - - -1 default active Fa0/2, Fa0/3, Fa0/4, Fa0/5 Fa0/6, Fa0/7, Fa0/8, Fa0/9 Fa0/11, Fa0/1210 VLAN10 active Fa0/120 VLAN20 active Fa0/101002 fddi-default active1003 token-ring-default active1004 fddinet-default active1005 trnet-default activeVLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2- - - - - - - - - - -1 enet 100001 1500 - - - - - 0 010 enet 100010 1500 - - - - - 0 020 enet 100020 1500 - - - - - 0 01002 fddi 101002 1500 - - - - - 0 01003 tr 101003 1500 - - - - - 0 01004 fdnet 101004 1500 - - - ieee - 0 01005 trnet 101005 1500 - - - ibm - 0 0Switch#show running-config!Version 12.1service timestamps debug uptimeservice timestamps log uptimeno service password-encryption!hostname Switchip name-server !ip subnet-zero!spanning-tree extend system-id!2.配置交换机SwitchB (1)创建vlan: CLI session with the switch is open. To end the CLI session, enter Exit.%LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down%LINK-3-UPDOWN: Interface FastEthernet0/2, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to down%LINK-3-UPDOWN: Interface FastEthernet0/3, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to down%LINK-3-UPDOWN: Interface FastEthernet0/4, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to down%LINK-3-UPDOWN: Interface FastEthernet0/5, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/5, changed state to down%LINK-3-UPDOWN: Interface FastEthernet0/6, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/6, changed state to down%LINK-3-UPDOWN: Interface FastEthernet0/7, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/7, changed state to down%LINK-3-UPDOWN: Interface FastEthernet0/8, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/8, changed state to down%LINK-3-UPDOWN: Interface FastEthernet0/9, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/9, changed state to down%LINK-3-UPDOWN: Interface FastEthernet0/10, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/10, changed state to down%LINK-3-UPDOWN: Interface FastEthernet0/11, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/11, changed state to down%LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to upSwitchenableSwitch#vlan databaseSwitch(vlan)#vlan 10 name VLAN10VLAN 10 added: Name:VLAN10Switch(vlan)#exitAPPLY completed.Exiting.(2)将端口放入相应vlan:Switch#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#interface fastethernet 0/1Switch(config-if)#switchport access vlan 10Switch(config-if)#exit(3)配置trunk端口Switch(config)#interface fastethernet 0/12Switch(config-if)#switchport mode trunkSwitch(config-if)#exitSwitch(config)#exit(4)查看配置Switch#show vlanVLAN Name Status Ports- - - -1 default active Fa0/2, Fa0/3, Fa0/4, Fa0/5 Fa0/6, Fa0/7, Fa0/8, Fa0/9 Fa0/10, Fa0/11, Fa0/1210 VLAN10 active Fa0/11002 fddi-default active1003 token-ring-default active1004 fddinet-default active1005 trnet-default activeVLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2- - - - - - - - - - -1 enet 100001 1500 - - - - - 0 010 enet 100010 1500 - - - - - 0 01002 fddi 101002 1500 - - - - - 0 01003 tr 101003 1500 - - - - - 0 01004 fdnet 101004 1500 - - - ieee - 0 01005 trnet 101005 1500 - - - ibm - 0 0Switch#show running-config!Version 12.1service timestamps debug uptimeservice timestamps log uptimeno service password-encryption!hostname Switchip name-server !ip subnet-zero!spanning-tree extend system-id!3.配置pc 分别设置PC1 、PC2、PC3的IP地址为:、、,掩码为 PC1上:Boson BOSS 5.0Copyright 1998-2003 Boson Software, Inc.Use the command help to get startedPress Enter to beginC:ipconfig /ip PC2上: Boson BOSS 5.0Copyright 1998-2003 Boson Software, Inc.Use the command help to get startedPress Enter to beginC:ipconfig /ip 255.255 % Invalid input detected at marker.C:ipconfig /ip PC3上: Boson BOSS 5.0Copyright 1998-2003 Boson Software, Inc.Use the command help to get startedPress Enter to beginC:ipconfig /ip 4.测试 根据802.1Q协议,在同一个vlan中的机器可以通信,不同vlan中的机器不能通信,即PC1和PC3可以通信;PC1和PC2,PC3和PC2不可以通信。 PC1上: Boson BOSS 5.0Copyright 1998-2003 Boson Software, Inc.Use the command help to get startedPress Enter to beginC:ipconfig /ip C:ping Pinging with 32 bytes of data:Request timed out.Request timed out.Request timed out.Request timed out.Request timed out.Ping statistics for : Packets: Sent = 5, Received = 0, Lost = 5 (100% loss),Approximate round trip times in milli-seconds: Minimum = 0ms, Maximum = 0ms, Average = 0msC:ping Pinging with 32 bytes of data:Reply from : bytes=32 time=60ms TTL=241Reply from : bytes=32 time=60ms TTL=241Reply from : bytes=32 time=60ms TTL=241Reply from : bytes=32 time=60ms TTL=241Reply from : bytes=32 time=60ms TTL=241Ping statistics for : Packets: Sent = 5, Received = 5, Lost = 0 (0% loss),Approximate round trip times in
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 第22章 二次函数 单元测试(含答案)人教版(2024)数学九年级上 册
- 2025年中高端衡器合作协议书
- 校长招考试题及答案
- 2025年湖南省长沙市雅礼外国语学校中考数学模拟试卷(3月份)(含答案)
- 工程造价信息题库及答案
- 2025年心理与健康考试题及答案
- 2025年阜阳中考试卷及详细答案
- 2025年宁夏二建考试试题及答案
- 2025年分类考试笔试题目及答案
- 慢性伤口概述
- 游戏攻略短视频行业跨境出海战略研究报告
- 人教版小学四年级上册《信息科技》全套完整版课件
- 高考志愿规划创业
- 激光束传输与变换-第八讲
- 2025年昭通市直事业单位选调(47人)高频重点模拟试卷提升(共500题附带答案详解)
- Unit 1 Back to School Reading 说课稿-2024-2025学年高一英语译林版(2020)必修第一册
- 汽车租赁公司挂靠合同范本
- 福建省福州市2024-2025学年高三上学期8月第一次质量检测试题 英语 含答案
- 2024年中国高筋雪花粉市场调查研究报告
- 仓储物流安全培训课件
- 安徽省皖江名校2024-2025学年高一上学期12月联考英语试题(含答案无听力原文及音频)
评论
0/150
提交评论