下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、本次主要讲解三层交换实现vlan间的相互通信:本例配置模型图命令行:swA配置命令:Switch>enableSwitch#vlandatabase/进入vlan配置模式%Warning:ItisrecommendedtoconfigureVLANfromconfigmode,asVLANdatabasemodeisbeingdeprecated.PleaseconsultuserdocumentationforconfiguringVTP/VLANinconfigmode.Switch(vlan)#vlan2nameTztA/在swA上创建vlan2名为TztAVLAN2added:N
2、ame:TztASwitch(vlan)#vlan3nameTztB/在swA上创建vlan3名为TztBVLAN3added:Name:TztBSwitch(vlan)#exitAPPLYcompleted.Exiting.Switch#conftEnterconfigurationcommands,oneperline.EndwithCNTL/Z.Switch(config)#intf0/2Switch(config-if)#switchportmodeaccess/将f0/2划分给vlan2Switch(config-if)#switchportaccessvlan2Switch(con
3、fig-if)#exitSwitch(config)#intf0/3Switch(config-if)#switchportmodeaccessSwitch(config-if)#switchportaccessvlan3/将f0/3划分给vlan3Switch(config-if)#exitSwitch(config)#intf0/1Switch(config-if)#switchportmodetrunk/配置与三层设备连接的f0/1为trunk模式%LINEPROTO-5-UPDOWN:LineprotocolonInterfaceFastEthernet0/1,changedstate
4、todown%LINEPROTO-5-UPDOWN:LineprotocolonInterfaceFastEthernet0/1,changedstatetoupSwitch(config-if)#switchporttrunkallowedvlanall/允许所有vlan通过f0/1端口Switch(config-if)#exitSwitch(config)#exitSwitch#%SYS-5-CONFIG_I:ConfiguredfromconsolebyconsoleSwitch#wrBuildingconfiguration.OKSwitch#(三层交换机)Msw命令配置:Switch
5、>Switch>enableSwitch#vlandatabase/进入vlan配置模式%Warning:ItisrecommendedtoconfigureVLANfromconfigmode,asVLANdatabasemodeisbeingdeprecated.PleaseconsultuserdocumentationforconfiguringVTP/VLANinconfigmode.Switch(vlan)#vlan2nameTztA/在Msw上创建vlan2名为TztAVLAN2added:Name:TztASwitch(vlan)#vlan3nameTztB/在Ms
6、w上创建vlan2名为TztAVLAN3added:Name:TztBSwitch(vlan)#exitAPPLYcompleted.Exiting.Switch#conftEnterconfigurationcommands,oneperline.EndwithCNTL/Z.Switch(config)#intf0/1Switch(config-if)#switchportmodetrunk/配置三层设备与二层设备连接的f0/1为trunk模式Commandrejected:Aninterfacewhosetrunkencapsulationis"Auto"cannotb
7、econfiguredto"trunk"mode.Switch(config-if)#switchporttrunkallowedvlanall/允许所有vlan通过f0/1端口Switch(config-if)#noshutdown/激活端口Switch(config-if)#exitSwitch(config)#iprouting/使用三层设备的路由功能Switch(config)#intvlan2/进入vlan2配置模式虚拟端口%LINK-5-CHANGED:InterfaceVlan2,changedstatetoupSwitch(config-if)#%LINEP
8、ROTO-5-UPDOWN:LineprotocolonInterfaceVlan2,changedstatetoupSwitch(config-if)#ipaddress192.168.1.1255.255.255.0/配置vlan2的ip地址Switch(config-if)#noshutdown/激活端口Switch(config-if)#exitSwitch(config)#intvlan3/配置vlan3虚拟端口Switch(config-if)#%LINK-5-CHANGED:InterfaceVlan3,changedstatetoup%LINEPROTO-5-UPDOWN:Li
9、neprotocolonInterfaceVlan3,changedstatetoupSwitch(config-if)#ipaddress192.168.2.1255.255.255.0Switch(config-if)#noshutdownSwitch(config-if)#exitSwitch(config)#doshowiprouteCodes:C-connected,S-static,I-IGRP,R-RIP,M-mobile,B-BGPD-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinterareaN1-OSPFNSSAexternaltype1,N
10、2-OSPFNSSAexternaltype2E1-OSPFexternaltype1,E2-OSPFexternaltype2,E-EGPi-IS-IS,L1-IS-ISlevel-1,L2-IS-ISlevel-2,ia-IS-ISinterarea*-candidatedefault,U-per-userstaticroute,o-ODRP-periodicdownloadedstaticrouteGatewayoflastresortisnotset上述的配置成果C192.168.1.0/24isdirectlyconnected,Vlan2/C192.168.2.0/24isdirectlyconnected,Vlan3Switc
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 珠宝买卖合同
- 中标后签合同
- 水池施工合同
- 工程分供合同
- 含山租房合同
- 入职国企合同
- 土鸡销售合同
- 防伪标签合同
- 养殖场转让协议 合同
- 长电销售合同
- 2025年高校辅导员考试基础知识试题及答案
- 2025江苏苏州市高新区基层公共服务岗位招聘高校毕业生30人考试参考题库及答案解析
- 2025广东清远市纪委市监委纪律审查管理中心招聘17人考试参考题库及答案解析
- 紧固件包装培训知识总结
- DB51-T 3299-2025 数据资产登记规范
- 粘多糖贮积症课件
- 山西三晋卓越联盟2025-2026高三10月质量检测(26-X-028C)英语(B)
- 中考英语阅读理解专项训练试卷
- 保密知识培训课件
- DB31T 1605-2025电动自行车充换电柜建设和消防安全管理要求
- GB/T 24460-2025太阳能光伏照明装置总技术规范
评论
0/150
提交评论