How to manage networks

MAAS provides pre-configured networks for convenience. You can reconfigure these networks to match your environment.

This page shows you how to:

  • Manage subnets (the foundation of IP allocation).
  • Create and use VLANs.
  • Allocate and reserve IP addresses.
  • Configure and maintain interfaces (NICs, bonds, bridges).
  • Use network discovery to detect devices.
  • Apply advanced patterns such as dual NICs and loopbacks.

Cheat sheet: common networking commands

Here are the most common MAAS networking commands at a glance. Use this cheat sheet if you just need the basics. The sections below provide full detail and context.

# Subnets
maas $PROFILE subnets read
maas $PROFILE subnet update $SUBNET_CIDR managed=true

# VLANs
maas $PROFILE vlans create $FABRIC_ID name=$VLAN_NAME vid=$VLAN_ID
maas $PROFILE interfaces create-vlan $SYSTEM_ID vlan=$VLAN_ID parent=$INTERFACE_ID

# IP addresses
maas $PROFILE ipaddresses reserve ip=$IP_ADDRESS
maas $PROFILE ipranges create type=dynamic subnet=$SUBNET start_ip=$LOW end_ip=$HIGH

# Interfaces
maas $PROFILE interfaces read $SYSTEM_ID
maas $PROFILE interface update $SYSTEM_ID $INTERFACE_ID key=value...

# Routes
maas $PROFILE interface link-subnet $SYSTEM_ID $INTERFACE_ID subnet=$SUBNET_ID mode=STATIC ip_address=10.0.0.101

# Discovery
maas $PROFILE maas set-config name=network_discovery value=enabled

Manage subnets

Subnets are the building blocks for all networking in MAAS. You’ll use them to assign addresses, set gateways, and control routing.

View and edit subnets

UI
Networking > Subnets > (Select subnet)

CLI

maas $PROFILE subnets read
maas $PROFILE subnet read $SUBNET_ID

Enable or disable subnet management

maas $PROFILE subnet update $SUBNET_CIDR managed=true   # enable
maas $PROFILE subnet update $SUBNET_CIDR managed=false  # disable

Configure DNS servers

maas $PROFILE subnet update $SUBNET_CIDR dns_servers=$DNS_SERVER_IPS

Add static routes

maas $PROFILE static-routes create source=$SOURCE_SUBNET destination=$DEST_SUBNET gateway_ip=$GATEWAY_IP

Manage VLANs

VLANs let you segment networks for isolation, PXE booting, or multi-tenancy.

Create a VLAN

maas $PROFILE vlans create $FABRIC_ID name=$VLAN_NAME vid=$VLAN_ID

Assign a VLAN to an interface

maas $PROFILE interfaces create-vlan $SYSTEM_ID vlan=$VLAN_ID parent=$INTERFACE_ID

Delete a VLAN

maas $PROFILE vlan delete $FABRIC_ID $VLAN_ID

Manage IP addresses

You can reserve addresses for static or dynamic use.

Reserve a single IP

maas $PROFILE ipaddresses reserve ip=$IP_ADDRESS_STATIC_SINGLE

Reserve a dynamic range

maas $PROFILE ipranges create type=dynamic subnet=$SUBNET_ADDRESS   start_ip=$IP_DYNAMIC_RANGE_LOW end_ip=$IP_DYNAMIC_RANGE_HIGH

Reserve a static range

maas $PROFILE ipranges create type=reserved subnet=$SUBNET_ADDRESS   start_ip=$IP_STATIC_RANGE_LOW end_ip=$IP_STATIC_RANGE_HIGH

Configure static IP via netplan (post-deploy)

Edit /etc/netplan/50-cloud-init.yaml:

network:
  ethernets:
    ens160:
      addresses:
        - 192.168.0.100/24
      gateway4: 192.168.0.1
      nameservers:
        addresses: [8.8.8.8, 8.8.4.4]

Apply with:

sudo netplan apply

Manage interfaces

Interfaces control how machines connect to subnets. MAAS supports physical NICs, VLANs, bonds, and bridges. Most changes require the machine to be in Ready or Broken state.

View and maintain interfaces

  • List interfaces:
    maas $PROFILE interfaces read $SYSTEM_ID
    
  • View one interface:
    maas $PROFILE interface read $SYSTEM_ID $INTERFACE_ID
    
  • Update interface:
    maas $PROFILE interface update $SYSTEM_ID $INTERFACE_ID key=value...
    
  • Delete interface:
    maas $PROFILE interface delete $SYSTEM_ID $INTERFACE_ID
    

Common interface types

  • Physical (detected during commissioning)
  • VLAN (virtual interface tied to a parent NIC and VLAN ID)
  • Bond (group NICs for redundancy or throughput)
  • Bridge (share NICs with VMs/containers or route traffic)

Each has UI and CLI creation commands. See interface reference for details.

Manage routes and links

  • Disconnect interface:
    maas $PROFILE interface disconnect $SYSTEM_ID $INTERFACE_ID
    
  • Link interface to subnet:
    maas $PROFILE interface link-subnet $SYSTEM_ID $INTERFACE_ID     mode=STATIC subnet=$SUBNET_ID ip_address=10.0.0.101
    
  • Unlink interface:
    maas $PROFILE interface unlink-subnet $SYSTEM_ID $INTERFACE_ID
    
  • Set default gateway:
    maas $PROFILE subnet update $SUBNET_CIDR gateway_ip=$MY_GATEWAY
    

Tag interfaces

Tags help classify interfaces for automation (e.g., "uplink", "pxe").

  • Add tag:
    maas $PROFILE interface add-tag $SYSTEM_ID $INTERFACE_ID tag=my-tag
    
  • Remove tag:
    maas $PROFILE interface remove-tag $SYSTEM_ID $INTERFACE_ID tag=my-tag
    

Manage network discovery

Use discovery to detect devices on connected subnets.

  • Enable:
    maas $PROFILE maas set-config name=network_discovery value=enabled
    
  • Disable:
    maas $PROFILE maas set-config name=network_discovery value=disabled
    
  • Clear all discoveries:
    maas $PROFILE discoveries clear all=true
    

You can fine-tune discovery (force re-scan, use ping, slow scan, limit threads) and filter results by unknown IP or MAC. See CLI reference for full commands.

Advanced: dual NICs and loopbacks

  • Dual NICs: Assign private and public roles to different NICs (e.g., internal DHCP + external static IP). Configure in MAAS or via netplan.
  • Loopbacks: Add a loopback interface with a dummy MAC (00:00:00:00:00:00). Useful for routing or HA testing.

Verify your changes

  • Check the UI: Machines > Network tab should reflect changes.
  • Confirm CLI reads show the expected subnets, bonds, or bridges.
  • Use ping or ip addr on deployed machines to confirm connectivity.

Next steps

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.

I’m not sure if this is the right place to ask for this. Would it be possible to have some documentation on managing network spaces in terms of VLANs and subnets, primarily with the web UI? In particular, how to set up multi-subnet spaces. Thank you!

Review as requested

Create a Vlan interface

  • Suggestion: in the section above you briefly explain what the concept of a physical interface is, you could do that here to start too to explain that this connects a VLAN and a parent interface. In fact, you also have a brief explanation of bonds in the bonds section below too.
  • Nit: You will need VLAN separation for many different purposes: → Creating separate VLANs can be useful for a number of different purposes:
  • Nit: a parent (usually a physical NIC) → a parent interface (typically a physical network interface like a NIC, on which the VLAN is configured)
  • a VLAN ID (typically between 1 and 4094)-> a VLAN VID (typically between 1 and 4094).
  • Do you need to duplicate what the keys and the descriptions are when you have a link to the CLI documentation?

Bond two interfaces

  • Question/nit:
    provider failover if one NIC fails
    is this just applicable to NICs or failure of any physical interface? Is it necessary to distinguish between the two here?
  • Nit: Should this section be named Creating a bond ?
  • Suggestion: Remove the How to create a bond and Troubleshooting bond creation, or keep these headers but add in a troubleshooting section into the VLAN interface section above where you mention “some common mistakes often plague…”. Either way, there’s similar content in the two sections but different headings.
  • You don’t specify what the keys/ optional parameters here are like you do in VLAN interface, which is perhaps preferable with the link to the CLI docs, either way the sections aren’t consistent.

Create a bridge

  • Put the definition/description first, before the use cases, as in previous sections.
  • Nit: you could link to jq docs?
  • Same comment about keys/optional parameters/ cli docs as the sections above.

Manage vlans

Create vlan

  • $VLAN_ID → $VLAN_VID

Assign vlan to interface

  • $VLAN_ID is correct here, it’s the database id, no change needed

Delete VLAN

  • $VLAN_ID-> $VLAN_VID

General comment:

Throughout the docs you mention $SYSTEM_ID and $PROFILE, it’s obvious to me what these are but are these explicitly written anywhere?