三层交换机实现vlan间通信

本文详细介绍了如何通过华为三层交换机实现不同VLAN间的通信,包括划分VLAN、配置Trunk、核心交换机设置以及最终的验证过程。
摘要由CSDN通过智能技术生成

实验环境介绍

在这里插入图片描述

一、划分vlan并将相应的接口加入VLAN

swh1配置

<Huawei>SYS
Enter system view, return user view with Ctrl+Z.
[Huawei]sys swh1
[swh1]
[swh1]int g0/0/1
[swh1-GigabitEthernet0/0/1]port link-type access 
[swh1-GigabitEthernet0/0/1]int g0/0/2
[swh1-GigabitEthernet0/0/2]port link-type access
[swh1-GigabitEthernet0/0/2]int g0/0/3
[swh1-GigabitEthernet0/0/3]port link-type access
[swh1-GigabitEthernet0/0/3]q

[swh1]vlan 10
[swh1-vlan10]port g0/0/1
[swh1-vlan10]q
[swh1]
[swh1]vlan 20
[swh1-vlan20]
[swh1-vlan20]port g0/0/2
[swh1-vlan20]q
[swh1]vlan 30
[swh1-vlan30]port g0/0/3

查看vlan

[swh1]dis vlan
The total number of vlans is : 4
--------------------------------------------------------------------------------
U: Up;         D: Down;         TG: Tagged;         UT: Untagged;
MP: Vlan-mapping;               ST: Vlan-stacking;
#: ProtocolTransparent-vlan;    *: Management-vlan;
--------------------------------------------------------------------------------

VID  Type    Ports                                                          
--------------------------------------------------------------------------------
1    common  UT: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/0/10(D)     GE0/0/11(D)     
                GE0/0/12(D)     GE0/0/13(D)     GE0/0/14(D)     GE0/0/15(D)     
                GE0/0/16(D)     GE0/0/17(D)     GE0/0/18(D)     GE0/0/19(D)     
                GE0/0/20(D)     GE0/0/21(D)     GE0/0/22(D)     GE0/0/23(D)     
                GE0/0/24(D)                                                     

10   common  UT:GE0/0/1(D)                                                      

20   common  UT:GE0/0/2(D)                                                      

30   common  UT:GE0/0/3(D)                                                      


VID  Status  Property      MAC-LRN Statistics Description      
--------------------------------------------------------------------------------

1    enable  default       enable  disable    VLAN 0001                         
10   enable  default       enable  disable    VLAN 0010                         
20   enable  default       enable  disable    VLAN 0020                         
30   enable  default       enable  disable    VLAN 0030                         

swh2配置

The device is running!
##########
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys swh2
[swh2]
[swh2]int g0/0/1
[swh2-GigabitEthernet0/0/1]port link-type access 
[swh2-GigabitEthernet0/0/1]int g0/0/2
[swh2-GigabitEthernet0/0/2]port link-type access
[swh2-GigabitEthernet0/0/2]int g0/0/3
[swh2-GigabitEthernet0/0/3]port link-type access
[swh2-GigabitEthernet0/0/3]q
[swh2]vlan 10
[swh2-vlan10]port g0/0/1
[swh2-vlan10]q
[swh2]
[swh2]vlan 20
[swh2-vlan20]port g0/0/2
[swh2-vlan20]q
[swh2]vlan 30
[swh2-vlan30]port g0/0/3
[swh2-vlan30]q
[swh2]dis vlan
The total number of vlans is : 4
--------------------------------------------------------------------------------
U: Up;         D: Down;         TG: Tagged;         UT: Untagged;
MP: Vlan-mapping;               ST: Vlan-stacking;
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值