https://blog.51cto.com/lumay0526/2046957
注意:如果在域环境下部署DHCP,在安装完成后需要使用活动目录服务器授权DHCP服务
system-view vlan batch 10 20 #新建VLAN interface GigabitEthernet0/0/1 #进入接口GigabitEthernet0/0/1 port link-type access #设置端口模式Access,vlan10 port default vlan 10 interface GigabitEthernet0/0/2 #进入接口GigabitEthernet0/0/2 port link-type access #设置端口模式Access,vlan20 port default vlan 20 interface GigabitEthernet0/0/3 #进入接口GigabitEthernet0/0/3(上行端口) port link-type trunk #设置端口模式Trunk,所有vlan均可通过 port trunk allow-pass vlan all
system-view vlan batch 10 20 30 40 #新建vlan10 20 30 40 #配置虚拟端口地址(网关地址) interface vlan 10 ip address 192.168.10.1 24 interface vlan 20 ip address 192.168.20.1 24 interface vlan 30 ip address 192.168.90.1 24 interface GigabitEthernet0/0/1 #配置下行端口trunk port link-type trunk port trunk allow-pass vlan all interface GigabitEthernet0/0/2 #配置下行端口trunk port link-type trunk port trunk allow-pass vlan all interface GigabitEthernet0/0/3 #配置连接dhcp端口vlan30 port link-type access port default vlan 30 #配置中继: system-view dhcp enable interface vlan 10 dhcp select relay dhcp relay server-ip 192.168.90.9 interface vlan 20 dhcp select relay dhcp relay server-ip 192.168.90.9