Skip to content
Ask AI

VLAN Translation

This chapter provides examples of how to configure and manage VLAN Translation on AsterNOS devices using NETCONF.

Request example to enable basic QINQ on a physical port via edit-config

<config>
<top>
<interfaces>
<interface>
<name>Ethernet1</name>
<vlan-translation operation="create">
<basic-qinq-enable>true</basic-qinq-enable>
</vlan-translation>
</interface>
</interfaces>
</top>
</config>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:711f2467-2b7c-4b27-af42-790babf0c64a">
<ok/>
</rpc-reply>

Request example to disable basic QINQ on a physical port via edit-config

<config>
<top>
<interfaces>
<interface>
<name>Ethernet1</name>
<vlan-translation>
<basic-qinq-enable operation="delete"/>
</vlan-translation>
</interface>
</interfaces>
</top>
</config>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:b41256ea-9a79-4cdc-9f39-89b011b3d238">
<ok/>
</rpc-reply>

Request example to configure VLAN stacking on a physical port via edit-config

<config>
<top>
<vlans>
<vlan>
<vlanid>100</vlanid>
</vlan>
<vlan>
<vlanid>200</vlanid>
</vlan>
</vlans>
<interfaces>
<interface>
<name>Ethernet1</name>
<vlan-config operation="create">
<vlan>
<vlan-id>100</vlan-id>
<tagging-mode>untagged</tagging-mode>
</vlan>
<vlan>
<vlan-id>200</vlan-id>
<tagging-mode>tagged</tagging-mode>
</vlan>
</vlan-config>
<vlan-translation operation="create">
<stackings>
<stacking>
<original-vlan>100</original-vlan>
<service-vlan>200</service-vlan>
<remark-tc>3</remark-tc>
</stacking>
</stackings>
</vlan-translation>
</interface>
</interfaces>
</top>
</config>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:29aadc40-fa3b-43fe-91db-e7a9e44add1a">
<ok/>
</rpc-reply>

Request example to delete all VLAN stacking on a physical port via edit-config

<config>
<top>
<interfaces>
<interface>
<name>Ethernet1</name>
<vlan-translation>
<stackings operation="delete"/>
</vlan-translation>
</interface>
</interfaces>
</top>
</config>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:8cf00578-c196-42ab-836b-03392530c316">
<ok/>
</rpc-reply>

Request example to delete a specific VLAN stacking on a physical port via edit-config

<config>
<top>
<interfaces>
<interface>
<name>Ethernet1</name>
<vlan-translation>
<stackings>
<stacking operation="delete">
<original-vlan>100</original-vlan>
</stacking>
</stackings>
</vlan-translation>
</interface>
</interfaces>
</top>
</config>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:0a8ddd65-40b3-4c44-ad7a-734904299438">
<ok/>
</rpc-reply>

Configure Untagged VLAN Stacking on Physical Port

Section titled “Configure Untagged VLAN Stacking on Physical Port”

Request example to configure VLAN stacking on a physical port via edit-config

<config>
<top>
<vlans>
<vlan>
<vlanid>100</vlanid>
</vlan>
<vlan>
<vlanid>200</vlanid>
</vlan>
</vlans>
<interfaces>
<interface>
<name>Ethernet2</name>
<vlan-config operation="create">
<vlan>
<vlan-id>200</vlan-id>
<tagging-mode>tagged</tagging-mode>
</vlan>
</vlan-config>
</interface>
<interface>
<name>Ethernet1</name>
<vlan-config operation="create">
<vlan>
<vlan-id>100</vlan-id>
<tagging-mode>untagged</tagging-mode>
</vlan>
<vlan>
<vlan-id>200</vlan-id>
<tagging-mode>tagged</tagging-mode>
</vlan>
</vlan-config>
<vlan-translation operation="create">
<stackings>
<stacking>
<original-vlan>0</original-vlan>
<customer-vlan>100</customer-vlan>
<service-vlan>200</service-vlan>
<remark-tc>3</remark-tc>
<upstream-port>Ethernet2</upstream-port>
</stacking>
</stackings>
</vlan-translation>
</interface>
</interfaces>
</top>
</config>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:d4371ee4-49f7-4380-850e-889740a2c30d">
<ok/>
</rpc-reply>

Request example to configure VLAN mapping on a physical port via edit-config

<config>
<top>
<vlans operation="create">
<vlan>
<vlanid>200</vlanid>
</vlan>
<vlan>
<vlanid>100</vlanid>
</vlan>
</vlans>
<interfaces>
<interface>
<name>Ethernet1</name>
<vlan-config operation="create">
<vlan>
<vlan-id>100</vlan-id>
<tagging-mode>tagged</tagging-mode>
</vlan>
<vlan>
<vlan-id>200</vlan-id>
<tagging-mode>tagged</tagging-mode>
</vlan>
</vlan-config>
<vlan-translation operation="create">
<mappings>
<mapping>
<original-vlan>100</original-vlan>
<stage>both</stage>
<mapping-vlan>200</mapping-vlan>
</mapping>
</mappings>
</vlan-translation>
</interface>
</interfaces>
</top>
</config>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:83bb3e8f-52b7-48af-9628-906680f0aa36">
<ok/>
</rpc-reply>

Request example to delete all VLAN mapping on a physical port via edit-config

<config>
<top>
<interfaces>
<interface>
<name>Ethernet1</name>
<vlan-translation>
<mappings operation="delete"/>
</vlan-translation>
</interface>
</interfaces>
</top>
</config>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:ffe37f10-95d4-47d3-8d7d-dac6e3723eb3">
<ok/>
</rpc-reply>

Request example to delete a specific VLAN mapping on a physical port via edit-config

<config>
<top>
<interfaces>
<interface>
<name>Ethernet1</name>
<vlan-translation>
<mappings>
<mapping operation="delete">
<original-vlan>100</original-vlan>
<stage>both</stage>
</mapping>
</mappings>
</vlan-translation>
</interface>
</interfaces>
</top>
</config>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:eb448b88-7626-426f-8a60-251abc9629ef">
<ok/>
</rpc-reply>

Delete All Vlan Tagged VlanStackings on Physical Port

Section titled “Delete All Vlan Tagged VlanStackings on Physical Port”

Request example to delete all vlan tagged vlanStackings on a physical port via delete-all-tagged-vlan-stacking

<delete-all-tagged-vlan-stacking>
<interface>Ethernet1</interface>
</delete-all-tagged-vlan-stacking>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:b926bbe7-37ef-42a9-b410-c4ba91483992">
<data>
<deleted_count>1</deleted_count>
</data>
</rpc-reply>