---
title: How to manage networks
description: Canonical makes open source secure, reliable and easy to use, providing
  support for Ubuntu and a portfolio of enterprise-grade technologies. Founded in
  2004, Canonical operates globally with team members in over 80 countries.
url: https://canonical-com-2950.demos.haus/maas/docs/how-to-manage-networks?format=md
---

*Submit*

# How to manage networks

MAAS provides pre-configured [networks](https://canonical.com/maas/docs/about-maas-networking) 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](https://canonical-com-2950.demos.haus/maas/docs/how-to-manage-networks?format=md#p-9070-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](https://canonical-com-2950.demos.haus/maas/docs/how-to-manage-networks?format=md#p-9070-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](https://canonical-com-2950.demos.haus/maas/docs/how-to-manage-networks?format=md#p-9070-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](https://canonical-com-2950.demos.haus/maas/docs/how-to-manage-networks?format=md#p-9070-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](https://canonical-com-2950.demos.haus/maas/docs/how-to-manage-networks?format=md#p-9070-configure-dns-servers)

```
maas $PROFILE subnet update $SUBNET_CIDR dns_servers=$DNS_SERVER_IPS
```

### [Add static routes](https://canonical-com-2950.demos.haus/maas/docs/how-to-manage-networks?format=md#p-9070-add-static-routes)

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

## [Manage VLANs](https://canonical-com-2950.demos.haus/maas/docs/how-to-manage-networks?format=md#p-9070-manage-vlans)

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

### [Create a VLAN](https://canonical-com-2950.demos.haus/maas/docs/how-to-manage-networks?format=md#p-9070-create-a-vlan)

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

### [Assign a VLAN to an interface](https://canonical-com-2950.demos.haus/maas/docs/how-to-manage-networks?format=md#p-9070-assign-a-vlan-to-an-interface)

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

### [Delete a VLAN](https://canonical-com-2950.demos.haus/maas/docs/how-to-manage-networks?format=md#p-9070-delete-a-vlan)

```
maas $PROFILE vlan delete $FABRIC_ID $VLAN_ID
```

## [Manage IP addresses](https://canonical-com-2950.demos.haus/maas/docs/how-to-manage-networks?format=md#p-9070-manage-ip-addresses)

You can reserve addresses for static or dynamic use.

### [Reserve a single IP](https://canonical-com-2950.demos.haus/maas/docs/how-to-manage-networks?format=md#p-9070-reserve-a-single-ip)

```
maas $PROFILE ipaddresses reserve ip=$IP_ADDRESS_STATIC_SINGLE
```

### [Reserve a dynamic range](https://canonical-com-2950.demos.haus/maas/docs/how-to-manage-networks?format=md#p-9070-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](https://canonical-com-2950.demos.haus/maas/docs/how-to-manage-networks?format=md#p-9070-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)](https://canonical-com-2950.demos.haus/maas/docs/how-to-manage-networks?format=md#p-9070-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](https://canonical-com-2950.demos.haus/maas/docs/how-to-manage-networks?format=md#p-9070-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](https://canonical-com-2950.demos.haus/maas/docs/how-to-manage-networks?format=md#p-9070-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](https://canonical-com-2950.demos.haus/maas/docs/how-to-manage-networks?format=md#p-9070-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](https://canonical.com/maas/docs/interface) for details.

## [Manage routes and links](https://canonical-com-2950.demos.haus/maas/docs/how-to-manage-networks?format=md#p-9070-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](https://canonical-com-2950.demos.haus/maas/docs/how-to-manage-networks?format=md#p-9070-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](https://canonical-com-2950.demos.haus/maas/docs/how-to-manage-networks?format=md#p-9070-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](https://canonical-com-2950.demos.haus/maas/docs/how-to-manage-networks?format=md#p-9070-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](https://canonical-com-2950.demos.haus/maas/docs/how-to-manage-networks?format=md#p-9070-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](https://canonical-com-2950.demos.haus/maas/docs/how-to-manage-networks?format=md#p-9070-next-steps)

* Explore [about MAAS networking](https://canonical.com/maas/docs/about-maas-networking) for deeper context.
* Investigate [how to tune MAAS network services](https://canonical.com/maas/docs/how-to-manage-network-services) to improve performance or create special configurations.
* If you need redundancy, learn [how to manage high availability](https://canonical.com/maas/docs/how-to-manage-high-availability).

---

[Previous

Back up MAAS](https://canonical-com-2950.demos.haus/maas/docs/how-to-back-up-maas)
[Next

Manage network services](https://canonical-com-2950.demos.haus/maas/docs/how-to-manage-network-services)

Last updated 1 year, 1 day ago. [Help improve this document in the forum](https://discourse.maas.io/t/how-to-manage-networks/5164).
