Clearing a DHCP lease on a Palo Alto Networks firewall can help resolve an address conflict, remove a stale client entry, or let a device obtain a different IP address. The process is usually performed from the firewall’s operational CLI, and the command must identify both the DHCP server interface and the client’s IP address. Before removing a lease, confirm that the firewall is actually serving DHCP for that network: a firewall acting only as a DHCP relay does not hold the client leases itself.
What a DHCP Lease Is
A DHCP lease is the temporary assignment of an IP address to a device. When a Palo Alto firewall is configured as a DHCP server, it keeps track of information such as the client’s address, the interface that serves the network, and the lease’s status or expiration. The client normally renews its lease automatically before it expires.
Clearing a lease removes the firewall’s record of that assignment. It does not necessarily make the client stop using the address immediately. A device may continue using its current IP until it releases the address, renews its lease, or the lease expires. Keep this distinction in mind when troubleshooting: clearing the server-side entry and renewing the client’s network settings are related, but separate, actions.
Check That the Firewall Is the DHCP Server
First, identify how DHCP is configured on the network. The firewall may be configured as a DHCP server, a DHCP relay, or a DHCP client on one of its interfaces. The lease-clearing command in this guide is for a Palo Alto firewall acting as a DHCP server.
- DHCP server: The firewall assigns addresses to clients on a connected network. Its DHCP lease table is the place to check and clear those assignments.
- DHCP relay: The firewall forwards DHCP messages to a separate DHCP server. The actual leases are recorded on that server, so clear the lease there instead.
- DHCP client: The firewall receives an address from another DHCP server. This is different from clearing a lease for a client served by the firewall.
You can review the DHCP configuration in the firewall’s web interface under Network and the relevant DHCP settings. Menu labels can differ between PAN-OS releases. If you are unsure which device owns the lease, check the DHCP server configuration and the client’s network details before making changes.
Find the DHCP Lease in the CLI
Connect to the firewall using SSH or open its CLI from the web interface. Use the firewall’s operational mode, which is the mode in which you run monitoring and troubleshooting commands. At an operational prompt, list leases with:
show dhcp server lease all
To narrow the results to one interface, use:
show dhcp server lease interface ethernet1/1
Replace ethernet1/1 with the interface that serves the client’s subnet. Use the output to identify the client’s IP address and, when available, verify the associated client or hardware address. Confirm that you have selected the correct interface and device before clearing anything. A mistaken selection can affect another client or network.
If the command is not accepted on your firewall, use CLI tab completion or the built-in command help to check the syntax supported by your PAN-OS version. Command availability and exact options can vary by release.
Clear a Specific DHCP Lease
Once you have confirmed the interface and the client’s IP address, clear that individual lease with this command:
clear dhcp lease interface ethernet1/1 ip 192.168.10.25
Replace ethernet1/1 with the DHCP-serving interface and 192.168.10.25 with the address shown for the client in the lease table. For example, if the client’s lease is on ethernet1/2 and its address is 10.20.30.45, use:
clear dhcp lease interface ethernet1/2 ip 10.20.30.45
Run the command at the operational prompt, not as a configuration change. Clearing a lease is an operational action, so it generally does not require a configuration commit. Do not use a guessed wildcard or “clear all” variation: supported options can differ between releases, and a broad action could interrupt more clients than intended. If you need to remove many leases, verify the options available on your software version and follow your organization’s change process.
Verify That the Lease Was Cleared
After running the command, check the lease table again:
show dhcp server lease interface ethernet1/1
Confirm that the targeted address no longer appears as an active lease, or that the table reflects the updated state. If it still appears, verify that you used the correct interface and IP address. Also check whether you are connected to the firewall that serves the client’s subnet, particularly in environments with multiple firewalls, virtual systems, or high-availability peers.
Next, decide whether the client needs to request a new lease immediately. If the device is still online, clearing the server’s record alone may not cause it to stop using its current IP. Depending on the client operating system and network setup, you may need to disconnect and reconnect the network, renew the DHCP lease, or restart the client’s network connection. Use the appropriate method for the device rather than assuming that the firewall’s command forces a client-side renewal.
Important Considerations Before Clearing a Lease
- Check for an address conflict: Confirm that another device is not already using the IP address. Removing the record while a client is still using the address can create confusion or an IP conflict if the address is assigned again.
- Coordinate with the client owner: Clearing a lease can temporarily disrupt access to network resources. Let the user or service owner know if the device may need to renew or reconnect.
- Review reservations: A configured DHCP reservation is different from a temporary lease. Clearing a lease does not necessarily delete or change the reservation in the DHCP configuration.
- Use the right interface: The interface in the command must be the one providing DHCP for the client’s subnet, not simply the interface that appears closest to the device in a network diagram.
- Keep a record: For production networks, document the client, address, reason for clearing the lease, and time of the change.
These precautions are particularly useful when troubleshooting printers, phones, cameras, access points, and other devices that may retain network settings or have limited ways to renew a lease. If the device is critical, schedule the change or coordinate with the service owner before removing its DHCP entry.
Common Problems and Troubleshooting
The lease does not appear in the table. Check that you are viewing the right interface and firewall. If the Palo Alto device is configured as a DHCP relay, look up the lease on the external DHCP server instead. Also confirm that the client is currently using DHCP rather than a manually configured static IP.
The clear command returns an error. Verify the command spelling, interface name, and IP address. Make sure you are at the operational prompt, and use CLI completion or help to confirm the syntax supported by your PAN-OS release. Do not substitute a different command based on an example for another software version without checking it first.
The client continues using the old address. That can be expected. Removing the server’s lease record does not necessarily send a message that immediately changes the client’s local network settings. Renew the lease from the client or reconnect it, using the procedure appropriate to its operating system. If the address is statically configured, changing the DHCP server’s lease table will not change it.
The address returns after being cleared. The client may have requested the same address again, or a reservation may be configured for that device. Review the DHCP configuration, reservation settings, and client identifier. If the problem is an address conflict, identify which device is using the address instead of repeatedly clearing the lease.
The issue occurs in a high-availability setup. Check which peer is active and which firewall is serving DHCP traffic. Verify the lease state after a failover as well. HA behavior and operational-state handling can depend on the configuration and PAN-OS release, so do not assume that clearing a lease on one peer has the desired effect on every setup.
Frequently Asked Questions
Do I need to commit after clearing a DHCP lease? In normal use, no. The command clears an operational lease entry rather than changing the firewall’s saved configuration. If you also change DHCP settings or reservations, those configuration changes may require a commit.
Will clearing the lease give the client a new IP address? Not necessarily. The client may request the same address again, especially if the address is still available or reserved for that device. If you need a different address, review the DHCP pool and reservation settings and renew the client’s lease.
Can I clear a DHCP relay lease on the firewall? The firewall relay forwards DHCP traffic, but the external DHCP server maintains the lease. Clear or modify the entry on that server, then have the client renew if needed.
Conclusion
To clear a DHCP lease on a Palo Alto firewall, first confirm that the firewall is acting as the DHCP server, find the client’s entry with show dhcp server lease all, and remove the specific binding with clear dhcp lease interface <interface> ip <IP-address>. Verify the result in the lease table, then renew the client’s connection if it needs to request an address again. Use care with active devices, reservations, DHCP relays, and high-availability environments so that a targeted cleanup does not create a larger network problem.
Disclaimer: Articles are written by Humans, AI or Both. Verify Important information.