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-typeoption-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" option
- option 40 string "domain.tld"; # 40: "NIS Domain" option
- option 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 edit system services dhcp router statement instead:
- [edit system services dhcp]
- option 3 router 10.7.7.2; # 3: "Default Router" option
- router {
- 10.7.7.1;
- }