#
dhcp enable
#
ip pool vlan10
gateway-list 192.168.10.254
network 192.168.10.0 mask 255.255.255.0
dns-list 8.8.8.8
#
interface Vlanif10
ip address 192.168.10.254 255.255.255.0
#
interface GigabitEthernet0/0/1
port link-type access
port default vlan 10
#
interface GigabitEthernet0/0/2
port link-type access
port default vlan 20
备注:
1、当配置有vlanif接口的ip pool,系统无法生成相同地址的接口IP pool
[DHCP-Vlanif10]dhcp select interface //报错提示如下
Error: The IP address segment has been used by a global IP pool.
2、交换机的物理interface没法配置IP,因此DHCP是做在vlanif接口里面的
3、ip pool是根据接口的地址段自动匹配的,你可以再做一个vlan20的地址池去匹配另外接口