思科设备三层交换机的vlan间通信配置_第1页
思科设备三层交换机的vlan间通信配置_第2页
思科设备三层交换机的vlan间通信配置_第3页
思科设备三层交换机的vlan间通信配置_第4页
全文预览已结束

下载本文档

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

文档简介

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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论