华为 —小型企业多交换机多VLAN通信简单实验

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了华为 —小型企业多交换机多VLAN通信简单实验相关的知识,希望对你有一定的参考价值。

多交换机VLAN间通信

一、实验目的

实现多交换机不同VLAN间通信,并实现全网互通。

 

二、实验环境

Windows 10

eNSP

 

三、实验拓扑

技术分享图片


四、实验步骤

PC配置IP地址的步骤就不进行展示了。

SW1

         <Huawei>sys

         [Huawei]sys SW1

         [SW1]vl ba 10 20 30

         [SW1]int eth0/0/1

         [SW1-Ethernet0/0/1]un shu

         [SW1-Ethernet0/0/1]po link-t ac

         [SW1-Ethernet0/0/1]po de vl 10

               [SW1-Ethernet0/0/1]int eth 0/0/2

               [SW1-Ethernet0/0/2]un shu

               [SW1-Ethernet0/0/2]po link-t ac

               [SW1-Ethernet0/0/2]po de vl 20

               [SW1-Ethernet0/0/2]int eth 0/0/3

               [SW1-Ethernet0/0/3]un shu

               [SW1-Ethernet0/0/3]po link-t ac

               [SW1-Ethernet0/0/3]po de vl 30

               [SW1-Ethernet0/0/3]int eth 0/0/22

               [SW1-Ethernet0/0/22]po link-t tr

               [SW1-Ethernet0/0/22]po tr all vl all

 

         SW2

         <Huawei>sys

         [Huawei]sys SW2

         [SW2]vl ba 40 50

         [SW2]int eth0/0/1

         [SW2-Ethernet0/0/1]un shu

         [SW2-Ethernet0/0/1]po link-t ac

         [SW2-Ethernet0/0/1]po de vl 40

               [SW2-Ethernet0/0/1]int eth 0/0/2

               [SW2-Ethernet0/0/2]un shu

               [SW2-Ethernet0/0/2]po link-t ac

               [SW2-Ethernet0/0/2]po de vl 50

               [SW2-Ethernet0/0/2]int eth 0/0/22

               [SW2-Ethernet0/0/22]po link-t tr

               [SW2-Ethernet0/0/22]po tr all vl all

 

         LSW1:

                   <Huawei>sys

                   [Huawei]sys LSW1

                   [LSW1]vl ba 10 20 30 40 50 60

                   [LSW1]int g0/0/1

                   [LSW1-GigabitEthernet0/0/1]un shu

                   [LSW1-GigabitEthernet0/0/1]po link-t tr

                   [LSW1-GigabitEthernet0/0/1]po tr all vl all

                   [LSW1-GigabitEthernet0/0/1]int g0/0/2

                   [LSW1-GigabitEthernet0/0/2]un shu

                   [LSW1-GigabitEthernet0/0/2]po link-t tr

                   [LSW1-GigabitEthernet0/0/2]po tr all vl all

                   [LSW1-GigabitEthernet0/0/2]int g0/0/24

                   [LSW1-GigabitEthernet0/0/24]po link-t acc

                   [LSW1-GigabitEthernet0/0/24]po de vl 60

                   [LSW1-GigabitEthernet0/0/24]int vl 10

                   [LSW1-Vlanif10]un shu

[LSW1-Vlanif10]ip add 192.168.10.254 255.255.255.0

                   [LSW1-Vlanif10]int vl 20

                   [LSW1-Vlanif20]un shu

                   [LSW1-Vlanif20]ip add 192.168.20.254 255.255.255.0

                   [LSW1-Vlanif20]int vl 30

                   [LSW1-Vlanif30]un shu

                   [LSW1-Vlanif30]ip add 192.168.30.254 255.255.255.0

                   [LSW1-Vlanif30]int vl 40

                   [LSW1-Vlanif40]un shu

                   [LSW1-Vlanif40]ip add 192.168.40.254 255.255.255.0

                   [LSW1-Vlanif40]int vl 50

                   [LSW1-Vlanif50]un shu

                   [LSW1-Vlanif50]ip add 192.168.50.254255.255.255.0

                   [LSW1-Vlanif50]int vl 60

                   [LSW1-Vlanif60]un shu

                   [LSW1-Vlanif60]ip add 192.168.60.2 255.255.255.0

                   [LSW1-Vlanif60]quit

                   [LSW1]ip route-static 192.168.70.0 255.255.255.0 192.168.60.1

 

         R1:

            <Huawei>sys

            [Huawei]sys R1

            [R1]int g0/0/1

            [R1- GigabitEthernet0/0/1]un shu

[R1- GigabitEthernet0/0/1]ip add 192.168.60.1 255.255.255.0

[R1- GigabitEthernet0/0/1]int g0/0/0

[R1- GigabitEthernet0/0/0]un shu

[R1- GigabitEthernet0/0/0]ip add 192.168.70.254 255.255.255.0

[R1- GigabitEthernet0/0/0]quit

[R1]ip route-static 0.0.0.0 0.0.0.0 192.168.6.2

五、结果验证

测试PC1与其他全部PC的连通性

技术分享图片

技术分享图片


以上是关于华为 —小型企业多交换机多VLAN通信简单实验的主要内容,如果未能解决你的问题,请参考以下文章

中小型网络最全的VLAN技术——实现不同网段间通信——三层交换(路由)原理

小型企业交换机批量配置VLAN

华为多交换机不同VLAN间通信全网互通域名解析(详细步骤)

华为S5700实现两个VLAN间不通信的ACL策略

小型实验组合(VLAN+Trunk链路+三层交换)

中小型企业网络构建