dhcpserver

Purpose

Used for managing and showing the status of a DHCP server, including managing the leases for IP addresses, restarting, running, and shutting down the DHCP server, and displaying DHCP server status information.

Required permissions

For Digi products with two or more users, permissions must be set to set permissions dhcpserver=execute to use this command. See set permissions for details on setting user permissions for commands.

Syntax

dhcpserver [deletelease={ip address|all}]
[restart]
[run]
[shutdown]
[status]

Options

deletelease={ip address|all}

Specifies how to handle IP address leases. You can remove leases from the DHCP Server while it is running.

ip address

Removes a specific lease from the DHCP server.

all

Removes all IP address leases from the DHCP server.

Removing a lease causes the associated IP address to be returned immediately to the available address pool. Any IP address in this available address pool can be served in a new lease to a DHCP client.

If you stop or restart the DHCP server, or if you reboot the Digi device, all knowledge of the IP address leases will be lost. All leased addresses, except for reservations, will be returned to the available address pool and may be served in a new lease to a DHCP client.

Static lease reservations always display in the lease list. These reservation leases may be removed, but a new lease will be created immediately. To disable or permanently remove a reservation, use the set dhcpserver command.

restart

Restarts the DHCP server.

run

Runs (starts) the DHCP server if it is not already started.

shutdown

Shuts down the DHCP server.

status

Displays DHCP server status information.

Example

Display DHCP server status

#> dhcpserver status

Device Networking Status:

  Status for eth0:
    IP address         : 10.30.1.188
    Subnet mask        : 255.255.255.0
    Gateway            : 10.30.1.1
    Using static IP    : yes
  Default gateway      : 10.0.0.1
  Uptime               : 0 days + 21:00:44

DHCP server status: running

  Uptime               : 0 days + 00:00:14

Scopes configured in server:

Scope 1:
  Name                 : eth0
  IP address           : 10.30.1.126
  Subnet mask          : 255.255.255.0
  Starting IP address  : 10.30.1.190
  Ending IP address    : 10.30.1.198
  Routers              : 10.30.1.188
  DNS servers          : 209.183.48.10, 209.183.48.11
  Lease duration       : 3600 (seconds)
  Offer delay          : 500 (milliseconds)
  Addr conflict detect : disabled
  Send DNS proxy       : enabled
Address reservations:
    Reservation 1:
      IP address           : 10.30.1.135
      Client ID            : 00:40:9D:24:73:F8
      Lease duration       : 3600 (seconds)
    Reservation 2:
      IP address           : 10.30.1.192
      Client ID            : 02:40:9D:24:73:F8
      Lease duration       : using scope lease duration
    Reservation 3:
      IP address           : 10.30.1.195
      Client ID            : 00:09:26:19:51:05
      Lease duration       : using scope lease duration
    Reservation 4:
      IP address           : 10.30.1.196
      Client ID            : 00:09:26:19:51:06
      Lease duration       : using scope lease duration
    Reservation 5:
      IP address           : 10.30.1.197
      Client ID            : 00:09:26:19:51:07
      Lease duration       : using scope lease duration
  Address exclusions:
    none configured
  Lease Records:
                    Client ID         Lease Time in Seconds
    IP Address      (MAC Address)     Duration   Remaining  Lease Record Status
    --------------- ----------------- ---------- ---------- ------------------
    10.30.1.135     00:40:9D:24:73:F8 3600       1834       Reserved (active)
    10.30.1.192     02:40:9D:24:73:F8 3600       N/A        Reserved (inactive)
    10.30.1.195     00:09:26:19:51:05 3600       N/A        Reserved (inactive)
    10.30.1.196     00:09:26:19:51:06 3600       N/A        Reserved (inactive)
    10.30.1.197     00:09:26:19:51:07 3600       N/A        Reserved (inactive)

Delete a lease

dhcpserver deletelease=10.30.1.135

Delete all leases

dhcpserver deletelease=all

Output

Lease status values

Following are descriptions of the lease status values. The amount of time that a lease table entry will remain in each state also is stated. Note that after a lease is deleted, the associated IP address is returned to the available address pool.

Assigned (active)

A lease is currently assigned and active for the given client. The client may renew the lease, in which case the lease remains in this state.

Assigned (expired)

A lease has expired and is no longer active for the given client. A lease in this state will remain for 4 hours, after which it is deleted. If the same client requests an IP address before the lease is deleted, it will be given the same IP address previously served to it.

Reserved (active)

A lease for an address reservation is currently active for the given client. A reservation lease will remain indefinitely, although the status may alternate between active and inactive.

Reserved (inactive)

A lease for an address reservation is currently inactive for the given client. A reservation lease will remain indefinitely, although the status may alternate between active and inactive.

Reserved (unavail)

A lease for an address reservation was offered to a client, but that client actively declined to use the IP address. Typically this is because the client determined that another host on the same subnetwork is already using that IP address. Upon receiving the client's decline message, the DHCP server will mark the address as unavailable. The lease will remain in this state for 4 hours, after which it is reverts to the Reserved (inactive) status.

Offered (pre-lease)

A lease has been offered to the given client, but that client has not yet requested that the lease be acknowledged. It may be that the client also received an offer from another DHCP server, in which case this offer will expire in approximately 2 minutes. If the client requests this lease before that 2 minute interval elapses, this lease will change status to Assigned.

Released

A lease was previously assigned to the given client, but that client has proactively released it. A lease in this state will remain for 1 hour, after which it is deleted. If the same client requests an IP address before the lease is deleted, it will be given the same IP address previously served to it.

Unavailable Address

A lease was offered to a client, but that client actively declined to use the IP address. Typically this is because the client determined that another host on the same subnetwork is already using that IP address. Upon receiving the client's decline message, the DHCP server will mark the address as unavailable. The lease will remain in this state for four hours, after which it is deleted.

This status may also occur if the DHCP Server determines that the IP address is in use before it offers the address to a client. See the set dhcpserver command option conflictdetect.

See also