OpenConfig VLAN
Match single tagged VLAN
Release
This configuration was introduced in OcNOS version 5.1.
Configuration
Use this command to set a single tag VLAN match.
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>
<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
None.
Match single tagged VLAN range
Release
This configuration was introduced in OcNOS version 5.1.
Configuration
Use this command to set a single tag VLAN range in a subinterface.
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
Release
This configuration was introduced in OcNOS version 5.1.
Configuration
Use this command to set an outer VLAN match in a subinterface.
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
Release
This configuration was introduced in OcNOS version 5.1.
Configuration
Use this command to set outer and inner VLAN match in a subinterface.
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>
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
None.
Ingress-mapping actions
Release
This configuration was introduced in OcNOS version 5.1.
Configuration
Use this command to configure an ingress-mapping with VLAN actions. Allowed actions are PUSH, POP and SWAP.
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
Release
This configuration was introduced in OcNOS version 5.1.
Configuration
Use this command to configure a trunk VLAN range in an interface
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>
<enabled>true</enabled>
<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>
<enabled>true</enabled>
<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>
<enabled>true</enabled>
</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 interface with native VLAN
Release
This configuration was introduced in OcNOS version 5.1.
Configuration
Use this command to configure a native VLAN for a trunk VLAN interface.
OpenConfig NETCONF Payload
<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>
<native-vlan>351</native-vlan>
</config>
</switched-vlan>
</ethernet>
</interface>
</interfaces>
OcNOS CLI command
interface xe7
switchport
dot1ad ethertype 0x8100
bridge-group 1
switchport mode trunk
switchport trunk allowed vlan add 350-352
switchport trunk native vlan 351
OcNOS NETCONF Payload
<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>
<vlans>
<config>
<native-vlan-id>351</native-vlan-id>
</config>
</vlans>
</switched-vlan>
</port-vlan>
</interface>
</interfaces>
Validation with NETCONF get
<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>374</out-multicast-pkts>
<out-broadcast-pkts>0</out-broadcast-pkts>
<out-unicast-pkts>0</out-unicast-pkts>
<out-pkts>374</out-pkts>
<out-octets>24068</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>
<native-vlan>351</native-vlan>
<trunk-vlans>350..352</trunk-vlans>
</config>
<state>
<interface-mode>TRUNK</interface-mode>
<native-vlan>351</native-vlan>
<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.
Access VLAN in interface
Release
This configuration was introduced in OcNOS version 5.1.
Configuration
Use this command to configure an access VLAN in an interface
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>
<enabled>true</enabled>
<bridge-protocol xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-oc-ni-augments">ieee-vlan-bridge</bridge-protocol>
</config>
<vlans>
<vlan>
<vlan-id>300</vlan-id>
<config>
<vlan-id>300</vlan-id>
<status>ACTIVE</status>
</config>
</vlan>
</vlans>
<interfaces>
<interface>
<id>xe16</id>
<config>
<interface>xe16</interface>
<id>xe16</id>
</config>
</interface>
</interfaces>
</network-instance>
</network-instances>
<interfaces xmlns="http://openconfig.net/yang/interfaces">
<interface>
<name>xe16</name>
<config>
<name>xe16</name>
<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>ACCESS</interface-mode>
<access-vlan>300</access-vlan>
</config>
</switched-vlan>
</ethernet>
</interface>
</interfaces>
OcNOS CLI command
interface xe16
switchport
bridge-group 1
switchport mode access
switchport access vlan 300
OcNOS NETCONF Payload
<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>xe16</name>
<config>
<name>xe16</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>xe16</name>
<config>
<name>xe16</name>
<enable-switchport />
</config>
<port-vlan xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-port-vlan">
<switched-vlan>
<interface-mode>access</interface-mode>
<config>
<interface-mode>access</interface-mode>
</config>
<vlans>
<config>
<vlan-id>300</vlan-id>
</config>
</vlans>
</switched-vlan>
</port-vlan>
</interface>
</interfaces>
Validation with NETCONF get
<interfaces xmlns="http://openconfig.net/yang/interfaces">
<interface>
<name>xe16</name>
<config>
<name>xe16</name>
<type
xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ethernetCsmacd</type>
</config>
<state>
<name>xe16</name>
<logical>false</logical>
<last-change>557400</last-change>
<oper-status>DOWN</oper-status>
<admin-status>UP</admin-status>
<ifindex>5016</ifindex>
<counters>
<last-clear>1642444529</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: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_10GB</negotiated-port-speed>
<negotiated-duplex-mode>FULL</negotiated-duplex-mode>
<hw-mac-address>b8:6a:97:c3:64:4d</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>ACCESS</interface-mode>
<access-vlan>300</access-vlan>
</config>
<state>
<interface-mode>ACCESS</interface-mode>
<access-vlan>300</access-vlan>
</state>
</switched-vlan>
</ethernet>
<subinterfaces>
<subinterface>
<index>0</index>
<config>
<index>0</index>
</config>
</subinterface>
</subinterfaces>
</interface>
</interfaces>
Restrictions
VLAN associated to access interface must also be created and bridge must be associated to the interface.
Trunk VLANs in link aggregation interface
Release
This configuration was introduced in OcNOS version 5.1.
Configuration
Use this command to configure a trunk VLAN range in a link aggregation interface
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>
<enabled>true</enabled>
<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
Release
This configuration was introduced in OcNOS version 5.1.
Configuration
Use this command to configure a native VLAN for a trunk VLAN link aggregation.
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>
<enabled>true</enabled>
<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
Release
This configuration was introduced in OcNOS version 5.1.
Configuration
Use this command to create a cross connect between 2 subinterfaces.
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>
<enabled>false</enabled>
<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
disable
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>
<cross-connect xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-cross-connect">
<config>
<admin-disable />
<description>Test XConnection</description>
<endpoint-if>xe7.10</endpoint-if>
<endpoint-if>xe8.20</endpoint-if>
</config>
</cross-connect>
<config>
<instance-name>test3</instance-name>
<instance-type>cross-connect</instance-type>
</config>
</network-instance>
</network-instances>
<interfaces xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-interface">
<interface>
<name>xe7.10</name>
<config>
<enable-switchport />
<name>xe7.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>xe8.20</name>
<config>
<enable-switchport />
<name>xe8.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>xe7</name>
<config>
<name>xe7</name>
</config>
</interface>
<interface>
<name>xe8</name>
<config>
<name>xe8</name>
</config>
</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>
<enabled>false</enabled>
</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>
<enabled>false</enabled>
</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.
Deletion of a cross connect
Release
This configuration was introduced in OcNOS version 5.1.
Configuration
Use this command to delete a cross connect.
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#sh 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
None.
Creation of a VLAN bridge
Release
This configuration was introduced in OcNOS version 5.1.
Configuration
Use this command to create a VLAN bridge and assign VLANs to it.
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>
<enabled>true</enabled>
</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
<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>
<enabled>true</enabled>
<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>
<enabled>true</enabled>
</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.