---
title: VLAN
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-2934.demos.haus/maas/docs/vlan?format=md
---

*Submit*

# VLAN

Enter keyword arguments in the form `key=value`.

## [Delete a VLAN](https://canonical-com-2934.demos.haus/maas/docs/vlan?format=md#p-23255-delete-a-vlan)

```
maas $PROFILE vlan delete [--help] [-d] [-k] fabric_id vid [data ...]
```

#### Positional arguments

* fabric\_id
* vid

Delete VLAN on a given fabric.

#### Command-line options

| Option | Effect |
| --- | --- |
| –help, -h | Show this help message and exit |
| -d, --debug | Display more information about API responses |
| -k, --insecure | Disable SSL certificate check |

## [Retrieve VLAN](https://canonical-com-2934.demos.haus/maas/docs/vlan?format=md#p-23255-retrieve-vlan)

```
maas $PROFILE vlan read [--help] [-d] [-k] fabric_id vid [data ...]
```

#### Positional arguments

* fabric\_id
* vid

Retrieves a VLAN on a given fabric\_id.

#### Command-line options

| Option | Effect |
| --- | --- |
| –help, -h | Show this help message and exit |
| -d, --debug | Display more information about API responses |
| -k, --insecure | Disable SSL certificate check |

## [Update VLAN](https://canonical-com-2934.demos.haus/maas/docs/vlan?format=md#p-23255-update-vlan)

```
maas $PROFILE vlan update [--help] [-d] [-k] fabric_id vid [data ...]
```

#### Positional arguments

* fabric\_id
* vid

Updates a given VLAN.

#### Keyword “name”

Optional String. Name of the VLAN.

#### Keyword “description”

Optional String. Description of the VLAN.

#### Keyword “mtu”

Optional Int. The MTU to use on the VLAN.

#### Keyword “dhcp\_on”

Optional Boolean. Whether or not DHCP should be managed on the VLAN.

#### Keyword “primary\_rack”

Optional String. The primary rack controller managing the VLAN (system\_id).

#### Keyword “secondary\_rack”

Optional String. The secondary rack controller managing the VLAN (system\_id).

#### Keyword “relay\_vlan”

Optional Int. Relay VLAN ID. Only set when this VLAN will be using a DHCP relay to forward DHCP requests to another VLAN that MAAS is managing. MAAS will not run the DHCP relay itself, it must be configured to proxy requests to the primary and/or secondary rack controller interfaces for the VLAN specified in this field.

#### Keyword “space”

Optional String. The space this VLAN should be placed in. Passing in an empty string (or the string ‘undefined’) will cause the VLAN to be placed in the ‘undefined’ space.

#### Command-line options

| Option | Effect |
| --- | --- |
| –help, -h | Show this help message and exit |
| -d, --debug | Display more information about API responses |
| -k, --insecure | Disable SSL certificate check |

## [Create a VLAN](https://canonical-com-2934.demos.haus/maas/docs/vlan?format=md#p-23255-create-a-vlan)

```
maas $PROFILE vlans create [--help] [-d] [-k] fabric_id [data ...]
```

#### Positional arguments

* fabric\_id

Creates a new VLAN.

#### Keyword “name”

Optional String. Name of the VLAN.

#### Keyword “description”

Optional String. Description of the new VLAN.

#### Keyword “vid”

Required Int. VLAN ID of the new VLAN.

#### Keyword “mtu”

Optional Int. The MTU to use on the VLAN.

#### Keyword “space”

Optional String. The space this VLAN should be placed in. Passing in an empty string (or the string ‘undefined’) will cause the VLAN to be placed in the ‘undefined’ space.

#### Command-line options

| Option | Effect |
| --- | --- |
| –help, -h | Show this help message and exit |
| -d, --debug | Display more information about API responses |
| -k, --insecure | Disable SSL certificate check |

## [List VLANs](https://canonical-com-2934.demos.haus/maas/docs/vlan?format=md#p-23255-list-vlans)

```
maas $PROFILE vlans read [--help] [-d] [-k] fabric_id [data ...]
```

#### Positional arguments

* fabric\_id

List all VLANs belonging to given fabric.

#### Command-line options

| Option | Effect |
| --- | --- |
| –help, -h | Show this help message and exit |
| -d, --debug | Display more information about API responses |
| -k, --insecure | Disable SSL certificate check |

---

[Previous

version](https://canonical-com-2934.demos.haus/maas/docs/version)
[Next

vm-cluster](https://canonical-com-2934.demos.haus/maas/docs/vm-cluster)

Last updated 1 year, 4 months ago. [Help improve this document in the forum](https://discourse.maas.io/t/vlan/11375).
