OcNOS-RON : OpenConfig Command Reference : L3VPN OpenConfig Translation
L3VPN OpenConfig Translation
Create VRF instance
This XML configuration snippet is used to initiate a VRF instances 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”.
Release
This configuration was introduced in OcNOS version 4.2.
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>
<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>
<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>
<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/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
This XML configuration snippet is used to configure MPLS label mode.
Release
This configuration was introduced in OcNOS version 4.2.
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>
</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>
<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>
<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
This XML configuration snippet is used to initiate a 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
For more information on this issue, please refer to https://github.com/openconfig/public/issues/392 .
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>
<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>
<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.
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.
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.
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>
<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>
<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>
<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.
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>
</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>
<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>
<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.
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>
</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>
<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>
<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>
</config>
<state>
<name>default</name>
<type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:DEFAULT_INSTANCE</type>
</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.