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:

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;}

Related Topics