华为模拟器如何实现不同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.
sysname SW1
vlan 10
vlan 20
vlan 30
q
port link-type access
port default vlan 10
undo shut
undo shutdown
Info: Interface GigabitEthernet0/0/1 is not shutdown.
q
interface g0/0/2
port link-type access
port default vlan 20
undo shut
Info: Interface GigabitEthernet0/0/2 is not shutdown.
q
interface g0/0/3
port link-type ac
port link-type access
port default vlan 30
undo shut
Info: Interface GigabitEthernet0/0/3 is not shutdown.
interface g0/0/4
port link-type trunk
port trunk allow-pass vlanall
undo shutdown
Info: Interface GigabitEthernet0/0/4 is not shutdown.
3.配置Switch2如下:
<Huawei>undo terminal monitor
<Huawei>system-view
sysname SW2
vlan 40
vlan 50
q
interface g0/0/2
port link-type access
port default vlan 40
undo shutdown
Info: Interface GigabitEthernet0/0/2 is not shutdown.
q
interface g0/0/3
port link-type access
port default vlan 50
undo shutdown
Info: Interface GigabitEthernet0/0/3 is not shutdown.
q
interface g0/0/1
port link-type trunk
undo shutdown
port trunk allow-pass vlanall
Info: Interface GigabitEthernet0/0/1 is not shutdown.
4.配置Switch3如下:
<Huawei>undo terminal monitor
Info: Current terminal monitor is off.
<Huawei>system-view
sysname SW3
vlan 10
vlan 20
vlan 30
vlan 40
vlan 50
q
interface vlan 10
ip address 10.0.0.254 255.0.0.0
undo shutdown
Info: Interface Vlanif10 is not shutdown.
q
interface vlan 20
ip address 20.0.0.254 255.0.0.0
undo shutdown
Info: Interface Vlanif20 is not shutdown.
q
interface vlan 30
ip address 30.0.0.254 255.0.0.0
undo shutdown
Info: Interface Vlanif30 is not shutdown.
q
interface vlan 40
ip address 40.0.0.254 255.0.0.0
undo shutdown
Info: Interface Vlanif40 is not shutdown.
q
interface vlan 50
ip address 50.0.0.254 255.0.0.0
undo shutdown
Info: Interface Vlanif50 is not shutdown.
q
interface g0/0/1
port link-type trunk
port trunk allow-pass vlan all
undo shutdown
Info: Interface GigabitEthernet0/0/1 is not shutdown.
q
interface g0/0/2
port link-type trunk
undo shutdown
port link-type trunk
port trunk allow-pass vlan all
Info: Interface GigabitEthernet0/0/2 is not shutdown.
vlan 60
q
interface g0/0/3
port link-type access
port default vlan 60
undo shutdown
interface vlan 60
ip address 60.0.0.1 255.0.0.0
5.配置R1如下
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
sysname R1
ip address 60.0.0.2 255.0.0.0
undo shut
Info: Interface GigabitEthernet0/0/0 is not shutdown.
q
interface g0/0/1
ip address 70.0.0.254 255.0.0.0
undo shut
Info: Interface GigabitEthernet0/0/1 is not shutdown.
6.配置server1如图:
7.在R1配置默认路由:
8.在SW3上配置静态路由:
结果验证如图:
页:
[1]