---
title: VLAN
slug: aidc/jKRo-vlan
createdAt: 2025-12-29T10:28:23.213Z
---

Virtual LAN.

## <font color="#1d50a2">URLs Summary</font>

| **URL**                                                            | **GET** | **POST** | **PATCH** | **PUT** | **DELETE** |
| ------------------------------------------------------------------ | ------- | -------- | --------- | ------- | ---------- |
| /rest/v1/rpc/clear-counters-vlan                                   | N       | Y        | N         | N       | N          |
| /rest/v1/running/interfaces/&#x7B;name}/vlan-config/&#x7B;vlan-id} | Y       | Y        | Y         | N       | Y          |
| /rest/v1/rpc/show-vlan                                             | N       | Y        | N         | N       | N          |
| /rest/v1/rpc/show-vlan-summary                                     | N       | Y        | N         | N       | N          |
| /rest/v1/running/vlans/&#x7B;vlanid}                               | Y       | Y        | Y         | N       | Y          |
| /rest/v1/rpc/batch-create-vlan                                     | N       | Y        | N         | N       | N          |
| /rest/v1/rpc/batch-create-vlan-member                              | N       | Y        | N         | N       | N          |
| /rest/v1/rpc/batch-delete-vlan                                     | N       | Y        | N         | N       | N          |
| /rest/v1/rpc/batch-delete-vlan-member                              | N       | Y        | N         | N       | N          |

## <font color="#1d50a2">Examples</font>

### <font color="#1d50a2">Create VLANs 300\~305 and 307.</font>

```json
POST HTTPS://{switch IP}/rest/v1/rpc/batch-create-vlan
{
        "vlan-ranges": "300-305,307"
}
```

### <font color="#1d50a2">Create members for VLANs 300\~305 and 307.</font>

```json
POST HTTPS://{switch IP}/rest/v1/rpc/batch-create-vlan-member
{
    "interface-name": "Ethernet1",
    "vlan-ranges": "300-305,307"
}
```

### <font color="#1d50a2">.Delete VLANs 300,305\~307</font>

```json
POST HTTPS://{switch IP}/rest/v1/rpc/batch-delete-vlan
{
    "vlan-ranges": "300,305-307"
}
```

### <font color="#1d50a2">Delete members from VLANs.</font>

```json
POST HTTPS://{switch IP}/rest/v1/rpc/batch-delete-vlan-member
{
    "interface-name": "Ethernet1",
    "vlan-ranges": "300-305,307"
}
```

### <font color="#1d50a2">Show vlan summary</font>

```json
POST HTTPS://{switch IP}/rest/v1/rpc/show-vlan-summary
```

**response:**

```json
{
    "vlan": [
        {
            "vlan-id": 10,
            "ip-address": [],
            "proxy-arp": "disable",
            "description": "",
            "dhcp-helper-address": [],
            "member": [
                {
                    "port": "Ethernet53:1",
                    "tagging-mode": "untagged"
                }
            ]
        },
        {
            "vlan-id": 200,
            "ip-address": [],
            "proxy-arp": "disable",
            "description": "",
            "dhcp-helper-address": [],
            "member": []
        }
    ]
}
```

### <font color="#1d50a2">Get all vlans.</font>

```json
GET HTTPS://{switch IP}/rest/v1/running/vlans
```

**response:**

```json
{
    "result": [
        {
            "vlanid": 10,
            "name": "Vlan10",
            "mac-limit": 100
        },
        {
            "vlanid": 200,
            "name": "Vlan200"
        }
    ]
}
```

### <font color="#1d50a2">Create a VLAN.</font>

```json
POST HTTPS://{switch IP}/rest/v1/running/vlans/300
{"description": "vlan 300"}
```

### <font color="#1d50a2">Modify a VLAN.</font>

```json
PATCH HTTPS://{switch IP}/rest/v1/running/vlans/300
{"mac-limit": 12345}
```

### <font color="#1d50a2">Delete a VLAN.</font>

```json
DELETE HTTPS://{switch IP}/rest/v1/running/vlans/100
```

### <font color="#1d50a2">Add a member into a VLAN.</font>

```json
POST HTTPS://{switch IP}/rest/v1/running/interfaces/Ethernet2/vlan-config
{
    "vlan-id": "101",
    "tagging-mode": "tagged"
}
```

### <font color="#1d50a2">Delete a member from a VLAN.</font>

```json
DELETE HTTPS://{switch IP}/rest/v1/running/interfaces/Ethernet1/vlan-config/100 
```

## <font color="#1d50a2">Properties Descriptions</font>

### <font color="#1d50a2">VLAN configuration</font>

**Tree Diagrams**

```plaintext
  +--rw vlans
     +--rw vlan* [vlanid]
        +--rw vlanid
        +--ro name?
        +--rw mac-limit?
        +--rw mac-learning?
        +--rw description?
        +--rw unknown-unicast-action?
        +--rw unknown-multicast-action?
        +--rw broadcast-action?
```

**Table of Properties**

| **Name**                 | **Required** | **Type/Range**      | **Description**                                                                                                                                                              |
| ------------------------ | ------------ | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| vlans                    | M            |                     | Path-only node, has no configurable value.                                                                                                                                   |
| vlanid                   | M            | 1..4094             | (sub-property of vlans)<br />VLAN identity                                                                                                                                   |
| name                     | RO           | Vlan1-4094          | (sub-property of vlans)                                                                                                                                                      |
| mac-limit                | O            | 1..131072           | (sub-property of vlans)<br />Limit the number of dynamic MAC addresses to be learned: when the mac number reaches the threshold, dynamic MAC addresses are no longer learned |
| mac-learning             | O            | "true"<br />"false" | (sub-property of vlans)<br />Set mac-learning mode for vlan, if disable, vlan will not learn mac<br />Default value: "true"                                                  |
| description              | O            | string              | (sub-property of vlans)<br />Set textual description of the vlan                                                                                                             |
| unknown-unicast-action   | O            | "flood"<br />"drop" | (sub-property of vlans)<br />Set the unknown unicast packets forwarding action                                                                                               |
| unknown-multicast-action | O            | "flood"<br />"drop" | (sub-property of vlans)<br />Set the unknown multicast packets forwarding action                                                                                             |
| broadcast-action         | O            | "flood"<br />"drop" | (sub-property of vlans)<br />Set the broadcast packets forwarding action                                                                                                     |

### <font color="#1d50a2">VLAN member configuration</font>

**Tree Diagrams**

```plaintext
  +--rw interfaces
     +--rw interface* [name]
        +--rw name
        +--rw vlan-config
           +--rw vlan* [vlan-id]
              +--rw vlan-id
              +--rw tagging-mode?
```

**Table of Properties**

| **Name**     | **Required** | **Type/Range**              | **Description**                                                                                                                                                                                                                          |
| ------------ | ------------ | --------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| interfaces   | M            |                             | Path-only node, has no configurable value.<br />Interface parameters.                                                                                                                                                                    |
| name         | M            | Ethernet name<br />Lag name | (sub-property of interfaces)<br />The name of the interface.                                                                                                                                                                             |
| vlan-config  | CM           |                             | (sub-property of interfaces)<br />Path-only node, has no configurable value.<br />Only applicable when `{interface}` is a Ethernet or PortChannel name.<br />VLAN related configuration that is part of the physical Ethernet interface. |
| vlan         | M            |                             | (sub-property of vlan-config)<br />Path-only node, has no configurable value.                                                                                                                                                            |
| vlan-id      | M            | 1..4094                     | (sub-property of vlan)<br />VLAN identity                                                                                                                                                                                                |
| tagging-mode | O            | "tagged"<br />"untagged"    | (sub-property of vlan)<br />Specifies the type of interface as a vlan member<br />Default value: "tagged"                                                                                                                                |

### <font color="#1d50a2">Batch create vlan</font>

**Tree Diagrams**

```plaintext
    +---x batch-create-vlan
    |  +---w input
    |     +---w vlan-ranges?
```

**Table of Properties**

| **Name**          | **Required** | **Type/Range**                                                                   | **Description**                                                       |
| ----------------- | ------------ | -------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
| batch-create-vlan | M            |                                                                                  | Path-only node, has no configurable value.                            |
| vlan-ranges       | O            | a comma-separated list of Vlans (1..4094), optionally in ranges (e.g., 10-50,52) | (sub-property of input)<br />Ranges of VLAN IDs, e.g. 100-200,300-400 |

### <font color="#1d50a2">Batch delete vlan</font>

**Tree Diagrams**

```plaintext
    +---x batch-delete-vlan
    |  +---w input
    |     +---w vlan-ranges?
```

**Table of Properties**

| **Name**          | **Required** | **Type/Range**                                                                   | **Description**                                                       |
| ----------------- | ------------ | -------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
| batch-delete-vlan | M            |                                                                                  | Path-only node, has no configurable value.                            |
| vlan-ranges       | O            | a comma-separated list of Vlans (1..4094), optionally in ranges (e.g., 10-50,52) | (sub-property of input)<br />Ranges of VLAN IDs, e.g. 100-200,300-400 |

### <font color="#1d50a2">Batch create vlan member</font>

**Tree Diagrams**

```plaintext
    +---x batch-create-vlan-member
    |  +---w input
    |     +---w interface-name?
    |     +---w vlan-ranges?
```

**Table of Properties**

| **Name**                 | **Required** | **Type/Range**                                                                   | **Description**                                                       |
| ------------------------ | ------------ | -------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
| batch-create-vlan-member | M            |                                                                                  | Path-only node, has no configurable value.                            |
| interface-name           | O            | Ethernet name<br />Lag name                                                      | (sub-property of input)<br />The name of the interface.               |
| vlan-ranges              | O            | a comma-separated list of Vlans (1..4094), optionally in ranges (e.g., 10-50,52) | (sub-property of input)<br />Ranges of VLAN IDs, e.g. 100-200,300-400 |

### <font color="#1d50a2">Batch delete vlan member</font>

**Tree Diagrams**

```plaintext
    +---x batch-delete-vlan-member
    |  +---w input
    |     +---w interface-name?
    |     +---w vlan-ranges?
    |  +--ro output
    |     +--ro result?
```

**Table of Properties**

| **Name**                 | **Required** | **Type/Range**                                                                   | **Description**                                                       |
| ------------------------ | ------------ | -------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
| batch-delete-vlan-member | M            |                                                                                  | Path-only node, has no configurable value.                            |
| interface-name           | O            | Ethernet name<br />Lag name                                                      | (sub-property of input)<br />The name of the interface.               |
| vlan-ranges              | O            | a comma-separated list of Vlans (1..4094), optionally in ranges (e.g., 10-50,52) | (sub-property of input)<br />Ranges of VLAN IDs, e.g. 100-200,300-400 |

### <font color="#1d50a2">Show vlan summary</font>

**Tree Diagrams**

```plaintext
    +---x show-vlan-summary
    |  +---w input
    |  |  +---w vlan-id?
    |  +--ro output
    |     +--ro vlan* [vlan-id]
    |        +--ro vlan-id
    |        +--ro ip-address*
    |        +--ro member* [port]
    |        |  +--ro port
    |        |  +--ro tagging-mode?
    |        +--ro proxy-arp?
    |        +--ro description?
    |        +--ro dhcp-helper-address*
```

**Table of Properties**

| **Name**            | **Required** | **Type/Range** | **Description**                                                                |
| ------------------- | ------------ | -------------- | ------------------------------------------------------------------------------ |
| show-vlan-summary   | M            |                | Path-only node, has no configurable value.<br />                               |
| vlan-id             | O            | 1..4094        | (sub-property of input)<br />The specified VLAN ID to show                     |
| vlan                | RO           |                | (sub-property of output)<br />Path-only node, has no configurable value.<br /> |
| vlan-id             | RO           | 1..4094        | (sub-property of vlan)<br />                                                   |
| ip-address          | RO           | string         | (sub-property of vlan)<br />                                                   |
| member              | RO           |                | (sub-property of vlan)<br />Path-only node, has no configurable value.<br />   |
| port                | RO           | string         | (sub-property of member)<br />                                                 |
| tagging-mode        | RO           | string         | (sub-property of member)<br />                                                 |
| proxy-arp           | RO           | string         | (sub-property of vlan)<br />                                                   |
| description         | RO           | string         | (sub-property of vlan)<br />                                                   |
| dhcp-helper-address | RO           | string         | (sub-property of vlan)                                                         |

### <font color="#1d50a2">Show vlan</font>

**Tree Diagrams**

```plaintext
    +---x show-vlan
    |  +---w input
    |  |  +---w vlan-id
    |  +--ro output
    |     +--ro result?
```

**Table of Properties**

| **Name**  | **Required** | **Type/Range**     | **Description**                                                                    |
| --------- | ------------ | ------------------ | ---------------------------------------------------------------------------------- |
| show-vlan | M            |                    | Path-only node, has no configurable value.                                         |
| vlan-id   | M            | 1..4094<br />"all" | (sub-property of input)<br />The VLAN ID to show                                   |
| result    | RO           | string             | (sub-property of output)<br />A table that shows information of the specified vlan |

### <font color="#1d50a2">Clear counters vlan</font>

**Tree Diagrams**

```plaintext
    +---x clear-counters-vlan
       +--ro output
          +--ro data?
```

**Table of Properties**

| **Name**            | **Required** | **Type/Range** | **Description**                                                                |
| ------------------- | ------------ | -------------- | ------------------------------------------------------------------------------ |
| clear-counters-vlan | M            |                | Path-only node, has no configurable value.<br />RPC for clearing vlan counters |
| data                | RO           | string         | (sub-property of output)<br />the result of clear counters vlan.               |

