华为模拟器如何实现不同Vlan不同网段之间的互通

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了华为模拟器如何实现不同Vlan不同网段之间的互通相关的知识,希望对你有一定的参考价值。

如图可以使PC1、PC2、PC3、PC4、PC5、server1、之间可以互相ping通:
技术分享图片
实验步骤:
1.配置PC1/PC2/PC3/PC4/PC5的IP,子网掩码,网关如图:
技术分享图片技术分享图片技术分享图片技术分享图片技术分享图片
2.配置Switch1如下:
<Huawei>undo terminal monitor
Info: Current terminal monitor is off.
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname SW1
[SW1]vlan 10
[SW1-vlan10]vlan 20
[SW1-vlan20]vlan 30
[SW1-vlan30]q
[SW1-GigabitEthernet0/0/1]port link-type access
[SW1-GigabitEthernet0/0/1]port default vlan 10
[SW1-GigabitEthernet0/0/1]undo shut
[SW1-GigabitEthernet0/0/1]undo shutdown
Info: Interface GigabitEthernet0/0/1 is not shutdown.
[SW1-GigabitEthernet0/0/1]q
[SW1]interface g0/0/2
[SW1-GigabitEthernet0/0/2]port link-type access
[SW1-GigabitEthernet0/0/2]port default vlan 20
[SW1-GigabitEthernet0/0/2]undo shut
Info: Interface GigabitEthernet0/0/2 is not shutdown.
[SW1-GigabitEthernet0/0/2]q
[SW1]interface g0/0/3
[SW1-GigabitEthernet0/0/3]port link-type ac
[SW1-GigabitEthernet0/0/3]port link-type access
[SW1-GigabitEthernet0/0/3]port default vlan 30
[SW1-GigabitEthernet0/0/3]undo shut
Info: Interface GigabitEthernet0/0/3 is not shutdown.
[SW1]interface g0/0/4
[SW1-GigabitEthernet0/0/4]port link-type trunk
[SW1-GigabitEthernet0/0/4]port trunk allow-pass vlan all
[SW1-GigabitEthernet0/0/4]undo shutdown
Info: Interface GigabitEthernet0/0/4 is not shutdown.
3.配置Switch2如下:
<Huawei>undo terminal monitor
<Huawei>system-view
[Huawei]sysname SW2
[SW2]vlan 40
[SW2-vlan40]vlan 50
[SW2-vlan50]q
[SW2]interface g0/0/2
[SW2-GigabitEthernet0/0/2]port link-type access
[SW2-GigabitEthernet0/0/2]port default vlan 40
[SW2-GigabitEthernet0/0/2]undo shutdown
Info: Interface GigabitEthernet0/0/2 is not shutdown.
[SW2-GigabitEthernet0/0/2]q
[SW2]interface g0/0/3
[SW2-GigabitEthernet0/0/3]port link-type access
[SW2-GigabitEthernet0/0/3]port default vlan 50
[SW2-GigabitEthernet0/0/3]undo shutdown
Info: Interface GigabitEthernet0/0/3 is not shutdown.
[SW2-GigabitEthernet0/0/3]q
[SW2]interface g0/0/1
[SW2-GigabitEthernet0/0/1]port link-type trunk
[SW2-GigabitEthernet0/0/1]undo shutdown
[SW2-GigabitEthernet0/0/1]port trunk allow-pass vlan all
Info: Interface GigabitEthernet0/0/1 is not shutdown.
4.配置Switch3如下:
<Huawei>undo terminal monitor
Info: Current terminal monitor is off.
<Huawei>system-view
[Huawei]sysname SW3
[SW3]vlan 10
[SW3-vlan10]vlan 20
[SW3-vlan20]vlan 30
[SW3-vlan30]vlan 40
[SW3-vlan40]vlan 50
[SW3-vlan50]q
[SW3]interface vlan 10
[SW3-Vlanif10]ip address 10.0.0.254 255.0.0.0
[SW3-Vlanif10]undo shutdown
Info: Interface Vlanif10 is not shutdown.
[SW3-Vlanif10]q
[SW3]interface vlan 20
[SW3-Vlanif20]ip address 20.0.0.254 255.0.0.0
[SW3-Vlanif20]undo shutdown
Info: Interface Vlanif20 is not shutdown.
[SW3-Vlanif20]q
[SW3]interface vlan 30
[SW3-Vlanif30]ip address 30.0.0.254 255.0.0.0
[SW3-Vlanif30]undo shutdown
Info: Interface Vlanif30 is not shutdown.
[SW3-Vlanif30]q
[SW3]interface vlan 40
[SW3-Vlanif40]ip address 40.0.0.254 255.0.0.0
[SW3-Vlanif40]undo shutdown
Info: Interface Vlanif40 is not shutdown.
[SW3-Vlanif40]q
[SW3]interface vlan 50
[SW3-Vlanif50]ip address 50.0.0.254 255.0.0.0
[SW3-Vlanif50]undo shutdown
Info: Interface Vlanif50 is not shutdown.
[SW3-Vlanif50]q
[SW3]interface g0/0/1
[SW3-GigabitEthernet0/0/1]port link-type trunk
[SW3-GigabitEthernet0/0/1]port trunk allow-pass vlan all
[SW3-GigabitEthernet0/0/1]undo shutdown
Info: Interface GigabitEthernet0/0/1 is not shutdown.
[SW3-GigabitEthernet0/0/1]q
[SW3]interface g0/0/2
[SW3-GigabitEthernet0/0/2]port link-type trunk
[SW3-GigabitEthernet0/0/2]undo shutdown
[SW3-GigabitEthernet0/0/2]port link-type trunk
[SW3-GigabitEthernet0/0/2]port trunk allow-pass vlan all
Info: Interface GigabitEthernet0/0/2 is not shutdown.
[SW3]vlan 60
[SW3-vlan60]q
[SW3]interface g0/0/3
[SW3-GigabitEthernet0/0/3]port link-type access
[SW3-GigabitEthernet0/0/3]port default vlan 60
[SW3-GigabitEthernet0/0/3]undo shutdown
[SW3]interface vlan 60
[SW3-Vlanif60]ip address 60.0.0.1 255.0.0.0
5.配置R1如下
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R1
[R1-GigabitEthernet0/0/0]ip address 60.0.0.2 255.0.0.0
[R1-GigabitEthernet0/0/0]undo shut
Info: Interface GigabitEthernet0/0/0 is not shutdown.
[R1-GigabitEthernet0/0/0]q
[R1]interface g0/0/1
[R1-GigabitEthernet0/0/1]ip address 70.0.0.254 255.0.0.0
[R1-GigabitEthernet0/0/1]undo shut
Info: Interface GigabitEthernet0/0/1 is not shutdown.
6.配置server1如图:
技术分享图片
7.在R1配置默认路由:
技术分享图片
8.在SW3上配置静态路由:
技术分享图片
结果验证如图:
技术分享图片技术分享图片技术分享图片技术分享图片

以上是关于华为模拟器如何实现不同Vlan不同网段之间的互通的主要内容,如果未能解决你的问题,请参考以下文章

华3交换机 S5120 两个不同的网段分别与不同的网段的交换机联网

华为三层交换机实现不同vlan,不同网段的互通

不同品牌的交换机可以VXLAN互通吗?

Trunk实现不同VLAN之间 相同网段的互通

VLAN间路由     即在不同的 VLAN 之间,配置好网关设备,确保不同网段互通

华为的MUX VLAN功能及配置