Vlan 实验 配置手册_第1页
Vlan 实验 配置手册_第2页
Vlan 实验 配置手册_第3页
Vlan 实验 配置手册_第4页
Vlan 实验 配置手册_第5页
已阅读5页,还剩22页未读 继续免费阅读

下载本文档

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

文档简介

Vlan实验配置手册录1.1.Vlan基础配置 21.1.1.拓扑和需求 21.1.2.命令介绍 21.1.3.详细配置 21.1.4.调试 31.2.Trunk配置 51.2.1.拓扑和需求 51.2.2.关键命令介绍 51.2.3.SW1配置 51.2.4.sw2配置 61.2.5.sw3配置 61.2.6.调试 71.3.500人企业网配置 81.3.1.拓扑和需求 81.3.2.关键命令介绍 81.3.3.核心Sw1配置 91.3.4.汇聚Sw2配置 91.3.5.接入Sw4配置 101.3.6.管理vlan和telnet配置 101.4.Muxvlan配置 111.5.Supervlan配置 121.1.Vlan基础配置1.1.1.拓扑和需求需求:按照拓扑,将各接口配置为access接口并划入相应vlan。确保相同vlan的PC可以互访。不同vlan的PC互相隔离。1.1.2.命令介绍vlan配置命令:vlanbatch1020创建vlan1020interfaceGi0/0/1进入接口0/0/1portlink-typeaccess接口类型配置为accessportdefaultvlan10将接口划入vlan10调试命令:displayvlan查看vlan配置displayportvlan查看接口类型以及pvidport-groupgroup-membergi0/0/1togi0/0/2同时对多个接口进行配置1.1.3.详细配置vlanbatch1020interfaceGigabitEthernet0/0/1portlink-typeaccessportdefaultvlan10#interfaceGigabitEthernet0/0/2portlink-typeaccessportdefaultvlan10#interfaceGigabitEthernet0/0/3portlink-typeaccessportdefaultvlan20#interfaceGigabitEthernet0/0/4portlink-typeaccessportdefaultvlan201.1.4.调试[sw1]displayvlanThetotalnumberofvlansis:3--------------------------------------------------------------------------------U:Up;D:Down;TG:Tagged;UT:Untagged;MP:Vlan-mapping;ST:Vlan-stacking;#:ProtocolTransparent-vlan;*:Management-vlan;--------------------------------------------------------------------------------VIDTypePorts--------------------------------------------------------------------------------1commonUT:GE0/0/5(D)GE0/0/6(D)GE0/0/7(D)GE0/0/8(D)GE0/0/9(D)GE0(D)GE0/0/21(D)GE0/0/22(D)GE0/0/23(D)GE4(D)commonUTGEU)GE0/0/2(U)20commonUT:GE0/0/3(U)GE0/0/4(U)[sw1]displayportvlanPortLinkTypePVIDTrunkVLANList-------------------------------------------------------------------------------GigabitEthernetGigabitEthernet0/0/1access10-GigabitEthernet0/0/2access10-GigabitEthernet0/0/3access20-GigabitEthernet0/0/4access20-GigabitEthernet0/0/5hybrid1-GigabitEthernet0/0/6GigabitEthernet0/0/7PC:PC>ping192.168.10.2hybridhybrid11--Ping192.168.10.2:32databytes,PressCtrl_CtobreakFrom192.168.10.2:bytes=32seq=1ttl=128time=47msFrom192.168.10.2:bytes=32seq=2ttl=128time=47msFrom192.168.10.2:bytes=32seq=3ttl=128time=47msFrom192.168.10.2:bytes=32seq=4ttl=128time=47msFrom192.168.10.2:bytes=32seq=5ttl=128time=47ms---192.168.10.2pingstatistics---5packet(s)transmitted5packet(s)received0.00%packetlossround-tripmin/avg/max=47/47/47msPC>ping192.168.10.3Ping192.168.10.3:32databytes,PressCtrl_CtobreakFrom192.168.10.1:DestinationhostunreachableFrom192.168.10.1:DestinationhostunreachableFrom192.168.10.1:DestinationhostunreachableFrom192.168.10.1:DestinationhostunreachableFrom192.168.10.1:Destinationhostunreachable---192.168.10.3pingstatistics---5packet(s)transmitted0packet(s)received100.00%packetloss1.2.Trunk配置1.2.1.拓扑和需求需求:按照拓扑配置vlan和trunk,确保相同vlan的用户可以互访。不同vlan的用户互相隔离。1.2.2.关键命令介绍vlan配置命令:vlanbatch1020创建vlan1020interfaceGi0/0/1进入接口0/0/1portlink-typetrunkporttrunkallow-passvlanall允许所有的vlan通过(默认只允许vlan1通过)调试命令:displayvlan查看vlan配置displayportvlan查看接口类型以及pvidport-groupgroup-membergi0/0/1togi0/0/2同时对多个接口进行配置注意:sw2也需要配置相应vlan。Sw1:vlanbatch1020interfaceGigabitEthernet0/0/1portlink-typeaccessportdefaultvlan10#interfaceGigabitEthernet0/0/2portlink-typeaccessportdefaultvlan10#interfaceGigabitEthernet0/0/3portlink-typeaccessportdefaultvlan20#interfaceGigabitEthernet0/0/4portlink-typeaccessportdefaultvlan20interfaceGigabitEthernet0/0/5portlink-typetrunkporttrunkallow-passvlanallvlanbatch1020port-groupgroup-membergi0/0/1togi0/0/2Portlink-typetrunkPorttrunkallow-passvlanallVlanbatch1020interfaceGigabitEthernet0/0/1portlink-typetrunkporttrunkallow-passvlan2to4094#interfaceGigabitEthernet0/0/2portlink-typeaccessportdefaultvlan10#interfaceGigabitEthernet0/0/3portlink-typeaccessportdefaultvlan10#interfaceGigabitEthernet0/0/4portlink-typeaccessportdefaultvlan20#interfaceGigabitEthernet0/0/5portlink-typeaccessportdefaultvlan201.2.6.调试[sw2]disvlanThetotalnumberofvlansis:3--------------------------------------------------------------------------------U:Up;D:Down;TG:Tagged;UT:Untagged;MP:Vlan-mapping;ST:Vlan-stacking;#:ProtocolTransparent-vlan;*:Management-vlan;--------------------------------------------------------------------------------VIDTypePorts--------------------------------------------------------------------------------commonUTGE0/1(U)GE0/0/2(U)GE0/0/3(D)GE0/0/4(D)GE0/0/5(D)GE0/0/6(D)GE0/0/7(D)GE0/0/8(D)GE0/0/9(D)GE0(D)GE0/0/21(D)GE0/0/22(D)GE0/0/23(D)GE4(D)1010commonTG:GE0/0/1(U)GE0/0/2(U)commonTGGE1(U)GE0/0/2(U)[sw3]disportvlanPortLinkTypePVIDTrunkVLANList-------------------------------------------------------------------------------GigabitEthernet0/0/1trunk11-4094GigabitEthernet0/0/2access-GigabitEthernet0/0/3access-GigabitEthernet0/0/4access-GigabitEthernet0/0/5PC:access-PC>ping192.168.10.6Ping192.168.10.6:32databytes,PressCtrl_CtobreakFrom192.168.10.6:bytes=32seq=1ttl=128time=94msFrom192.168.10.6:bytes=32seq=2ttl=128time=94msFrom192.168.10.6:bytes=32seq=3ttl=128time=109msFrom192.168.10.6:bytes=32seq=4ttl=128time=125msFrom192.168.10.6:bytes=32seq=5ttl=128time=109msPC:PC>ping192.168.10.8Ping192.168.10.8:32databytes,PressCtrl_CtobreakFrom192.168.10.8:bytes=32seq=1ttl=128time=94msFrom192.168.10.8:bytes=32seq=2ttl=128time=94msFrom192.168.10.8:bytes=32seq=3ttl=128time=94msFrom192.168.10.8:bytes=32seq=4ttl=128time=94msFrom192.168.10.8:bytes=32seq=5ttl=128time=94ms1.3.500人企业网配置1.3.1.拓扑和需求需求:按照拓扑配置vlan、trunk以及vlan间路由,确保所有vlan用户可以互相访问。1.3.2.关键命令介绍interfaceVlanif10创建三层交换机虚拟接口vlanif10ipaddress192.168.10.254255.255.255.0给接口配置IP地址iproute-static192.168.20.0255.255.255.0192.168.200.1静态路由去往目标网段192.168.20.0/24将数据报文转发至下一跳192.168.200.11.3.3.核心Sw1配置vlanbatch10203040200//200是互联vlan,vlanif200对接路由R1interfaceVlanif10ipaddress192.168.10.254255.255.255.0#interfaceVlanif20ipaddress192.168.20.254255.255.255.0#interfaceVlanif30ipaddress192.168.30.254255.255.255.0#interfaceVlanif40ipaddress192.168.40.254255.255.255.0#interfaceVlanif200ipaddress192.168.200.1255.255.255.252interfaceGigabitEthernet0/0/1portlink-typetrunkporttrunkallow-passvlan2to4094#interfaceGigabitEthernet0/0/2portlink-typetrunkporttrunkallow-passvlan2to4094#interfaceGigabitEthernet0/0/3portlink-typeaccessportdefaultvlan200iproute-static0.0.0.00.0.0.0192.168.200.2//去往外网的缺省路由1.3.4.汇聚Sw2配置vlanbatch10203040interfaceGigabitEthernet0/0/1portlink-typetrunkporttrunkallow-passvlan2to4094#interfaceGigabitEthernet0/0/2portlink-typetrunkporttrunkallow-passvlan2to4094#interfaceGigabitEthernet0/0/3portlink-typetrunkporttrunkallow-passvlan2to4094注意:其他汇聚交换机配置类似,在此不再赘述!!1.3.5.接入Sw4配置vlanbatch10203040interfaceGigabitEthernet0/0/1portlink-typeaccessportdefaultvlan10#interfaceGigabitEthernet0/0/2portlink-typeaccessportdefaultvlan10#interfaceGigabitEthernet0/0/5portlink-typetrunkporttrunkallow-passvlan2to4094注意:其他接入交换机配置类似,在此不再赘述!!1.3.6.管理vlan和telnet配置规划:vlan255192.168.255.0/24作为管理vlan,192.168.255.0/24为管理地址段所有交换机开启telnet:user-interfacevty04setauthenticationpasswordcipher123//设置telnet密码为123核心sw1配置:Vlan255interfaceVlanif255ipaddress192.168.255.254255.255.255.0汇聚sw2配置:Vlan255interfaceVlanif255ipaddress192.168.255.2255.255.255.0iproute-static0.0.0.00192.168.255.254//针对管理流量的回包路由接入sw4配置:Vlan255interfaceVlanif255ipaddress192.168.255.4255.255.255.0iproute-static0.0.0.00192.168.255.254//针对管理流量的回包路由注意:其他交换机配置类似,此处略!!1.4.Muxvlan配置关键配置:vlan10mux-vlansubordinateseparate20subordinategroup3040 (只能设一个隔离型vlan)sw配置:vlanbatch2310vlan10mux-vlan将vlan10设置为主vlansubordinateseparate2将vlan2设置vlan隔离vlan(隔离型vlan)subordinategroup3将vlan3设置为群组vlan(互通型vlan)interfaceGigabitEthernet0/0/5interfaceGigabitEthernet0/0/5portlink-typeaccessportdefaultvlan10/接口5划到vlan10并开启muxvlanportmux-vlanenableinterfaceGigabitEthernet0/0/1portlink-typeaccessportdefaultvlan2/接口1划入vlan2并开启muxvlanportmux-vlanenable#interfaceGigabitEthernet0/0/2portlink-typeaccessportdefaultvlan2portmux-vlanenable#interfa

温馨提示

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

评论

0/150

提交评论