OcNOS-RON : OpenConfig Command Reference : VLAN OpenConfig Translation
VLAN OpenConfig Translation
Match single tagged VLAN
This XML configuration snippet is used to to set a single tag VLAN match.
Release
This configuration was introduced in OcNOS version 5.1.
OpenConfig NetConf Payload
<interfaces xmlns="http://openconfig.net/yang/interfaces">
<interface>
<name>xe24</name>
<config>
<name>xe24</name>
<type xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ethernetCsmacd</type>
</config>
<subinterfaces>
<subinterface>
<index>20</index>
<config>
<index>20</index>
</config>
<vlan xmlns="http://openconfig.net/yang/vlan">
<match>
<single-tagged-list>
<config>
<vlan-ids>6</vlan-ids>
</config>
</single-tagged-list>
</match>
</vlan>
</subinterface>
</subinterfaces>
</interface>
</interfaces>
OcNOS CLI Command
interface xe24.20
encapsulation dot1q 6
OcNOS NetConf Payload
<interfaces xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-interface">
<interface>
<name>xe24</name>
<config>
<name>xe24</name>
</config>
</interface>
<interface>
<name>xe24.20</name>
<config>
<name>xe24.20</name>
</config>
<extended xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-if-extended">
<subinterface-encapsulation>
<single-tag-vlan-matches>
<single-tag-vlan-match>
<encapsulation-type>dot1q</encapsulation-type>
<config>
<encapsulation-type>dot1q</encapsulation-type>
<outer-vlan-id>6</outer-vlan-id>
</config>
</single-tag-vlan-match>
</single-tag-vlan-matches>
</subinterface-encapsulation>
</extended>
</interface>
</interfaces>
Validation with NetConf get
<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>
<vlan xmlns="http://openconfig.net/yang/vlan">
<match>
<single-tagged-list>
<config>
<vlan-ids>6</vlan-ids>
</config>
<state>
<vlan-ids>6</vlan-ids>
</state>
</single-tagged-list>
</match>
</vlan>
</subinterface>
</subinterfaces>
</interface>
</interfaces>
Restrictions
N/A
Match single tagged VLAN range
This XML configuration snippet is used to set a single tag VLAN range in a subinterface.
Release
This configuration was introduced in OcNOS version 5.1.
OpenConfig NetConf Payload
<interfaces xmlns="http://openconfig.net/yang/interfaces">
<interface>
<name>xe26</name>
<subinterfaces>
<subinterface>
<index>10</index>
<config>
<index>10</index>
</config>
<vlan xmlns="http://openconfig.net/yang/vlan">
<match>
<single-tagged-range>
<config>
<low-vlan-id>10</low-vlan-id>
<high-vlan-id>20</high-vlan-id>
</config>
</single-tagged-range>
</match>
<ingress-mapping>
<config>
<vlan-stack-action>PUSH</vlan-stack-action>
<vlan-id>15</vlan-id>
<tpid xmlns:oc-vlan-types="http://openconfig.net/yang/vlan-types">oc-vlan-types:TPID_0X88A8</tpid>
</config>
</ingress-mapping>
</vlan>
</subinterface>
</subinterfaces>
</interface>
</interfaces>
OcNOS CLI Command
interface xe26.10 switchport
encapsulation dot1q 10-20
rewrite push 0x88a8 15
OcNOS NetConf Payload
<interfaces xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-interface">
<interface>
<name>xe26</name>
<config>
<name>xe26</name>
</config>
</interface>
<interface>
<name>xe26.10</name>
<config>
<name>xe26.10</name>
<enable-switchport />
</config>
<extended xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-if-extended">
<subinterface-encapsulation>
<single-tag-vlan-matches>
<single-tag-vlan-match>
<encapsulation-type>dot1q</encapsulation-type>
<config>
<encapsulation-type>dot1q</encapsulation-type>
<outer-vlan-id>10-20</outer-vlan-id>
</config>
</single-tag-vlan-match>
</single-tag-vlan-matches>
<rewrite>
<config>
<vlan-action>push</vlan-action>
<push-outer-vlan-id>15</push-outer-vlan-id>
<push-tpid>0x88a8</push-tpid>
</config>
</rewrite>
</subinterface-encapsulation>
</extended>
</interface>
</interfaces>
Validation with NetConf get
<interfaces xmlns="http://openconfig.net/yang/interfaces">
<interface>
<name>xe26</name>
<config>
<name>xe26</name>
<type xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ethernetCsmacd</type>
</config>
<subinterfaces>
<subinterface>
<index>0</index>
<config>
<index>0</index>
</config>
</subinterface>
<subinterface>
<index>10</index>
<config>
<index>10</index>
</config>
<state>
<name>xe26.10</name>
<logical>true</logical>
<oper-status>DOWN</oper-status>
<ifindex>328531978</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>
<vlan xmlns="http://openconfig.net/yang/vlan">
<ingress-mapping>
<config>
<vlan-stack-action>PUSH</vlan-stack-action>
<tpid>TPID_0X88A8</tpid>
<vlan-id>15</vlan-id>
</config>
<state>
<vlan-stack-action>PUSH</vlan-stack-action>
<tpid>TPID_0X88A8</tpid>
<vlan-id>15</vlan-id>
</state>
</ingress-mapping>
<match>
<single-tagged-range>
<config>
<low-vlan-id>10</low-vlan-id>
<high-vlan-id>20</high-vlan-id>
</config>
<state>
<low-vlan-id>10</low-vlan-id>
<high-vlan-id>20</high-vlan-id>
</state>
</single-tagged-range>
</match>
</vlan>
</subinterface>
</subinterfaces>
</interface>
</interfaces>
Restrictions
If OcNOS “switchport” parameter has not been set previously on subinterface, VLAN range match needs to be configured along with ingress-mapping or added in the cross-connect network-instance.
Match double tagged VLAN
This XML configuration snippet is used to set an outer VLAN match in a subinterface.
Release
This configuration was introduced in OcNOS version 5.1.
OpenConfig NetConf Payload
<interfaces xmlns="http://openconfig.net/yang/interfaces">
<interface>
<name>xe37</name>
<config>
<name>xe37</name>
<type xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ethernetCsmacd</type>
</config>
<subinterfaces>
<subinterface>
<index>100</index>
<config>
<index>100</index>
</config>
<vlan xmlns="http://openconfig.net/yang/vlan">
<match>
<double-tagged-outer-list>
<config>
<outer-vlan-ids>400</outer-vlan-ids>
</config>
</double-tagged-outer-list>
</match>
</vlan>
</subinterface>
</subinterfaces>
</interface>
</interfaces>
OcNOS CLI Command
interface xe37.100
encapsulation dot1ad 400
OcNOS NetConf Payload
<interfaces xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-interface">
<interface>
<name>xe37</name>
<config>
<name>xe37</name>
</config>
</interface>
<interface>
<name>xe37.100</name>
<config>
<name>xe37.100</name>
</config>
<extended xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-if-extended">
<subinterface-encapsulation>
<single-tag-vlan-matches>
<single-tag-vlan-match>
<encapsulation-type>dot1ad</encapsulation-type>
<config>
<encapsulation-type>dot1ad</encapsulation-type>
<outer-vlan-id>400</outer-vlan-id>
</config>
</single-tag-vlan-match>
</single-tag-vlan-matches>
</subinterface-encapsulation>
</extended>
</interface>
</interfaces>
Validation with NetConf get
<interfaces xmlns="http://openconfig.net/yang/interfaces">
<interface>
<name>xe37</name>
<config>
<name>xe37</name>
</config>
<subinterfaces>
<subinterface>
<index>100</index>
<config>
<index>100</index>
</config>
<state>
<name>xe37.100</name>
<logical>true</logical>
<oper-status>DOWN</oper-status>
<ifindex>328892516</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>
<vlan xmlns="http://openconfig.net/yang/vlan">
<match>
<double-tagged-outer-list>
<config>
<outer-vlan-ids>400</outer-vlan-ids>
</config>
<state>
<outer-vlan-ids>400</outer-vlan-ids>
</state>
</double-tagged-outer-list>
</match>
</vlan>
</subinterface>
</subinterfaces>
</interface>
</interfaces>
Restrictions
Double-tagged-outer-list does not support the inner-vlan-id configuration.
Match double tagged with outer and inner VLAN
This XML configuration snippet is used to set outer and inner VLAN match in a subinterface.
Release
This configuration was introduced in OcNOS version 5.1.
OpenConfig NetConf Payload
<interfaces xmlns="http://openconfig.net/yang/interfaces">
<interface>
<name>xe25</name>
<config>
<name>xe25</name>
<type xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ethernetCsmacd</type>
</config>
<subinterfaces>
<subinterface>
<index>20</index>
<config>
<index>20</index>
</config>
<vlan xmlns="http://openconfig.net/yang/vlan">
<match>
<double-tagged>
<config>
<outer-vlan-id>40</outer-vlan-id>
<inner-vlan-id>30</inner-vlan-id>
</config>
</double-tagged>
</match>
</vlan>
</subinterface>
</subinterfaces>
</interface>
</interfaces>
OcNOS CLI Command
interface xe25.20
encapsulation dot1ad 40 inner-dot1q 30
OcNOS NetConf Payload
<interfaces xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-interface">
<interface>
<name>xe25</name>
<config>
<name>xe25</name>
</config>
</interface>
<interface>
<name>xe25.20</name>
<config>
<name>xe25.20</name>
</config>
<extended xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-if-extended">
<subinterface-encapsulation>
<double-tag-vlan-matches>
<double-tag-vlan-match>
<encapsulation-type>dot1ad</encapsulation-type>
<outer-vlan-id>40</outer-vlan-id>
<config>
<encapsulation-type>dot1ad</encapsulation-type>
<outer-vlan-id>40</outer-vlan-id>
<inner-vlan-id>30</inner-vlan-id>
</config>
</double-tag-vlan-match>
</double-tag-vlan-matches>
</subinterface-encapsulation>
</extended>
</interface>
</interfaces>
Validation with NetConf get
<interfaces xmlns="http://openconfig.net/yang/interfaces">
<interface>
<name>xe25</name>
<config>
<name>xe25</name>
</config>
<subinterfaces>
<subinterface>
<index>20</index>
<config>
<index>20</index>
</config>
<state>
<name>xe25.20</name>
<logical>true</logical>
<oper-status>DOWN</oper-status>
<ifindex>328499220</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>
<vlan xmlns="http://openconfig.net/yang/vlan">
<match>
<double-tagged>
<config>
<outer-vlan-id>40</outer-vlan-id>
<inner-vlan-id>30</inner-vlan-id>
</config>
<state>
<outer-vlan-id>40</outer-vlan-id>
<inner-vlan-id>30</inner-vlan-id>
</state>
</double-tagged>
</match>
</vlan>
</subinterface>
</subinterfaces>
</interface>
</interfaces>
Restrictions
N/A
Ingress-mapping actions
This XML configuration snippet is used to configure an ingress-mapping with VLAN actions. Allowed actions are PUSH, POP and SWAP.
Release
This configuration was introduced in OcNOS version 5.1.
OpenConfig NetConf Payload
<interfaces xmlns="http://openconfig.net/yang/interfaces">
<interface>
<name>xe32</name>
<config>
<name>xe32</name>
<type xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ethernetCsmacd</type>
</config>
<subinterfaces>
<subinterface>
<index>100</index>
<config>
<index>100</index>
</config>
<vlan xmlns="http://openconfig.net/yang/vlan">
<match>
<single-tagged-list>
<config>
<vlan-ids>10</vlan-ids>
</config>
</single-tagged-list>
</match>
<ingress-mapping>
<config>
<vlan-stack-action>SWAP</vlan-stack-action>
<tpid>TPID_0X8100</tpid>
<vlan-id>100</vlan-id>
</config>
</ingress-mapping>
</vlan>
</subinterface>
</subinterfaces>
</interface>
</interfaces>
OcNOS CLI Command
interface xe32.100 switchport
encapsulation dot1q 10
rewrite translate 1-to-1 0x8100 100
OcNOS NetConf Payload
<interfaces xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-interface">
<interface>
<name>xe32</name>
<config>
<name>xe32</name>
</config>
</interface>
<interface>
<name>xe32.100</name>
<config>
<name>xe32.100</name>
<enable-switchport />
</config>
<extended xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-if-extended">
<subinterface-encapsulation>
<single-tag-vlan-matches>
<single-tag-vlan-match>
<encapsulation-type>dot1q</encapsulation-type>
<config>
<encapsulation-type>dot1q</encapsulation-type>
<outer-vlan-id>10</outer-vlan-id>
</config>
</single-tag-vlan-match>
</single-tag-vlan-matches>
<rewrite>
<config>
<vlan-action>translate</vlan-action>
<rewrite-translate-action>1-to-1</rewrite-translate-action>
<dot1q-dot1ad-tpid>0x8100</dot1q-dot1ad-tpid>
<outer-vlan-id>100</outer-vlan-id>
</config>
</rewrite>
</subinterface-encapsulation>
</extended>
</interface>
</interfaces>
Validation with NetConf get
<interfaces xmlns="http://openconfig.net/yang/interfaces">
<interface>
<name>xe32</name>
<config>
<name>xe32</name>
</config>
<subinterfaces>
<subinterface>
<index>100</index>
<config>
<index>100</index>
</config>
<state>
<name>xe32.100</name>
<logical>true</logical>
<oper-status>DOWN</oper-status>
<ifindex>328728676</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>
<vlan xmlns="http://openconfig.net/yang/vlan">
<ingress-mapping>
<config>
<vlan-stack-action>SWAP</vlan-stack-action>
<tpid
xmlns:oc-vlan-types="http://openconfig.net/yang/vlan-types">oc-vlan-types:TPID_0X8100</tpid>
<vlan-id>100</vlan-id>
</config>
<state>
<vlan-stack-action>SWAP</vlan-stack-action>
<tpid
xmlns:oc-vlan-types="http://openconfig.net/yang/vlan-types">oc-vlan-types:TPID_0X8100</tpid>
<vlan-id>100</vlan-id>
</state>
</ingress-mapping>
<match>
<single-tagged-list>
<config>
<vlan-ids>10</vlan-ids>
</config>
<state>
<vlan-ids>10</vlan-ids>
</state>
</single-tagged-list>
</match>
</vlan>
</subinterface>
</subinterfaces>
</interface>
</interfaces>
Restrictions
Only for VLAN action PUSH, match is optional. If not used, it will set encapsulation default in OcNOS.
Trunk VLANs in interface
This XML configuration snippet is used to configure a trunk VLAN range in an interface.
Release
This configuration was introduced in OcNOS version 5.1.
OpenConfig NetConf Payload
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>1</name>
<config>
<name>1</name>
<type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:L2L3</type>
<bridge-protocol xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-oc-ni-augments">ieee-vlan-bridge</bridge-protocol>
</config>
<vlans>
<vlan>
<vlan-id>350</vlan-id>
<config>
<vlan-id>350</vlan-id>
<status>ACTIVE</status>
</config>
</vlan>
<vlan>
<vlan-id>351</vlan-id>
<config>
<vlan-id>351</vlan-id>
<status>ACTIVE</status>
</config>
</vlan>
<vlan>
<vlan-id>352</vlan-id>
<config>
<vlan-id>352</vlan-id>
<status>ACTIVE</status>
</config>
</vlan>
</vlans>
<interfaces>
<interface>
<id>xe7</id>
<config>
<interface>xe7</interface>
<id>xe7</id>
</config>
</interface>
</interfaces>
</network-instance>
</network-instances>
<interfaces xmlns="http://openconfig.net/yang/interfaces">
<interface>
<name>xe7</name>
<config>
<name>xe7</name>
<tpid xmlns="http://openconfig.net/yang/vlan">TPID_0X8100</tpid>
<type xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ethernetCsmacd</type>
</config>
<ethernet xmlns="http://openconfig.net/yang/interfaces/ethernet">
<switched-vlan xmlns="http://openconfig.net/yang/vlan">
<config>
<interface-mode>TRUNK</interface-mode>
<trunk-vlans>350..352</trunk-vlans>
</config>
</switched-vlan>
</ethernet>
</interface>
</interfaces>
OcNOS CLI Command
bridge 1 protocol ieee vlan-bridge
!
vlan database
vlan 350-352 bridge 1 state enable
!
interface xe7
switchport
dot1ad ethertype 0x8100
bridge-group 1
switchport mode trunk
switchport trunk allowed vlan add 350-352
OcNOS NetConf Payload
<network-instances xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-network-instance">
<network-instance>
<instance-name>1</instance-name>
<instance-type>l2ni</instance-type>
<bridge xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-bridge">
<config>
<protocol>ieee-vlan-bridge</protocol>
</config>
<vlans xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-vlan">
<vlan>
<vlan-id>350</vlan-id>
<config>
<vlan-id>350</vlan-id>
</config>
<customer-vlan>
<config>
<state>enable</state>
</config>
</customer-vlan>
</vlan>
<vlan>
<vlan-id>351</vlan-id>
<config>
<vlan-id>351</vlan-id>
</config>
<customer-vlan>
<config>
<state>enable</state>
</config>
</customer-vlan>
</vlan>
<vlan>
<vlan-id>352</vlan-id>
<config>
<vlan-id>352</vlan-id>
</config>
<customer-vlan>
<config>
<state>enable</state>
</config>
</customer-vlan>
</vlan>
</vlans>
<bridge-ports>
<interface>
<name>xe7</name>
<config>
<name>xe7</name>
</config>
</interface>
</bridge-ports>
</bridge>
<config>
<instance-name>1</instance-name>
<instance-type>l2ni</instance-type>
</config>
</network-instance>
</network-instances>
<interfaces xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-interface">
<interface>
<name>xe7</name>
<config>
<name>xe7</name>
<dot1ad-ether-type>0x8100</dot1ad-ether-type>
<enable-switchport />
</config>
<port-vlan xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-port-vlan">
<switched-vlan>
<interface-mode>trunk</interface-mode>
<config>
<interface-mode>trunk</interface-mode>
</config>
<allowed-vlan>
<config>
<allowed-vlan-id>350-352</allowed-vlan-id>
</config>
</allowed-vlan>
</switched-vlan>
</port-vlan>
</interface>
</interfaces>
Validation with NetConf get
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>1</name>
<config>
<name>1</name>
<type
xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:L2L3</type>
<bridge-protocol xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-oc-ni-augments">ieee-vlan-bridge</bridge-protocol>
</config>
<state>
<name>1</name>
<type
xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:L2L3</type>
</state>
<fdb>
<config>
<mac-learning>true</mac-learning>
</config>
</fdb>
<interfaces>
<interface>
<id>xe7</id>
<config>
<id>xe7</id>
<interface>xe7</interface>
</config>
<state>
<id>xe7</id>
<interface>xe7</interface>
</state>
</interface>
</interfaces>
<vlans>
<vlan>
<vlan-id>350</vlan-id>
<config>
<vlan-id>350</vlan-id>
<status>ACTIVE</status>
</config>
<state>
<vlan-id>350</vlan-id>
<status>ACTIVE</status>
</state>
<members>
<member>
<state>
<interface>xe7</interface>
</state>
</member>
</members>
</vlan>
<vlan>
<vlan-id>351</vlan-id>
<config>
<vlan-id>351</vlan-id>
<status>ACTIVE</status>
</config>
<state>
<vlan-id>351</vlan-id>
<status>ACTIVE</status>
</state>
<members>
<member>
<state>
<interface>xe7</interface>
</state>
</member>
</members>
</vlan>
<vlan>
<vlan-id>352</vlan-id>
<config>
<vlan-id>352</vlan-id>
<status>ACTIVE</status>
</config>
<state>
<vlan-id>352</vlan-id>
<status>ACTIVE</status>
</state>
<members>
<member>
<state>
<interface>xe7</interface>
</state>
</member>
</members>
</vlan>
</vlans>
</network-instance>
</network-instances>
<interfaces xmlns="http://openconfig.net/yang/interfaces">
<interface>
<name>xe7</name>
<config>
<name>xe7</name>
<tpid xmlns="http://openconfig.net/yang/vlan" xmlns:oc-vlan-types="http://openconfig.net/yang/vlan-types">oc-vlan-types:TPID_0X8100</tpid>
<type
xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ethernetCsmacd</type>
</config>
<state>
<name>xe7</name>
<tpid xmlns="http://openconfig.net/yang/vlan" xmlns:oc-vlan-types="http://openconfig.net/yang/vlan-types">oc-vlan-types:TPID_0X8100</tpid>
<logical>false</logical>
<last-change>318900</last-change>
<oper-status>UP</oper-status>
<admin-status>UP</admin-status>
<ifindex>5007</ifindex>
<counters>
<last-clear>1642442144</last-clear>
<out-errors>0</out-errors>
<out-discards>0</out-discards>
<out-multicast-pkts>145</out-multicast-pkts>
<out-broadcast-pkts>0</out-broadcast-pkts>
<out-unicast-pkts>0</out-unicast-pkts>
<out-pkts>145</out-pkts>
<out-octets>9412</out-octets>
<in-fcs-errors>0</in-fcs-errors>
<in-errors>0</in-errors>
<in-discards>0</in-discards>
<in-multicast-pkts>0</in-multicast-pkts>
<in-broadcast-pkts>0</in-broadcast-pkts>
<in-unicast-pkts>0</in-unicast-pkts>
<in-pkts>0</in-pkts>
<in-octets>0</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
xmlns:oc-eth="http://openconfig.net/yang/interfaces/ethernet">oc-eth:SPEED_1GB</negotiated-port-speed>
<negotiated-duplex-mode>FULL</negotiated-duplex-mode>
<hw-mac-address>b8:6a:97:c3:64:44</hw-mac-address>
<counters>
<in-crc-errors>0</in-crc-errors>
<in-jabber-frames>0</in-jabber-frames>
<in-fragment-frames>0</in-fragment-frames>
<in-oversize-frames>0</in-oversize-frames>
</counters>
</state>
<switched-vlan xmlns="http://openconfig.net/yang/vlan">
<config>
<interface-mode>TRUNK</interface-mode>
<trunk-vlans>350..352</trunk-vlans>
</config>
<state>
<interface-mode>TRUNK</interface-mode>
<trunk-vlans>350..352</trunk-vlans>
</state>
</switched-vlan>
</ethernet>
<subinterfaces>
<subinterface>
<index>0</index>
<config>
<index>0</index>
</config>
</subinterface>
</subinterfaces>
</interface>
</interfaces>
Restrictions
VLANs associated to trunk interface must also be created and bridge must be associated to the interface.
Trunk VLANs in link aggregation interface
This XML configuration snippet is used to configure a trunk VLAN range in a link aggregation interface.
Release
This configuration was introduced in OcNOS version 5.1.
OpenConfig NetConf Payload
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>1</name>
<config>
<name>1</name>
<type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:L2L3</type>
<bridge-protocol xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-oc-ni-augments">ieee-vlan-bridge</bridge-protocol>
</config>
<fdb>
<config>
<mac-learning>true</mac-learning>
</config>
</fdb>
<vlans>
<vlan>
<vlan-id>300</vlan-id>
<config>
<vlan-id>300</vlan-id>
<status>ACTIVE</status>
</config>
</vlan>
</vlans>
<interfaces>
<interface>
<id>sa3</id>
<config>
<interface>sa3</interface>
<id>sa3</id>
</config>
</interface>
</interfaces>
</network-instance>
</network-instances>
<interfaces xmlns="http://openconfig.net/yang/interfaces">
<interface>
<name>sa3</name>
<config>
<name>sa3</name>
<type xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ieee8023adLag</type>
</config>
<aggregation xmlns="http://openconfig.net/yang/interfaces/aggregate">
<switched-vlan xmlns="http://openconfig.net/yang/vlan">
<config>
<interface-mode>TRUNK</interface-mode>
<trunk-vlans>300</trunk-vlans>
</config>
</switched-vlan>
<config>
<lag-type>STATIC</lag-type>
</config>
</aggregation>
</interface>
</interfaces>
OcNOS CLI Command
interface sa3
switchport
bridge-group 1
switchport mode trunk
switchport trunk allowed vlan add 300
OcNOS NetConf Payload
<network-instances xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-network-instance">
<network-instance>
<instance-name>1</instance-name>
<instance-type>l2ni</instance-type>
<bridge xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-bridge">
<config>
<protocol>ieee-vlan-bridge</protocol>
</config>
<vlans xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-vlan">
<vlan>
<vlan-id>300</vlan-id>
<config>
<vlan-id>300</vlan-id>
</config>
<customer-vlan>
<config>
<state>enable</state>
</config>
</customer-vlan>
</vlan>
</vlans>
<bridge-ports>
<interface>
<name>sa3</name>
<config>
<name>sa3</name>
</config>
</interface>
</bridge-ports>
</bridge>
<config>
<instance-name>1</instance-name>
<instance-type>l2ni</instance-type>
</config>
</network-instance>
</network-instances>
<interfaces xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-interface">
<interface>
<name>sa3</name>
<config>
<name>sa3</name>
<enable-switchport />
</config>
<port-vlan xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-port-vlan">
<switched-vlan>
<interface-mode>trunk</interface-mode>
<config>
<interface-mode>trunk</interface-mode>
</config>
<allowed-vlan>
<config>
<allowed-vlan-id>300</allowed-vlan-id>
</config>
</allowed-vlan>
</switched-vlan>
</port-vlan>
</interface>
</interfaces>
Validation with NetConf get
<interfaces xmlns="http://openconfig.net/yang/interfaces">
<interface>
<name>sa3</name>
<config>
<name>sa3</name>
<type
xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ieee8023adLag</type>
</config>
<state>
<name>sa3</name>
<logical>false</logical>
<last-change>851000</last-change>
<oper-status>DOWN</oper-status>
<admin-status>UP</admin-status>
<ifindex>200003</ifindex>
<counters>
<last-clear>1642447466</last-clear>
<out-errors>0</out-errors>
<out-discards>0</out-discards>
<out-multicast-pkts>0</out-multicast-pkts>
<out-broadcast-pkts>0</out-broadcast-pkts>
<out-unicast-pkts>0</out-unicast-pkts>
<out-pkts>0</out-pkts>
<out-octets>0</out-octets>
<in-fcs-errors>0</in-fcs-errors>
<in-errors>0</in-errors>
<in-discards>0</in-discards>
<in-multicast-pkts>0</in-multicast-pkts>
<in-broadcast-pkts>0</in-broadcast-pkts>
<in-unicast-pkts>0</in-unicast-pkts>
<in-pkts>0</in-pkts>
<in-octets>0</in-octets>
</counters>
<type
xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ieee8023adLag</type>
</state>
<ethernet xmlns="http://openconfig.net/yang/interfaces/ethernet">
<state>
<negotiated-port-speed
xmlns:oc-eth="http://openconfig.net/yang/interfaces/ethernet">oc-eth:SPEED_UNKNOWN</negotiated-port-speed>
<negotiated-duplex-mode>FULL</negotiated-duplex-mode>
<hw-mac-address>0e:00:00:00:00:01</hw-mac-address>
<counters>
<in-crc-errors>0</in-crc-errors>
<in-jabber-frames>0</in-jabber-frames>
<in-fragment-frames>0</in-fragment-frames>
<in-oversize-frames>0</in-oversize-frames>
</counters>
</state>
</ethernet>
<subinterfaces>
<subinterface>
<index>0</index>
<config>
<index>0</index>
</config>
</subinterface>
</subinterfaces>
<aggregation xmlns="http://openconfig.net/yang/interfaces/aggregate">
<switched-vlan xmlns="http://openconfig.net/yang/vlan">
<config>
<interface-mode>TRUNK</interface-mode>
<trunk-vlans>300</trunk-vlans>
</config>
<state>
<interface-mode>TRUNK</interface-mode>
<trunk-vlans>300</trunk-vlans>
</state>
</switched-vlan>
<config>
<lag-type>STATIC</lag-type>
</config>
<state>
<lag-type>STATIC</lag-type>
</state>
</aggregation>
</interface>
</interfaces>
Restrictions
VLANs associated to trunk LAG must also be created and bridge must be associated to the LAG.
Trunk LAG with native VLAN
This XML configuration snippet is used to configure a native VLAN for a trunk VLAN link aggregation.
Release
This configuration was introduced in OcNOS version 5.1.
OpenConfig NetConf Payload
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>1</name>
<config>
<name>1</name>
<type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:L2L3</type>
<bridge-protocol xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-oc-ni-augments">ieee-vlan-bridge</bridge-protocol>
</config>
<fdb>
<config>
<mac-learning>true</mac-learning>
</config>
</fdb>
<vlans>
<vlan>
<vlan-id>300</vlan-id>
<config>
<vlan-id>300</vlan-id>
<status>ACTIVE</status>
</config>
</vlan>
</vlans>
<interfaces>
<interface>
<id>po1</id>
<config>
<interface>po1</interface>
<id>po1</id>
</config>
</interface>
</interfaces>
</network-instance>
</network-instances>
<interfaces xmlns="http://openconfig.net/yang/interfaces">
<interface>
<name>po1</name>
<config>
<name>po1</name>
<tpid xmlns="http://openconfig.net/yang/vlan">TPID_0X8100</tpid>
<type xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ieee8023adLag</type>
</config>
<aggregation xmlns="http://openconfig.net/yang/interfaces/aggregate">
<switched-vlan xmlns="http://openconfig.net/yang/vlan">
<config>
<interface-mode>TRUNK</interface-mode>
<native-vlan>300</native-vlan>
<trunk-vlans>300</trunk-vlans>
</config>
</switched-vlan>
<config>
<lag-type>LACP</lag-type>
</config>
</aggregation>
</interface>
</interfaces>
OcNOS CLI Command
interface po1
switchport
dot1ad ethertype 0x8100
bridge-group 1
switchport mode trunk
switchport trunk allowed vlan add 300
switchport trunk native vlan 300
OcNOS NetConf Payload
<network-instances xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-network-instance">
<network-instance>
<instance-name>1</instance-name>
<instance-type>l2ni</instance-type>
<bridge xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-bridge">
<config>
<protocol>ieee-vlan-bridge</protocol>
</config>
<vlans xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-vlan">
<vlan>
<vlan-id>300</vlan-id>
<config>
<vlan-id>300</vlan-id>
</config>
<customer-vlan>
<config>
<state>enable</state>
</config>
</customer-vlan>
</vlan>
</vlans>
<bridge-ports>
<interface>
<name>po1</name>
<config>
<name>po1</name>
</config>
</interface>
</bridge-ports>
</bridge>
<config>
<instance-name>1</instance-name>
<instance-type>l2ni</instance-type>
</config>
</network-instance>
</network-instances>
<interfaces xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-interface">
<interface>
<name>po1</name>
<config>
<name>po1</name>
<dot1ad-ether-type>0x8100</dot1ad-ether-type>
<enable-switchport />
</config>
<port-vlan xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-port-vlan">
<switched-vlan>
<interface-mode>trunk</interface-mode>
<config>
<interface-mode>trunk</interface-mode>
</config>
<vlans>
<config>
<native-vlan-id>300</native-vlan-id>
</config>
</vlans>
<allowed-vlan>
<config>
<allowed-vlan-id>300</allowed-vlan-id>
</config>
</allowed-vlan>
</switched-vlan>
</port-vlan>
</interface>
</interfaces>
Validation with NetConf get
<interfaces xmlns="http://openconfig.net/yang/interfaces">
<interface>
<name>po1</name>
<config>
<name>po1</name>
<tpid xmlns="http://openconfig.net/yang/vlan" xmlns:oc-vlan-types="http://openconfig.net/yang/vlan-types">oc-vlan-types:TPID_0X8100</tpid>
<type
xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ieee8023adLag</type>
</config>
<state>
<name>po1</name>
<tpid xmlns="http://openconfig.net/yang/vlan" xmlns:oc-vlan-types="http://openconfig.net/yang/vlan-types">oc-vlan-types:TPID_0X8100</tpid>
<logical>false</logical>
<last-change>897000</last-change>
<oper-status>DOWN</oper-status>
<admin-status>UP</admin-status>
<ifindex>100001</ifindex>
<counters>
<last-clear>1642447926</last-clear>
<out-errors>0</out-errors>
<out-discards>0</out-discards>
<out-multicast-pkts>0</out-multicast-pkts>
<out-broadcast-pkts>0</out-broadcast-pkts>
<out-unicast-pkts>0</out-unicast-pkts>
<out-pkts>0</out-pkts>
<out-octets>0</out-octets>
<in-fcs-errors>0</in-fcs-errors>
<in-errors>0</in-errors>
<in-discards>0</in-discards>
<in-multicast-pkts>0</in-multicast-pkts>
<in-broadcast-pkts>0</in-broadcast-pkts>
<in-unicast-pkts>0</in-unicast-pkts>
<in-pkts>0</in-pkts>
<in-octets>0</in-octets>
</counters>
<type
xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ieee8023adLag</type>
</state>
<ethernet xmlns="http://openconfig.net/yang/interfaces/ethernet">
<state>
<negotiated-port-speed
xmlns:oc-eth="http://openconfig.net/yang/interfaces/ethernet">oc-eth:SPEED_UNKNOWN</negotiated-port-speed>
<negotiated-duplex-mode>FULL</negotiated-duplex-mode>
<hw-mac-address>0e:00:00:00:00:01</hw-mac-address>
<counters>
<in-crc-errors>0</in-crc-errors>
<in-jabber-frames>0</in-jabber-frames>
<in-fragment-frames>0</in-fragment-frames>
<in-oversize-frames>0</in-oversize-frames>
</counters>
</state>
</ethernet>
<subinterfaces>
<subinterface>
<index>0</index>
<config>
<index>0</index>
</config>
</subinterface>
</subinterfaces>
<aggregation xmlns="http://openconfig.net/yang/interfaces/aggregate">
<switched-vlan xmlns="http://openconfig.net/yang/vlan">
<config>
<interface-mode>TRUNK</interface-mode>
<native-vlan>300</native-vlan>
<trunk-vlans>300</trunk-vlans>
</config>
<state>
<interface-mode>TRUNK</interface-mode>
<native-vlan>300</native-vlan>
<trunk-vlans>300</trunk-vlans>
</state>
</switched-vlan>
<config>
<lag-type>LACP</lag-type>
</config>
<state>
<lag-type>LACP</lag-type>
</state>
</aggregation>
</interface>
</interfaces>
Restrictions
VLANs associated to trunk interface must also be created and bridge must be associated to the interface.
Creation of a cross connect
This XML configuration snippet is used to create a cross connect between 2 subinterfaces.
Release
This configuration was introduced in OcNOS version 5.1.
OpenConfig NetConf Payload
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>test3</name>
<config>
<name>test3</name>
<type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">L2P2P</type>
<description>Test XConnection</description>
</config>
<interfaces>
<interface>
<id>xe7.10</id>
<config>
<id>xe7.10</id>
<interface>xe7</interface>
<subinterface>10</subinterface>
</config>
</interface>
<interface>
<id>xe8.20</id>
<config>
<id>xe8.20</id>
<interface>xe8</interface>
<subinterface>20</subinterface>
</config>
</interface>
</interfaces>
</network-instance>
</network-instances>
<interfaces xmlns="http://openconfig.net/yang/interfaces">
<interface>
<name>xe7</name>
<config>
<name>xe7</name>
<type xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ethernetCsmacd</type>
</config>
<subinterfaces>
<subinterface>
<index>10</index>
<config>
<index>10</index>
</config>
<vlan xmlns="http://openconfig.net/yang/vlan">
<match>
<single-tagged-list>
<config>
<vlan-ids>10</vlan-ids>
</config>
</single-tagged-list>
</match>
</vlan>
</subinterface>
</subinterfaces>
</interface>
<interface>
<name>xe8</name>
<config>
<name>xe8</name>
<type xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ethernetCsmacd</type>
</config>
<subinterfaces>
<subinterface>
<index>20</index>
<config>
<index>20</index>
</config>
<vlan xmlns="http://openconfig.net/yang/vlan">
<match>
<single-tagged-list>
<config>
<vlan-ids>10</vlan-ids>
</config>
</single-tagged-list>
</match>
</vlan>
</subinterface>
</subinterfaces>
</interface>
</interfaces>
OcNOS CLI Command
interface xe7.10 switchport
encapsulation dot1q 10
!
interface xe8.20 switchport
encapsulation dot1q 10
!
cross-connect test3
description Test XConnection
interface xe7.10
interface xe8.20
OcNOS NetConf Payload
<network-instances xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-network-instance">
<network-instance>
<instance-name>test3</instance-name>
<instance-type>cross-connect</instance-type>
<config>
<instance-name>test3</instance-name>
<instance-type>cross-connect</instance-type>
</config>
<cross-connect xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-cross-connect">
<config>
<xc-name>test3</xc-name>
<description>Test XConnection</description>
</config>
<cross-connect-interfaces>
<cross-connect-interface>
<endpoint-if>eth7.10</endpoint-if>
<config>
<endpoint-if>eth7.10</endpoint-if>
</config>
</cross-connect-interface>
<cross-connect-interface>
<endpoint-if>eth8.20</endpoint-if>
<config>
<endpoint-if>eth8.20</endpoint-if>
</config>
</cross-connect-interface>
</cross-connect-interfaces>
</cross-connect>
</network-instance>
</network-instances>
<interfaces xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-interface">
<interface>
<name>eth7.10</name>
<config>
<name>eth7.10</name>
<enable-switchport/>
</config>
<extended xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-if-extended">
<subinterface-encapsulation>
<single-tag-vlan-matches>
<single-tag-vlan-match>
<encapsulation-type>dot1q</encapsulation-type>
<config>
<encapsulation-type>dot1q</encapsulation-type>
<outer-vlan-id>10</outer-vlan-id>
</config>
</single-tag-vlan-match>
</single-tag-vlan-matches>
</subinterface-encapsulation>
</extended>
</interface>
<interface>
<name>eth8.20</name>
<config>
<name>eth8.20</name>
<enable-switchport/>
</config>
<extended xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-if-extended">
<subinterface-encapsulation>
<single-tag-vlan-matches>
<single-tag-vlan-match>
<encapsulation-type>dot1q</encapsulation-type>
<config>
<encapsulation-type>dot1q</encapsulation-type>
<outer-vlan-id>10</outer-vlan-id>
</config>
</single-tag-vlan-match>
</single-tag-vlan-matches>
</subinterface-encapsulation>
</extended>
</interface>
</interfaces>
Validation with NetConf get
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>test3</name>
<config>
<name>test3</name>
<type
xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:L2P2P</type>
<description>Test XConnection</description>
</config>
<state>
<name>test3</name>
<type
xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:L2P2P</type>
<description>Test XConnection</description>
</state>
<interfaces>
<interface>
<id>xe7.10</id>
<config>
<id>xe7.10</id>
<interface>xe7</interface>
<subinterface>10</subinterface>
</config>
<state>
<id>xe7.10</id>
<interface>xe7</interface>
<subinterface>10</subinterface>
</state>
</interface>
<interface>
<id>xe8.20</id>
<config>
<id>xe8.20</id>
<interface>xe8</interface>
<subinterface>20</subinterface>
</config>
<state>
<id>xe8.20</id>
<interface>xe8</interface>
<subinterface>20</subinterface>
</state>
</interface>
</interfaces>
</network-instance>
</network-instances>
Restrictions
Exactly 2 subinterfaces must be configured along with network-instance creation.
The old Open Config path /network-instances/network-instance/config/enabled is not support after Open Config v1.0.0., and without this path the Cross-Connect feature lost the translation for IPI path /network-instances/network-instance/cross-connect/config/admin-disable.
Deletion of a cross connect
This XML configuration snippet is used to delete a cross connect.
Release
This configuration was introduced in OcNOS version 5.1.
OpenConfig NetConf Payload
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance operation="delete">
<name>test3</name>
</network-instance>
</network-instances>
OcNOS CLI Command
OcNOS#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
OcNOS(config)#no cross-connect test3
OcNOS(config)#commit
OcNOS#show running-config cross-connect
!
OcNOS NetConf Payload
<network-instances xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-network-instance">
<network-instance operation="delete">
<instance-name>test3</instance-name>
<instance-type>cross-connect</instance-type>
</network-instance>
</network-instances>
Validation with NetConf get
<data/>
Restrictions
N/A
Configure Bridge Domain and associate L2 Subinterfaces
This XML configuration snippet is used to configure L2 Subinterface and attach to Bridge Domain. Please note the subinterfaces are set to L2 implicitly by Bridge Domain instance translation. Because of this, the subinterfaces must either be created in the same transaction as Bridge Domain or created as L2 from CLI or IPI datamodel. Otherwise, if the subinterfaces are created as L3, this would result in error while assiging them to a Bridge Domain instance..
Release
This configuration was introduced in OcNOS version 6.4.
OpenConfig NetConf Payload
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>1</name>
<config>
<name>1</name>
<type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">L2VSI</type>
<description>Test Bridge Domain</description>
</config>
<interfaces>
<interface>
<id>xe9.10</id>
<config>
<id>xe9.10</id>
<interface>xe9</interface>
<subinterface>10</subinterface>
</config>
</interface>
<interface>
<id>xe10.20</id>
<config>
<id>xe10.20</id>
<interface>xe10</interface>
<subinterface>20</subinterface>
</config>
</interface>
</interfaces>
</network-instance>
</network-instances>
<interfaces xmlns="http://openconfig.net/yang/interfaces">
<interface>
<name>xe9</name>
<config>
<name>xe9</name>
<type xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ethernetCsmacd</type>
</config>
<subinterfaces>
<subinterface>
<index>10</index>
<config>
<index>10</index>
</config>
<vlan xmlns="http://openconfig.net/yang/vlan">
<match>
<single-tagged-list>
<config>
<vlan-ids>10</vlan-ids>
</config>
</single-tagged-list>
</match>
</vlan>
</subinterface>
</subinterfaces>
</interface>
<interface>
<name>xe10</name>
<config>
<name>xe10</name>
<type xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ethernetCsmacd</type>
</config>
<subinterfaces>
<subinterface>
<index>20</index>
<config>
<index>20</index>
</config>
<vlan xmlns="http://openconfig.net/yang/vlan">
<match>
<single-tagged-list>
<config>
<vlan-ids>10</vlan-ids>
</config>
</single-tagged-list>
</match>
</vlan>
</subinterface>
</subinterfaces>
</interface>
</interfaces>
OcNOS CLI Command
interface xe9.10 switchport
encapsulation dot1q 10
!
interface xe10.20 switchport
encapsulation dot1q 10
!
bridge-domain 1
description Test Bridge Domain
interface xe9.10
interface xe10.20
!
OcNOS NetConf Payload
<network-instances xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-network-instance">
<network-instance>
<instance-name>1</instance-name>
<instance-type>bridge-domain</instance-type>
<config>
<instance-name>1</instance-name>
<instance-type>bridge-domain</instance-type>
</config>
<bridge-domain xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-bridge-domain">
<config>
<domain-id>1</domain-id>
<description>Test Bridge Domain</description>
<member-interfaces>xe9.10</member-interfaces>
<member-interfaces>xe10.20</member-interfaces>
</config>
</bridge-domain>
</network-instance>
</network-instances>
<interfaces xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-interface">
<interface>
<name>xe9.10</name>
<config>
<enable-switchport/>
<name>xe9.10</name>
</config>
<extended xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-if-extended">
<subinterface-encapsulation>
<single-tag-vlan-matches>
<single-tag-vlan-match>
<encapsulation-type>dot1q</encapsulation-type>
<config>
<encapsulation-type>dot1q</encapsulation-type>
<outer-vlan-id>10</outer-vlan-id>
</config>
</single-tag-vlan-match>
</single-tag-vlan-matches>
</subinterface-encapsulation>
</extended>
</interface>
<interface>
<name>xe10.20</name>
<config>
<enable-switchport/>
<name>xe10.20</name>
</config>
<extended xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-if-extended">
<subinterface-encapsulation>
<single-tag-vlan-matches>
<single-tag-vlan-match>
<encapsulation-type>dot1q</encapsulation-type>
<config>
<encapsulation-type>dot1q</encapsulation-type>
<outer-vlan-id>10</outer-vlan-id>
</config>
</single-tag-vlan-match>
</single-tag-vlan-matches>
</subinterface-encapsulation>
</extended>
</interface>
<interface>
<name>xe9</name>
<config>
<name>xe9</name>
</config>
</interface>
<interface>
<name>xe10</name>
<config>
<name>xe10</name>
</config>
</interface>
</interfaces>
Restrictions
Bridge Domain instance name must be an integer in the range 1-2147483647.
Deletion of a Bridge Domain instance
This XML configuration snippet is used to delete a Bridge Domain instance.
Release
This configuration was introduced in OcNOS version 6.4.
OpenConfig NetConf Payload
<network-instances xmlns="<http://openconfig.net/yang/network-instance">>
<network-instance operation="delete">
<name>1</name>
</network-instance>
</network-instances>
OcNOS CLI Command
OcNOS#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
OcNOS(config)#no bridge-domain 1
OcNOS(config)#commit
OcNOS#show running-config bridge-domain
!
OcNOS NetConf Payload
<network-instances xmlns="<http://www.ipinfusion.com/yang/ocnos/ipi-network-instance">>
<network-instance operation="delete">
<instance-name>1</instance-name>
<instance-type>bridge-domain</instance-type>
</network-instance>
</network-instances>
Validation with NetConf get
<data/>
Restrictions
N/A
Creation of a VLAN bridge
This XML configuration snippet is used to create a VLAN bridge and assign VLANs to it.
Release
This configuration was introduced in OcNOS version 5.1.
OpenConfig NetConf Payload
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>1</name>
<config>
<name>1</name>
<type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:L2L3</type>
</config>
<vlans>
<vlan>
<vlan-id>401</vlan-id>
<config>
<vlan-id>401</vlan-id>
<name>VLAN-401</name>
<status>ACTIVE</status>
</config>
</vlan>
<vlan>
<vlan-id>501</vlan-id>
<config>
<vlan-id>501</vlan-id>
<name>VLAN-501</name>
<status>ACTIVE</status>
</config>
</vlan>
</vlans>
</network-instance>
</network-instances>
OcNOS CLI Command
bridge 1 protocol ieee vlan-bridge
!
vlan database
vlan 401 bridge 1 name VLAN-401 state enable
vlan 501 bridge 1 name VLAN-501 state enable
OcNOS NetConf Payload
<network-instances xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-network-instance">
<network-instance>
<instance-name>1</instance-name>
<instance-type>l2ni</instance-type>
<bridge xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-bridge">
<config>
<protocol>ieee-vlan-bridge</protocol>
</config>
<vlans xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-vlan">
<vlan>
<vlan-id>401</vlan-id>
<config>
<vlan-id>401</vlan-id>
</config>
<customer-vlan>
<config>
<name>VLAN-401</name>
<state>enable</state>
</config>
</customer-vlan>
</vlan>
<vlan>
<vlan-id>501</vlan-id>
<config>
<vlan-id>501</vlan-id>
</config>
<customer-vlan>
<config>
<name>VLAN-501</name>
<state>enable</state>
</config>
</customer-vlan>
</vlan>
</vlans>
</bridge>
<config>
<instance-name>1</instance-name>
<instance-type>l2ni</instance-type>
</config>
</network-instance>
</network-instances>
Validation with NetConf get
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>1</name>
<config>
<name>1</name>
<type
xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:L2L3</type>
<bridge-protocol xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-oc-ni-augments">ieee-vlan-bridge</bridge-protocol>
</config>
<state>
<name>1</name>
<type
xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:L2L3</type>
</state>
<fdb>
<config>
<mac-learning>true</mac-learning>
</config>
</fdb>
<vlans>
<vlan>
<vlan-id>401</vlan-id>
<config>
<vlan-id>401</vlan-id>
<name>VLAN-401</name>
<status>ACTIVE</status>
</config>
<state>
<vlan-id>401</vlan-id>
<name>VLAN-401</name>
<status>ACTIVE</status>
</state>
</vlan>
<vlan>
<vlan-id>501</vlan-id>
<config>
<vlan-id>501</vlan-id>
<name>VLAN-501</name>
<status>ACTIVE</status>
</config>
<state>
<vlan-id>501</vlan-id>
<name>VLAN-501</name>
<status>ACTIVE</status>
</state>
</vlan>
</vlans>
</network-instance>
</network-instances>
Restrictions
The network-instance used for bridge must have a name being a number between 1 and 32.