home

Supported platforms

Vyatta documentation

Learn how to install, configure, and operate the Vyatta Network Operating System (Vyatta NOS) and Orchestrator, which help drive our virtual networking and physical platforms portfolio.

Setting additional DHCP configuration parameters

CAUTION:

This feature is advanced and should be used only by expert users in special situations.

The vRouter DHCP server commands provide a set of commonly used DHCP server features. However, many additional features are available. Information regarding the available DHCP server features are located on the dhcpd.conf man page. To access it, type the following at the Vyatta command prompt:

man dhcpd.conf

To access these additional features, use one of the following commands, depending on the required scope of the feature. The commands are listed from widest to narrowest scope.

The precedence of scope of these commands is from narrowest to widest. That is, if more than one command is specified and a given host address falls within the scope of both, it is governed by parameters specified in the command with the narrowest scope.

Multiple parameter strings can be specified. Each parameter string that is specified adds a separate line to the dhcpd.conf file.

Note that no validation is done by the vRouter before passing the parameter string from these commands to the DHCP server process (dhcpd). Because of this lack of validation, it is imperative that the syntax described in the dhcpd.conf documentation be strictly followed. Failure to do so could result in a failure of the DHCP server. It is advisable to check the system log for errors when using these parameter strings. In addition, the show system processes command can be used to determine if the dhcpd process is still running.

The following example shows how the additional DHCP server parameters can be accessed. To configure additional DHCP server parameters, perform the following steps in configuration mode.

Table 1. Setting up a DHCP server with additional parameters

Step

Command

Enable the DHCP server and define an option that does not already have a keyword defined in the dhcpd process. See the dhcpd man page for further information.


vyatta@R1# set service dhcp-server global-parameters ‘option rfc3442-static-route code 121 = string;’

Specify the value to be used for the option for all shared networks, subnets, and static mappings defined in the DHCP server configuration.


vyatta@R1# set service dhcp-server global-parameters ‘option rfc3442-static-route 01:01:01:01:01:01:01:01;’

Specify an IP address to statically map to a host with a specific MAC address.


vyatta@R1# set service dhcp-server static-mapping MAP1 ip-address 172.16.117.15

Specify the MAC address of a host to be statically mapped to an IP address.


vyatta@R1# set service dhcp-server static-mapping MAP1 mac-address 09:09:09:09:09:09

Override the global value of the parameter defined previously for a specific host.


vyatta@R1# set service dhcp-server static-mapping MAP1 static-mapping-parameters ‘option rfc3442-static-route 01:01:01:01:01:01:01:02’

Specify that the DHCP server is authoritative for the specified shared network.


vyatta@R1# set service dhcp-server shared-network-name NET1 authoritative enable

Specify the subnet and address pool to use.


vyatta@R1# set service dhcp-server shared-network-name NET1 subnet 172.16.117.0/24 start 172.16.117.10 stop 172.16.117.20

Commit the changes.


vyatta@R1# commit

Show the configuration.


vyatta@R1# show service dhcp-server
 global-parameters “option rfc3442-static-route code 121  = string;”
 global-parameters “option rfc3442-static-route  01:01:01:01:01:01:01:01;”
shared-network-name NET1 {
      authoritative enable
       subnet 172.16.117.0/24 {
         start 172.16.117.10 {
            stop 172.16.117.20
			}
		}
	}
static-mapping MAP1 {
         ip-address 172.16.117.15
        mac-address 09:09:09:09:09:09
        static-mapping-parameters “option-rfc3422-static-route 01:01:01:01:01:01:02”
}