---
title: vlan-translation
slug: enterprise-v6p1/9kII-vlan-translation
createdAt: 2025-12-17T08:17:40.626Z
---

AsterNOS vlan translation module, including VLAN Stack and VLAN mapping.

# <font color="#1d50a2">YANG Tree Diagram</font>

```none
module: asternos-vlan-translation

  augment /if:interfaces/if:interface:
    +--rw vlan-translation
       +--rw basic-qinq-enable?   boolean
       +--rw stackings
       |  +--rw stacking* [original-vlan]
       |     +--rw original-vlan    uint16
       |     +--rw customer-vlan?   cmn:vlan-id
       |     +--rw service-vlan     cmn:vlan-id
       |     +--rw remark-tc?       uint8
       |     +--rw upstream-port    cmn:ethernet-port-name
       +--rw mappings
          +--rw mapping* [original-vlan stage]
             +--rw original-vlan    cmn:vlan-id
             +--rw stage            enumeration
             +--rw mapping-vlan?    cmn:vlan-id

  rpcs:
    +---x delete-all-tagged-vlan-stacking
       +---w input
       |  +---w interface?   cmn:ethernet-port-name
       +--ro output
          +--ro data?   <anydata>
```

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

## <font color="#1d50a2">Resource List</font>

| **Path**                                                                  | **Access** |
| ------------------------------------------------------------------------- | ---------- |
| /?/interfaces/interface/vlan-translation                                  | Read-Write |
| /?/interfaces/interface/vlan-translation/basic-qinq-enable                | Read-Write |
| /?/interfaces/interface/vlan-translation/stackings                        | Read-Write |
| /?/interfaces/interface/vlan-translation/stackings/stacking               | Read-Write |
| /?/interfaces/interface/vlan-translation/stackings/stacking/original-vlan | Read-Write |
| /?/interfaces/interface/vlan-translation/stackings/stacking/customer-vlan | Read-Write |
| /?/interfaces/interface/vlan-translation/stackings/stacking/service-vlan  | Read-Write |
| /?/interfaces/interface/vlan-translation/stackings/stacking/remark-tc     | Read-Write |
| /?/interfaces/interface/vlan-translation/stackings/stacking/upstream-port | Read-Write |
| /?/interfaces/interface/vlan-translation/mappings                         | Read-Write |
| /?/interfaces/interface/vlan-translation/mappings/mapping                 | Read-Write |
| /?/interfaces/interface/vlan-translation/mappings/mapping/original-vlan   | Read-Write |
| /?/interfaces/interface/vlan-translation/mappings/mapping/stage           | Read-Write |
| /?/interfaces/interface/vlan-translation/mappings/mapping/mapping-vlan    | Read-Write |

## <font color="#1d50a2">Detailed Nodes</font>

### <font color="#1d50a2">/?/interfaces/interface/vlan-translation</font>

**Path**

/?/interfaces/interface/vlan-translation

**Node Type**

container

**Access**

Read-Write

### <font color="#1d50a2">/?/interfaces/interface/vlan-translation/basic-qinq-enable</font>

**Path**

/?/interfaces/interface/vlan-translation/basic-qinq-enable

**Node Type**

leaf

**Description**

When true, all packet coming in from this port will be added with a PVID VLAN tag whether it is tagged or not.

**Access**

Read-Write

**Data Type**

\<YANG type boolean>

**Constraints**

Valid in \[true, false]

### <font color="#1d50a2">/?/interfaces/interface/vlan-translation/stackings</font>

**Path**

/?/interfaces/interface/vlan-translation/stackings

**Node Type**

container

**Access**

Read-Write

### <font color="#1d50a2">/?/interfaces/interface/vlan-translation/stackings/stacking</font>

**Path**

/?/interfaces/interface/vlan-translation/stackings/stacking

**Node Type**

list

**Description**

VLAN stack configuration

**Access**

Read-Write

### <font color="#1d50a2">/?/interfaces/interface/vlan-translation/stackings/stacking/original-vlan</font>

**Path**

/?/interfaces/interface/vlan-translation/stackings/stacking/original-vlan

**Node Type**

leaf

**Description**

The original VLAN ID of the packet.

When the 'original-vlan' is 0, it means that all untagged packets will be tagged with both service VLAN and customer VLAN.

When the 'original-vlan' is not 0, it means the packets only carrying the specified VLAN ID will be tagged with service VLAN.

**Access**

Read-Write

**Data Type**

\<YANG type uint16>

**Constraints**

Valid range: 0 to 4094

### <font color="#1d50a2">/?/interfaces/interface/vlan-translation/stackings/stacking/customer-vlan</font>

**Path**

/?/interfaces/interface/vlan-translation/stackings/stacking/customer-vlan

**Node Type**

leaf

**Description**

The customer VLAN to be tagged for those untagged packets.

**Access**

Read-Write

**Data Type**

\<YANG type vlan-id>

**Constraints**

Multiple constraints:

- Valid range: 1 to 4094
- When condition: ../original-vlan = 0

### <font color="#1d50a2">/?/interfaces/interface/vlan-translation/stackings/stacking/service-vlan</font>

**Path**

/?/interfaces/interface/vlan-translation/stackings/stacking/service-vlan

**Node Type**

leaf

**Description**

The service VLAN to be tagged.

**Access**

Read-Write

**Data Type**

\<YANG type vlan-id>

**Constraints**

Valid range: 1 to 4094

**Mandatory**

Yes

### <font color="#1d50a2">/?/interfaces/interface/vlan-translation/stackings/stacking/remark-tc</font>

**Path**

/?/interfaces/interface/vlan-translation/stackings/stacking/remark-tc

**Node Type**

leaf

**Description**

The remarking value for the traffic class of the packet.

**Access**

Read-Write

**Data Type**

\<YANG type uint8>

**Constraints**

Valid range: 0 to 7

### <font color="#1d50a2">/?/interfaces/interface/vlan-translation/stackings/stacking/upstream-port</font>

**Path**

/?/interfaces/interface/vlan-translation/stackings/stacking/upstream-port

**Node Type**

leaf

**Description**

The upstream port of NNI.

Only when the 'original-vlan' is 0, this leaf is mandatory,

Otherwise, it can't be set.

**Access**

Read-Write

**Data Type**

\<YANG type ethernet-port-name>

**Constraints**

When condition: ../original-vlan = 0

**Mandatory**

Yes

### <font color="#1d50a2">/?/interfaces/interface/vlan-translation/mappings</font>

**Path**

/?/interfaces/interface/vlan-translation/mappings

**Node Type**

container

**Description**

VLAN mapping configuration.

**Access**

Read-Write

### <font color="#1d50a2">/?/interfaces/interface/vlan-translation/mappings/mapping</font>

**Path**

/?/interfaces/interface/vlan-translation/mappings/mapping

**Node Type**

list

**Description**

VLAN mapping configuration.

**Access**

Read-Write

### <font color="#1d50a2">/?/interfaces/interface/vlan-translation/mappings/mapping/original-vlan</font>

**Path**

/?/interfaces/interface/vlan-translation/mappings/mapping/original-vlan

**Node Type**

leaf

**Description**

The original VLAN ID of the packet.

**Access**

Read-Write

**Data Type**

\<YANG type vlan-id>

**Constraints**

Valid range: 1 to 4094

### <font color="#1d50a2">/?/interfaces/interface/vlan-translation/mappings/mapping/stage</font>

**Path**

/?/interfaces/interface/vlan-translation/mappings/mapping/stage

**Node Type**

leaf

**Description**

The stage of the mapping.

**Access**

Read-Write

**Data Type**

\<YANG type enumeration>

**Constraints**

Enumeration with options:

- ingress
- egress
- both

### <font color="#1d50a2">/?/interfaces/interface/vlan-translation/mappings/mapping/mapping-vlan</font>

**Path**

/?/interfaces/interface/vlan-translation/mappings/mapping/mapping-vlan

**Node Type**

leaf

**Description**

The mapping VLAN ID, 'original-vlan' will be mapped to this VLAN ID.

**Access**

Read-Write

**Data Type**

\<YANG type vlan-id>

**Constraints**

Valid range: 1 to 4094

