Offline docs (switch to live docs)                          UI-only  CLI-only

How to enable DHCP

Management of DHCP and IP ranges is a key element of configuring and managing MAAS:

If needed, you can review an explanation of MAAS DHCP before undertaking to manage or set MAAS DHCP parameters.

This article will help you learn:

How to enable MAAS-managed DHCP

To enable MAAS-managed DHCP:

  1. Select Subnets.

  2. Select the desired VLAN.

  3. Scroll down to Reserved ranges.

  4. If there is no reserved dynamic range, select Reserved dynamic range from the drop-down on the right.

  5. Enter a Start IP address.

  6. Enter an End IP address.

  7. Select Reserve.

  8. Select Configure DHCP. You will see a new screen.

  9. The options MAAS provides DHCP and Provide DHCP from a rack controller will be pre-selected.

  10. If you accept these options, you may need to choose a Rack controller.

  11. If you choose Relay to another VLAN, you will need to choose the target VLAN.

  12. Under Reserved dynamic range, you may have to select a subnet from the drop-down.

  13. You will need to select Configure DHCP for your changes to be registered with MAAS.

How to extend a reserved dynamic IP range

To extend a dynamic IP range:

  1. Go to Subnets.

  2. Select the relevant subnet.

  3. Reserve a dynamic range.

DHCP will be enabled automatically.

How to use a DHCP relay

To relay from one VLAN (source) to another VLAN (target):

  1. Ensure the target VLAN has DHCP enabled.

  2. Set up the external relay. This relay is set up independently from MAAS. See DHCP relay for software suggestions.

  3. Configure MAAS-managed DHCP as normal.

  4. Navigate to the source VLAN page.

  5. Select the Relay DHCP action.

  6. Fill in the fields in the resulting form. Note that the crucial setting is the target VLAN (Relay VLAN).

  7. Select Relay DHCP to finish.

How to customise MAAS with DHCP snippets

How to manage DHCP snippets

To manage snippets:

  1. Make sure you are logged in as an administrator.

  2. Select Settings >> DHCP snippets.

How to search DHCP snippets

To search DHCP snippets, enter the text to match in Search DHCP snippets. MAAS will progressively update the list of snippets as you type your search terms.

How to add DHCP snippets

To add a snippet:

  1. Select Add snippet.

  2. Enter the Snippet name.

  3. Optionally, check Enabled to enable the snippet now. Note that MAAS will not apply the snippet unless it is enabled.

  4. Optionally, enter a Description for the snippet.

  5. Optionally, choose a Type for the snippet from the drop-down (defaults to Global). This parameter sets the scope of the snippet. Note that if you choose a type other than global, you may need to choose the specific scope. For example, if you choose the Subnet type, you must identify the specific subnet to which this snippet applies.

  6. Enter the DHCP snippet. This is not validated on entry.

  7. Select Save snippet to register your changes with MAAS

How to edit DHCP snippets

To edit a snippet, select the pencil icon to the right of the snippet row and edit the fields as desired.

How to delete DHCP snippets

To delete a snippet, select the trash can icon to the right of the snippet. You will be asked to confirm; be aware that once confirmed, this action cannot be undone.

How to manage IP ranges

This section gives specific instructions about creating and managing IP ranges; it will help you learn:

See the glossary for an explanation of the two kinds of reserved IP ranges MAAS uses.

How to create an IP range

To create an IP range:

  1. Select Subnets.

  2. In the SUBNET column, choose the subnet for which you want to create an IP range.

  3. Scroll down to Reserved ranges.

  4. Select Reserve range and choose either Reserve range or Reserve dynamic range. Note that if you choose a dynamic range, MAAS will automatically provide DHCP for enlistment and commissioning provided that the associated VLAN has DHCP enabled.

  5. A window will appear, allowing you to enter a Start IP address and End IP address

  6. If you didn't select a dynamic range, you may optionally enter a Purpose for the range.

  7. Select Reserve to register your choices with MAAS.

How to edit an IP range

To edit an IP range, click on the pencil icon to the right of a range and make changes as desired. Be sure to Save your changes.

How to delete an IP range

To delete an IP range, click on the trash can icon to the right of a range. You will be asked to confirm by selecting Delete; there is no undo.

How to edit an existing IP range

  1. Select Menu at the far right of the row corresponding to the subnet in question.

  2. Select Edit reserved range from the menu that appears.

  3. Edit the fields as desired.

  4. Select Save to register your changes.

How to delete an existing IP range

  1. Select Menu at the far right of the row corresponding to the subnet in question.

  2. Select Remove range from the menu that appears.

  3. Select Save to register your changes.