




免费预览已结束,剩余1页可下载查看
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
案例八 利用三层交换机实现不同vlan间通信【背景描述】某企业有两个主要部门:销售部和技术部,其中销售部的个人计算机系统分散连接在两台交换机上,他们之间需要相互进行通信,销售部和技术部也需要进行相互通信,现要在交换机上做适当配置来实现这一目标。【实现功能】 使在同一VLAN里的计算机系统能跨交换机进行通信,而在不同VLAN里的计算机系统也能进行相互通信。【使用设备】设备类型设备名称设备数量交换机switchB1路由器三层交换机SwitchA1双绞线4计算机pc3【实验拓扑】【实现步骤】步骤1.在交换机SwitchA上创建vlan 10 ,并将0/5端口划分到vlan 10 中.SwitchAenableSwitchA#configure terminalSwitchA(config)#vlan 10SwitchA(config-vlan)#name salesSwitchA(config-vlan)#exitSwitchA(config)#interface fastEthernet 0/5SwitchA(config-if)#switchport access vlan 10SwitchA(config-if)#exitSwitchA(config)#vlan 20SwitchA(config-vlan)#name technicalSwitchA(config-vlan)#exitSwitchA(config)#interface vlan 20SwitchA(config-if)#exitSwitchA(config)#interface fastEthernet 0/15SwitchA(config-if)#switchport access vlan 20SwitchA(config-if)#exit步骤2.把交换机SwichA和SwichB相连的端口定义为tag vlan模式SwitchA(config)#interface fastEthernet 0/24SwitchA(config-if)#switchport mode trunk!将F0/24端口定义为tag vlan模式验证测试:验证F0/24端口已被设为tag vlan模式SwitchA#show interfaces fastEthernet 0/24 switchportInterface Switchport Mode Access Native Protected VLAN lists- - - - - - -Fa0/24 Enabled Trunk 1 1 Disabled All步骤3.在交换机SwichB上创建vlan 10,并将0/5端口划分到vlan 10中.SwichB(config)#vlan 10SwichB(config-vlan)#name salseSwichB(config-vlan)#exitSwichB(config)#interface fastEthernet 0/5SwichB(config-if)#switchport access vlan 10步骤4.把交换机SwichB和SwichA相连的端口定义为tag vlan模式SwichB(config)#interface fastEthernet 0/24SwichB(config-if)#switchport mode trunk验证测试:验证F0/24端口已被设置为tag vlan模式SwichB#show interfaces fastEthernet 0/24 switchportInterface Switchport Mode Access Native Protected VLAN lists- - - - - - -Fa0/24 Enabled Trunk 1 1 Disabled All步骤5.验证PC1与PC3能相互通信,但PC2和PC3不能相互通信。C:Documents and SettingsAdministratorping 192.168.10.30 !在PC1的命令行方式下能ping通PC3Pinging 192.168.10.30 with 32 bytes of data:Reply from 192.168.10.30: bytes=32 time1ms TTL=128Reply from 192.168.10.30: bytes=32 time1ms TTL=128Reply from 192.168.10.30: bytes=32 time1ms TTL=128Reply from 192.168.10.30: bytes=32 timeping 192.168.10.30 !在PC2的命令行方式下验证不能ping通PC3Pinging 192.168.10.30 with 32 bytes of data:Request timed out.Request timed out.Request timed out.Request timed out.Ping statistics for 192.168.10.30: Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),步骤6.设置三层交换机VLAN间通信SwitchA(config)#interface vlan 10 !创建虚拟接口vlan 10SwitchA(config-if)#ip address 192.168.10.254 255.255.255.0 !配置虚拟接口vlan 10 的地址为192.168.10.254SwitchA(config-if)#no shutdown !开启端口2009-05-23 16:42:39 5-CONFIG:Configured from outbandSwitchA(config-if)#exit2009-05-23 16:42:42 5-CONFIG:Configured from outbandSwitchA(config)#interface vlan 20 !创建虚拟接口vlan 202009-05-23 16:42:46 5-CONFIG:Configured from outbandSwitchA(config-if)#ip address 192.168.20.254 255.255.255.0 !配置虚拟接口的地址为192.168.20.2542009-05-23 16:43:06 5-CONFIG:Configured from outbandSwitchA(config-if)#no shutdown !开启端口2009-05-23 16:43:09 5-CONFIG:Configured from outbandSwitchA(config-if)#exit2009-05-23 16:43:15 5-CONFIG:Configured from outband验证测试:查看S3550路由器的状态SwitchA#show ip interface !查看IP接口的状态Interface : VL10Description : Vlan 10OperStatus : upManagementStatus : EnabledPrimary Internet address: 192.168.10.254/24Broadcast address : 255.255.255.255PhysAddress : 00d0.f8b8.289cInterface : VL20Description : Vlan 20OperStatus : upManagementStatus : EnabledPrimary Internet address: 192.168.20.254/24Broadcast address : 255.255.255.255PhysAddress : 00d0.f8b8.289b步骤7.将PC1和PC3的网关设置为192.168.10.254,将PC2的默认网关设置成192.168.20.254测试结果:不同vlan间的主机可以相互ping通参考配置SwichA#show running-config !显示交换机SwichA的全部配置System software version : 2.41(4) Build Nov 23 2005 ReleaseBuilding configuration.Current configuration : 413 bytes!version 1.0!hostname SwichAvlan 1!vlan 10 name sales!vlan 20 name technical!interface FastEthernet 0/5 switchport access vlan 10!interface FastEthernet 0/15 switchport access vlan 20!interface FastEthernet 0/24 switchport mode trunk!interface Vlan 10 ip address 192.168.10.254 255.255.255.0!interface Vlan 20 ip address 192.168.20.254 255.255.255.0!endSwichB#show running-config !显示交换机SwichB的全部配置System software version : 1.61(2) Build Aug 31 2005 ReleaseBuilding configuration.Current configuration :
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025年度专利技术合作研发与成果转化合同范本
- 2025年度绿色建材采购质量保证合同
- 2025版植筋加固工程进度管理合同协议书下载
- 2025版企事业单位高管劳动合同范例
- 2025版国际航班接送班车服务合同范本
- 2025年新型材料研发项目合作协议范本
- 2025房地产广告创意设计及智能家居集成服务合同
- 2025二手公寓租赁合同(含家具家电及室内装饰)
- 2025房地产财务顾问服务与税务筹划合同
- 2025年度租赁合同下载打印适用住宅类房产
- 2025年初中学业水平考试生物试卷(附答案)
- 车辆运输安全培训
- 中小学教职工开学安全培训
- 长沙银行笔试题目及答案
- 业绩分红方案(3篇)
- 菜鸟驿站加盟合作协议书
- 2025成都中医药大学辅导员考试试题及答案
- 更年期保健专科建设和管理指南
- 社区消防改造合同范本10篇
- 《油田化学药剂》课件
- 赊销产品协议书范本
评论
0/150
提交评论