华为ENSP配置 三层交换机DHCP配置加VLAN划分实验

实验拓扑图如下:

华为ENSP配置 三层交换机DHCP配置加VLAN划分实验_第1张图片

 LSW5三层交换机配置:

#
sysname LSW5
#
vlan batch 10 20
#
dhcp enable
#
ip pool 1
 gateway-list 192.168.1.254
 network 192.168.1.0 mask 255.255.255.0
 dns-list 8.8.8.8
#
ip pool 2
 gateway-list 192.168.2.254
 network 192.168.2.0 mask 255.255.255.0
 dns-list 8.8.8.8
#
interface Vlanif10
 ip address 192.168.1.254 255.255.255.0
 dhcp select global
#
interface Vlanif20
 ip address 192.168.2.254 255.255.255.0
 dhcp select global
#
interface MEth0/0/1
#
interface GigabitEthernet0/0/1
 port link-type trunk
 port trunk allow-pass vlan 10 20
#

 LSW6二层交换机配置:

#
sysname LSW6
#
vlan batch 10 20
#
interface Vlanif1
#
interface MEth0/0/1
#
interface Ethernet0/0/1
 port link-type trunk
 port trunk allow-pass vlan 10 20
#
interface Ethernet0/0/2
 port link-type access
 port default vlan 10
#
interface Ethernet0/0/3
 port link-type access
 port default vlan 20
#
interface Ethernet0/0/4
 port link-type trunk
 port trunk allow-pass vlan 10 20
#

 LSW7二层交换机配置:

#
sysname LSW7
#
vlan batch 10 20
#
interface Vlanif1
#
interface MEth0/0/1
#
interface Ethernet0/0/1
 port link-type trunk
 port trunk allow-pass vlan 10 20
#
interface Ethernet0/0/2
 port link-type access
 port default vlan 10
#
interface Ethernet0/0/3
 port link-type access
 port default vlan 20
#

各pc截图如下,都能通。

华为ENSP配置 三层交换机DHCP配置加VLAN划分实验_第2张图片

 华为ENSP配置 三层交换机DHCP配置加VLAN划分实验_第3张图片

 

你可能感兴趣的:(华为网络)