1. 程式人生 > >華為模擬器如何實現不同Vlan不同網段之間的互通

華為模擬器如何實現不同Vlan不同網段之間的互通

shu current color tro ffffff mina src pro 默認路由

如圖可以使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不同網段之間的互通