L2VPN OpenConfig Translation
Configure VPLS with Ethernet type
The VPLS creates a Ethernet type if the value of the 'pw-encapsulation' attribute is set to 'PWE_Ethernet_Raw_mode.
Release
This configuration was introduced in OcNOS version 5.1
OpenConfig NETCONF Payload
<interfaces xmlns="http://openconfig.net/yang/interfaces">
<interface>
<name>xe24</name>
<config>
<name>xe24</name>
<type xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ethernetCsmacd</type>
</config>
<subinterfaces>
<subinterface>
<index>1</index>
<config>
<index>1</index>
<enabled>true</enabled>
</config>
</subinterface>
</subinterfaces>
</interface>
</interfaces>
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>VPLS-TEST</name>
<config>
<name>VPLS-TEST</name>
<type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:L2VSI</type>
</config>
<connection-points>
<connection-point>
<connection-point-id>default</connection-point-id>
<endpoints>
<endpoint>
<endpoint-id>1</endpoint-id>
<config>
<precedence>1</precedence>
<type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:REMOTE</type>
</config>
<state>
<precedence>1</precedence>
</state>
<remote>
<config>
<virtual-circuit-identifier>400</virtual-circuit-identifier>
<remote-system>4.4.4.4</remote-system>
</config>
</remote>
</endpoint>
</endpoints>
<config>
<connection-point-id>default</connection-point-id>
</config>
</connection-point>
</connection-points>
<encapsulation>
<config>
<encapsulation-type
xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:MPLS</encapsulation-type>
</config>
</encapsulation>
<interfaces>
<interface>
<id>xe24.1</id>
<config>
<id>xe24.1</id>
<interface>xe24</interface>
<subinterface>1</subinterface>
</config>
</interface>
</interfaces>
<mpls>
<global>
<config>
<pw-encapsulation>PWE_ETHERNET_RAW_MODE</pw-encapsulation>
</config>
</global>
</mpls>
</network-instance>
</network-instances>
OcNOS CLI Command
mpls vpls VPLS-TEST1 400
signaling ldp
vpls-type ethernet
vpls-peer 4.4.4.4
exit-signaling
exit-vpls
!
interface xe24.1 switchport
encapsulation default
access-if-vpls
mpls-vpls VPLS-TEST1
OcNOS NETCONF Payload
<interfaces xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-interface">
<global xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-if-extended">
<error-disable>
<config>
<error-disable-stp-bpdu-guard>true</error-disable-stp-bpdu-guard>
</config>
</error-disable>
</global>
<interface>
<name>xe24</name>
<config>
<name>xe24</name>
</config>
</interface>
<interface>
<name>xe24.1</name>
<config>
<name>xe24.1</name>
<enable-switchport />
</config>
<extended xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-if-extended">
<subinterface-encapsulation>
<config>
<encap-default />
</config>
</subinterface-encapsulation>
</extended>
</interface>
</interfaces>
<network-instances xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-network-instance">
<network-instance>
<instance-name>VPLS-TEST1</instance-name>
<instance-type>vpls</instance-type>
<config>
<instance-name>VPLS-TEST1</instance-name>
<instance-type>vpls</instance-type>
</config>
<vpls-instance xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-l2vpn-vpls">
<vpls-peers>
<vpls-peer>
<peer-address>4.4.4.4</peer-address>
<config>
<peer-address>4.4.4.4</peer-address>
</config>
</vpls-peer>
<config>
<signaling-protocol-ldp />
<vpls-encapsulation-type>ethernet</vpls-encapsulation-type>
</config>
</vpls-peers>
<config>
<vpls-identifier>400</vpls-identifier>
</config>
</vpls-instance>
</network-instance>
</network-instances>
<vpls xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-l2vpn-vpls">
<interfaces>
<interface>
<name>xe24.1</name>
<vpls-access>
<config>
<vpls-name>VPLS-TEST1</vpls-name>
<enable />
</config>
</vpls-access>
<config>
<name>xe24.1</name>
</config>
</interface>
</interfaces>
</vpls>
Validation with NetConf get
<network-instance>
<name>VPLS-TEST</name>
<config>
<name>VPLS-TEST</name>
<type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:L2VSI</type>
</config>
<connection-points>
<connection-point>
<connection-point-id>default</connection-point-id>
<endpoints>
<endpoint>
<endpoint-id>1</endpoint-id>
<state>
<precedence>1</precedence>
<type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:REMOTE</type>
<endpoint-id>1</endpoint-id>
</state>
<config>
<type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:REMOTE</type>
<endpoint-id>1</endpoint-id>
</config>
<remote>
<config>
<virtual-circuit-identifier>400</virtual-circuit-identifier>
<remote-system>4.4.4.4</remote-system>
</config>
<state>
<virtual-circuit-identifier>400</virtual-circuit-identifier>
<remote-system>4.4.4.4</remote-system>
</state>
</remote>
</endpoint>
</endpoints>
<state>
<connection-point-id>default</connection-point-id>
</state>
<config>
<connection-point-id>default</connection-point-id>
</config>
</connection-point>
</connection-points>
<state>
<name>VPLS-TEST</name>
<type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:L2VSI</type>
</state>
<encapsulation>
<config>
<encapsulation-type
xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:MPLS</encapsulation-type>
</config>
<state>
<encapsulation-type
xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:MPLS</encapsulation-type>
</state>
</encapsulation>
<mpls>
<global>
<config>
<pw-encapsulation>PWE_ETHERNET_RAW_MODE</pw-encapsulation>
</config>
<state>
<pw-encapsulation>PWE_ETHERNET_RAW_MODE</pw-encapsulation>
</state>
</global>
</mpls>
<interfaces>
<interface>
<id>xe24.1</id>
<config>
<id>xe24.1</id>
<interface>xe24</interface>
<subinterface>1</subinterface>
</config>
<state>
<id>xe24.1</id>
<interface>xe24</interface>
<subinterface>1</subinterface>
</state>
</interface>
</interfaces>
<fdb>
<config>
<mac-learning>true</mac-learning>
</config>
<state>
<mac-learning>true</mac-learning>
</state>
</fdb>
</network-instance>
Restrictions
/network-instances/network-instance/interfaces/interface/id
This leaf must have the format “<interface>.<subinterface>”, e.g., xe10.2, and it is limited to 32 characters.
Currently encapsulation supported is ethernet. On OcNOS the the vpls-type must always be set as ethernet.
The instance-name (for netconf) or name (for CLI) must to be ended with 1 or 2, otherwise the command will be accept by OcNOS, but this vpls won’t be translated by Openconfig.
The endpoint-id must to be 1 or 2 in Openconfig payload.
Configure VPLS with VLAN type
The VPLS creates a VLAN type if the value of the 'pw-encapsulation' attribute is set to 'PWE_Ethernet_Tagged_mode.
Release
This configuration was introduced in OcNOS version 5.1.
OpenConfig NETCONF Payload
<interfaces xmlns="http://openconfig.net/yang/interfaces">
<interface>
<name>xe25</name>
<config>
<name>xe25</name>
<type xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ethernetCsmacd</type>
</config>
<subinterfaces>
<subinterface>
<index>1</index>
<config>
<index>1</index>
<enabled>true</enabled>
</config>
</subinterface>
</subinterfaces>
</interface>
</interfaces>
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>VPLS-FULL</name>
<config>
<name>VPLS-FULL</name>
<type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:L2VSI</type>
</config>
<connection-points>
<connection-point>
<connection-point-id>default</connection-point-id>
<endpoints>
<endpoint>
<endpoint-id>1</endpoint-id>
<config>
<type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:REMOTE</type>
<endpoint-id>1</endpoint-id>
<precedence>1</precedence>
</config>
<remote>
<config>
<remote-system>6.6.6.6</remote-system>
<virtual-circuit-identifier>600</virtual-circuit-identifier>
</config>
</remote>
</endpoint>
</endpoints>
<config>
<connection-point-id>default</connection-point-id>
</config>
</connection-point>
</connection-points>
<interfaces>
<interface>
<id>xe25.1</id>
<config>
<id>xe25.1</id>
<interface>xe25</interface>
<subinterface>1</subinterface>
</config>
</interface>
</interfaces>
<encapsulation>
<config>
<encapsulation-type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:MPLS</encapsulation-type>
</config>
</encapsulation>
<mpls>
<global>
<config>
<pw-encapsulation>PWE_ETHERNET_TAGGED_MODE</pw-encapsulation>
</config>
</global>
</mpls>
</network-instance>
</network-instances>
OcNOS CLI Command
mpls vpls VPLS-FULL1 600
signaling ldp
vpls-type vlan
vpls-peer 6.6.6.6
exit-signaling
exit-vpls
!
interface xe25.1 switchport
encapsulation default
access-if-vpls
mpls-vpls VPLS-FULL1
OcNOS NETCONF Payload
<interfaces xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-interface">
<global xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-if-extended">
<error-disable>
<config>
<error-disable-stp-bpdu-guard>true</error-disable-stp-bpdu-guard>
</config>
</error-disable>
</global>
<interface>
<name>xe25</name>
<config>
<name>xe25</name>
</config>
</interface>
<interface>
<name>xe25.1</name>
<config>
<name>xe25.1</name>
<enable-switchport />
</config>
<extended xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-if-extended">
<subinterface-encapsulation>
<config>
<encap-default />
</config>
</subinterface-encapsulation>
</extended>
</interface>
</interfaces>
<network-instances xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-network-instance">
<network-instance>
<instance-name>VPLS-FULL1</instance-name>
<instance-type>vpls</instance-type>
<config>
<instance-name>VPLS-FULL1</instance-name>
<instance-type>vpls</instance-type>
</config>
<vpls-instance xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-l2vpn-vpls">
<vpls-peers>
<vpls-peer>
<peer-address>6.6.6.6</peer-address>
<config>
<peer-address>6.6.6.6</peer-address>
</config>
</vpls-peer>
<config>
<signaling-protocol-ldp />
<vpls-encapsulation-type>vlan</vpls-encapsulation-type>
</config>
</vpls-peers>
<config>
<vpls-identifier>600</vpls-identifier>
</config>
</vpls-instance>
</network-instance>
</network-instances>
<vpls xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-l2vpn-vpls">
<interfaces>
<interface>
<name>xe25.1</name>
<vpls-access>
<config>
<vpls-name>VPLS-FULL1</vpls-name>
<enable />
</config>
</vpls-access>
<config>
<name>xe25.1</name>
</config>
</interface>
</interfaces>
</vpls>
Validation with NetConf get
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>VPLS-FULL</name>
<config>
<name>VPLS-FULL</name>
<type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:L2VSI</type>
</config>
<connection-points>
<connection-point>
<connection-point-id>default</connection-point-id>
<endpoints>
<endpoint>
<endpoint-id>1</endpoint-id>
<state>
<precedence>1</precedence>
<type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:REMOTE</type>
<endpoint-id>1</endpoint-id>
</state>
<config>
<type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:REMOTE</type>
<endpoint-id>1</endpoint-id>
</config>
<remote>
<config>
<virtual-circuit-identifier>600</virtual-circuit-identifier>
<remote-system>6.6.6.6</remote-system>
</config>
<state>
<virtual-circuit-identifier>600</virtual-circuit-identifier>
<remote-system>6.6.6.6</remote-system>
</state>
</remote>
</endpoint>
</endpoints>
<state>
<connection-point-id>default</connection-point-id>
</state>
<config>
<connection-point-id>default</connection-point-id>
</config>
</connection-point>
</connection-points>
<state>
<name>VPLS-FULL</name>
<type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:L2VSI</type>
</state>
<encapsulation>
<config>
<encapsulation-type
xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:MPLS</encapsulation-type>
</config>
<state>
<encapsulation-type
xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:MPLS</encapsulation-type>
</state>
</encapsulation>
<mpls>
<global>
<config>
<pw-encapsulation>PWE_ETHERNET_TAGGED_MODE</pw-encapsulation>
</config>
<state>
<pw-encapsulation>PWE_ETHERNET_TAGGED_MODE</pw-encapsulation>
</state>
</global>
</mpls>
<interfaces>
<interface>
<id>xe25.1</id>
<config>
<id>xe25.1</id>
<interface>xe25</interface>
<subinterface>1</subinterface>
</config>
<state>
<id>xe25.1</id>
<interface>xe25</interface>
<subinterface>1</subinterface>
</state>
</interface>
</interfaces>
<fdb>
<config>
<mac-learning>true</mac-learning>
</config>
<state>
<mac-learning>true</mac-learning>
</state>
</fdb>
</network-instance>
Restrictions
/network-instances/network-instance/interfaces/interface/id
This leaf must have the format “<interface>.<subinterface>”, e.g., xe10.2, and it is limited to 32 characters.
Currently encapsulation supported is ethernet. On OcNOS the the vpls-type must always be set as ethernet.
The instance-name (for netconf) or name (for CLI) must to be ended with 1 or 2, otherwise the command will be accept by OcNOS, but this vpls won’t be translated by OpenConfig.
The endpoint-id must to be 1 or 2 in OpenConfig payload.
Disabling VPLS mac-learning
Release
This configuration was introduced in OcNOS version 5.1.
OpenConfig NETCONF Payload
<interfaces xmlns="http://openconfig.net/yang/interfaces">
<interface>
<name>xe2</name>
<config>
<name>xe2</name>
<type xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ethernetCsmacd</type>
</config>
<subinterfaces>
<subinterface>
<index>1</index>
<config>
<index>1</index>
<enabled>true</enabled>
</config>
</subinterface>
</subinterfaces>
</interface>
</interfaces>
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>VPLS-TEST</name>
<config>
<name>VPLS-TEST</name>
<type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:L2VSI</type>
</config>
<connection-points>
<connection-point>
<connection-point-id>default</connection-point-id>
<endpoints>
<endpoint>
<endpoint-id>1</endpoint-id>
<config>
<type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:REMOTE</type>
<endpoint-id>1</endpoint-id>
</config>
<remote>
<config>
<virtual-circuit-identifier>101</virtual-circuit-identifier>
<remote-system>3.3.3.3</remote-system>
</config>
</remote>
</endpoint>
</endpoints>
</connection-point>
</connection-points>
<encapsulation>
<config>
<encapsulation-type
xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:MPLS</encapsulation-type>
</config>
</encapsulation>
<interfaces>
<interface>
<id>xe2.1</id>
<config>
<id>xe2.1</id>
<interface>xe2</interface>
<subinterface>1</subinterface>
</config>
</interface>
</interfaces>
<fdb>
<config>
<mac-learning>false</mac-learning>
</config>
</fdb>
</network-instance>
</network-instances>
OcNOS CLI Command
mpls vpls VPLS-TEST1 101
signaling ldp
vpls-peer 3.3.3.3
exit-signaling
exit-vpls
!
interface xe2.1 switchport
encapsulation default
access-if-vpls
mpls-vpls VPLS-TEST1
learning disable
OcNOS NETCONF Payload
<interfaces xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-interface">
<interface>
<name>xe2</name>
<config>
<name>xe2</name>
</config>
</interface>
<interface>
<name>xe2.1</name>
<config>
<name>xe2.1</name>
<enable-switchport />
</config>
<extended xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-if-extended">
<subinterface-encapsulation>
<config>
<encap-default />
</config>
</subinterface-encapsulation>
</extended>
</interface>
</interfaces>
<network-instances xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-network-instance">
<network-instance>
<instance-name>VPLS-TEST1</instance-name>
<instance-type>vpls</instance-type>
<config>
<instance-name>VPLS-TEST1</instance-name>
<instance-type>vpls</instance-type>
</config>
<vpls-instance xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-l2vpn-vpls">
<vpls-peers>
<vpls-peer>
<peer-address>3.3.3.3</peer-address>
<config>
<peer-address>3.3.3.3</peer-address>
</config>
</vpls-peer>
<config>
<signaling-protocol-ldp />
</config>
</vpls-peers>
<config>
<vpls-identifier>101</vpls-identifier>
</config>
</vpls-instance>
</network-instance>
</network-instances>
<vpls xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-l2vpn-vpls">
<interfaces>
<interface>
<name>xe2.1</name>
<vpls-access>
<config>
<vpls-name>VPLS-TEST1</vpls-name>
<disable-mac-learning />
<enable />
</config>
</vpls-access>
<config>
<name>xe2.1</name>
</config>
</interface>
</interfaces>
</vpls>
Validation with NETCONF get
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>VPLS-TEST</name>
<config>
<name>VPLS-TEST</name>
<type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:L2VSI</type>
</config>
<connection-points>
<connection-point>
<connection-point-id>default</connection-point-id>
<endpoints>
<endpoint>
<endpoint-id>1</endpoint-id>
<config>
<type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:REMOTE</type>
<endpoint-id>1</endpoint-id>
</config>
<remote>
<config>
<virtual-circuit-identifier>101</virtual-circuit-identifier>
<remote-system>3.3.3.3</remote-system>
</config>
<state>
<virtual-circuit-identifier>101</virtual-circuit-identifier>
<remote-system>3.3.3.3</remote-system>
</state>
</remote>
<state>
<type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:REMOTE</type>
<endpoint-id>1</endpoint-id>
</state>
</endpoint>
</endpoints>
</connection-point>
</connection-points>
<state>
<name>VPLS-TEST</name>
<type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:L2VSI</type>
</state>
<encapsulation>
<config>
<encapsulation-type
xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:MPLS</encapsulation-type>
</config>
<state>
<encapsulation-type
xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:MPLS</encapsulation-type>
</state>
</encapsulation>
<interfaces>
<interface>
<id>xe2.1</id>
<config>
<id>xe2.1</id>
<interface>xe2</interface>
<subinterface>1</subinterface>
</config>
<state>
<id>xe2.1</id>
<interface>xe2</interface>
<subinterface>1</subinterface>
</state>
</interface>
</interfaces>
<fdb>
<config>
<mac-learning>false</mac-learning>
</config>
<state>
<mac-learning>false</mac-learning>
</state>
</fdb>
</network-instance>
</network-instances>
<interfaces xmlns="http://openconfig.net/yang/interfaces">
<interface>
<name>xe2</name>
<config>
<name>xe2</name>
<type xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ethernetCsmacd</type>
</config>
<state>
<name>xe2</name>
<logical>false</logical>
<last-change>550600</last-change>
<oper-status>UP</oper-status>
<admin-status>UP</admin-status>
<ifindex>10002</ifindex>
<counters>
<last-clear>Never</last-clear>
<out-errors>0</out-errors>
<out-discards>0</out-discards>
<out-multicast-pkts>86</out-multicast-pkts>
<out-broadcast-pkts>0</out-broadcast-pkts>
<out-unicast-pkts>0</out-unicast-pkts>
<out-pkts>86</out-pkts>
<out-octets>9780</out-octets>
<in-fcs-errors>0</in-fcs-errors>
<in-errors>0</in-errors>
<in-discards>0</in-discards>
<in-multicast-pkts>3485</in-multicast-pkts>
<in-broadcast-pkts>0</in-broadcast-pkts>
<in-unicast-pkts>0</in-unicast-pkts>
<in-pkts>3485</in-pkts>
<in-octets>279684</in-octets>
</counters>
<type xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ethernetCsmacd</type>
</state>
<ethernet xmlns="http://openconfig.net/yang/interfaces/ethernet">
<state>
<negotiated-port-speed>SPEED_10GB</negotiated-port-speed>
<negotiated-duplex-mode>FULL</negotiated-duplex-mode>
<hw-mac-address>b86a.97be.193f</hw-mac-address>
</state>
</ethernet>
<subinterfaces>
<subinterface>
<index>0</index>
<config>
<index>0</index>
</config>
</subinterface>
<subinterface>
<index>1</index>
<config>
<index>1</index>
</config>
<state>
<name>xe2.1</name>
<logical>true</logical>
<oper-status>UP</oper-status>
<ifindex>20484097</ifindex>
<counters>
<last-clear>Never</last-clear>
<out-pkts>0</out-pkts>
<out-octets>0</out-octets>
<in-pkts>0</in-pkts>
<in-octets>0</in-octets>
</counters>
</state>
<ethernet xmlns="http://openconfig.net/yang/interfaces/ethernet">
<switched-vlan xmlns="http://openconfig.net/yang/vlan">
<state>
<interface-mode>ACCESS</interface-mode>
</state>
</switched-vlan>
</ethernet>
</subinterface>
</subinterfaces>
</interface>
</interfaces>
Restrictions
/network-instances/network-instance/interfaces/interface/id
This leaf must have the format “<interface>.<subinterface>”, e.g., xe10.2, and it is limited to 32 characters.
Configure VPWS
Release
This configuration was introduced in OcNOS version 5.1.
OpenConfig NETCONF Payload
<interfaces xmlns="http://openconfig.net/yang/interfaces">
<interface>
<name>xe1</name>
<config>
<name>xe1</name>
<type xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ethernetCsmacd</type>
</config>
<subinterfaces>
<subinterface>
<index>1</index>
<config>
<index>1</index>
<enabled>true</enabled>
</config>
</subinterface>
</subinterfaces>
</interface>
</interfaces>
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>VPWS-TEST</name>
<config>
<name>VPWS-TEST</name>
<type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:L2P2P</type>
</config>
<connection-points>
<connection-point>
<connection-point-id>default</connection-point-id>
<endpoints>
<endpoint>
<endpoint-id>1</endpoint-id>
<remote>
<config>
<virtual-circuit-identifier>100</virtual-circuit-identifier>
<remote-system>2.2.2.2</remote-system>
</config>
</remote>
<config>
<type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:REMOTE</type>
<endpoint-id>1</endpoint-id>
<precedence>1</precedence>
</config>
</endpoint>
</endpoints>
</connection-point>
</connection-points>
<encapsulation>
<config>
<encapsulation-type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:MPLS</encapsulation-type>
</config>
</encapsulation>
<interfaces>
<interface>
<id>xe1.1</id>
<config>
<id>xe1.1</id>
<interface>xe1</interface>
<subinterface>1</subinterface>
</config>
</interface>
</interfaces>
</network-instance>
</network-instances>
OcNOS CLI Command
mpls l2-circuit VPWS-TEST1 100 2.2.2.2
!
interface xe1.1 switchport
encapsulation default
access-if-vpws
mpls-l2-circuit VPWS-TEST1 primary
OcNOS NETCONF Payload
<interfaces xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-interface">
<interface>
<name>xe1</name>
<config>
<name>xe1</name>
</config>
</interface>
<interface>
<name>xe1.1</name>
<config>
<name>xe1.1</name>
<enable-switchport />
</config>
<extended xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-if-extended">
<subinterface-encapsulation>
<config>
<encap-default />
</config>
</subinterface-encapsulation>
</extended>
</interface>
</interfaces>
<network-instances xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-network-instance">
<network-instance>
<instance-name>VPWS-TEST1</instance-name>
<instance-type>vpws</instance-type>
<config>
<instance-name>VPWS-TEST1</instance-name>
<instance-type>vpws</instance-type>
</config>
<vpws-instance xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-l2vpn-vpws">
<pseudowire>
<pseudowire-identifier>100</pseudowire-identifier>
<peer-address>2.2.2.2</peer-address>
<config>
<pseudowire-identifier>100</pseudowire-identifier>
<peer-address>2.2.2.2</peer-address>
</config>
<default-tagged>
<config>
<enable-default-tagged-mode />
</config>
</default-tagged>
</pseudowire>
</vpws-instance>
</network-instance>
</network-instances>
<vpws xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-l2vpn-vpws">
<interfaces>
<interface>
<name>xe1.1</name>
<vpws-access>
<config>
<enable />
</config>
<bindings>
<binding>
<vpws-name>VPWS-TEST1</vpws-name>
<config>
<vpws-name>VPWS-TEST1</vpws-name>
<pseudowire-link-mode>primary</pseudowire-link-mode>
</config>
</binding>
</bindings>
</vpws-access>
<config>
<name>xe1.1</name>
</config>
</interface>
</interfaces>
</vpws>
Validation with NetConf get
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>VPWS-TEST</name>
<config>
<name>VPWS-TEST</name>
<type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:L2P2P</type>
</config>
<connection-points>
<connection-point>
<connection-point-id>default</connection-point-id>
<endpoints>
<endpoint>
<endpoint-id>1</endpoint-id>
<remote>
<config>
<virtual-circuit-identifier>100</virtual-circuit-identifier>
<remote-system>2.2.2.2</remote-system>
</config>
<state>
<virtual-circuit-identifier>100</virtual-circuit-identifier>
<remote-system>2.2.2.2</remote-system>
</state>
</remote>
<config>
<type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:REMOTE</type>
<endpoint-id>1</endpoint-id>
<precedence>1</precedence>
</config>
<state>
<type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:REMOTE</type>
<endpoint-id>1</endpoint-id>
<precedence>1</precedence>
</state>
</endpoint>
</endpoints>
</connection-point>
</connection-points>
<encapsulation>
<config>
<encapsulation-type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:MPLS</encapsulation-type>
</config>
<state>
<encapsulation-type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:MPLS</encapsulation-type>
</state>
</encapsulation>
<interfaces>
<interface>
<id>xe1.1</id>
<config>
<id>xe1.1</id>
<interface>xe1</interface>
<subinterface>1</subinterface>
</config>
<state>
<id>xe1.1</id>
<interface>xe1</interface>
<subinterface>1</subinterface>
</state>
</interface>
</interfaces>
</network-instance>
</network-instances>
<interfaces xmlns="http://openconfig.net/yang/interfaces">
<interface>
<name>xe1</name>
<config>
<name>xe1</name>
</config>
<subinterfaces>
<subinterface>
<index>1</index>
<config>
<index>1</index>
</config>
<state>
<name>xe1.1</name>
<logical>true</logical>
<oper-status>DOWN</oper-status>
<ifindex>20482049</ifindex>
<counters>
<last-clear>0</last-clear>
<out-pkts>0</out-pkts>
<out-octets>0</out-octets>
<in-pkts>0</in-pkts>
<in-octets>0</in-octets>
</counters>
</state>
<ethernet xmlns="http://openconfig.net/yang/interfaces/ethernet">
<switched-vlan xmlns="http://openconfig.net/yang/vlan">
<state>
<interface-mode>ACCESS</interface-mode>
</state>
</switched-vlan>
</ethernet>
</subinterface>
</subinterfaces>
</interface>
</interfaces>
Restrictions
/network-instances/network-instance/interfaces/interface/id
This leaf must have the format “<interface>.<subinterface>”, e.g., xe10.2, and it is limited to 32 characters.
The instance-name (for netconf) or name (for CLI) must to be ended with 1 or 2, otherwise the command will be accept by OcNOS, but this vpws won’t be translated by OpenConfig.
The endpoint-id must to be 1 or 2 in OpenConfig payload.
Configure VPWS precedence
Release
This configuration was introduced in OcNOS version 5.1.
OpenConfig NETCONF Payload
<interfaces xmlns="http://openconfig.net/yang/interfaces">
<interface>
<name>xe1</name>
<config>
<name>xe1</name>
<type xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ethernetCsmacd</type>
</config>
<subinterfaces>
<subinterface>
<index>1</index>
<config>
<index>1</index>
</config>
</subinterface>
</subinterfaces>
</interface>
</interfaces>
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>VPWS-TEST</name>
<config>
<name>VPWS-TEST</name>
<type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:L2P2P</type>
</config>
<connection-points>
<connection-point>
<connection-point-id>default</connection-point-id>
<endpoints>
<endpoint>
<endpoint-id>1</endpoint-id>
<remote>
<config>
<virtual-circuit-identifier>100</virtual-circuit-identifier>
<remote-system>2.2.2.2</remote-system>
</config>
</remote>
<config>
<type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:REMOTE</type>
<endpoint-id>1</endpoint-id>
<precedence>1</precedence>
</config>
</endpoint>
<endpoint>
<endpoint-id>2</endpoint-id>
<remote>
<config>
<virtual-circuit-identifier>200</virtual-circuit-identifier>
<remote-system>3.3.3.3</remote-system>
</config>
</remote>
<config>
<type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:REMOTE</type>
<endpoint-id>2</endpoint-id>
<precedence>2</precedence>
</config>
</endpoint>
</endpoints>
</connection-point>
</connection-points>
<encapsulation>
<config>
<encapsulation-type
xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:MPLS</encapsulation-type>
</config>
</encapsulation>
<interfaces>
<interface>
<id>xe1.1</id>
<config>
<id>xe1.1</id>
<interface>xe1</interface>
<subinterface>1</subinterface>
</config>
</interface>
</interfaces>
</network-instance>
</network-instances>
OcNOS CLI Command
mpls l2-circuit VPWS-TEST1 100 2.2.2.2
mpls l2-circuit VPWS-TEST2 200 3.3.3.3
!
interface xe1.1 switchport
encapsulation default
access-if-vpws
mpls-l2-circuit VPWS-TEST1 primary
mpls-l2-circuit VPWS-TEST2 secondary
OcNOS NetConf Payload
<interfaces xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-interface">
<interface>
<name>xe1</name>
<config>
<name>xe1</name>
</config>
</interface>
<interface>
<name>xe1.1</name>
<config>
<name>xe1.1</name>
<enable-switchport />
</config>
<extended xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-if-extended">
<subinterface-encapsulation>
<config>
<encap-default />
</config>
</subinterface-encapsulation>
</extended>
</interface>
</interfaces>
<network-instances xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-network-instance">
<network-instance>
<instance-name>VPWS-TEST1</instance-name>
<instance-type>vpws</instance-type>
<config>
<instance-name>VPWS-TEST1</instance-name>
<instance-type>vpws</instance-type>
</config>
<vpws-instance xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-l2vpn-vpws">
<pseudowire>
<pseudowire-identifier>100</pseudowire-identifier>
<peer-address>2.2.2.2</peer-address>
<config>
<pseudowire-identifier>100</pseudowire-identifier>
<peer-address>2.2.2.2</peer-address>
</config>
<default-tagged>
<config>
<enable-default-tagged-mode />
</config>
</default-tagged>
</pseudowire>
</vpws-instance>
</network-instance>
<network-instance>
<instance-name>VPWS-TEST2</instance-name>
<instance-type>vpws</instance-type>
<config>
<instance-name>VPWS-TEST2</instance-name>
<instance-type>vpws</instance-type>
</config>
<vpws-instance xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-l2vpn-vpws">
<pseudowire>
<pseudowire-identifier>200</pseudowire-identifier>
<peer-address>3.3.3.3</peer-address>
<config>
<pseudowire-identifier>200</pseudowire-identifier>
<peer-address>3.3.3.3</peer-address>
</config>
<default-tagged>
<config>
<enable-default-tagged-mode />
</config>
</default-tagged>
</pseudowire>
</vpws-instance>
</network-instance>
</network-instances>
<vpws xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-l2vpn-vpws">
<interfaces>
<interface>
<name>xe1.1</name>
<vpws-access>
<config>
<enable />
</config>
<bindings>
<binding>
<vpws-name>VPWS-TEST1</vpws-name>
<config>
<vpws-name>VPWS-TEST1</vpws-name>
<pseudowire-link-mode>primary</pseudowire-link-mode>
</config>
</binding>
<binding>
<vpws-name>VPWS-TEST2</vpws-name>
<config>
<vpws-name>VPWS-TEST2</vpws-name>
<pseudowire-link-mode>secondary</pseudowire-link-mode>
</config>
</binding>
</bindings>
</vpws-access>
<config>
<name>xe1.1</name>
</config>
</interface>
</interfaces>
</vpws>
Validation with NetConf get
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>VPWS-TEST</name>
<config>
<name>VPWS-TEST</name>
<type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:L2P2P</type>
</config>
<connection-points>
<connection-point>
<connection-point-id>default</connection-point-id>
<endpoints>
<endpoint>
<endpoint-id>1</endpoint-id>
<remote>
<config>
<virtual-circuit-identifier>100</virtual-circuit-identifier>
<remote-system>2.2.2.2</remote-system>
</config>
<state>
<virtual-circuit-identifier>100</virtual-circuit-identifier>
<remote-system>2.2.2.2</remote-system>
</state>
</remote>
<config>
<type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:REMOTE</type>
<endpoint-id>1</endpoint-id>
<precedence>1</precedence>
</config>
<state>
<type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:REMOTE</type>
<endpoint-id>1</endpoint-id>
<precedence>1</precedence>
</state>
</endpoint>
<endpoint>
<endpoint-id>2</endpoint-id>
<remote>
<config>
<virtual-circuit-identifier>200</virtual-circuit-identifier>
<remote-system>3.3.3.3</remote-system>
</config>
<state>
<virtual-circuit-identifier>200</virtual-circuit-identifier>
<remote-system>3.3.3.3</remote-system>
</state>
</remote>
<config>
<type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:REMOTE</type>
<endpoint-id>2</endpoint-id>
<precedence>2</precedence>
</config>
<state>
<type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:REMOTE</type>
<endpoint-id>2</endpoint-id>
<precedence>2</precedence>
</state>
</endpoint>
</endpoints>
</connection-point>
</connection-points>
<state>
<name>VPWS-TEST</name>
<type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:L2P2P</type>
</state>
<encapsulation>
<config>
<encapsulation-type
xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:MPLS</encapsulation-type>
</config>
<state>
<encapsulation-type
xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:MPLS</encapsulation-type>
</state>
</encapsulation>
<interfaces>
<interface>
<id>xe1.1</id>
<config>
<id>xe1.1</id>
<interface>xe1</interface>
<subinterface>1</subinterface>
</config>
<state>
<id>xe1.1</id>
<interface>xe1</interface>
<subinterface>1</subinterface>
</state>
</interface>
</interfaces>
</network-instance>
</network-instances>
<interfaces xmlns="http://openconfig.net/yang/interfaces">
<interface>
<name>xe1</name>
<config>
<name>xe1</name>
<type xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ethernetCsmacd</type>
</config>
<state>
<name>xe1</name>
<logical>false</logical>
<last-change>15100</last-change>
<oper-status>UP</oper-status>
<admin-status>UP</admin-status>
<ifindex>10001</ifindex>
<counters>
<last-clear>Never</last-clear>
<out-errors>0</out-errors>
<out-discards>0</out-discards>
<out-multicast-pkts>6</out-multicast-pkts>
<out-broadcast-pkts>0</out-broadcast-pkts>
<out-unicast-pkts>0</out-unicast-pkts>
<out-pkts>6</out-pkts>
<out-octets>640</out-octets>
<in-fcs-errors>0</in-fcs-errors>
<in-errors>0</in-errors>
<in-discards>0</in-discards>
<in-multicast-pkts>7</in-multicast-pkts>
<in-broadcast-pkts>0</in-broadcast-pkts>
<in-unicast-pkts>0</in-unicast-pkts>
<in-pkts>7</in-pkts>
<in-octets>814</in-octets>
</counters>
<type xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ethernetCsmacd</type>
</state>
<ethernet xmlns="http://openconfig.net/yang/interfaces/ethernet">
<state>
<negotiated-port-speed>SPEED_10GB</negotiated-port-speed>
<negotiated-duplex-mode>FULL</negotiated-duplex-mode>
<hw-mac-address>b86a.97be.193e</hw-mac-address>
</state>
</ethernet>
<subinterfaces>
<subinterface>
<index>0</index>
<config>
<index>0</index>
</config>
</subinterface>
<subinterface>
<index>1</index>
<config>
<index>1</index>
</config>
<state>
<name>xe1.1</name>
<logical>true</logical>
<oper-status>UP</oper-status>
<ifindex>20482049</ifindex>
<counters>
<last-clear>Never</last-clear>
<out-pkts>0</out-pkts>
<out-octets>0</out-octets>
<in-pkts>0</in-pkts>
<in-octets>0</in-octets>
</counters>
</state>
<ethernet xmlns="http://openconfig.net/yang/interfaces/ethernet">
<switched-vlan xmlns="http://openconfig.net/yang/vlan">
<state>
<interface-mode>ACCESS</interface-mode>
</state>
</switched-vlan>
</ethernet>
</subinterface>
</subinterfaces>
</interface>
</interfaces>
Restrictions
/network-instances/network-instance/interfaces/interface/id
This leaf must have the format “<interface>.<subinterface>”, e.g., xe10.2, and it is limited to 32 characters.
The instance-name (for netconf) or name (for CLI) must be ended with 1 or 2, otherwise the command will be accept by OcNOS, but this vpws won’t be translated by OpenConfig.
The endpoint-id must to be 1 or 2 in OpenConfig payload.