分享页面

在华为交换机上配置基于子网的vlan实现vlan的动态划分

发布时间:2021-08-04 10:13
 

拓扑如下图所示:

具体配置:

SW1:

int vlan 10

ip-subnet-vlan 1 ip 192.168.1.0 255.255.255.0

int vlan 20

ip-subnet-vlan 1 ip 192.168.2.0 255.255.255.0

nterface Ethernet0/0/1

port link-type trunk

port trunk allow-pass vlan 2 to 4094

interface Ethernet0/0/2

port link-type hybrid

port hybrid untagged vlan 2 to 4094

ip-subnet-vlan enable

interface Ethernet0/0/3

port link-type hybrid

port hybrid untagged vlan 2 to 4094

ip-subnet-vlan enable

SW2:

int vlan 10

ip-subnet-vlan 1 ip 192.168.1.0 255.255.255.0

int vlan 20

ip-subnet-vlan 1 ip 192.168.2.0 255.255.255.0

nterface Ethernet0/0/1

port link-type trunk

port trunk allow-pass vlan 2 to 4094

interface Ethernet0/0/2

port link-type hybrid

port hybrid untagged vlan 2 to 4094

ip-subnet-vlan enable

interface Ethernet0/0/3

port link-type hybrid

port hybrid untagged vlan 2 to 4094

ip-subnet-vlan enable
本文导读