《计算机网络》实验指导书:相同VLAN的跨交换机通信.doc_第1页
《计算机网络》实验指导书:相同VLAN的跨交换机通信.doc_第2页
《计算机网络》实验指导书:相同VLAN的跨交换机通信.doc_第3页
《计算机网络》实验指导书:相同VLAN的跨交换机通信.doc_第4页
《计算机网络》实验指导书:相同VLAN的跨交换机通信.doc_第5页
已阅读5页,还剩1页未读 继续免费阅读

下载本文档

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

文档简介

海量资料 超值下载相同VLAN的跨交换机通信一、实验目的1.了解IEEE802.1q的实现方法,掌握跨二层交换机相同VLAN间通信的调试方法; 2.了解交换机接口的trunk模式和access模式; 二、实验描述某公司有两层楼,每个楼层都有一台交换机以满足上网需求,每层都有技术部、销售部,两个楼层技术部的计算机之间可以互相访问,销售部之间也可以互相访问,技术部和销售部之间不能自由访问,通过VLAN划分使技术部和销售部之间不能自由访问;使用802.1Q实现跨交换机的VLAN通信。三、实验拓扑四、所需设备1.S2960 2台2.PC 4台3.网线 5根五、实验步骤第1步:分别在SW1和SW2上划分两个VLAN,VLAN 2和VLAN 3,并添加端口。 SW1(config)#vlan 2SW1(config-vlan)#name salesSW1(config-vlan)#exitSW1(config)#int f0/1SW1(config-if)#switchport mode accessSW1(config-if)#switchport access vlan 2SW1(config-if)#exitSW1(config)#vlan 3SW1(config-vlan)#name techSW1(config-vlan)#exitSW1(config)#int f0/12SW1(config-if)#switchport mode accessSW1(config-if)#switchport access vlan 3SW1(config-if)#exit交换机SW2配置同SW1。第2步:设置交换机trunk端口。SW1(config)#int f0/24SW1(config-if)#switchport mode trunk将f0/24端口配置为trunk,通过打标记,实现VLAN的跨交换机通信SW1(config-if)#exit交换机SW2配置同SW1./若交换机为三层交换机/SW3560(config)#int f0/24/SW3560(config-if)# switchport trunk encapsulation dot1q/SW3560(config-if)#switchport mode trunk/SW3560(config-if)#exit第3步:配置PC1、PC2、PC3和PC4的IP地址PC1:192.168.2.2/24 PC2:192.168.3.2/24PC3:192.168.2.3/24 PC4: 192.168.3.3/24第4步:验证实验SW1 VLAN 2 中的PC1 ping SW2 VLAN 2 中的PC3:六、注意事项1.取消一个VLAN可以使用no vlan 2.在执行no vlan后注意观察vlan下的端口是否出现。七、参考配置SW1#sh runBuilding configuration.Current configuration : 1021 bytes!version 12.2no service password-encryption!hostname SW1!interface FastEthernet0/1 switchport access vlan 2 switchport mode access!interface FastEthernet0/2!interface FastEthernet0/3!interface FastEthernet0/4!interface FastEthernet0/5!interface FastEthernet0/6!interface FastEthernet0/7!interface FastEthernet0/8!interface FastEthernet0/9!interface FastEthernet0/10!interface FastEthernet0/11!interface FastEthernet0/12 switchport access vlan 3!interface FastEthernet0/13!interface FastEthernet0/14!interface FastEthernet0/15!interface FastEthernet0/16!interface FastEthernet0/17!interface FastEthernet0/18!interface FastEthernet0/19!interface FastEthernet0/20!interface FastEthernet0/21!interface FastEthernet0/22!interface FastEthernet0/23!interface FastEthernet0/24 switchport mode trunk!interface GigabitEthernet1/1!interface GigabitEthernet1/2!interface Vlan1 no ip address shutdown!line con 0!line vty 0 4 loginline vty 5 15 login!EndSW2#sh runBuilding configuration.Current configuration : 1045 bytes!version 12.2no service password-encryption!hostname SW2!interface FastEthernet0/1 switchport access vlan 2 switchport mode access!interface FastEthernet0/2!interface FastEthernet0/3!interface FastEthernet0/4!interface FastEthernet0/5!interface FastEthernet0/6!interface FastEthernet0/7!interface FastEthernet0/8!interface FastEthernet0/9!interface FastEthernet0/10!interface FastEthernet0/11!interface FastEthernet0/12 switchport access vlan 3 switchport mode access!interface FastEthernet0/13!interface FastEthernet0/14!interface FastEthernet0/15!interface FastEthernet0/16!interface FastEthernet0/17!interface FastEthernet0/18!interface FastEthernet0/19!interface FastEthernet0/20!interface FastEthernet0/21!interface FastEthernet0/22!interface FastEthernet0/23!interface FastEthernet0/24 switchport

温馨提示

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

评论

0/150

提交评论