Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

dhcp-attributes (Address-Assignment Pools)

Syntax

Hierarchy Level

Description

Configure DHCP attributes for the protocol family in a specific address pool. The attributes determine options and behaviors for the DHCP clients.

Options

boot-file

Set the boot file advertised to DHCP clients. After the client receives an IP address and the boot file location from the DHCP server, the client uses the boot image stored in the boot file to complete DHCP setup. This configuration is equivalent to DHCP option 67.

  • Values: filename—Location of the boot file on the boot server. The filename can include a pathname.

boot-server

Configure the name of the boot server advertised to DHCP clients. The client uses a boot file located on the boot server to complete DHCP setup. This configuration is equivalent to DHCP option 66.

  • Values:

    • address—IPv4 address of a boot server.

    • hostname—Fully qualified hostname of a boot server.

dns-server

Specify a DNS server to which clients can send DNS queries. This is equivalent to DHCPv6 option 23. To specify multiple DNS servers, add multiple dns-server statements in order of preference.

  • Values: ipv6-address—IPv6 address of a DNS server.

domain-name

Configure the name of the domain in which clients search for a DHCP server host. This is the default domain name that is appended to hostnames that are not fully qualified. This is equivalent to DHCP option 15.

  • Values: domain-name—Name of the domain.

exclude-prefix-len exclude-prefix-length

Specify the length of the IPv6 prefix to be excluded from the delegated prefix. Range: 1 through 128.

grace-period

Configure the amount of time that the client retains the address lease after the lease expires. The address cannot be reassigned to another client during the grace period.

  • Values: seconds—Number of seconds the lease is retained.

  • Range: 0 through 4,294,967,295 seconds.

  • Default: 0 (no grace period).

maximum-lease-time

Specify the maximum length of time, in seconds, that the lease is held for a client if the client does not renew the lease. This is equivalent to DHCP option 51. The maximum-lease-time is mutually exclusive with both the preferred-lifetime and the valid-lifetime, and cannot be configured with either timer.

  • Values: seconds—Maximum number of seconds the lease can be held.

  • Range: 30 through 4,294,967,295 seconds.

  • Default: 86,400 (24 hours).

name-server

Configure one or more Domain Name System (DNS) name servers available to the client to resolve hostname-to-client mappings. This is equivalent to DHCP option 6.

  • Values: server-names—IP addresses of the domain name servers, listed in order of preference.

netbios-node-type

Specify the NetBIOS node type. This is equivalent to DHCP option 46.

  • Values: node-type—One of the following node types:

    • b-node—Broadcast node.

    • h-node—Hybrid node.

    • m-node—Mixed node.

    • p-node—Peer-to-peer node.

option

Specify user-defined options that are added to client packets. Starting in Junos OS Release 13.3, the hex-string option type was introduced.

  • Values:

    • array—An option can include an array of option types.

    • id-number—Any whole number. The ID number is used to index the option and must be unique across a DHCP server.

    • option-type—Any of the following types: byte, byte-stream, flag, hex-string, integer, ip-address, short, string, unsigned-integer, or unsigned-short.

    • option-value—Value associated with an option. The option value must be compatible with the option type (for example, an On or Off value for a flag type).

preferred-lifetime

Specify the length of time, in seconds, that the DHCPv6 server keeps the IPv6 prefix active. When the lifetime expires, the address is deprecated. If the valid-lifetime is also configured, the preferred-lifetime must be less than the valid-lifetime. The preferred-lifetime and the maximum-lease-time are mutually exclusive and cannot both be configured.

  • Values: seconds—Number of seconds that the IPv6 prefix is active.

  • Range: 30 through 4,294,967,295 seconds.

  • Default: 86,400 (24 hours).

router

Specify one or more routers located on the client’s subnet. This statement is the equivalent of DHCP option 3.

  • Values: router-address—IP address of one or more routers.

server-identifier

Specify the IP address that is used as the source address the DHCP server includes in IP packets when communicating with clients. The address is included in the DHCP packet in option 54.

  • Values: ipv4-address—IP address.

sip-server-address

Specify a SIP outbound proxy server that DHCPv6 local server clients can use. This is equivalent to DHCPv6 option 22. To specify multiple servers, add multiple sip-server-address statements in order of preference.

  • Values: ipv6-address—IPv6 address of a SIP outbound proxy server.

sip-server-domain-name

Configure the domain name of the SIP outbound proxy server that DHCPv6 local server clients can use. This is equivalent to DHCPv6 option 21.

  • Values: domain-name—Name of the domain.

t1-percentage

Specify a percentage of the preferred-lifetime value. After this percentage of the preferred-lifetime value elapses, the DHCPv4 or DHCPv6 client requests an extension on its lease from the originating DHCP local server. The t1-percentage is also referred to as the renewal time. The t1-percentage value must be less than the t2-percentage value. DHCPv4 server support was added in Junos OS Release 17.2.

  • Values: percentage—Percentage of the preferred-lifetime value.

  • Range: 0 through 100.

  • Default: If the t1-percentage value is not configured, the default is based on the preferred-lifetime value:

    • If the preferred-lifetime value is finite, the default is 50 percent of the preferred-lifetime value.

    • If the preferred-lifetime value is infinite, the default is also infinite.

t1-renewal-time

Specify the time (T1) at which the DHCPv4 or DHCPv6 client requests an extension (renewal) of the existing lease. This time is expressed as the number of seconds since the beginning of the lease. Using this statement to configure a duration in seconds is an alternative to using the t1-percentage statement.

  • Values: seconds—Number of seconds.

  • Range: 30 through 4,294,967,295 seconds.

  • Default: 50 percent of the lease duration (preferred-lifetime).

t2-percentage

Specify a percentage of the preferred-lifetime value. After this percentage of the preferred-lifetime value elapses, the DHCPv4 or DHCPv6 client requests an extension on its lease from any available DHCPv4 or DHCPv6 server. The t2-percentage is also referred to as the rebinding time. The t2-percentage value must be greater than the t1-percentage value. DHCPv4 server support was added in Junos OS Release 17.2.

  • Values: percentage—Percentage of the preferred-lifetime value.

  • Range: 0 through 100.

  • Default: Default: If the t2-percentage value is not configured, the default is based on the preferred-lifetime value:

    • If the preferred-lifetime value is finite, the default is 80 percent of the preferred-lifetime value.

    • When the preferred-lifetime value is infinite, the default is also infinite.

t2-rebinding-time

Specify the time (T2) at which the DHCPv4 or DHCPv6 client attempts to contact any DHCP server to request an extension (rebinding) of the existing lease. This time is expressed as the number of seconds since the beginning of the lease. Using this statement to configure a duration in seconds is an alternative to using the t2-percentage statement.

  • Values: seconds—Number of seconds.

  • Range: 30 through 4,294,967,295 seconds.

  • Default: The default value depends on the client:

    • (DHCPv4 clients) 87.5 percent of the lease duration (preferred-lifetime).

    • (DHCPv6 clients) 80 percent of the lease duration (preferred-lifetime).

tftp-server

Specify the Trivial File Transfer Protocol (TFTP) server that the client uses to obtain the client configuration file. This is equivalent to DHCP option 150.

  • Values: ip-address—IP address of the TFTP server.

valid-lifetime

Specify the length of time, in seconds, that the DHCPv6 server keeps the IPv6 prefix valid. When the lifetime expires, the address becomes invalid. If the preferred-lifetime is also configured, the valid-lifetime must be greater than the preferred-lifetime. The valid-lifetime and the maximum-lease-time are mutually exclusive and cannot both be configured.

  • Values: seconds—Number of seconds that the IPv6 prefix is valid.

  • Range: 30 through 4,294,967,295 seconds.

  • Default: 86,400 (24 hours).

wins-server

Specify one or more NetBIOS name servers (NBNS) that the client uses to resolve NetBIOS names. This is equivalent to DHCP option 44.

  • Values: ipv4-address—IP address of each NetBIOS name server. Add them to the configuration in order of preference.

The remaining statements are explained separately. Search for a statement in CLI Explorer or click a linked statement in the Syntax section for details.

Required Privilege Level

admin—To view this statement in the configuration.

admin-control—To add this statement to the configuration.

Release Information

Statement introduced in Junos OS Release 9.0.

exclude-prefix-len statement introduced in Junos OS Release 17.3 for MX Series.