I have a Cisco C9200-24PXG switch that isn't giving out DHCP addresses from our firewall. When I assign a static IP to a device, it works as expected, but when I leave a device plugged in for DHCP, it gets a 169.254 IP address and doesn't connect properly. I'm not very familiar with Cisco devices, so I'm wondering if there's a specific setting or configuration I need to adjust in the interface to allow DHCP to work correctly.
4 Answers
If your switch has VLAN interfaces set up and is acting at Layer 3, make sure you’ve defined helper addresses in those VLAN interfaces that point to your DHCP server. This setup is crucial for forwarding DHCP broadcasts from clients to the server.
Check if you have a DHCP forwarder set up to relay DHCP requests to the firewall, especially if your switch is functioning like a Layer 3 device.
Do you have DHCP Snooping enabled on the switch ports? Also, confirm whether all the ports are in the same VLAN and if any routing is taking place. Sharing one of your port configurations could help us troubleshoot further.
Could it be a DHCP Snooping issue? If the device that keeps getting the 169.254 address is directly connected to the upstream device, it might be worth testing to see if DHCP works in that setup.
Here's the VLAN config my boss set up for a static IP for the switch:

And here’s the port config:
GigabitEthernet1/0/1 is up, line protocol is up (connected)
MTU 1500 bytes, Full-duplex, 1000Mb/s, no input errors or drops.