In MAAS-managed networks, you can further manage your subnets with a reserved range of IP addresses. You can reserve IP addresses by adding one or more reserved ranges to a subnet configuration. You can define two types of ranges: reserved ranges and reserved dynamic ranges.
A reserved range operates differently depending on whether the subnet is managed or unmanaged. For a managed (subnet), MAAS will never assign IP addresses inside this range. You can use this range for anything, such as infrastructure systems, network hardware, external DHCP, or an OpenStack namespace. For an unmanaged (subnet), MAAS will only assign IP addresses inside this range – but MAAS can assign any IP within this range.
A reserved dynamic range is used by MAAS for enlisting, commissioning and, if enabled, MAAS-managed DHCP on the machine’s VLAN during commissioning and deployment. If created with the Web UI, an initial range is created as part of the DHCP enablement process. MAAS never uses IP addresses from this range for an unmanaged subnet.
This article gives specific instructions about creating and managing IP ranges; it will help you learn:
To create a range with the web UI, choose the “Subnets” option across the top:
In the “SUBNET” column, choose the subnet for which you want to create an IP range(s):
Scroll down to “Reserved ranges” on the subnet screen and click on the “Reserve range” drop-down:
Choose ‘Reserve range’ or ‘Reserve dynamic range’. If you choose the latter, MAAS will automatically provide DHCP for enlistment and commissioning provided that the associated VLAN has DHCP enabled.
When you choose either of those two options, a window will appear allowing you to enter start and end addresses for the range as well as a comment.
Below is an example window when creating a ‘reserved range’ (the windows are identical):
Click the ‘Reserve’ button when done.
See Concepts and terms for an explanation of the two kinds of reserved IP ranges MAAS uses.
To create a range of dynamic IP addresses that will be used by MAAS for node enlistment, commissioning, and possibly deployment:
maas $PROFILE ipranges create type=dynamic \ start_ip=$IP_DYNAMIC_RANGE_LOW end_ip=$IP_DYNAMIC_RANGE_HIGH \ comment='This is a reserved dynamic range'
To create a range of IP addresses that will not be used by MAAS:
maas $PROFILE ipranges create type=reserved \ start_ip=$IP_STATIC_RANGE_LOW end_ip=$IP_STATIC_RANGE_HIGH \ comment='This is a reserved range'
To reserve a single IP address that will not be used by MAAS:
maas $PROFILE ipaddresses reserve ip_address=$IP_STATIC_SINGLE
To remove such a single reserved IP address:
maas $PROFILE ipaddresses release ip=$IP_STATIC_SINGLE
Click the ‘Menu’ button at the far right of the row corresponding to the subnet in question and select ‘Edit reserved range’ from the menu that appears. Edit the fields as desired and click the ‘Save’ button.
Select ‘Remove range’ from the menu that appears when clicking the ‘Menu’ button at the far right of the row corresponding to the subnet in question.
To edit an IP range, first find the ID of the desired IP range with the command:
maas admin ipranges read
Examine the JSON output to find the ID corresponding to the IP range you want to edit, then enter:
maas admin iprange update $ID start_ip="<start ip>" end_ip="<end ip>" comment="freeform comment"
This command will update the IP range associated with $ID.