Let us say I have a switch on which I have created two VLANs 10 and 20. I have set ports 1-10 to be on VLAN 10 and ports 11-20 to be on VLAN 20. Presently the PCs in both VLANs are configured with static IP addresses, I have SVIs on both VLANs on the switch and the PCs can ping each other in different VLANs and that all works. VLAN 10 PCs are on subnet 192.168.10.0/24 and VLAN 20 PCs are on 192.168.20.0/24, with the SVI and PC default gateway being .1 on each network.
What I would like to do now is create two DHCP pools on the switch called POOL10 and POOL20 and for PC's connected to any of the VLAN10 ports to be assigned an IP address and other details from POOL10 and PCs connected to any of the VLAN20 ports to get their configuration from POOL20. But what I can't figure out, nor find in the documentation, is how to associate a DHCP pool with a particular VLAN on the switch.
I know I could use a separate PC running its own DHCP server on each VLAN but I would like to do this entirely on the switch (or a router using the DHCP helper feature) so that all the pools are administered in one place.
I've seen this question but it doesn't seem to apply in this scenario.
conf t
thenip dhcp pool POOL10
and then I am in DHCP configuration mode but I'm not in VLAN nor interface modes? How would I say DHCP broadcasts received on a port in VLAN10 should be served from POOL10?