ensp二层交换机不同vlan之间如何通信_华三交换机不同网段互通

2022-11-04 13:33:28 浏览数 (1)

大家好,又见面了,我是你们的朋友全栈君。

如图所示,可以使PC1:10.10.10.10/24;PC2:20.20.20.20/24;PC3:30.30.30.30/24之间可以相互ping通。

1、配置PC机的IP地址、子网掩码以及网关;

2、在实验过程中,我们将10段地址划入vlan10,20段地址划入vlan20, 30段地址划入vlan30。

3、配置switc1如下:

<Huawei>sys

[Huawei]vlan batch 10 20

[Huawei]int g0/0/1 [Huawei-GigabitEthernet0/0/1]port link-type access

[Huawei-GigabitEthernet0/0/1]port default vlan 10

[Huawei-GigabitEthernet0/0/1]int g0/0/2 [Huawei-GigabitEthernet0/0/2]port link-type access [Huawei-GigabitEthernet0/0/2]port default vlan 20

[Huawei-GigabitEthernet0/0/2]q [Huawei]interface Vlanif 10 [Huawei-Vlanif10]ip add 10.10.10.1 24

[Huawei-Vlanif10]q [Huawei]int Vlanif 20 [Huawei-Vlanif20]ip add 20.20.20.1 24 [Huawei-Vlanif20]int g0/0/3 [Huawei-GigabitEthernet0/0/3]port link-type trunk [Huawei-GigabitEthernet0/0/3]port trunk allow-pass vlan all

4、配置switch2如下:

<Huawei>sys

[Huawei]vlan batch 30

[Huawei]int g0/0/1 [Huawei-GigabitEthernet0/0/1]port link-type access

[Huawei-GigabitEthernet0/0/1]port default vlan 30

[Huawei-GigabitEthernet0/0/1]q [Huawei]interface Vlanif30 [Huawei-Vlanif30]ip add 30.30.30.1 24

[Huawei-Vlanif30]int g0/0/2 [Huawei-GigabitEthernet0/0/2]port link-type trunk [Huawei-GigabitEthernet0/0/2]port trunk allow-pass vlan all

5、配置switch3如下:

<Huawei>sys

[Huawei]vlan batch 10 20 30 [Huawei]interface Vlanif 10 [Huawei-Vlanif10]ip add 10.10.10.1 24 [Huawei-Vlanif10]q [Huawei]int Vlanif 20 [Huawei-Vlanif20]ip add 20.20.20.1 24 [Huawei-Vlanif20]q [Huawei]int Vlanif 30 [Huawei-Vlanif30]ip add 30.30.30.1 24

[Huawei-Vlanif30]int g0/0/1 [Huawei-GigabitEthernet0/0/1]port link-type trunk [Huawei-GigabitEthernet0/0/1]port trunk allow-pass vlan all [Huawei-GigabitEthernet0/0/1]int g0/0/2 [Huawei-GigabitEthernet0/0/2]port link-type trunk [Huawei-GigabitEthernet0/0/2]port trunk allow-pass vlan all

6、结果验证如下:

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。

0 人点赞