1、H3C实验报告大全含18个实验4配置vlan及vlan间路由H3C实验报告大全【含18个实验】4-配置vlan及vlan间路由配置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
2、服务二.vlan间路由1.三层交换trunk和hybrid2.单臂路由一.配置vlan、trunk粗略的查看有设备上有几个vlanH3C1display vlan Total 2 VLAN exist(s). The following VLANs exist: 1(default), 2 详细的查看设备上vlan的情况H3C1display vlan all VLAN ID: 1 /vlan1的详细信息 VLAN Type: static /vlan属于静态的,也就是说是手工创建的 Route Interface: configured Description: VLAN 0001 /对vl
3、an的描述 Broadcast MAX-ratio: 100% /广播包在vlan链路占的百分比,可改 Tagged Ports: none /标记的,如果串行接口不在此vlan中, 那个接口将会出现在此处! Untagged Ports: /可以说是属于本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 Inte
4、rface: configured Description: VLAN 0002 Broadcast MAX-ratio: 100% Tagged Ports: none Untagged Ports: none查看vlan接口状态,可以看到vlan2是down的,原因是:默认trunk只为vlan1服务!H3C1display ip interface brief *down: administratively down(s): spoofingInterface Physical Protocol IP Address Ethernet0/1/0 up down unassigned 查看
5、设备上开启trunk的端口,PVID属于哪个vlan,允许通过trunk的vlan!此时只有1!H3C1display 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 80
6、2.1q /封装类型只会是IEEE802.1q2.配置vlan2H3C2int vlan 1H3C2-Vlan-interface1ip add 1.1.1.2 255.255.255.0H3C2-Vlan-interface1un shutH3C2vlan 2H3C2-vlan2qH3C2int vlan 2H3C2-Vlan-interface2ip add 2.2.2.3 255.255.255.0H3C2-Vlan-interface2un shutH3C-Ethernet0/4/3port link-type trunk3.解决默认只允许vlan1通过trunk链路虽然配置完毕但是此
7、时vlan2的接口是down的,原因上面已经看到,是默认只能vlan1通过trunk,这点是和Cisco不同的地方。我们要在的是允许所有的vlan通过trunk链路H3C1interface e0/4/3H3C1-Ethernet0/4/3port trunk permit vlan ? INTEGER 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-interfac
8、e2: 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.H3C1-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-inte
9、rface2: link status is UP %Nov 18 20:00:16:844 2010 H3C2 IFNET/4/UPDOWN: Line protocol on the interface Vlan-interface2 is UP . Done.H3C2-Ethernet0/4/3H3C1display vlan allVLAN ID: 1 VLAN Type: static Route Interface: configured Description: VLAN 0001 Broadcast MAX-ratio: 100% Tagged Ports: none Unta
10、gged 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: 2 VLAN Type: static Route Interface: configured Description: VLAN 0002 Broadcast MAX-ratio: 100% Tagged Ports: Ethernet0/4/3 /本vlan通过哪个接口出去 Untagged Ports: noneH3C1dis
11、play interface e0/4/3部分显示省略 Port link-type: trunk VLAN passing : 1(default vlan), 2 /此时通过的vlan VLAN permitted: 1(default vlan), 2-4094 /此时允许通过的vlan是all Trunk port encapsulation: IEEE 802.1qdisplay gvrp statistics GVRP statistics on port Ethernet0/4/3 GVRP Status : Enabled GVRP Running : YES GVRP Fai
12、led Registrations : 0 GVRP Last Pdu Origin : 0000-5602-0003 GVRP Registration Type : Normal二.vlan间路由1.三层交换-trunk和hybrid首先介绍trunk通过trunk使用三层交换实现vlan间路由是很简单的,只需要开启trunk链路并允许相应vlan通过即可!与Cisco不同,不需要开启路由功能!然后是hybridHybrid是h3c的,下面的实验就是hybrid的应用。实验拓扑实验环境:实验步骤:创建vlan并把相应的接口加入到vlan中sw1vlan 2sw1-vlan2vlan 3sw
13、1-vlan3vlan 2sw1-vlan2port e1/0/6为vlan设置ip开启hybrid的混杂链路类型设置vlan2、3不打标签!看同一台交换机上不同vlan能否通信 看不同交换机上的不同vlan能否通信实验环境如图实验步骤:创建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
14、2sw2-vlan2vlan 3sw2-vlan3port e1/0/6sw2-Ethernet1/0/2port link-type trunksw2-Ethernet1/0/2port trunk p vlan all为vlan设置ip(不设置应该可以)设置路由器-开启主接口H3Cint e0/0H3C-Ethernet0/0un shut创建子接口-ip-封装类型+对应vidH3Cint e0/0.1H3C-Ethernet0/0.1vlan-type dot1q vid 2H3Cint e0/0.2H3C-Ethernet0/0.2vlan-type dot1q vid 3H3Cdis
15、play ip int b*down: administratively down(s): spoofingInterface Physical Protocol IP AddressAux0 down down unassignedEthernet0/0 up down unassignedEthernet0/1 down down unassignedSerial4/0 down down unassignedH3Cint e0/0Sw1上开启与路由器相连的trunk链路-允许所有sw1int e1/0/12sw1-Ethernet1/0/12port link-type trunksw1-Ethernet1/0/12port trunk permit vlan all
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1