MAAS provides pre-configured networks for convenience and efficiency. Reconfigure these networks to suit your environment.
Learn more about MAAS networking
Manage interfaces
Manage MAAS interfaces, including network interfaces, gateways, bridges, and bonds.
Create an interface
Create interfaces quickly with MAAS UI and CLI.
Create a physical interface
CLI
maas $PROFILE interfaces create-physical $SYSTEM_ID (key=value)....
See the Physical interface parameters table for valid key-value pairs.
Create a VLAN interface
CLI
maas $PROFILE interfaces create-vlan $SYSTEM_ID (key=value)...
See the VLAN interface parameters table for valid key-value pairs.
Bond two interfaces
Learn more about bonds.
UI:
Machines > (Select machine) > Network > (Select 2 physical interface) > Create bond > (Configure details) > Save interface
CLI:
maas $PROFILE interfaces create-bond $SYSTEM_ID name=$BOND_NAME parents=$IFACE1_ID,$IFACE2_ID <optional parameters>
Find the optional parameters listed in the Interface bond parameters table
Create a bridge
UI:
Machines > (Select machine) > Network > (Select interface) > Create bridge > (Configure details) > Save interface
CLI:
INTERFACE_ID=$(maas $PROFILE machine read $SYSTEM_ID | jq .boot_interface.id)
BRIDGE_ID=$(maas $PROFILE interfaces create-bridge $SYSTEM_ID name=br0 parent=$INTERFACE_ID | jq .id)
SUBNET_ID=$(maas $PROFILE subnets read | jq -r '.[] | select(.cidr == "10.0.0.0/24" and .managed == true).id')
maas $PROFILE interface link-subnet $SYSTEM_ID $BRIDGE_ID subnet=$SUBNET_ID mode="STATIC" ip_address="10.0.0.101"
Create a bridge with netplan
Modify /etc/netplan/50-cloud-init.yaml
:
network:
bridges:
br0:
addresses:
- 10.0.0.101/24
gateway4: 10.0.0.1
interfaces:
- enp1s0
Apply:
sudo netplan apply
View and maintain interfaces
List existing interfaces
UI
*Machines > (machine) > Network
CLI
maas $PROFILE interfaces read $SYSTEM_ID
List a particular interface
UI
*Machines > (machine) > Network
CLI
maas $PROFILE interface read $SYSTEM_ID $INTERFACE_ID
Update an interface
Update parameters for an interface, depending on current machine
state. Machines that are Ready or Broken have access to all
options. Machines that are Deployed can only update the interface
name
and mac_address
, so that bad interfaces can be replaced
on-line.
CLI
maas $PROFILE interface update $SYSTEM_ID $INTERFACE_ID (key=value)...
See the section for the interface type (physical, bridge…) for key
parameters.
Delete an interface
Delete an interface that is no longer needed.
CLI
maas $PROFILE interface delete $SYSTEM_ID $INTERFACE_ID
Manage routes and links
Disconnect an interface
Disconnect an interface from a machine. Deletes any linked subnets
and IP addresses, and disconnects the interface from any associated
VLAN.
CLI
maas $PROFILE interface disconnect $SYSTEM_ID $INTERFACE_ID
Link an interface to a subnet
Link a specific interface on a given machine to an existing subnet.
CLI
maas admin interface link-subnet $SYSTEM_ID $INTERFACE_ID (key=value)...
See the Interface-subnet link parameters table for valid key-value pairs.
Unlink an interface from a subnet
CLI
maas $PROFILE interface unlink-subnet $SYSTEM_ID $INTERFACE_ID
Set the default gateway
maas $PROFILE subnet update $SUBNET_CIDR gateway_ip=$MY_GATEWAY
Add static routes
UI:
Networking > Subnets > (Select subnet) > Add static route > Fill fields > Save
CLI:
maas $PROFILE static-routes create source=$SOURCE_SUBNET destination=$DEST_SUBNET gateway_ip=$GATEWAY_IP
Configure loopback
After commissioning, manually add a loopback interface using a placeholder MAC (00:00:00:00:00:00
).
For automation, use cloud-init
.
Tag interfaces
Add a tag to an interface
Use a tag to identify or group interfaces.
CLI
maas $PROFILE interface add-tag $SYSTEM_ID $INTERFACE_ID tag="string"
Remove a tag from an interface
Remove tags from interfaces when no longer needed.
CLI
maas $PROFILE interface remove-tag $SYSTEM_ID $INTERFACE_ID tag="<tagname>"
Manage dual NICs
Set up dual NICs with MAAS
- NIC 1 (private subnet): Set to DHCP (e.g.,
192.168.10.0/24
). - NIC 2 (public internet): Set to DHCP/static (e.g.,
192.168.1.0/24
).
Set up dual NICS with Netplan
network:
version: 2
ethernets:
ens18:
addresses:
- 192.168.10.5/24
gateway4: 192.168.10.1
ens19:
addresses:
- 192.168.1.10/24
gateway4: 192.168.1.1
nameservers:
addresses:
- 8.8.8.8
- 8.8.4.4
Manage network discovery
Network discovery detects connected devices, including non-deployables. Use the UI to:
- enable or disable discovery.
- change the active subnet mapping interval (how often discovery scans).
- clear all discoveries.
Use the CLI to fine-tune discovery:
- scan specific subnets.
- force a re-scan (even if everything’s up to date).
- scan with
ping
instead of the defaultnmap
. - scan slowly (using less network bandwidth).
- control the number of scan threads that are used.
- filter for unknown IP address, MAC address, or both.
- clear discoveries selectively (by MAC plus IP address)
- clear discoveries by source (mdns or neighbours)
Learn more about network discovery.
Set up discovery
MAAS can automatically detect and catalog devices on your network. Use these settings to enable or disable discovery, adjust the scan interval, clear all discovered devices, or target specific subnets for scanning.
Enable discovery
UI
Networking > Network discovery > Configuration > Enabled
CLI
maas $PROFILE maas set-config name=network_discovery value="enabled"
Disable discovery
UI
Networking > Network discovery > Configuration > Disabled
CLI
maas $PROFILE maas set-config name=network_discovery value="disabled"
Set the discovery interval
Set the time interval between discovery runs.
UI
Networking > Network discovery > Configuration > Active subnet mapping interval
CLI
maas $PROFILE maas set-config name=active_discovery_interval value=<interval-in-seconds>
Clear all discoveries
UI
*Networking > Network discovery > Clear all discoveries
CLI
maas $PROFILE discoveries clear all=true
Scan specific subnets
Scan for devices on a specific subnet.
UI
Networking > Network discovery > Configuration > Subnet mapping > [Choose subnets by CIDR] > Save
CLI
maas $PROFILE discoveries scan cidr=<subnet CIDR>
Fine-tune discovery (CLI only)
Control scan behavior, improve performance, filter results, and selectively clear discoveries for more precise network management.
Force a re-scan
Force a re-scan, regardless of existing results or previous scans.
CLI
maas $PROFILE discoveries scan force=true
Scan with ping
Make network discovery use ping
, rather than nmap
.
CLI
maas $PROFILE discoveries scan always_use_ping=true
Scan slowly
Make nmap
scan at a lower frequency (nine packets per second). If scanning with ping
, this parameter is ignored.
CLI
maas $PROFILE discoveries scan slow=true
Manage scan threading
Set the thread count for discovery scanning.
CLI
maas $PROFILE discoveries scan thread=<number_of_threads>
Filter for unknowns
Get a report of devices with unknown addresses.
CLI
By unknown IP address
maas $PROFILE discoveries by-unknown-ip
By unknown MAC address
maas $PROFILE discoveries by-unknown-mac
By unknown MAC and IP
maas $PROFILE discoveries by-unknown-mac-and-ip
Clear discoveries selectively
Delete all discovered neighbours and associated reverse DNS entries associated with a given IP and MAC address.
CLI
maas $PROFILE discoveries clear-by-mac-and-ip ip=<ip-address> mac=<mac-address>
Clear discoveries by source
Delete all discovered neighbours or mDNS entries.
CLI
Delete discovered neighbours
maas $PROFILE discoveries clear neighbours=true
Delete mDNS entries
maas $PROFILE discoveries clear mdns=true
Manage subnets
Note: The following instructions are based on MAAS 3.4. For earlier versions, the UI element names may differ.
Examine subnets
UI
Networking > Subnets > (Select subnet)
CLI
- List subnets:
maas $PROFILE subnets read
- Retrieve details of a specific subnet:
maas $PROFILE subnet read $SUBNET_ID
Toggle subnet management
UI
Subnets > (Select subnet) > Edit > Managed allocation > Save
CLI
- Enable management:
maas $PROFILE subnet update $SUBNET_CIDR managed=true
- Disable management:
maas $PROFILE subnet update $SUBNET_CIDR managed=false
Configure DNS servers per subnet
UI
Subnets > (Select subnet)j > Edit > DNS servers > Save
CLI
maas $PROFILE subnet update $SUBNET_CIDR dns_servers=$DNS_SERVER_IPS
Add static routes
UI
Subnets > (Select subnet) > Static routes > Add static route > Enter Gateway IP > Enter Destination subnet > Enter (optional) Metric > Save
CLI
maas $PROFILE static-routes create source=$SOURCE_SUBNET destination=$DEST_SUBNET gateway_ip=$GATEWAY_IP
Manage VLANs
Create VLAN
UI
Subnets > Add > VLAN > (Fill fields) > Add VLAN
CLI
maas $PROFILE vlans create $FABRIC_ID name=$VLAN_NAME vid=$VLAN_ID
Assign VLAN to interface
UI
Machines > (Select machine> > (Select physical interface) > Actions > Add VLAN
CLI
maas $PROFILE interfaces create-vlan $SYSTEM_ID vlan=$VLAN_ID parent=$INTERFACE_ID
Delete VLAN
UI
Subnets > (Select VLAN) > Delete VLAN > Delete VLAN*
CLI
maas $PROFILE vlan delete $FABRIC_ID $VLAN_ID
Manage IP addresses
Static IP via netplan
Modify /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
Reserve IPs
Reserve a single IP
CLI
maas $PROFILE ipaddresses reserve ip=$IP_ADDRESS_STATIC_SINGLE
Reserve dynamic range
UI
Subnets > (Select subnet> > (Scroll down> > Reserve range > Reserve dynamic range > (Fill fields) > Reserve
CLI
maas $PROFILE ipranges create type=dynamic subnet=$SUBNET_ADDRESS start_ip=$IP_DYNAMIC_RANGE_LOW end_ip=$IP_DYNAMIC_RANGE_HIGH
Reserved range:
UI
Subnets > (Select subnet> > (Scroll down) > Reserve range > Reserve range > (Fill fields) Reserve
CLI
maas $PROFILE ipranges create type=reserved subnet=$SUBNET_ADDRESS start_ip=$IP_STATIC_RANGE_LOW end_ip=$IP_STATIC_RANGE_HIGH
Last updated 2 days ago.