Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation

Clearing DHCP Bindings for Subscriber Access

This topic provides the procedure you use to display current DHCP bindings, clear selected bindings, and verify that the specified bindings are successfully cleared.

Subscriber management enables you to clear DHCP bindings at several different levels for DHCP local server and DHCP relay agent. For example, you can clear the DHCP bindings on all interfaces, a group of interfaces, or a specific interface. You can also clear DHCP bindings based on IP address, MAC address, session-ID, DHCPv6 prefix, DHCPv6 Client ID, FPC, PIC, port, VLAN, or stacked VLAN (S-VLAN).

This topic includes examples to show several variations of the clear DHCP binding feature. The examples use DHCP local server commands; however, the procedure and commands are similar for DHCP relay agent, DHCPv6 local server, and DHCPv6 relay agent.

To clear bindings and verify the results for a specific IP address:

  1. Display current bindings. Issue the appropriate variation of the show dhcp server binding command.
    user@host> show dhcp server binding
    2 clients, (2 bound, 0 selecting, 0 renewing, 0 rebinding)
    
    IP address       Hardware address    Type     Lease expires at
    192.168.32.1     90:00:00:01:00:01   active   2011-10-17 11:38:47 PST
    192.168.32.3     90:00:00:02:00:01   active   2011-00-17 11:38:41 PST
    
  2. Clear the binding you want to remove.
    user@host> clear dhcp server binding 192.168.32.1
  3. Verify that the binding has been cleared.
    user@host> show dhcp server binding
    1 clients, (1 bound, 0 selecting, 0 renewing, 0 rebinding)
    
    IP address      Hardware address    Type     Lease expires at
    192.168.32.3    90:00:00:02:00:01   active   2011-00-17 11:38:41 PST
    

The following examples show variations of the clear DHCP binding feature. The examples use the DHCP local server version of the commands.

Note: IP demux interfaces are not supported by the show and clear DHCP bindings commands for DHCP local server and DHCP relay agent.

To clear all bindings:

user@host> clear dhcp server binding all

To clear bindings on a specific interface:

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

To clear all bindings over an interface. This example uses the wildcard option.

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

To clear bindings on top of a specific VLAN. This example clears all bindings on top of VLAN 100.

user@host> clear dhcp server binding ge-1/0/0:100

To clear bindings for a specific S-VLAN. This example clears bindings on S-VLAN 100-200.

user@host> clear dhcp server binding ge-1/0/0:100-200

To clear all bindings on top of all demux VLANs:

user@host> clear dhcp server binding demux0

To clear all bindings on top of an underlying interface. This example clears the bindings on all demux VLANS on top of interface ae0:

user@host> clear dhcp server binding ae0

To clear PPP bindings. This example uses the wildcard feature and clears the PPP bindings over interface pp0.100 and pp0.200.

user@host> clear dhcp server binding pp0.*

To clear all bindings on an FPC. This example uses the wildcard feature and clears all DHCP bindings on FPC 1.

user@host> clear dhcp server binding ge-1/*

To clear all bindings on a PIC. This example uses the wildcard feature and clears all DHCP bindings on FPC 1, PIC 0.

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

To clear all bindings on a port. This example uses the wildcard feature and clears all DHCP bindings on FPC 1, PIC 0, port 0.

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

Published: 2013-02-11

Supported Platforms

Published: 2013-02-11