Use cases
Inside this chapter there are scenarios that could be accomplished using openconfig configurations xml files, showing complex interactions between different objects.
L3VPN
Create VRF instance
Release
This configuration was introduced in OcNOS version 4.2.
Configuration
In OpenConfig, VRF instances are represented by network-instances of type L3VRF, while the default VRF is a network-instance of type DEFAULT_INSTANCE. In OcNOS the default instance must have the name “default”.
OpenConfig NETCONF Payload
<network-instances xmlns="http://openconfig.net/yang/network-instance"
<network-instance>
<name>VRF1</name>
<config>
<name>VRF1</name>
<type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:L3VRF</type>
<enabled>true</enabled>
<enabled-address-families xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</enabled-address-families>
<enabled-address-families xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV6</enabled-address-families>
<router-id>20.20.20.20</router-id>
<description>"L3VPN Test Instance 1"</description>
<route-distinguisher>100:1</route-distinguisher>
</config>
</network-instance>
</network-instances>
OcNOS CLI Command
ip vrf VRF1
description "L3VPN Test Instance 1"
router-id 20.20.20.20
rd 100:1
OcNOS NETCONF Payload
<network-instances xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-network-instance">
<network-instance>
<instance-name>VRF1</instance-name>
<instance-type>vrf</instance-type>
<config>
<instance-name>VRF1</instance-name>
<instance-type>vrf</instance-type>
</config>
<vrf xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-vrf">
<config>
<router-id>20.20.20.20</router-id>
<description>"L3VPN Test Instance 1"</description>
<vrf-name>VRF1</vrf-name>
</config>
<bgp-vrf xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-bgp-vrf">
<config>
<rd-string>100:1</rd-string>
</config>
</bgp-vrf>
</vrf>
</network-instance>
</network-instances>
Validation with NETCONF get
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>VRF1</name>
<config>
<name>VRF1</name>
<type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:L3VRF</type>
<enabled>true</enabled>
<enabled-address-families xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</enabled-address-families>
<enabled-address-families xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV6</enabled-address-families>
<description>"L3VPN Test Instance 1"</description>
<router-id>20.20.20.20</router-id>
<route-distinguisher>100:1</route-distinguisher>
</config>
<state>
<name>VRF1</name>
<type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:L3VRF</type>
<enabled>true</enabled>
<enabled-address-families xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</enabled-address-families>
<enabled-address-families xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV6</enabled-address-families>
<description>"L3VPN Test Instance 1"</description>
<router-id>20.20.20.20</router-id>
<route-distinguisher>100:1</route-distinguisher>
</state>
<protocols>
<protocol xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">
<identifier>oc-pol-types:DIRECTLY_CONNECTED</identifier>
<name>DIRECTLY_CONNECTED</name>
<config>
<identifier>oc-pol-types:DIRECTLY_CONNECTED</identifier>
<name>DIRECTLY_CONNECTED</name>
<enabled>true</enabled>
</config>
</protocol>
</protocols>
<tables xmlns:oc-types="http://openconfig.net/yang/openconfig-types">
<table xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">
<protocol>oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family>oc-types:IPV4</address-family>
<config>
<protocol>oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family>oc-types:IPV4</address-family>
</config>
</table>
<table xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">
<protocol>oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family>oc-types:IPV6</address-family>
<config>
<protocol>oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family>oc-types:IPV6</address-family>
</config>
</table>
</tables>
<interfaces>
<interface>
<id>lo.VRF1</id>
<config>
<interface>lo.VRF1</interface>
<id>lo.VRF1</id>
</config>
</interface>
</interfaces>
</network-instance>
</network-instances>
Restrictions
/network-instances/network-instance/config/enabled
OcNOS does not support disabling the network-instance, so if this parameter is omitted, it will be set to TRUE by default.
/network-instances/network-instance/config/enabled-address-families
OcNOS does not support enabling/disabling address-families per network-instance, so if this parameter is omitted, it will be created by default depending on the instance type.
/network-instances/network-instance/config/type
In OcNOS, the instance type is a mandatory parameter, in OpenConfig, if omitted, it will be set to “L3VRF”, unless the instance name is set to “default”, in which case the type will be “DEFAULT_INSTANCE”.
Configure MPLS label mode
Release
This configuration was introduced in OcNOS version 4.2.
Configuration
OpenConfig NETCONF Payload
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>VRF1</name>
<config>
<name>VRF1</name>
<type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:L3VRF</type>
<enabled>true</enabled>
<enabled-address-families xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</enabled-address-families>
<enabled-address-families xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV6</enabled-address-families>
</config>
<encapsulation>
<config>
<label-allocation-mode xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:PER_PREFIX</label-allocation-mode>
<encapsulation-type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:MPLS</encapsulation-type>
</config>
</encapsulation>
</network-instance>
<network-instance>
<name>default</name>
<protocols>
<protocol xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">
<identifier>oc-pol-types:BGP</identifier>
<config>
<identifier>oc-pol-types:BGP</identifier>
</config>
</protocol>
</protocols>
</network-instance>
</network-instances>
OcNOS CLI Command
ip vrf VRF1
!
mpls label mode vpnv4 vrf VRF1 per-prefix
!
OcNOS NETCONF Payload
<network-instances xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-network-instance">
<network-instance>
<instance-name>VRF1</instance-name>
<instance-type>vrf</instance-type>
<config>
<instance-name>VRF1</instance-name>
<instance-type>vrf</instance-type>
</config>
<vrf xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-vrf">
<config>
<vrf-name>VRF1</vrf-name>
</config>
</vrf>
</network-instance>
</network-instances>
<bgp xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-bgp">
<global>
<mpls-l3vpn-label-mode>
<address-family-name>vpnv4</address-family-name>
<vrf-name>VRF1</vrf-name>
<config>
<address-family-name>vpnv4</address-family-name>
<vrf-name>VRF1</vrf-name>
<label-alloc-type>per-prefix</label-alloc-type>
</config>
</mpls-l3vpn-label-mode>
</global>
</bgp>
Validation with NETCONF get
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>VRF1</name>
<config>
<name>VRF1</name>
<type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:L3VRF</type>
<enabled>true</enabled>
<enabled-address-families xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</enabled-address-families>
<enabled-address-families xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV6</enabled-address-families>
<description>"L3VPN Test Instance 1"</description>
<router-id>20.20.20.20</router-id>
<route-distinguisher>100:1</route-distinguisher>
</config>
<state>
<name>VRF1</name>
<type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:L3VRF</type>
<enabled>true</enabled>
<enabled-address-families xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</enabled-address-families>
<enabled-address-families xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV6</enabled-address-families>
<description>"L3VPN Test Instance 1"</description>
<router-id>20.20.20.20</router-id>
<route-distinguisher>100:1</route-distinguisher>
</state>
<protocols>
<protocol xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">
<identifier>oc-pol-types:DIRECTLY_CONNECTED</identifier>
<name>DIRECTLY_CONNECTED</name>
<config>
<identifier>oc-pol-types:DIRECTLY_CONNECTED</identifier>
<name>DIRECTLY_CONNECTED</name>
<enabled>true</enabled>
</config>
</protocol>
</protocols>
<tables xmlns:oc-types="http://openconfig.net/yang/openconfig-types">
<table xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">
<protocol>oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family>oc-types:IPV4</address-family>
<config>
<protocol>oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family>oc-types:IPV4</address-family>
</config>
</table>
<table xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">
<protocol>oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family>oc-types:IPV6</address-family>
<config>
<protocol>oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family>oc-types:IPV6</address-family>
</config>
</table>
</tables>
<interfaces>
<interface>
<id>lo.VRF1</id>
<config>
<interface>lo.VRF1</interface>
<id>lo.VRF1</id>
</config>
</interface>
</interfaces>
<encapsulation>
<config>
<label-allocation-mode xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:PER_PREFIX</label-allocation-mode>
<encapsulation-type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:MPLS</encapsulation-type>
</config>
</encapsulation>
</network-instance>
</network-instances>
Restrictions
/network-instances/network-instance/encapsulation/config/encapsulation-type
Currently, the only supported encapsulation-type is “MPLS”.
/network-instances/network-instance/encapsulation/config/label-allocation-mode
If encapsulation-type MPLS is configured, this leaf is mandatory. The “PER_NEXTHOP” value is not supported.
Create route-targets
Release
This configuration was introduced in OcNOS version 4.2.
OpenConfig does not support the configuration of route-targets per network-instance, so a proprietary augment was added.
module: openconfig-network-instance
+--rw network-instances
+--rw network-instance* [name]
+--rw ipi-oc-ni-augments:route-targets
+--rw ipi-oc-ni-augments:route-target* [rt-rd-string]
+--rw ipi-oc-ni-augments:rt-rd-string -> ../config/rt-rd-string
+--rw ipi-oc-ni-augments:config
| +--rw ipi-oc-ni-augments:rt-rd-string? rt_rd_string_t
| +--rw ipi-oc-ni-augments:direction rt_direction_t
+--ro ipi-oc-ni-augments:state
+--ro ipi-oc-ni-augments:rt-rd-string? rt_rd_string_t
+--ro ipi-oc-ni-augments:direction? rt_direction_t
Configuration
OpenConfig NETCONF Payload
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>VRF1</name>
<config>
<name>VRF1</name>
</config>
<route-targets xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-oc-ni-augments">
<route-target>
<rt-rd-string>100:1</rt-rd-string>
<config>
<rt-rd-string>100:1</rt-rd-string>
<direction>EXPORT</direction>
</config>
</route-target>
<route-target>
<rt-rd-string>200:1</rt-rd-string>
<config>
<rt-rd-string>200:1</rt-rd-string>
<direction>IMPORT</direction>
</config>
</route-target>
</route-targets>
</network-instance>
</network-instances>
OcNOS CLI Command
ip vrf VRF1
route-target export 100:1
route-target import 200:1
OcNOS NETCONF Payload
<network-instances xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-network-instance">
<network-instance>
<instance-name>VRF1</instance-name>
<instance-type>vrf</instance-type>
<config>
<instance-name>VRF1</instance-name>
<instance-type>vrf</instance-type>
</config>
<vrf xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-vrf">
<bgp-vrf xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-bgp-vrf">
<route-target>
<rt-rd-string>100:1</rt-rd-string>
<direction>export</direction>
<config>
<rt-rd-string>100:1</rt-rd-string>
<direction>export</direction>
</config>
</route-target>
<route-target>
<rt-rd-string>200:1</rt-rd-string>
<direction>import</direction>
<config>
<rt-rd-string>200:1</rt-rd-string>
<direction>import</direction>
</config>
</route-target>
</bgp-vrf>
</vrf>
</network-instance>
</network-instances>
Validation with NETCONF get
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>VRF1</name>
<config>
<name>VRF1</name>
<type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:L3VRF</type>
<enabled>true</enabled>
<enabled-address-families xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</enabled-address-families>
<enabled-address-families xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV6</enabled-address-families>
<description>"L3VPN Test Instance 1"</description>
<router-id>20.20.20.20</router-id>
<route-distinguisher>100:1</route-distinguisher>
</config>
<state>
<name>VRF1</name>
<type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:L3VRF</type>
<enabled>true</enabled>
<enabled-address-families xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</enabled-address-families>
<enabled-address-families xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV6</enabled-address-families>
<description>"L3VPN Test Instance 1"</description>
<router-id>20.20.20.20</router-id>
<route-distinguisher>100:1</route-distinguisher>
</state>
<protocols>
<protocol xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">
<identifier>oc-pol-types:DIRECTLY_CONNECTED</identifier>
<name>DIRECTLY_CONNECTED</name>
<config>
<identifier>oc-pol-types:DIRECTLY_CONNECTED</identifier>
<name>DIRECTLY_CONNECTED</name>
<enabled>true</enabled>
</config>
</protocol>
</protocols>
<tables xmlns:oc-types="http://openconfig.net/yang/openconfig-types">
<table xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">
<protocol>oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family>oc-types:IPV4</address-family>
<config>
<protocol>oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family>oc-types:IPV4</address-family>
</config>
</table>
<table xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">
<protocol>oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family>oc-types:IPV6</address-family>
<config>
<protocol>oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family>oc-types:IPV6</address-family>
</config>
</table>
</tables>
<route-targets xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-oc-ni-augments">
<route-target>
<rt-rd-string>100:1</rt-rd-string>
<config>
<rt-rd-string>100:1</rt-rd-string>
<direction>EXPORT</direction>
</config>
<state>
<rt-rd-string>100:1</rt-rd-string>
<direction>EXPORT</direction>
</state>
</route-target>
<route-target>
<rt-rd-string>200:1</rt-rd-string>
<config>
<rt-rd-string>200:1</rt-rd-string>
<direction>IMPORT</direction>
</config>
<state>
<rt-rd-string>200:1</rt-rd-string>
<direction>IMPORT</direction>
</state>
</route-target>
</route-targets>
<interfaces>
<interface>
<id>lo.VRF1</id>
<config>
<interface>lo.VRF1</interface>
<id>lo.VRF1</id>
</config>
</interface>
</interfaces>
<encapsulation>
<config>
<label-allocation-mode xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:PER_PREFIX</label-allocation-mode>
<encapsulation-type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:MPLS</encapsulation-type>
</config>
</encapsulation>
</network-instance>
</network-instances>
Restrictions
This is a proprietary implementation and it can be changed if the support for this feature is added to OpenConfig in the future.
Create extended community sets
Release
This configuration was introduced in OcNOS version 4.2.
Configuration
OpenConfig NETCONF Payload
<routing-policy xmlns="http://openconfig.net/yang/routing-policy">
<defined-sets>
<bgp-defined-sets xmlns="http://openconfig.net/yang/bgp-policy">
<ext-community-sets>
<ext-community-set>
<ext-community-set-name>CLIST</ext-community-set-name>
<config>
<ext-community-set-name>CLIST</ext-community-set-name>
<match-set-options>ANY</match-set-options>
<ext-community-member>route-target:10.10.23.23:30</ext-community-member>
<ext-community-member>100:15</ext-community-member>
<ext-community-member>route-target:12.12.24.24:40</ext-community-member>
</config>
</ext-community-set>
</ext-community-sets>
</bgp-defined-sets>
</defined-sets>
</routing-policy>
OcNOS CLI Command
ip extcommunity-list standard CLIST permit soo 100:15
ip extcommunity-list standard CLIST permit rt 10.10.23.23:30
ip extcommunity-list standard CLIST permit rt 12.12.24.24:40
OcNOS NETCONF Payload
<bgp xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-bgp">
<global>
<community-lists>
<extended-community>
<standard>
<name>CLIST</name>
<config>
<name>CLIST</name>
</config>
<action-value>
<extended-action>permit</extended-action>
<route-target-soo>rt</route-target-soo>
<value>10.10.23.23:30</value>
<config>
<extended-action>permit</extended-action>
<route-target-soo>rt</route-target-soo>
<value>10.10.23.23:30</value>
</config>
</action-value>
<action-value>
<extended-action>permit</extended-action>
<route-target-soo>soo</route-target-soo>
<value>100:15</value>
<config>
<extended-action>permit</extended-action>
<route-target-soo>soo</route-target-soo>
<value>100:15</value>
</config>
</action-value>
<action-value>
<extended-action>permit</extended-action>
<route-target-soo>rt</route-target-soo>
<value>12.12.24.24:40</value>
<config>
<extended-action>permit</extended-action>
<route-target-soo>rt</route-target-soo>
<value>12.12.24.24:40</value>
</config>
</action-value>
</standard>
</extended-community>
</community-lists>
</global>
</bgp>
Validation with NETCONF get
<routing-policy xmlns="http://openconfig.net/yang/routing-policy">
<defined-sets>
<bgp-defined-sets xmlns="http://openconfig.net/yang/bgp-policy">
<ext-community-sets>
<ext-community-set>
<ext-community-set-name>CLIST</ext-community-set-name>
<config>
<ext-community-set-name>CLIST</ext-community-set-name>
<match-set-options>ANY</match-set-options>
<ext-community-member>route-target:10.10.23.23:30</ext-community-member>
<ext-community-member>100:15</ext-community-member>
<ext-community-member>route-target:12.12.24.24:40</ext-community-member>
</config>
</ext-community-set>
</ext-community-sets>
</bgp-defined-sets>
<tag-sets>
<tag-set>
<name>4294967295</name>
<config>
<name>4294967295</name>
<tag-value>4294967295</tag-value>
</config>
<state>
<name>4294967295</name>
<tag-value>4294967295</tag-value>
</state>
</tag-set>
</tag-sets>
</defined-sets>
</routing-policy>
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.
Add community set to match criteria for route map
Release
This configuration was introduced in OcNOS version 4.2.
Configuration
OpenConfig NETCONF Payload
<routing-policy xmlns="http://openconfig.net/yang/routing-policy">
<policy-definitions>
<policy-definition>
<name>in-VRF1</name>
<statements>
<statement>
<name>10</name>
<config>
<name>10</name>
</config>
<actions>
<config>
<policy-result>ACCEPT_ROUTE</policy-result>
</config>
</actions>
<conditions>
<bgp-conditions xmlns="http://openconfig.net/yang/bgp-policy">
<config>
<ext-community-set>CLIST</ext-community-set>
</config>
</bgp-conditions>
</conditions>
</statement>
</statements>
<config>
<name>in-VRF1</name>
</config>
</policy-definition>
<policy-definition>
<name>out-VRF1</name>
<statements>
<statement>
<name>10</name>
<config>
<name>10</name>
</config>
<actions>
<config>
<policy-result>ACCEPT_ROUTE</policy-result>
</config>
</actions>
</statement>
</statements>
<config>
<name>out-VRF1</name>
</config>
</policy-definition>
</policy-definitions>
</routing-policy>
OcNOS CLI Command
route-map in-VRF1 permit 10
match extcommunity CLIST
route-map out-VRF1
set extcommunity soo 200:25
OcNOS NETCONF Payload
<routemaps xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-routemap">
<routemap>
<routemap-name>in-VRF1</routemap-name>
<sequence-id>10</sequence-id>
<config>
<routemap-name>in-VRF1</routemap-name>
<sequence-id>10</sequence-id>
<action>permit</action>
</config>
<match-condition>
<extended-communities>
<extended-community>
<extended-community-identifier>CLIST</extended-community-identifier>
<config>
<extended-community-identifier>CLIST</extended-community-identifier>
<match-type>no-exact-match</match-type>
</config>
</extended-community>
</extended-communities>
</match-condition>
</routemap>
<routemap>
<routemap-name>out-VRF1</routemap-name>
<sequence-id>10</sequence-id>
<config>
<routemap-name>out-VRF1</routemap-name>
<sequence-id>10</sequence-id>
<action>permit</action>
</config>
<set-action>
<config>
<ext-community-site-of-origin>200:25</ext-community-site-of-origin>
</config>
</set-action>
</routemap>
</routemaps>
Validation with NETCONF get
<routing-policy xmlns="http://openconfig.net/yang/routing-policy">
<policy-definitions>
<policy-definition>
<name>in-VRF1</name>
<statements>
<statement>
<name>10</name>
<config>
<name>10</name>
</config>
<actions>
<config>
<policy-result>ACCEPT_ROUTE</policy-result>
</config>
<state>
<policy-result>ACCEPT_ROUTE</policy-result>
</state>
</actions>
<state>
<name>10</name>
</state>
<conditions>
<bgp-conditions xmlns="http://openconfig.net/yang/bgp-policy">
<config>
<ext-community-set>CLIST</ext-community-set>
</config>
</bgp-conditions>
</conditions>
</statement>
</statements>
<config>
<name>in-VRF1</name>
</config>
<state>
<name>in-VRF1</name>
</state>
</policy-definition>
<policy-definition>
<name>out-VRF1</name>
<statements>
<statement>
<name>10</name>
<config>
<name>10</name>
</config>
<actions>
<config>
<policy-result>ACCEPT_ROUTE</policy-result>
</config>
<state>
<policy-result>ACCEPT_ROUTE</policy-result>
</state>
<bgp-actions xmlns="http://openconfig.net/yang/bgp-policy"/>
</actions>
<state>
<name>10</name>
</state>
</statement>
</statements>
<config>
<name>out-VRF1</name>
</config>
<state>
<name>out-VRF1</name>
</state>
</policy-definition>
</policy-definitions>
</routing-policy>
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.
Apply routing policy (route map) as import/export
Release
This configuration was introduced in OcNOS version 4.2.
Configuration
OpenConfig NETCONF Payload
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>VRF1</name>
<config>
<name>VRF1</name>
<type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:L3VRF</type>
<enabled>true</enabled>
<enabled-address-families xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</enabled-address-families>
<enabled-address-families xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV6</enabled-address-families>
<router-id>20.20.20.20</router-id>
<description>"L3VPN Test Instance 1"</description>
<route-distinguisher>100:1</route-distinguisher>
</config>
<inter-instance-policies>
<apply-policy>
<config>
<export-policy>RT_EXPORT_POLICY</export-policy>
<import-policy>RT_IMPORT_POLICY</import-policy>
</config>
</apply-policy>
</inter-instance-policies>
<route-targets xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-oc-ni-augments">
<route-target>
<rt-rd-string>100:1</rt-rd-string>
<config>
<rt-rd-string>100:1</rt-rd-string>
<direction>BOTH</direction>
</config>
</route-target>
</route-targets>
</network-instance>
</network-instances>
OcNOS CLI Command
route-map RT_IMPORT_POLICY
route-map RT_EXPORT_POLICY
!
ip vrf VRF1
description "L3VPN Test Instance 1"
router-id 20.20.20.20
rd 100:1
route-target both 100:1
import map RT_IMPORT_POLICY
export map RT_EXPORT_POLICY
!
OcNOS NETCONF Payload
<network-instances xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-network-instance">
<network-instance>
<instance-name>VRF1</instance-name>
<instance-type>vrf</instance-type>
<config>
<instance-name>VRF1</instance-name>
<instance-type>vrf</instance-type>
</config>
<vrf xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-vrf">
<config>
<router-id>20.20.20.20</router-id>
<description>"L3VPN Test Instance 2039"</description>
<vrf-name>VRF1</vrf-name>
</config>
<bgp-vrf xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-bgp-vrf">
<config>
<rd-string>100:1</rd-string>
<export-map>RT_EXPORT_POLICY</export-map>
<import-map>RT_IMPORT_POLICY</import-map>
</config>
<route-target>
<rt-rd-string>100:1</rt-rd-string>
<config>
<rt-rd-string>100:1</rt-rd-string>
<direction>import export</direction>
</config>
</route-target>
</bgp-vrf>
</vrf>
</network-instance>
</network-instances>
Validation with NETCONF get
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>VRF1</name>
<config>
<name>VRF1</name>
<type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:L3VRF</type>
<enabled>true</enabled>
<enabled-address-families xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</enabled-address-families>
<enabled-address-families xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV6</enabled-address-families>
<description>"L3VPN Test Instance 1"</description>
<router-id>20.20.20.20</router-id>
<route-distinguisher>100:1</route-distinguisher>
</config>
<state>
<name>VRF1</name>
<type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:L3VRF</type>
<enabled>true</enabled>
<enabled-address-families xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</enabled-address-families>
<enabled-address-families xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV6</enabled-address-families>
<description>"L3VPN Test Instance 1"</description>
<router-id>20.20.20.20</router-id>
<route-distinguisher>100:1</route-distinguisher>
</state>
<protocols>
<protocol xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">
<identifier>oc-pol-types:DIRECTLY_CONNECTED</identifier>
<name>DIRECTLY_CONNECTED</name>
<config>
<identifier>oc-pol-types:DIRECTLY_CONNECTED</identifier>
<name>DIRECTLY_CONNECTED</name>
<enabled>true</enabled>
</config>
<state>
<identifier>oc-pol-types:DIRECTLY_CONNECTED</identifier>
<name>DIRECTLY_CONNECTED</name>
<enabled>true</enabled>
</state>
</protocol>
</protocols>
<tables xmlns:oc-types="http://openconfig.net/yang/openconfig-types">
<table xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">
<protocol>oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family>oc-types:IPV4</address-family>
<config>
<protocol>oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family>oc-types:IPV4</address-family>
</config>
<state>
<protocol>oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family>oc-types:IPV4</address-family>
</state>
</table>
<table xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">
<protocol>oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family>oc-types:IPV6</address-family>
<config>
<protocol>oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family>oc-types:IPV6</address-family>
</config>
<state>
<protocol>oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family>oc-types:IPV6</address-family>
</state>
</table>
</tables>
<inter-instance-policies>
<apply-policy>
<config>
<import-policy>in-VRF1</import-policy>
<export-policy>out-VRF1</export-policy>
</config>
</apply-policy>
</inter-instance-policies>
<route-targets xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-oc-ni-augments">
<route-target>
<rt-rd-string>100:1</rt-rd-string>
<config>
<rt-rd-string>100:1</rt-rd-string>
<direction>EXPORT</direction>
</config>
<state>
<rt-rd-string>100:1</rt-rd-string>
<direction>EXPORT</direction>
</state>
</route-target>
<route-target>
<rt-rd-string>200:1</rt-rd-string>
<config>
<rt-rd-string>200:1</rt-rd-string>
<direction>IMPORT</direction>
</config>
<state>
<rt-rd-string>200:1</rt-rd-string>
<direction>IMPORT</direction>
</state>
</route-target>
</route-targets>
<interfaces>
<interface>
<id>lo.VRF1</id>
<config>
<interface>lo.VRF1</interface>
<id>lo.VRF1</id>
</config>
<state>
<interface>lo.VRF1</interface>
<id>lo.VRF1</id>
</state>
</interface>
</interfaces>
<encapsulation>
<config>
<label-allocation-mode xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:PER_PREFIX</label-allocation-mode>
<encapsulation-type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:MPLS</encapsulation-type>
</config>
</encapsulation>
</network-instance>
</network-instances>
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 interfaces to access VPN
Release
This configuration was introduced in OcNOS version 4.2.
Configuration
OpenConfig NETCONF Payload
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>VRF1</name>
<config>
<name>VRF1</name>
<type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:L3VRF</type>
<enabled>true</enabled>
<enabled-address-families xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</enabled-address-families>
<enabled-address-families xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV6</enabled-address-families>
</config>
<interfaces>
<interface>
<id>xe2.2000</id>
<config>
<interface>xe2</interface>
<subinterface>2000</subinterface>
<id>xe2.2000</id>
</config>
</interface>
</interfaces>
</network-instance>
</network-instances>
<interfaces xmlns="http://openconfig.net/yang/interfaces">
<interface>
<name>xe2</name>
<config>
<name>xe2</name>
</config>
<subinterfaces>
<subinterface>
<index>2000</index>
<config>
<index>2000</index>
</config>
<ipv4 xmlns="http://openconfig.net/yang/interfaces/ip">
<config>
<mtu>1500</mtu>
</config>
<addresses>
<address>
<ip>11.12.13.14</ip>
<config>
<ip>11.12.13.14</ip>
<prefix-length>24</prefix-length>
</config>
</address>
</addresses>
</ipv4>
</subinterface>
</subinterfaces>
</interface>
</interfaces>
OcNOS CLI Command
interface xe2.2000
ip vrf forwarding VRF1
ip address 11.12.13.14/24
encapsulation dot1q 2000
mtu 1500
OcNOS NETCONF Payload
<network-instances xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-network-instance">
<network-instance>
<instance-name>VRF1</instance-name>
<instance-type>vrf</instance-type>
<config>
<instance-name>VRF1</instance-name>
<instance-type>vrf</instance-type>
</config>
<vrf xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-vrf">
<config>
<vrf-name>VRF1</vrf-name>
</config>
</vrf>
</network-instance>
</network-instances>
<interfaces xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-interface">
<interface>
<name>xe2.2000</name>
<config>
<name>xe2.2000</name>
<mtu>1500</mtu>
<vrf-name>VRF1</vrf-name>
</config>
<ipv4 xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-if-ip">
<config>
<primary-ip-addr>11.12.13.14/24</primary-ip-addr>
</config>
</ipv4>
<extended xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-if-extended">
<subinterface-encapsulation>
<vlan-service>
<config>
<outer-vlan-id>2000</outer-vlan-id>
<encapsulation-type>dot1q</encapsulation-type>
</config>
</vlan-service>
</subinterface-encapsulation>
</extended>
</interface>
</interfaces>
Validation with NETCONF get
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>VRF1</name>
<config>
<name>VRF1</name>
<type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:L3VRF</type>
<enabled>true</enabled>
<enabled-address-families xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</enabled-address-families>
<enabled-address-families xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV6</enabled-address-families>
<description>"L3VPN Test Instance 1"</description>
<router-id>20.20.20.20</router-id>
<route-distinguisher>100:1</route-distinguisher>
</config>
<state>
<name>VRF1</name>
<type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:L3VRF</type>
<enabled>true</enabled>
<enabled-address-families xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</enabled-address-families>
<enabled-address-families xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV6</enabled-address-families>
<description>"L3VPN Test Instance 1"</description>
<router-id>20.20.20.20</router-id>
<route-distinguisher>100:1</route-distinguisher>
</state>
<protocols>
<protocol xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">
<identifier>oc-pol-types:DIRECTLY_CONNECTED</identifier>
<name>DIRECTLY_CONNECTED</name>
<config>
<identifier>oc-pol-types:DIRECTLY_CONNECTED</identifier>
<name>DIRECTLY_CONNECTED</name>
<enabled>true</enabled>
</config>
<state>
<identifier>oc-pol-types:DIRECTLY_CONNECTED</identifier>
<name>DIRECTLY_CONNECTED</name>
<enabled>true</enabled>
</state>
</protocol>
</protocols>
<tables xmlns:oc-types="http://openconfig.net/yang/openconfig-types">
<table xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">
<protocol>oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family>oc-types:IPV4</address-family>
<config>
<protocol>oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family>oc-types:IPV4</address-family>
</config>
<state>
<protocol>oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family>oc-types:IPV4</address-family>
</state>
</table>
<table xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">
<protocol>oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family>oc-types:IPV6</address-family>
<config>
<protocol>oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family>oc-types:IPV6</address-family>
</config>
<state>
<protocol>oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family>oc-types:IPV6</address-family>
</state>
</table>
</tables>
<inter-instance-policies>
<apply-policy>
<config>
<import-policy>in-VRF1</import-policy>
<export-policy>out-VRF1</export-policy>
</config>
</apply-policy>
</inter-instance-policies>
<route-targets xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-oc-ni-augments">
<route-target>
<rt-rd-string>100:1</rt-rd-string>
<config>
<rt-rd-string>100:1</rt-rd-string>
<direction>EXPORT</direction>
</config>
<state>
<rt-rd-string>100:1</rt-rd-string>
<direction>EXPORT</direction>
</state>
</route-target>
<route-target>
<rt-rd-string>200:1</rt-rd-string>
<config>
<rt-rd-string>200:1</rt-rd-string>
<direction>IMPORT</direction>
</config>
<state>
<rt-rd-string>200:1</rt-rd-string>
<direction>IMPORT</direction>
</state>
</route-target>
</route-targets>
<interfaces>
<interface>
<id>lo.VRF1</id>
<config>
<interface>lo.VRF1</interface>
<id>lo.VRF1</id>
</config>
<state>
<interface>lo.VRF1</interface>
<id>lo.VRF1</id>
</state>
</interface>
<interface>
<id>xe2.2000</id>
<config>
<interface>xe2</interface>
<subinterface>2000</subinterface>
<id>xe2.2000</id>
</config>
<state>
<id>xe2</id>
<interface>xe2</interface>
<subinterface>2000</subinterface>
</state>
</interface>
</interfaces>
<encapsulation>
<config>
<label-allocation-mode xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:PER_PREFIX</label-allocation-mode>
<encapsulation-type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:MPLS</encapsulation-type>
</config>
</encapsulation>
</network-instance>
</network-instances>
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 BGP with neighbors and route redistribution
Release
This configuration was introduced in OcNOS version 4.2.
Configuration
OpenConfig NETCONF Payload
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>VRF1</name>
<protocols>
<protocol xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">
<identifier>oc-pol-types:DIRECTLY_CONNECTED</identifier>
<name>DIRECTLY_CONNECTED</name>
<config>
<identifier>oc-pol-types:DIRECTLY_CONNECTED</identifier>
<name>DIRECTLY_CONNECTED</name>
<enabled>true</enabled>
</config>
</protocol>
<protocol xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">
<identifier>oc-pol-types:BGP</identifier>
<name>100</name>
<bgp>
<global>
<config>
<as>100</as>
</config>
</global>
<neighbors>
<neighbor>
<neighbor-address>11.12.13.15</neighbor-address>
<afi-safis>
<afi-safi xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">
<afi-safi-name>oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<config>
<afi-safi-name>oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<enabled>true</enabled>
</config>
</afi-safi>
</afi-safis>
<config>
<neighbor-address>11.12.13.15</neighbor-address>
<peer-as>200</peer-as>
<enabled>true</enabled>
</config>
</neighbor>
</neighbors>
</bgp>
<config>
<identifier>oc-pol-types:BGP</identifier>
<name>100</name>
<enabled>true</enabled>
</config>
</protocol>
</protocols>
<tables xmlns:oc-types="http://openconfig.net/yang/openconfig-types">
<table xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">
<protocol>oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family>oc-types:IPV4</address-family>
<config>
<protocol>oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family>oc-types:IPV4</address-family>
</config>
</table>
<table xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">
<protocol>oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family>oc-types:IPV6</address-family>
<config>
<protocol>oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family>oc-types:IPV6</address-family>
</config>
</table>
<table xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">
<protocol>oc-pol-types:BGP</protocol>
<address-family>oc-types:IPV4</address-family>
<config>
<protocol xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</protocol>
<address-family xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</address-family>
</config>
</table>
</tables>
<table-connections xmlns:oc-types="http://openconfig.net/yang/openconfig-types">
<table-connection xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">
<src-protocol>oc-pol-types:DIRECTLY_CONNECTED</src-protocol>
<dst-protocol>oc-pol-types:BGP</dst-protocol>
<address-family>oc-types:IPV4</address-family>
<config>
<dst-protocol xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</dst-protocol>
<address-family xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</address-family>
<dst-instance xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-oc-ni-augments">100</dst-instance>
<default-import-policy>ACCEPT_ROUTE</default-import-policy>
<src-protocol xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</src-protocol>
</config>
</table-connection>
</table-connections>
</network-instance>
<network-instance>
<name>default</name>
<config>
<name>default</name>
<type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:DEFAULT_INSTANCE</type>
<enabled>true</enabled>
</config>
<protocols>
<protocol xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">
<identifier>oc-pol-types:DIRECTLY_CONNECTED</identifier>
<name>DIRECTLY_CONNECTED</name>
<config>
<identifier>oc-pol-types:DIRECTLY_CONNECTED</identifier>
<name>DIRECTLY_CONNECTED</name>
<enabled>true</enabled>
</config>
</protocol>
<protocol xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">
<identifier>oc-pol-types:BGP</identifier>
<name>100</name>
<config>
<identifier>oc-pol-types:BGP</identifier>
<name>100</name>
<enabled>true</enabled>
</config>
<bgp>
<global>
<config>
<as>100</as>
</config>
</global>
<neighbors>
<neighbor>
<neighbor-address>2.2.2.2</neighbor-address>
<afi-safis>
<afi-safi xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">
<afi-safi-name>oc-bgp-types:L3VPN_IPV4_UNICAST</afi-safi-name>
<config>
<afi-safi-name>oc-bgp-types:L3VPN_IPV4_UNICAST</afi-safi-name>
<enabled>true</enabled>
</config>
</afi-safi>
</afi-safis>
<config>
<neighbor-address>2.2.2.2</neighbor-address>
<peer-as>100</peer-as>
</config>
<transport>
<config>
<local-address>1.1.1.1</local-address>
</config>
</transport>
</neighbor>
</neighbors>
</bgp>
</protocol>
</protocols>
<tables xmlns:oc-types="http://openconfig.net/yang/openconfig-types">
<table xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">
<protocol>oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family>oc-types:IPV4</address-family>
<config>
<protocol>oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family>oc-types:IPV4</address-family>
</config>
</table>
<table xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">
<protocol>oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family>oc-types:IPV6</address-family>
<config>
<protocol>oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family>oc-types:IPV6</address-family>
</config>
</table>
<table xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">
<protocol>oc-pol-types:BGP</protocol>
<address-family>oc-types:IPV4</address-family>
<config>
<protocol>oc-pol-types:BGP</protocol>
<address-family>oc-types:IPV4</address-family>
</config>
</table>
</tables>
</network-instance>
</network-instances>
OcNOS CLI Command
ip vrf VRF1
rd 1234:5
!
router bgp 100
neighbor 2.2.2.2 remote-as 100
neighbor 2.2.2.2 update-source 1.1.1.1
!
address-family ipv4 unicast
exit-address-family
!
address-family vpnv4 unicast
neighbor 2.2.2.2 activate
exit-address-family
!
address-family ipv4 vrf VRF1
redistribute connected
neighbor 11.12.13.15 remote-as 200
neighbor 11.12.13.15 activate
exit-address-family
OcNOS NETCONF Payload
<network-instances xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-network-instance">
<network-instance>
<instance-name>default</instance-name>
<instance-type>vrf</instance-type>
<config>
<instance-name>default</instance-name>
<instance-type>vrf</instance-type>
</config>
<vrf xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-vrf">
<config>
<vrf-name>default</vrf-name>
</config>
</vrf>
</network-instance>
<network-instance>
<instance-name>VRF1</instance-name>
<config>
<instance-name>VRF1</instance-name>
<instance-type></instance-type>
</config>
<vrf xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-vrf">
<config>
<vrf-name>VRF1</vrf-name>
</config>
<bgp-vrf xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-bgp-vrf">
<config>
<rd-string>1234:5</rd-string>
</config>
</bgp-vrf>
</vrf>
<bridge xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-bridge">
<config>
<protocol>ieee-vlan-bridge</protocol>
</config>
</bridge>
</network-instance>
</network-instances>
<bgp xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-bgp">
<bgp-instance>
<bgp-as>100</bgp-as>
<config>
<bgp-as>100</bgp-as>
<bgp-as>100</bgp-as>
</config>
<peer>
<peer-address>2.2.2.2</peer-address>
<address-family>
<afi>ipv4</afi>
<safi>vpn-unicast</safi>
<config>
<afi>ipv4</afi>
<safi>vpn-unicast</safi>
<activate />
</config>
</address-family>
<config>
<peer-address>2.2.2.2</peer-address>
<peer-as>100</peer-as>
<source-identifier>1.1.1.1</source-identifier>
</config>
</peer>
<address-family>
<afi>ipv4</afi>
<safi>vpn-unicast</safi>
<config>
<afi>ipv4</afi>
<safi>vpn-unicast</safi>
</config>
</address-family>
<address-family>
<afi>ipv4</afi>
<safi>unicast</safi>
<config>
<safi>unicast</safi>
<afi>ipv4</afi>
</config>
</address-family>
<address-family-vrf>
<afi>ipv4</afi>
<safi>unicast</safi>
<vrf-name>VRF1</vrf-name>
<vrf-peer>
<peer-address>11.12.13.15</peer-address>
<config>
<activate />
<peer-address>11.12.13.15</peer-address>
<peer-as>200</peer-as>
</config>
</vrf-peer>
<config>
<afi>ipv4</afi>
<safi>unicast</safi>
<vrf-name>VRF1</vrf-name>
</config>
<config>
<safi>unicast</safi>
<afi>ipv4</afi>
<vrf-name>VRF1</vrf-name>
</config>
<route-redistribute-list>
<protocol-type>connected</protocol-type>
<config>
<protocol-type>connected</protocol-type>
</config>
</route-redistribute-list>
</address-family-vrf>
</bgp-instance>
</bgp>
Validation with NETCONF get
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>VRF1</name>
<config>
<name>VRF1</name>
<type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:L3VRF</type>
<enabled>true</enabled>
<enabled-address-families xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</enabled-address-families>
<enabled-address-families xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV6</enabled-address-families>
<description>"L3VPN Test Instance 1"</description>
<router-id>20.20.20.20</router-id>
<route-distinguisher>100:1</route-distinguisher>
</config>
<state>
<name>VRF1</name>
<type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:L3VRF</type>
<enabled>true</enabled>
<enabled-address-families xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</enabled-address-families>
<enabled-address-families xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV6</enabled-address-families>
<description>"L3VPN Test Instance 1"</description>
<router-id>20.20.20.20</router-id>
<route-distinguisher>100:1</route-distinguisher>
</state>
<protocols>
<protocol xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">
<identifier>oc-pol-types:DIRECTLY_CONNECTED</identifier>
<name>DIRECTLY_CONNECTED</name>
<config>
<identifier>oc-pol-types:DIRECTLY_CONNECTED</identifier>
<name>DIRECTLY_CONNECTED</name>
<enabled>true</enabled>
</config>
<state>
<identifier>oc-pol-types:DIRECTLY_CONNECTED</identifier>
<name>DIRECTLY_CONNECTED</name>
<enabled>true</enabled>
</state>
</protocol>
<protocol xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">
<identifier>oc-pol-types:BGP</identifier>
<name>100</name>
<bgp>
<global>
<config>
<as>100</as>
</config>
<state>
<as>100</as>
</state>
</global>
<neighbors>
<neighbor>
<neighbor-address>11.12.13.15</neighbor-address>
<afi-safis>
<afi-safi xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">
<afi-safi-name>oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<config>
<afi-safi-name>oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<enabled>true</enabled>
</config>
<state>
<afi-safi-name>oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<enabled>true</enabled>
</state>
</afi-safi>
</afi-safis>
<config>
<neighbor-address>11.12.13.15</neighbor-address>
<peer-as>200</peer-as>
<enabled>true</enabled>
</config>
<state>
<neighbor-address>11.12.13.15</neighbor-address>
<peer-as>200</peer-as>
<enabled>true</enabled>
</state>
</neighbor>
</neighbors>
</bgp>
<config>
<identifier>oc-pol-types:BGP</identifier>
<name>100</name>
<enabled>true</enabled>
</config>
<state>
<identifier>oc-pol-types:BGP</identifier>
<name>100</name>
<enabled>true</enabled>
</state>
</protocol>
</protocols>
<tables xmlns:oc-types="http://openconfig.net/yang/openconfig-types">
<table xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">
<protocol>oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family>oc-types:IPV4</address-family>
<config>
<protocol>oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family>oc-types:IPV4</address-family>
</config>
<state>
<protocol>oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family>oc-types:IPV4</address-family>
</state>
</table>
<table xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">
<protocol>oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family>oc-types:IPV6</address-family>
<config>
<protocol>oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family>oc-types:IPV6</address-family>
</config>
<state>
<protocol>oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family>oc-types:IPV6</address-family>
</state>
</table>
<table xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">
<protocol>oc-pol-types:BGP</protocol>
<address-family>oc-types:IPV4</address-family>
<config>
<protocol xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</protocol>
<address-family xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</address-family>
</config>
</table>
</tables>
<inter-instance-policies>
<apply-policy>
<config>
<import-policy>in-VRF1</import-policy>
<export-policy>out-VRF1</export-policy>
</config>
</apply-policy>
</inter-instance-policies>
<route-targets xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-oc-ni-augments">
<route-target>
<rt-rd-string>100:1</rt-rd-string>
<config>
<rt-rd-string>100:1</rt-rd-string>
<direction>EXPORT</direction>
</config>
<state>
<rt-rd-string>100:1</rt-rd-string>
<direction>EXPORT</direction>
</state>
</route-target>
<route-target>
<rt-rd-string>200:1</rt-rd-string>
<config>
<rt-rd-string>200:1</rt-rd-string>
<direction>IMPORT</direction>
</config>
<state>
<rt-rd-string>200:1</rt-rd-string>
<direction>IMPORT</direction>
</state>
</route-target>
</route-targets>
<interfaces>
<interface>
<id>lo.VRF1</id>
<config>
<interface>lo.VRF1</interface>
<id>lo.VRF1</id>
</config>
<state>
<interface>lo.VRF1</interface>
<id>lo.VRF1</id>
</state>
</interface>
<interface>
<id>xe2.2000</id>
<config>
<interface>xe2</interface>
<subinterface>2000</subinterface>
<id>xe2.2000</id>
</config>
<state>
<id>xe2</id>
<interface>xe2</interface>
<subinterface>2000</subinterface>
</state>
</interface>
</interfaces>
<encapsulation>
<config>
<label-allocation-mode xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:PER_PREFIX</label-allocation-mode>
<encapsulation-type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:MPLS</encapsulation-type>
</config>
</encapsulation>
<table-connections xmlns:oc-types="http://openconfig.net/yang/openconfig-types">
<table-connection xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">
<src-protocol>oc-pol-types:DIRECTLY_CONNECTED</src-protocol>
<dst-protocol>oc-pol-types:BGP</dst-protocol>
<address-family>oc-types:IPV4</address-family>
<config>
<dst-protocol xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</dst-protocol>
<address-family xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</address-family>
<dst-instance xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-oc-ni-augments">100</dst-instance>
<default-import-policy>ACCEPT_ROUTE</default-import-policy>
<src-protocol xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</src-protocol>
</config>
</table-connection>
</table-connections>
</network-instance>
<network-instance>
<name>default</name>
<config>
<name>default</name>
<type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:DEFAULT_INSTANCE</type>
<enabled>true</enabled>
</config>
<state>
<name>default</name>
<type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:DEFAULT_INSTANCE</type>
<enabled>true</enabled>
</state>
<protocols>
<protocol xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">
<identifier>oc-pol-types:DIRECTLY_CONNECTED</identifier>
<name>DIRECTLY_CONNECTED</name>
<config>
<identifier>oc-pol-types:DIRECTLY_CONNECTED</identifier>
<name>DIRECTLY_CONNECTED</name>
<enabled>true</enabled>
</config>
<state>
<identifier>oc-pol-types:DIRECTLY_CONNECTED</identifier>
<name>DIRECTLY_CONNECTED</name>
<enabled>true</enabled>
</state>
</protocol>
<protocol xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">
<identifier>oc-pol-types:BGP</identifier>
<name>100</name>
<config>
<identifier>oc-pol-types:BGP</identifier>
<name>100</name>
<enabled>true</enabled>
</config>
<bgp>
<global>
<config>
<as>100</as>
</config>
<state>
<as>100</as>
</state>
</global>
<neighbors>
<neighbor>
<neighbor-address>2.2.2.2</neighbor-address>
<afi-safis>
<afi-safi xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">
<afi-safi-name>oc-bgp-types:L3VPN_IPV4_UNICAST</afi-safi-name>
<config>
<afi-safi-name>oc-bgp-types:L3VPN_IPV4_UNICAST</afi-safi-name>
<enabled>true</enabled>
</config>
<state>
<afi-safi-name>oc-bgp-types:L3VPN_IPV4_UNICAST</afi-safi-name>
<enabled>true</enabled>
<enabled>true</enabled>
</state>
</afi-safi>
</afi-safis>
<config>
<neighbor-address>2.2.2.2</neighbor-address>
<peer-as>100</peer-as>
</config>
<transport>
<config>
<local-address>1.1.1.1</local-address>
</config>
<state>
<local-address>1.1.1.1</local-address>
</state>
</transport>
<state>
<neighbor-address>2.2.2.2</neighbor-address>
<peer-as>100</peer-as>
</state>
</neighbor>
</neighbors>
</bgp>
<state>
<enabled>true</enabled>
<identifier>oc-pol-types:BGP</identifier>
<name>100</name>
</state>
</protocol>
</protocols>
<tables xmlns:oc-types="http://openconfig.net/yang/openconfig-types">
<table xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">
<protocol>oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family>oc-types:IPV4</address-family>
<config>
<protocol>oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family>oc-types:IPV4</address-family>
</config>
<state>
<protocol>oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family>oc-types:IPV4</address-family>
</state>
</table>
<table xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">
<protocol>oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family>oc-types:IPV6</address-family>
<config>
<protocol>oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family>oc-types:IPV6</address-family>
</config>
<state>
<protocol>oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family>oc-types:IPV6</address-family>
</state>
</table>
<table xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">
<protocol>oc-pol-types:BGP</protocol>
<address-family>oc-types:IPV4</address-family>
<config>
<protocol>oc-pol-types:BGP</protocol>
<address-family>oc-types:IPV4</address-family>
</config>
</table>
</tables>
<interfaces>
<interface>
<id>ce49</id>
<config>
<interface>ce49</interface>
<id>ce49</id>
</config>
<state>
<interface>ce49</interface>
<id>ce49</id>
</state>
</interface>
<interface>
<id>ce50</id>
<config>
<interface>ce50</interface>
<id>ce50</id>
</config>
<state>
<interface>ce50</interface>
<id>ce50</id>
</state>
</interface>
<interface>
<id>ce51</id>
<config>
<interface>ce51</interface>
<id>ce51</id>
</config>
<state>
<interface>ce51</interface>
<id>ce51</id>
</state>
</interface>
<interface>
<id>ce52</id>
<config>
<interface>ce52</interface>
<id>ce52</id>
</config>
<state>
<interface>ce52</interface>
<id>ce52</id>
</state>
</interface>
<interface>
<id>ce53</id>
<config>
<interface>ce53</interface>
<id>ce53</id>
</config>
<state>
<interface>ce53</interface>
<id>ce53</id>
</state>
</interface>
<interface>
<id>ce54</id>
<config>
<interface>ce54</interface>
<id>ce54</id>
</config>
<state>
<interface>ce54</interface>
<id>ce54</id>
</state>
</interface>
<interface>
<id>lo</id>
<config>
<interface>lo</interface>
<id>lo</id>
</config>
<state>
<interface>lo</interface>
<id>lo</id>
</state>
</interface>
<interface>
<id>xe1</id>
<config>
<interface>xe1</interface>
<id>xe1</id>
</config>
<state>
<interface>xe1</interface>
<id>xe1</id>
</state>
</interface>
<interface>
<id>xe10</id>
<config>
<interface>xe10</interface>
<id>xe10</id>
</config>
<state>
<interface>xe10</interface>
<id>xe10</id>
</state>
</interface>
<interface>
<id>xe11</id>
<config>
<interface>xe11</interface>
<id>xe11</id>
</config>
<state>
<interface>xe11</interface>
<id>xe11</id>
</state>
</interface>
<interface>
<id>xe12</id>
<config>
<interface>xe12</interface>
<id>xe12</id>
</config>
<state>
<interface>xe12</interface>
<id>xe12</id>
</state>
</interface>
<interface>
<id>xe13</id>
<config>
<interface>xe13</interface>
<id>xe13</id>
</config>
<state>
<interface>xe13</interface>
<id>xe13</id>
</state>
</interface>
<interface>
<id>xe14</id>
<config>
<interface>xe14</interface>
<id>xe14</id>
</config>
<state>
<interface>xe14</interface>
<id>xe14</id>
</state>
</interface>
<interface>
<id>xe15</id>
<config>
<interface>xe15</interface>
<id>xe15</id>
</config>
<state>
<interface>xe15</interface>
<id>xe15</id>
</state>
</interface>
<interface>
<id>xe16</id>
<config>
<interface>xe16</interface>
<id>xe16</id>
</config>
<state>
<interface>xe16</interface>
<id>xe16</id>
</state>
</interface>
<interface>
<id>xe17</id>
<config>
<interface>xe17</interface>
<id>xe17</id>
</config>
<state>
<interface>xe17</interface>
<id>xe17</id>
</state>
</interface>
<interface>
<id>xe18</id>
<config>
<interface>xe18</interface>
<id>xe18</id>
</config>
<state>
<interface>xe18</interface>
<id>xe18</id>
</state>
</interface>
<interface>
<id>xe19</id>
<config>
<interface>xe19</interface>
<id>xe19</id>
</config>
<state>
<interface>xe19</interface>
<id>xe19</id>
</state>
</interface>
<interface>
<id>xe2</id>
<config>
<interface>xe2</interface>
<id>xe2</id>
</config>
<state>
<interface>xe2</interface>
<id>xe2</id>
</state>
</interface>
<interface>
<id>xe20</id>
<config>
<interface>xe20</interface>
<id>xe20</id>
</config>
<state>
<interface>xe20</interface>
<id>xe20</id>
</state>
</interface>
<interface>
<id>xe21</id>
<config>
<interface>xe21</interface>
<id>xe21</id>
</config>
<state>
<interface>xe21</interface>
<id>xe21</id>
</state>
</interface>
<interface>
<id>xe22</id>
<config>
<interface>xe22</interface>
<id>xe22</id>
</config>
<state>
<interface>xe22</interface>
<id>xe22</id>
</state>
</interface>
<interface>
<id>xe23</id>
<config>
<interface>xe23</interface>
<id>xe23</id>
</config>
<state>
<interface>xe23</interface>
<id>xe23</id>
</state>
</interface>
<interface>
<id>xe24</id>
<config>
<interface>xe24</interface>
<id>xe24</id>
</config>
<state>
<interface>xe24</interface>
<id>xe24</id>
</state>
</interface>
<interface>
<id>xe25</id>
<config>
<interface>xe25</interface>
<id>xe25</id>
</config>
<state>
<interface>xe25</interface>
<id>xe25</id>
</state>
</interface>
<interface>
<id>xe26</id>
<config>
<interface>xe26</interface>
<id>xe26</id>
</config>
<state>
<interface>xe26</interface>
<id>xe26</id>
</state>
</interface>
<interface>
<id>xe27</id>
<config>
<interface>xe27</interface>
<id>xe27</id>
</config>
<state>
<interface>xe27</interface>
<id>xe27</id>
</state>
</interface>
<interface>
<id>xe28</id>
<config>
<interface>xe28</interface>
<id>xe28</id>
</config>
<state>
<interface>xe28</interface>
<id>xe28</id>
</state>
</interface>
<interface>
<id>xe29</id>
<config>
<interface>xe29</interface>
<id>xe29</id>
</config>
<state>
<interface>xe29</interface>
<id>xe29</id>
</state>
</interface>
<interface>
<id>xe3</id>
<config>
<interface>xe3</interface>
<id>xe3</id>
</config>
<state>
<interface>xe3</interface>
<id>xe3</id>
</state>
</interface>
<interface>
<id>xe30</id>
<config>
<interface>xe30</interface>
<id>xe30</id>
</config>
<state>
<interface>xe30</interface>
<id>xe30</id>
</state>
</interface>
<interface>
<id>xe31</id>
<config>
<interface>xe31</interface>
<id>xe31</id>
</config>
<state>
<interface>xe31</interface>
<id>xe31</id>
</state>
</interface>
<interface>
<id>xe32</id>
<config>
<interface>xe32</interface>
<id>xe32</id>
</config>
<state>
<interface>xe32</interface>
<id>xe32</id>
</state>
</interface>
<interface>
<id>xe33</id>
<config>
<interface>xe33</interface>
<id>xe33</id>
</config>
<state>
<interface>xe33</interface>
<id>xe33</id>
</state>
</interface>
<interface>
<id>xe34</id>
<config>
<interface>xe34</interface>
<id>xe34</id>
</config>
<state>
<interface>xe34</interface>
<id>xe34</id>
</state>
</interface>
<interface>
<id>xe35</id>
<config>
<interface>xe35</interface>
<id>xe35</id>
</config>
<state>
<interface>xe35</interface>
<id>xe35</id>
</state>
</interface>
<interface>
<id>xe36</id>
<config>
<interface>xe36</interface>
<id>xe36</id>
</config>
<state>
<interface>xe36</interface>
<id>xe36</id>
</state>
</interface>
<interface>
<id>xe37</id>
<config>
<interface>xe37</interface>
<id>xe37</id>
</config>
<state>
<interface>xe37</interface>
<id>xe37</id>
</state>
</interface>
<interface>
<id>xe38</id>
<config>
<interface>xe38</interface>
<id>xe38</id>
</config>
<state>
<interface>xe38</interface>
<id>xe38</id>
</state>
</interface>
<interface>
<id>xe39</id>
<config>
<interface>xe39</interface>
<id>xe39</id>
</config>
<state>
<interface>xe39</interface>
<id>xe39</id>
</state>
</interface>
<interface>
<id>xe4</id>
<config>
<interface>xe4</interface>
<id>xe4</id>
</config>
<state>
<interface>xe4</interface>
<id>xe4</id>
</state>
</interface>
<interface>
<id>xe40</id>
<config>
<interface>xe40</interface>
<id>xe40</id>
</config>
<state>
<interface>xe40</interface>
<id>xe40</id>
</state>
</interface>
<interface>
<id>xe41</id>
<config>
<interface>xe41</interface>
<id>xe41</id>
</config>
<state>
<interface>xe41</interface>
<id>xe41</id>
</state>
</interface>
<interface>
<id>xe42</id>
<config>
<interface>xe42</interface>
<id>xe42</id>
</config>
<state>
<interface>xe42</interface>
<id>xe42</id>
</state>
</interface>
<interface>
<id>xe43</id>
<config>
<interface>xe43</interface>
<id>xe43</id>
</config>
<state>
<interface>xe43</interface>
<id>xe43</id>
</state>
</interface>
<interface>
<id>xe44</id>
<config>
<interface>xe44</interface>
<id>xe44</id>
</config>
<state>
<interface>xe44</interface>
<id>xe44</id>
</state>
</interface>
<interface>
<id>xe45</id>
<config>
<interface>xe45</interface>
<id>xe45</id>
</config>
<state>
<interface>xe45</interface>
<id>xe45</id>
</state>
</interface>
<interface>
<id>xe46</id>
<config>
<interface>xe46</interface>
<id>xe46</id>
</config>
<state>
<interface>xe46</interface>
<id>xe46</id>
</state>
</interface>
<interface>
<id>xe47</id>
<config>
<interface>xe47</interface>
<id>xe47</id>
</config>
<state>
<interface>xe47</interface>
<id>xe47</id>
</state>
</interface>
<interface>
<id>xe48</id>
<config>
<interface>xe48</interface>
<id>xe48</id>
</config>
<state>
<interface>xe48</interface>
<id>xe48</id>
</state>
</interface>
<interface>
<id>xe5</id>
<config>
<interface>xe5</interface>
<id>xe5</id>
</config>
<state>
<interface>xe5</interface>
<id>xe5</id>
</state>
</interface>
<interface>
<id>xe6</id>
<config>
<interface>xe6</interface>
<id>xe6</id>
</config>
<state>
<interface>xe6</interface>
<id>xe6</id>
</state>
</interface>
<interface>
<id>xe7</id>
<config>
<interface>xe7</interface>
<id>xe7</id>
</config>
<state>
<interface>xe7</interface>
<id>xe7</id>
</state>
</interface>
<interface>
<id>xe8</id>
<config>
<interface>xe8</interface>
<id>xe8</id>
</config>
<state>
<interface>xe8</interface>
<id>xe8</id>
</state>
</interface>
<interface>
<id>xe9</id>
<config>
<interface>xe9</interface>
<id>xe9</id>
</config>
<state>
<interface>xe9</interface>
<id>xe9</id>
</state>
</interface>
</interfaces>
</network-instance>
</network-instances>
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.
L2VPN
VPLS with Ethernet type
When the value of attribute pw-encapsulation is PWE_ETHERNET_RAW_MODE, the VPLS will be created with Ethernet type
Release
This configuration was introduced in OcNOS version 5.1.
Configuration
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>
<enabled>true</enabled>
</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>
<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>
<enabled>true</enabled>
</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>
<enabled>true</enabled>
</state>
<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.
VPLS with VLAN type
When the value of attribute pw-encapsulation is PWE_ETHERNET_TAGGED_MODE, the VPLS will be created with VLAN type
Release
This configuration was introduced in OcNOS version 5.1.
Configuration
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>
<enabled>true</enabled>
</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>
<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>
<enabled>true</enabled>
</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>
<enabled>true</enabled>
</state>
<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.
Disabling VPLS mac-learning
Release
This configuration was introduced in OcNOS version 5.1.
Configuration
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>
<enabled>true</enabled>
</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>
<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>
<enabled>true</enabled>
</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>
<enabled>true</enabled>
</state>
<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.
Configuration
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>
<enabled>true</enabled>
</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>
<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>
<enabled>true</enabled>
</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>
<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.
Configure VPWS precedence
Release
This configuration was introduced in OcNOS version 5.1.
Configuration
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>
<enabled>true</enabled>
</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>
<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>
<enabled>true</enabled>
</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>
<enabled>true</enabled>
</state>
<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.