Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation

Creating User-Defined DHCP Options Not Included in the Default Junos Implementation of the DHCP Server

You can configure one or more user-defined options that are not included in the Junos default implementation of the DHCP server. For example, if a client requests a DHCP option that is not included in the DHCP server, you can create a user-defined option that enables the server to respond to the client’s request.

To configure a user-defined DHCP option, include the option statement:

option {[ (id-number option-type option-value) | (id-number array option-type option-value) ];}

The option statement specifies the following values:

  • 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, integer, ip-address, short, string, unsigned-integer, unsigned-short.
  • array—An option can include an array of values.
  • 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).

You can include this statement at the following hierarchy levels:

[edit system services dhcp][edit system services dhcp pool][edit system services dhcp static-binding]

The following example shows user-defined DHCP options:

[edit system services dhcp]option 19 flag off; # 19: "IP Forwarding" optionoption 40 string "domain.tld"; # 40: "NIS Domain" optionoption 16 ip-address 10.3.3.33; # 16: "Swap Server" option

User-defined options that conflict with DHCP configuration statements are ignored by the server. For example, in the following configuration, the DHCP server ignores the user-defined option 3 router statement and uses the router statement instead:

[edit system services dhcp]option 3 router 10.7.7.2; # 3: "Default Router" optionrouter {10.7.7.1;}

Published: 2012-07-03

Supported Platforms

Published: 2012-07-03