It's a very unorthodox concept in networking to try to assign an IP address based on switch port. Why would you want to do that? Here are some typical designs:
1. use "static" addresses on devices. Manually intensive, but simple. You can track what devices will have what address. Common for PLCs.
2. use an assignment pool (DHCP or BOOTP). You don't care who gets what address. Sharing is done by other means (NETBIOS names, etc) or not done at all (Internet cafe, etc).
3. use DHCP with hardware (MAC address) reservations. This allows you to centrally manage addresses.
4. there are many schemes if the purpose is security. MAC filtering based on port, and many others.
1. use "static" addresses on devices. Manually intensive, but simple. You can track what devices will have what address. Common for PLCs.
2. use an assignment pool (DHCP or BOOTP). You don't care who gets what address. Sharing is done by other means (NETBIOS names, etc) or not done at all (Internet cafe, etc).
3. use DHCP with hardware (MAC address) reservations. This allows you to centrally manage addresses.
4. there are many schemes if the purpose is security. MAC filtering based on port, and many others.