Vlan-Translation-Netconf
Vlan Translation
Section titled “Vlan Translation”Resources Summary
Section titled “Resources Summary”| YANG Path | get/get-config | edit-config | rpc |
|---|---|---|---|
| /delete-all-tagged-vlan-stacking | — | — | Y |
| /interfaces/{name}/vlan-translation | Y | merge, replace, create, delete | — |
| /interfaces/{name}/vlan-translation/basic-qinq-enable | Y | merge, replace, create, delete | — |
| /interfaces/{name}/vlan-translation/mappings/{original-vlan}/{stage} | Y | merge, replace, create, delete | — |
| /interfaces/{name}/vlan-translation/stackings/{original-vlan} | Y | merge, replace, create, delete | — |
Examples
Section titled “Examples”This chapter provides examples of how to configure and manage VLAN Translation on AsterNOS devices using NETCONF.
Enable Basic QINQ on Physical Port
Section titled “Enable Basic QINQ on Physical Port”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>Disable Basic QINQ on Physical Port
Section titled “Disable Basic QINQ on Physical Port”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>Enable Basic QINQ on PortChannel
Section titled “Enable Basic QINQ on PortChannel”Request example to enable basic QINQ on a portChannel via edit-config
<config> <top> <interfaces> <interface> <name>PortChannel0001</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>Disable Basic QINQ on PortChannel
Section titled “Disable Basic QINQ on PortChannel”Request example to disable basic QINQ on a physical port via edit-config
<config> <top> <interfaces> <interface> <name>PortChannel0001</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>Configure VLAN Stacking on Physical Port
Section titled “Configure 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>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>Delete VLAN Stacking on Physical Port
Section titled “Delete VLAN Stacking on Physical Port”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>Configure VLAN Mapping on Physical Port
Section titled “Configure VLAN Mapping on Physical Port”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>Delete VLAN Mapping on Physical Port
Section titled “Delete VLAN Mapping on Physical Port”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>Properties Descriptions
Section titled “Properties Descriptions”Vlan Translation
Section titled “Vlan Translation”Tree Diagram
/workspaces/as-mgmt-doc/doc/resource/yang/asternos-vlan-translation.yang:28: warning: the revision statements are not given in reverse chronological ordermodule: asternos-vlan-translation
augment /if:interfaces/if:interface: +--rw vlan-translationBasic Qinq Enable
Section titled “Basic Qinq Enable”Tree Diagram
/workspaces/as-mgmt-doc/doc/resource/yang/asternos-vlan-translation.yang:28: warning: the revision statements are not given in reverse chronological ordermodule: asternos-vlan-translation
augment /if:interfaces/if:interface: +--rw vlan-translationMapping
Section titled “Mapping”Tree Diagram
/workspaces/as-mgmt-doc/doc/resource/yang/asternos-vlan-translation.yang:28: warning: the revision statements are not given in reverse chronological ordermodule: asternos-vlan-translation
augment /if:interfaces/if:interface: +--rw vlan-translationStacking
Section titled “Stacking”Tree Diagram
/workspaces/as-mgmt-doc/doc/resource/yang/asternos-vlan-translation.yang:28: warning: the revision statements are not given in reverse chronological ordermodule: asternos-vlan-translation
augment /if:interfaces/if:interface: +--rw vlan-translationDelete All Tagged Vlan Stacking
Section titled “Delete All Tagged Vlan Stacking”Tree Diagram
/workspaces/as-mgmt-doc/doc/resource/yang/asternos-vlan-translation.yang:28: warning: the revision statements are not given in reverse chronological ordermodule: asternos-vlan-translation
augment /if:interfaces/if:interface: +--rw vlan-translation
rpcs: +---x delete-all-tagged-vlan-stacking +---w input | +---w interface? cmn:ethernet-port-name +--ro output +--ro data? <anydata>Table of Properties
| Name | Required | Type/Range | Description |
|---|---|---|---|
| delete-all-tagged-vlan-stacking | O | ||
| interface | O | cmn:ethernet-port-name | The name of the interface to delete all tagged VLAN stackings. If not specified, all tagged VLAN stackings will be deleted from all interfaces. |
| data | O | Output message indicating the result of the operation. |