Per port IP address assignment

I was looking at setting up our out of band network and was wondering if I could configure DHCP on the switch and have it hand out an address to a specific port. For example I would like port gi1/0/1 to get the IP of, port gi1/0/27 to get IP In doing some searching I found a config guide for doing exactly that. It’s called ‘DHCP Server Port-Based Address Allocation’. Here’s an example:

Global Config Commands-

Under each interface you need to add-

You can verify by running the following command-

Here you can see I have two ports configured and each is associated with it’s matching interface. Under the DHCP server, the client id should start with either Gi or gi.