实验报告大全含18个实验4配置vlan及vlan间路由_第1页
实验报告大全含18个实验4配置vlan及vlan间路由_第2页
实验报告大全含18个实验4配置vlan及vlan间路由_第3页
实验报告大全含18个实验4配置vlan及vlan间路由_第4页
实验报告大全含18个实验4配置vlan及vlan间路由_第5页
已阅读5页,还剩3页未读 继续免费阅读

下载本文档

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

文档简介

1、配置vlan实验目录一.配置vlan、trunk1.配置H3C1的vlan,及vlan查看命令! H3C1display vlan H3C1display vlan all H3C1display port trunk H3C1display interface e0/4/3 2.配置H3C2的vlan3,解决默认只允许vlan1通过trunk链路H3C1-Ethernet0/4/3port trunk permit vlan all4. gvrp相当与Cisco的VTP服务二.vlan间路由1.三层交换trunk和hybrid2.单臂路由一.配置vlan、trunk1.配置H3C1H3C1i

2、nt vlan 1 /为vlan1配置ip地址H3C1H3C1-Vlan-interface1un shutH3C1vlan 2 /创建vlan2H3C1-vlan2q H3C1int vlan 2 /为vlan2配置ip地址H3C1H3C1-Vlan-interface2un shutH3C1-Vlan-interface2qH3C1int e0/4/3 /开启trunk链路H3C1-Ethernet0/4/3port link-type trunk粗略的查看有设备上有几个vlanH3C1display vlan Total 2 VLAN exist(s). The following VL

3、ANs exist: 1(default), 2 详细的查看设备上vlan的情况H3C1display vlan all VLAN ID: 1 /vlan1的详细信息 VLAN Type: static /vlan属于静态的,也就是说是手工创建的 Route Interface: configured Description: VLAN 0001 /对vlan的描述 Broadcast MAX-ratio: 100% /广播包在vlan链路占的百分比,可改 Tagged Ports: none /标记的,如果串行接口不在此vlan中, 那个接口将会出现在此处! Untagged Ports:

4、/可以说是属于本vlan的接口 Ethernet0/4/0 Ethernet0/4/1 Ethernet0/4/2 Ethernet0/4/3 Ethernet0/4/4 Ethernet0/4/5 Ethernet0/4/6 Ethernet0/4/7 VLAN ID: 2 /vlan2的详细信息 VLAN Type: static Route Interface: configured Description: VLAN 0002 Broadcast MAX-ratio: 100% Tagged Ports: none Untagged Ports: none查看vlan接口状态,可以看到

5、vlan2是down的,原因是:默认trunk只为vlan1服务!H3C1display ip interface brief *down: administratively down(s): spoofingInterface Physical Protocol IP Address Ethernet0/1/0 up down unassigned Vlan-interface1 up up 1.1.1.1 Vlan-interface2 down down 2.2.2.2 查看设备上开启trunk的端口,PVID属于哪个vlan,允许通过trunk的vlan!此时只有1!H3C1displ

6、ay port trunk Interface PVID VLAN passingEth0/4/3 1 1 查看trunk端口H3C1display interface e0/4/3 部分显示省略Port link-type: trunk VLAN passing : 1(default vlan) /默认只有vlan1通过 VLAN permitted: 1(default vlan) /默认只允许vlan1通过 Trunk port encapsulation: IEEE 802.1q /封装类型只会是IEEE802.1q2.配置vlan2H3C2int vlan 1H3C2H3C2-Vl

7、an-interface1un shutH3C2vlan 2H3C2-vlan2qH3C2int vlan 2H3C2H3C2-Vlan-interface2un shutH3C-Ethernet0/4/3port link-type trunk3.解决默认只允许vlan1通过trunk链路虽然配置完毕但是此时vlan2的接口是down的,原因上面已经看到,是默认只能vlan1通过trunk,这点是和Cisco不同的地方。我们要在的是允许所有的vlan通过trunk链路H3C1interface e0/4/3H3C1-Ethernet0/4/3port trunk permit vlan ?

8、INTEGER<1-4094> VLAN ID all All the VLANsH3C1-Ethernet0/4/3port trunk permit vlan all Please wait.%Nov 18 19:59:07:453 2010 H3C1 IFNET/4/LINK UPDOWN: Vlan-interface2: link status is UP %Nov 18 19:59:07:453 2010 H3C1 IFNET/4/UPDOWN: Line protocol on the interface Vlan-interface2 is UP . Done.H3

9、C1-Ethernet0/4/3 /此时vlan2接口就开启了H3C2interface e0/4/3H3C2-Ethernet0/4/3port trunk permit vlan all Please wait.%Nov 18 20:00:16:844 2010 H3C2 IFNET/4/LINK UPDOWN: Vlan-interface2: link status is UP %Nov 18 20:00:16:844 2010 H3C2 IFNET/4/UPDOWN: Line protocol on the interface Vlan-interface2 is UP . Don

10、e.H3C2-Ethernet0/4/3H3C1display vlan allVLAN ID: 1 VLAN Type: static Route Interface: configured Description: VLAN 0001 Broadcast MAX-ratio: 100% Tagged Ports: none Untagged Ports: Ethernet0/4/0 Ethernet0/4/1 Ethernet0/4/2 Ethernet0/4/3 Ethernet0/4/4 Ethernet0/4/5 Ethernet0/4/6 Ethernet0/4/7 VLAN ID

11、: 2 VLAN Type: static Route Interface: configured Description: VLAN 0002 Broadcast MAX-ratio: 100% Tagged Ports: Ethernet0/4/3 /本vlan通过哪个接口出去 Untagged Ports: noneH3C1display interface e0/4/3部分显示省略 Port link-type: trunk VLAN passing : 1(default vlan), 2 /此时通过的vlan VLAN permitted: 1(default vlan), 2-4

12、094 /此时允许通过的vlan是all Trunk port encapsulation: IEEE 802.1q4.GVRP相当于Cisco的VTPH3C1gvrp GVRP is enabled globally.H3C1interface e0/4/3H3C1-Ethernet0/4/3gvrp H3C1vlan 10H3C1-vlan10vlan 11H3C1-vlan11vlan 12H3C2gv GVRP is enabled globally.H3C2int e0/4/3H3C2-Ethernet0/4/3gvH3C2display vlan Total 5 VLAN exis

13、t(s). The following VLANs exist: 1(default), 2, 10-12 成功学习到vlan<H3C1>display gvrp statistics GVRP statistics on port Ethernet0/4/3 GVRP Status : Enabled GVRP Running : YES GVRP Failed Registrations : 0 GVRP Last Pdu Origin : 0000-5602-0003 GVRP Registration Type : Normal二.vlan间路由1. 三层交换-trunk和

14、hybrid首先介绍trunk通过trunk使用三层交换实现vlan间路由是很简单的,只需要开启trunk链路并允许相应vlan通过即可!与Cisco不同,不需要开启路由功能!然后是hybridHybrid是h3c的,下面的实验就是hybrid的应用。实验拓扑Vlan3Vlan2实验环境:实验步骤:创建vlan并把相应的接口加入到vlan中sw1vlan 2sw1-vlan2vlan 3sw1-vlan3vlan 2sw1-vlan2port e1/0/6为vlan设置ip地址开启hybrid的混杂链路类型设置vlan2、3不打标签!看同一台交换机上不同vlan能否通信 看不同交换机上的不同v

15、lan能否通信实验环境如图实验步骤:创建vlan并把相应的接口加入到vlan中sw1vlan 2sw1-vlan2vlan 3sw1-vlan3vlan 2sw1-vlan2port e1/0/6sw1int e1/0/2sw1-Ethernet1/0/2port link-type trunksw1-Ethernet1/0/2port trunk permit vlan allsw2vlan 2sw2-vlan2vlan 3sw2-vlan3port e1/0/6sw2-Ethernet1/0/2port link-type trunksw2-Ethernet1/0/2port trunk

16、p vlan all为vlan设置ip地址(不设置应该可以)设置路由器-开启主接口H3Cint e0/0H3C-Ethernet0/0un shut创建子接口-ip-封装类型+对应vidH3Cint e0/0.1H3C-Ethernet0/0.1ip add 192.168.2.254 24H3C-Ethernet0/0.1vlan-type dot1q vid 2H3Cint e0/0.2H3C-Ethernet0/0.2ip add 192.168.3.254 24H3C-Ethernet0/0.2vlan-type dot1q vid 3H3Cdisplay ip int b*down: administratively down(s): spoofingInterface Physical Protocol IP AddressAux0 down down unassignedEth

温馨提示

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

评论

0/150

提交评论