eNSP华为路由器与交换机连接

eNSP华为路由器与交换机连接_第1张图片

路由配置:

[Huawei]interface GigabitEthernet 0/0/0
[Huawei-GigabitEthernet0/0/0]ip address 172.16.10.1 24
[Huawei]ip route-static 0.0.0.0 0.0.0.0 172.16.10.2

交换机配置:

[Huawei]vlan batch 10 20
[Huawei]interface Vlanif 10
[Huawei-Vlanif10]ip address 172.16.10.2 255.255.255.0
[Huawei]interface GigabitEthernet 0/0/1
[Huawei-GigabitEthernet0/0/1] port link-type access
[Huawei-GigabitEthernet0/0/1] port default vlan 10

[Huawei]interface Vlanif 20
[Huawei-Vlanif10]ip address 192.168.20.1 255.255.255.0
[Huawei]interface GigabitEthernet 0/0/2
[Huawei-GigabitEthernet0/0/2] port link-type access
[Huawei-GigabitEthernet0/0/2] port default vlan 20
[Huawei]ip route-static 0.0.0.0 0.0.0.0 172.16.10.1

PC设置:

eNSP华为路由器与交换机连接_第2张图片

测试:

eNSP华为路由器与交换机连接_第3张图片

你可能感兴趣的:(华为数通,华为,数字通信,交换机,路由器,网络)