华为交换机同一VLAN配置多个网段实现互通

2019年10月14日16:50:35 评论 5,750
首月免费体验

在VLANIF接口下配置主从IP地址,可以实现同一VLAN多个网段用户间的互通。
例如,如图1所示,某VLAN10内两个主机Host_1和Host_2分别属于网段10.1.1.1/24和10.1.2.1/24,要求两主机互通。

可以在Switch上进行如下配置:
[Switch] interface gigabitethernet 0/0/1
[Switch-GigabitEthernet0/0/1] port link-type access
[Switch-GigabitEthernet0/0/1] port default vlan 10
[Switch-GigabitEthernet0/0/1] quit
[Switch] interface gigabitethernet 0/0/2
[Switch-GigabitEthernet0/0/2] port link-type access
[Switch-GigabitEthernet0/0/2] port default vlan 10
[Switch-GigabitEthernet0/0/2] quit
[Switch] interface vlanif 10
[Switch-Vlanif10] ip address 10.1.1.1 24
[Switch-Vlanif10] ip address 10.1.2.1 24 sub
[Switch-Vlanif10] quit
这样配置后,主机Host_1和Host_2间就可以互通了。

weinxin
博主微信
这是我的微信扫一扫

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: