Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Announcement: Try the Ask AI chatbot for answers to your technical questions about Juniper products and solutions.

close
header-navigation
keyboard_arrow_up
close
keyboard_arrow_left
Junos CLI Reference
Table of Contents Expand all
list Table of Contents

clear dhcp server binding

date_range 19-Nov-23

Syntax

content_copy zoom_out_map
clear dhcp server binding 
<address>
<all>
<interface interface-name>
<interfaces-vlan>
<interfaces-wildcard>
<logical-system logical-system-name>
<routing-instance routing-instance-name>
<dual-stack>

Description

Clear the binding state of a Dynamic Host Configuration Protocol (DHCP) client from the client table on the extended DHCP local server.

Note:

If you delete the DHCP server configuration, DHCP server bindings might still remain. To ensure that DHCP bindings are removed, issue the clear dhcp server binding command before you delete the DHCP server configuration.

Options

address

(Optional) Clear the binding state for the DHCP client, using one of the following entries:

  • ip-address—The specified IP address.

  • mac-address—The specified MAC address.

  • session-id—The specified session ID.

all

(Optional) Clear the binding state for all DHCP clients.

interface interface-name

(Optional) Clear the binding state for DHCP clients on the specified interface.

Note:

This option clears all bindings whose initial login requests were received over the specified interface. Dynamic demux login requests are not received over the dynamic demux interface, but rather the underlying interface of the dynamic demux interface. To clear a specific dynamic demux interface, use the ip-address or mac-address options.

interfaces-vlan

(Optional) Clear the binding state on the interface VLAN ID and S-VLAN ID.

interfaces-wildcard

(Optional) Clear bindings on a set of interfaces. This option supports the use of the wildcard character (*).

logical-system logical-system-name

(Optional) Clear the binding state for DHCP clients on the specified logical system.

routing-instance routing-instance-name

(Optional) Clear the binding state for DHCP clients on the specified routing instance.

dual-stack

(Optional) Remove either both arms or single arm of dual-stack.

Note:
  • The dual-stack command is added in the syntax removes both arms of the dual-stack with a single command entry.

  • When the dual-stack command is not added in the syntax, the clear dhcpv6 server binding command clears only the family specific arm of the dual-stack.

Required Privilege Level

view

Output Fields

See show dhcp server binding for an explanation of output fields.

Sample Output

clear dhcp server binding <ip-address>

The following sample output displays the address bindings in the DHCP client table on the extended DHCP local server before and after the clear dhcp server binding command is issued.

content_copy zoom_out_map
user@host> show dhcp server binding

2 clients, (0 bound, 0 selecting, 0 renewing, 0 rebinding)

IP address       Hardware address   Type     Lease expires at
198.51.100.1      00:00:5e:00:53:01  active   2007-01-17 11:38:47 PST
198.51.100.3      00:00:5e:00:53:02  active   2007-01-17 11:38:41 PST


user@host> clear dhcp server binding 198.51.100.1

user@host> show dhcp server binding

1 clients, (0 bound, 0 selecting, 0 renewing, 0 rebinding)

IP address       Hardware address   Type     Lease expires at
198.51.100.3      00:00:5e:00:53:02  active   2007-01-17 11:38:41 PST

clear dhcp server binding all

The following command clears all DHCP local server bindings:

content_copy zoom_out_map
user@host> clear dhcp server binding all

clear dhcp server binding interface

The following command clears DHCP local server bindings on a specific interface:

content_copy zoom_out_map
user@host> clear dhcp server binding interface fe-0/0/2 

clear dhcp server binding <interfaces-vlan>

The following command uses the interfaces-vlan option to clear all DHCP local server bindings on top of the underlying interface ae0, which clears DHCP bindings on all demux VLANs on top of ae0:

content_copy zoom_out_map
user@host> clear dhcp server binding ae0 

clear dhcp server binding <interfaces-wildcard>

The following command uses the interfaces-wildcard option to clear all DHCP local server bindings over a specific interface:

content_copy zoom_out_map
user@host> clear dhcp server binding ge-1/0/0.* 

clear dhcp server binding dual-stack all

The following command clears all the dual-stack local server bindings.

content_copy zoom_out_map
user@host> clear dhcp server binding dual-stack all

Release Information

Command introduced in Junos OS Release 9.0.

Options interfaces-vlan and interfaces-wildcard added in Junos OS Release 12.1.

Command updated with dual-stack statement in Junos OS Release 17.3.

footer-navigation