H3C实验报告大全含18个实验4配置vlan及vlan间路由.docx

上传人:b****7 文档编号:9765629 上传时间:2023-02-06 格式:DOCX 页数:11 大小:107.53KB
下载 相关 举报
H3C实验报告大全含18个实验4配置vlan及vlan间路由.docx_第1页
第1页 / 共11页
H3C实验报告大全含18个实验4配置vlan及vlan间路由.docx_第2页
第2页 / 共11页
H3C实验报告大全含18个实验4配置vlan及vlan间路由.docx_第3页
第3页 / 共11页
H3C实验报告大全含18个实验4配置vlan及vlan间路由.docx_第4页
第4页 / 共11页
H3C实验报告大全含18个实验4配置vlan及vlan间路由.docx_第5页
第5页 / 共11页
点击查看更多>>
下载资源
资源描述

H3C实验报告大全含18个实验4配置vlan及vlan间路由.docx

《H3C实验报告大全含18个实验4配置vlan及vlan间路由.docx》由会员分享,可在线阅读,更多相关《H3C实验报告大全含18个实验4配置vlan及vlan间路由.docx(11页珍藏版)》请在冰豆网上搜索。

H3C实验报告大全含18个实验4配置vlan及vlan间路由.docx

H3C实验报告大全含18个实验4配置vlan及vlan间路由

H3C实验报告大全【含18个实验】4-配置vlan及vlan间路由

配置vlan

实验目录

一.配置vlan、trunk

1.配置H3C1的vlan,及vlan查看命令!

[H3C1]displayvlan

[H3C1]displayvlanall

[H3C1]displayporttrunk

[H3C1]displayinterfacee0/4/3

2.配置H3C2的vlan

3,解决默认只允许vlan1通过trunk链路

[H3C1-Ethernet0/4/3]porttrunkpermitvlanall

4.gvrp相当与Cisco的VTP服务

 

二.vlan间路由

1.三层交换trunk和hybrid

2.单臂路由

 

一.配置vlan、trunk

 

粗略的查看有设备上有几个vlan

[H3C1]displayvlan

Total2VLANexist(s).

ThefollowingVLANsexist:

1(default),2

详细的查看设备上vlan的情况

[H3C1]displayvlanall

VLANID:

1//vlan1的详细信息

VLANType:

static//vlan属于静态的,也就是说是手工创建的

RouteInterface:

configured

 

Description:

VLAN0001//对vlan的描述

BroadcastMAX-ratio:

100%//广播包在vlan链路占的百分比,可改

TaggedPorts:

none//标记的,如果串行接口不在此vlan中,那个接口将会出现在此处!

UntaggedPorts:

//可以说是属于本vlan的接口

Ethernet0/4/0Ethernet0/4/1Ethernet0/4/2

Ethernet0/4/3Ethernet0/4/4Ethernet0/4/5

Ethernet0/4/6Ethernet0/4/7

VLANID:

2//vlan2的详细信息

VLANType:

static

RouteInterface:

configured

 

Description:

VLAN0002

BroadcastMAX-ratio:

100%

TaggedPorts:

none

UntaggedPorts:

none

查看vlan接口状态,可以看到vlan2是down的,原因是:

默认trunk只为vlan1服务!

[H3C1]displayipinterfacebrief

*down:

administrativelydown

(s):

spoofing

InterfacePhysicalProtocolIPAddress

Ethernet0/1/0updownunassigned

 

查看设备上开启trunk的端口,PVID属于哪个vlan,允许通过trunk的vlan!

此时只有1!

[H3C1]displayporttrunk

InterfacePVIDVLANpassing

Eth0/4/311

查看trunk端口

[H3C1]displayinterfacee0/4/3

部分显示省略

Portlink-type:

trunk

VLANpassing:

1(defaultvlan)//默认只有vlan1通过

VLANpermitted:

1(defaultvlan)//默认只允许vlan1通过

Trunkportencapsulation:

IEEE802.1q//封装类型只会是IEEE802.1q

2.配置vlan2

[H3C2]intvlan1

[H3C2-Vlan-interface1]ipadd1.1.1.2255.255.255.0

[H3C2-Vlan-interface1]unshut

[H3C2]vlan2

[H3C2-vlan2]q

[H3C2]intvlan2

[H3C2-Vlan-interface2]ipadd2.2.2.3255.255.255.0

[H3C2-Vlan-interface2]unshut

[H3C-Ethernet0/4/3]portlink-typetrunk

 

3.解决默认只允许vlan1通过trunk链路

虽然配置完毕但是此时vlan2的接口是down的,原因上面已经看到,是默认只能vlan1通过trunk,这点是和Cisco不同的地方。

我们要在的是允许所有的vlan通过trunk链路

[H3C1]interfacee0/4/3

[H3C1-Ethernet0/4/3]porttrunkpermitvlan?

INTEGER<1-4094>VLANID

allAlltheVLANs

[H3C1-Ethernet0/4/3]porttrunkpermitvlanall

Pleasewait...

%Nov1819:

59:

07:

4532010H3C1IFNET/4/LINKUPDOWN:

Vlan-interface2:

linkstatusisUP

%Nov1819:

59:

07:

4532010H3C1IFNET/4/UPDOWN:

LineprotocolontheinterfaceVlan-interface2isUP........................................Done.

[H3C1-Ethernet0/4/3]//此时vlan2接口就开启了

 

[H3C2]interfacee0/4/3

[H3C2-Ethernet0/4/3]porttrunkpermitvlanall

Pleasewait...

%Nov1820:

00:

16:

8442010H3C2IFNET/4/LINKUPDOWN:

Vlan-interface2:

linkstatusisUP

%Nov1820:

00:

16:

8442010H3C2IFNET/4/UPDOWN:

LineprotocolontheinterfaceVlan-interface2isUP........................................Done.

[H3C2-Ethernet0/4/3]

 

[H3C1]displayvlanall

VLANID:

1

VLANType:

static

RouteInterface:

configured

 

Description:

VLAN0001

BroadcastMAX-ratio:

100%

TaggedPorts:

none

UntaggedPorts:

Ethernet0/4/0Ethernet0/4/1Ethernet0/4/2

Ethernet0/4/3Ethernet0/4/4Ethernet0/4/5

Ethernet0/4/6Ethernet0/4/7

VLANID:

2

VLANType:

static

RouteInterface:

configured

 

Description:

VLAN0002

BroadcastMAX-ratio:

100%

TaggedPorts:

Ethernet0/4/3//本vlan通过哪个接口出去

UntaggedPorts:

none

[H3C1]displayinterfacee0/4/3

部分显示省略

Portlink-type:

trunk

VLANpassing:

1(defaultvlan),2//此时通过的vlan

VLANpermitted:

1(defaultvlan),2-4094//此时允许通过的vlan是all

Trunkportencapsulation:

IEEE802.1q

 

 

displaygvrpstatistics

GVRPstatisticsonportEthernet0/4/3

GVRPStatus:

Enabled

GVRPRunning:

YES

GVRPFailedRegistrations:

0

GVRPLastPduOrigin:

0000-5602-0003

GVRPRegistrationType:

Normal

 

二.vlan间路由

1.三层交换--trunk和hybrid

首先介绍trunk

通过trunk使用三层交换实现vlan间路由是很简单的,只需要开启trunk链路并允许相应vlan通过即可!

与Cisco不同,不需要开启路由功能!

然后是hybrid

Hybrid是h3c的,下面的实验就是hybrid的应用。

实验拓扑

实验环境:

 

实验步骤:

创建vlan并把相应的接口加入到vlan中

[sw1]vlan2

[sw1-vlan2]vlan3

[sw1-vlan3]vlan2

[sw1-vlan2]porte1/0/6

为vlan设置ip

开启hybrid的混杂链路类型

设置vlan2、3不打标签!

看同一台交换机上不同vlan能否通信

看不同交换机上的不同vlan能否通信

 

实验环境如图

实验步骤:

创建vlan并把相应的接口加入到vlan中

[sw1]vlan2

[sw1-vlan2]vlan3

[sw1-vlan3]vlan2

[sw1-vlan2]porte1/0/6

[sw1]inte1/0/2

[sw1-Ethernet1/0/2]portlink-typetrunk

[sw1-Ethernet1/0/2]porttrunkpermitvlanall

[sw2]vlan2

[sw2-vlan2]vlan3

[sw2-vlan3]porte1/0/6

[sw2-Ethernet1/0/2]portlink-typetrunk

[sw2-Ethernet1/0/2]porttrunkpvlanall

为vlan设置ip(不设置应该可以)

设置路由器--开启主接口

[H3C]inte0/0

[H3C-Ethernet0/0]unshut

创建子接口-ip-封装类型+对应vid

[H3C]inte0/0.1

[H3C-Ethernet0/0.1]vlan-typedot1qvid2

[H3C]inte0/0.2

[H3C-Ethernet0/0.2]vlan-typedot1qvid3

[H3C]displayipintb

*down:

administrativelydown

(s):

spoofing

InterfacePhysicalProtocolIPAddress

Aux0downdownunassigned

Ethernet0/0updownunassigned

 

Ethernet0/1downdownunassigned

Serial4/0downdownunassigned

[H3C]inte0/0

 

Sw1上开启与路由器相连的trunk链路--允许所有

[sw1]inte1/0/12

[sw1-Ethernet1/0/12]portlink-typetrunk

[sw1-Ethernet1/0/12]porttrunkpermitvlanall

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 总结汇报 > 学习总结

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1