Interfaces
Release
This configuration was introduced in OcNOS version 5.0.
Configuration
Use this set of XML config to configure an interface.
OpenConfig NETCONF Payload
<interfaces xmlns="http://openconfig.net/yang/interfaces">
<interface>
<name>xe10</name>
<config>
<name>xe10</name>
<enabled>true</enabled>
<mtu>1450</mtu>
<description>Test desc for the interface</description>
<tpid xmlns="http://openconfig.net/yang/vlan" xmlns:oc-vlan-types="http://openconfig.net/yang/vlan-types">oc-vlan-types:TPID_0X88A8</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">
<config>
<duplex-mode>FULL</duplex-mode>
<auto-negotiate>false</auto-negotiate>
<port-speed xmlns:oc-eth="http://openconfig.net/yang/interfaces/ethernet">oc-eth:SPEED_1GB</port-speed>
</config>
</ethernet>
<subinterfaces>
<subinterface>
<index>2</index>
<config>
<index>2</index>
<description>Test subinterface double tagged</description>
<enabled>true</enabled>
</config>
<ipv4 xmlns="http://openconfig.net/yang/interfaces/ip">
<addresses>
<address>
<ip>30.1.1.1</ip>
<config>
<ip>30.1.1.1</ip>
<prefix-length>24</prefix-length>
</config>
</address>
<address>
<ip>40.10.10.10</ip>
<config>
<ip>40.10.10.10</ip>
<prefix-length>24</prefix-length>
</config>
</address>
</addresses>
</ipv4>
</subinterface>
</subinterfaces>
</interface>
</interfaces>
OcNOS CLI Command
interface xe10
description "Test desc for the interface"
speed 1g
duplex full
mtu 1450
switchport dot1q ethertype 0x88A8
no shutdown
interface xe10.2
description "Test subinterface double tagged"
ip address 30.1.1.1/24
ip address 40.10.10.10/24 secondary
no shutdown
encapsulation dot1ad 10 inner-dot1q 200
OcNOS NETCONF Payload
<interfaces xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-interface">
<interface>
<name>xe10</name>
<config>
<name>xe10</name>
<enabled>true</enabled>
<mtu>1450</mtu>
<description>Test desc for the interface</description>
</config>
<extended xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-if-extended">
<config>
<dot1q-ether-type>0x88A8</dot1q-ether-type>
</config>
</extended>
<ethernet xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-if-ethernet">
<config>
<duplex-mode>full</duplex-mode>
<port-speed>1g</port-speed>
</config>
</ethernet>
</interface>
<interface>
<name>xe10.2</name>
<config>
<name>xe10.2</name>
<description>Test subinterface double tagged</description>
<enabled>true</enabled>
</config>
<ipv4 xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-if-ip">
<secondary-addresses>
<ip-address>40.10.10.10/24</ip-address>
<config>
<ip-address>40.10.10.10/24</ip-address>
</config>
</secondary-addresses>
<config>
<primary-ip-addr>30.1.1.1/24</primary-ip-addr>
</config>
</ipv4>
</interface>
</interfaces>
Validation with NETCONF get
<interfaces xmlns="http://openconfig.net/yang/interfaces">
<interface>
<name>xe10</name>
<config>
<name>xe10</name>
<mtu>1450</mtu>
<tpid xmlns="http://openconfig.net/yang/vlan" xmlns:oc-vlan-types="http://openconfig.net/yang/vlan-types">oc-vlan-types:TPID_0X8100</tpid>
<description>Test desc for the interface</description>
<type
xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ethernetCsmacd</type>
</config>
<state>
<name>xe10</name>
<mtu>1450</mtu>
<tpid xmlns="http://openconfig.net/yang/vlan-types">TPID_0X8100</tpid>
<description>Test desc for the interface</description>
<logical>false</logical>
<last-change>0</last-change>
<oper-status>DOWN</oper-status>
<admin-status>UP</admin-status>
<ifindex>10010</ifindex>
<counters>
<last-clear>0</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">
<config>
<duplex-mode>FULL</duplex-mode>
<auto-negotiate>false</auto-negotiate>
<port-speed
xmlns:oc-eth="http://openconfig.net/yang/interfaces/ethernet">oc-eth:SPEED_1GB</port-speed>
</config>
<state>
<duplex-mode>FULL</duplex-mode>
<port-speed
xmlns:oc-eth="http://openconfig.net/yang/interfaces/ethernet">oc-eth:SPEED_1GB</port-speed>
<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>b86a.9729.abc5</hw-mac-address>
</state>
</ethernet>
<subinterfaces>
<subinterface>
<index>0</index>
<ipv4 xmlns="http://openconfig.net/yang/interfaces/ip">
<config>
<mtu>1450</mtu>
</config>
</ipv4>
<config>
<index>0</index>
</config>
<ipv6 xmlns="http://openconfig.net/yang/interfaces/ip">
<config>
<mtu>1450</mtu>
</config>
</ipv6>
</subinterface>
</subinterfaces>
</interface>
</interfaces>
Restrictions
/interfaces/interface/name
This leaf has been restricted to have at most 32 characters.
As a general restriction, interface names must have valid OcNOS names, like: (eth, xe, ce, so, po, etc), as this is not configurable.
description
Release
This configuration was introduced in OcNOS version 4.2.
Configuration
Use this XML config to assign a description to a given interface.
OpenConfig NETCONF Payload
<interfaces xmlns="http://openconfig.net/yang/interfaces">
<interface>
<name>xe10</name>
<config>
<name>xe10</name>
<enabled>true</enabled>
<description>Test desc for the interface</description>
<type xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ethernetCsmacd</type>
</config>
</interface>
</interfaces>
OcNOS CLI Command
interface xe10
description "Test desc for the interface"
no shutdown
OcNOS NETCONF Payload
<interfaces xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-interface">
<interface>
<name>xe10</name>
<config>
<name>xe10</name>
<enabled>true</enabled>
<description>Test desc for the interface</description>
</config>
</interface>
</interfaces>
Validation with NETCONF get
<interfaces xmlns="http://openconfig.net/yang/interfaces">
<interface>
<name>xe10</name>
<config>
<name>xe10</name>
<tpid xmlns="http://openconfig.net/yang/vlan" xmlns:oc-vlan-types="http://openconfig.net/yang/vlan-types">oc-vlan-types:TPID_0X8100</tpid>
<description>Test desc for the interface</description>
<type
xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ethernetCsmacd</type>
</config>
<state>
<name>xe10</name>
<tpid xmlns="http://openconfig.net/yang/vlan-types">TPID_0X8100</tpid>
<description>Test desc for the interface</description>
<logical>false</logical>
<last-change>0</last-change>
<oper-status>DOWN</oper-status>
<admin-status>UP</admin-status>
<ifindex>10010</ifindex>
<counters>
<last-clear>0</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>b86a.97c3.6447</hw-mac-address>
</state>
</ethernet>
<subinterfaces>
<subinterface>
<index>0</index>
<config>
<index>0</index>
</config>
</subinterface>
</subinterfaces>
</interface>
</interfaces>
Restrictions
/interfaces/interface/name
This leaf has been restricted to have at most 32 characters.
MTU
Release
This configuration was introduced in OcNOS version 4.2.
Configuration
Use this XML config to set the Maximum Transmission Unit (MTU) for an interface.
OpenConfig NETCONF Payload
<interfaces xmlns="http://openconfig.net/yang/interfaces">
<interface>
<name>xe10</name>
<config>
<name>xe10</name>
<enabled>true</enabled>
<mtu>1450</mtu>
<type xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ethernetCsmacd</type>
</config>
</interface>
</interfaces>
OcNOS CLI Command
interface xe10
mtu 1450
no shutdown
OcNOS NETCONF Payload
<interfaces xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-interface">
<interface>
<name>xe10</name>
<config>
<name>xe10</name>
<enabled>true</enabled>
<mtu>1450</mtu>
</config>
</interface>
</interfaces>
Validation with NETCONF get
<interfaces xmlns="http://openconfig.net/yang/interfaces">
<interface>
<name>xe10</name>
<config>
<name>xe10</name>
<mtu>1450</mtu>
<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>xe10</name>
<mtu>1450</mtu>
<tpid xmlns="http://openconfig.net/yang/vlan-types">TPID_0X8100</tpid>
<logical>false</logical>
<last-change>0</last-change>
<oper-status>DOWN</oper-status>
<admin-status>UP</admin-status>
<ifindex>10010</ifindex>
<counters>
<last-clear>0</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>b86a.97c3.6447</hw-mac-address>
</state>
</ethernet>
<subinterfaces>
<subinterface>
<index>0</index>
<ipv4 xmlns="http://openconfig.net/yang/interfaces/ip">
<config>
<mtu>1450</mtu>
</config>
</ipv4>
<config>
<index>0</index>
</config>
<ipv6 xmlns="http://openconfig.net/yang/interfaces/ip">
<config>
<mtu>1450</mtu>
</config>
</ipv6>
</subinterface>
</subinterfaces>
</interface>
</interfaces>
Restrictions
/interfaces/interface/name
This leaf has been restricted to have at most 32 characters.
/interfaces/interface/config/mtu
This leaf can only be used to configure the physical interface.
Release
This configuration was introduced in OcNOS version 4.2.
Configuration
Use this XML config to specify that an IP address and prefix length will be used by this interface.
OpenConfig NETCONF Payload
<interfaces xmlns="http://openconfig.net/yang/interfaces">
<interface>
<name>xe10</name>
<config>
<name>xe10</name>
<enabled>true</enabled>
<type xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ethernetCsmacd</type>
</config>
<subinterfaces>
<subinterface>
<index>0</index>
<ipv4 xmlns="http://openconfig.net/yang/interfaces/ip">
<addresses>
<address>
<ip>30.1.1.1</ip>
<config>
<ip>30.1.1.1</ip>
<prefix-length>24</prefix-length>
</config>
</address>
</addresses>
</ipv4>
<config>
<index>0</index>
</config>
</subinterface>
</subinterfaces>
</interface>
</interfaces>
OcNOS CLI Command
interface xe10
ip address 30.1.1.1/24
no shutdown
OcNOS NETCONF Payload
<interfaces xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-interface">
<interface>
<name>xe10</name>
<config>
<name>xe10</name>
<enabled>true</enabled>
</config>
<ipv4 xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-if-ip">
<config>
<primary-ip-addr>30.1.1.1/24</primary-ip-addr>
</config>
</ipv4>
</interface>
</interfaces>
Validation with NETCONF get
<interfaces xmlns="http://openconfig.net/yang/interfaces">
<interface>
<name>xe10</name>
<config>
<name>xe10</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>xe10</name>
<tpid xmlns="http://openconfig.net/yang/vlan-types">TPID_0X8100</tpid>
<logical>false</logical>
<last-change>0</last-change>
<oper-status>DOWN</oper-status>
<admin-status>UP</admin-status>
<ifindex>10010</ifindex>
<counters>
<last-clear>0</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>b86a.97c3.6447</hw-mac-address>
</state>
</ethernet>
<subinterfaces>
<subinterface>
<index>0</index>
<ipv4 xmlns="http://openconfig.net/yang/interfaces/ip">
<addresses>
<address>
<ip>30.1.1.1</ip>
<config>
<ip>30.1.1.1</ip>
<prefix-length>24</prefix-length>
</config>
<state>
<ip>30.1.1.1</ip>
<prefix-length>24</prefix-length>
</state>
</address>
</addresses>
</ipv4>
<config>
<index>0</index>
</config>
</subinterface>
</subinterfaces>
</interface>
</interfaces>
Restrictions
/interfaces/interface/name
This leaf has been restricted to have at most 32 characters.
/interfaces/interface/subinterfaces/subinterface/ipv4/addresses/address
The first entry on that list will be used as the primary address, as OpenConfig does not have this concept.
Release
This configuration was introduced in OcNOS version 4.2.
Configuration
Use this XML config to specify that a secondary IP address and prefix length will be used by this interface. The secondary address cannot be configured in the absence of a primary IP address.
OpenConfig NETCONF Payload
<interfaces xmlns="http://openconfig.net/yang/interfaces">
<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>0</index>
<ipv4 xmlns="http://openconfig.net/yang/interfaces/ip">
<addresses>
<address>
<ip>10.10.10.1</ip>
<config>
<ip>10.10.10.1</ip>
<prefix-length>24</prefix-length>
</config>
</address>
<address>
<ip>11.11.11.1</ip>
<config>
<ip>11.11.11.1</ip>
<prefix-length>24</prefix-length>
</config>
</address>
</addresses>
</ipv4>
<config>
<index>0</index>
</config>
</subinterface>
</subinterfaces>
</interface>
</interfaces>
OcNOS CLI Command
interface xe10
ip address 10.10.10.1/24
ip address 11.11.11.1/24 secondary
no shutdown
OcNOS NETCONF Payload
<interfaces xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-interface">
<interface>
<name>xe10</name>
<config>
<name>xe10</name>
</config>
<ipv4 xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-if-ip">
<secondary-addresses>
<ip-address>11.11.11.1/24</ip-address>
<config>
<ip-address>11.11.11.1/24</ip-address>
</config>
</secondary-addresses>
<config>
<primary-ip-addr>10.10.10.1/24</primary-ip-addr>
</config>
</ipv4>
</interface>
</interfaces>
Validation with NETCONF get
<interfaces xmlns="http://openconfig.net/yang/interfaces">
<interface>
<name>xe10</name>
<config>
<name>xe10</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>xe10</name>
<tpid xmlns="http://openconfig.net/yang/vlan-types">TPID_0X8100</tpid>
<logical>false</logical>
<last-change>0</last-change>
<oper-status>DOWN</oper-status>
<admin-status>UP</admin-status>
<ifindex>10010</ifindex>
<counters>
<last-clear>0</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>b86a.97c3.6447</hw-mac-address>
</state>
</ethernet>
<subinterfaces>
<subinterface>
<index>0</index>
<ipv4 xmlns="http://openconfig.net/yang/interfaces/ip">
<addresses>
<address>
<ip>10.10.10.1</ip>
<config>
<ip>10.10.10.1</ip>
<prefix-length>24</prefix-length>
</config>
<state>
<ip>10.10.10.1</ip>
<prefix-length>24</prefix-length>
</state>
</address>
<address>
<ip>11.11.11.1</ip>
<config>
<ip>11.11.11.1</ip>
<prefix-length>24</prefix-length>
</config>
<state>
<ip>11.11.11.1</ip>
<prefix-length>24</prefix-length>
</state>
</address>
</addresses>
</ipv4>
<config>
<index>0</index>
</config>
</subinterface>
</subinterfaces>
</interface>
</interfaces>
Restrictions
/interfaces/interface/name
This leaf has been restricted to have at most 32 characters.
/interfaces/interface/subinterfaces/subinterface/ipv4/addresses/address
All leaves of this list that was not the first entry will be considered as secondaries addresses.
Release
This configuration was introduced in OcNOS version 4.2.
Configuration
Use this XML config to set the IPv6 addresses of an interface.
OpenConfig NETCONF Payload
<interfaces xmlns="http://openconfig.net/yang/interfaces">
<interface>
<name>xe11</name>
<config>
<name>xe11</name>
<type xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ethernetCsmacd</type>
</config>
<subinterfaces>
<subinterface>
<index>0</index>
<ipv6 xmlns="http://openconfig.net/yang/interfaces/ip">
<addresses>
<address>
<ip>ad0f::ac0f:ab0f</ip>
<config>
<ip>ad0f::ac0f:ab0f</ip>
<prefix-length>64</prefix-length>
</config>
</address>
<address>
<ip>ae0f::ad0f:ac0f</ip>
<config>
<ip>ae0f::ad0f:ac0f</ip>
<prefix-length>64</prefix-length>
</config>
</address>
<address>
<ip>f0ca:bebe::cafe</ip>
<config>
<ip>f0ca:bebe::cafe</ip>
<prefix-length>64</prefix-length>
</config>
</address>
</addresses>
</ipv6>
<config>
<index>0</index>
</config>
</subinterface>
</subinterfaces>
</interface>
</interfaces>
OcNOS CLI Command
interface xe11
ipv6 address ad0f::ac0f:ab0f/64
ipv6 address ae0f::ad0f:ac0f/64
ipv6 address f0ca:bebe::cafe/64
no shutdown
!
OcNOS NETCONF Payload
<interfaces xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-interface">
<interface>
<name>xe11</name>
<config>
<name>xe11</name>
</config>
<ipv6 xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-if-ip">
<addresses>
<ipv6-address>ad0f::ac0f:ab0f/64</ipv6-address>
<config>
<ipv6-address>ad0f::ac0f:ab0f/64</ipv6-address>
</config>
</addresses>
<addresses>
<ipv6-address>ae0f::ad0f:ac0f/64</ipv6-address>
<config>
<ipv6-address>ae0f::ad0f:ac0f/64</ipv6-address>
</config>
</addresses>
<addresses>
<ipv6-address>f0ca:bebe::cafe/64</ipv6-address>
<config>
<ipv6-address>f0ca:bebe::cafe/64</ipv6-address>
</config>
</addresses>
</ipv6>
</interface>
</interfaces>
Validation with NETCONF get
<interfaces xmlns="http://openconfig.net/yang/interfaces">
<interface>
<name>xe10</name>
<config>
<name>xe10</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>xe10</name>
<tpid xmlns="http://openconfig.net/yang/vlan-types">TPID_0X8100</tpid>
<logical>false</logical>
<last-change>0</last-change>
<oper-status>DOWN</oper-status>
<admin-status>UP</admin-status>
<ifindex>10010</ifindex>
<counters>
<last-clear>0</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">
<config>
<duplex-mode>FULL</duplex-mode>
</config>
<state>
<duplex-mode>FULL</duplex-mode>
<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>b86a.97c3.6447</hw-mac-address>
</state>
</ethernet>
<subinterfaces>
<subinterface>
<index>0</index>
<config>
<index>0</index>
</config>
</subinterface>
</subinterfaces>
</interface>
</interfaces>
Restrictions
/interfaces/interface/name
This leaf has been restricted to have at most 32 characters.
This configuration was introduced in OcNOS version 4.2.
Configuration
Use this XML config to set the duplex mode for an interface.
OpenConfig NETCONF Payload
<interfaces xmlns="http://openconfig.net/yang/interfaces">
<interface>
<name>xe10</name>
<config>
<name>xe10</name>
<enabled>true</enabled>
<type xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ethernetCsmacd</type>
</config>
<ethernet xmlns="http://openconfig.net/yang/interfaces/ethernet">
<config>
<duplex-mode>FULL</duplex-mode>
</config>
</ethernet>
</interface>
</interfaces>
OcNOS CLI Command
interface xe10
duplex full
no shutdown
OcNOS NETCONF Payload
<interfaces xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-interface">
<interface>
<name>xe10</name>
<config>
<name>xe10</name>
<enabled>true</enabled>
</config>
<ethernet xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-if-ethernet">
<config>
<duplex-mode>full</duplex-mode>
</config>
</ethernet>
</interface>
</interfaces>
Validation with NETCONF get
<interfaces xmlns="http://openconfig.net/yang/interfaces">
<interface>
<name>xe10</name>
<config>
<name>xe10</name>
<type
xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ethernetCsmacd</type>
</config>
<state>
<name>xe10</name>
<logical>false</logical>
<last-change>0</last-change>
<oper-status>DOWN</oper-status>
<admin-status>UP</admin-status>
<ifindex>10010</ifindex>
<counters>
<last-clear>0</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">
<config>
<auto-negotiate>false</auto-negotiate>
<port-speed
xmlns:oc-eth="http://openconfig.net/yang/interfaces/ethernet">oc-eth:SPEED_1GB</port-speed>
</config>
<state>
<port-speed
xmlns:oc-eth="http://openconfig.net/yang/interfaces/ethernet">oc-eth:SPEED_1GB</port-speed>
<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>b86a.9729.abc5</hw-mac-address>
</state>
</ethernet>
<subinterfaces>
<subinterface>
<index>0</index>
<config>
<index>0</index>
</config>
</subinterface>
</subinterfaces>
</interface>
</interfaces>
Restrictions
/interfaces/interface/name
This leaf has been restricted to have at most 32 characters.
Default
By default, duplex mode is full.
port-speed
Release
This configuration was introduced in OcNOS version 4.2.
Configuration
Use this xml config to set the link speed of the interface.
OpenConfig NETCONF Payload
<interfaces xmlns="http://openconfig.net/yang/interfaces">
<interface>
<name>xe10</name>
<config>
<name>xe10</name>
<enabled>true</enabled>
<type xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ethernetCsmacd</type>
</config>
<ethernet xmlns="http://openconfig.net/yang/interfaces/ethernet">
<config>
<auto-negotiate>false</auto-negotiate>
<port-speed xmlns:oc-eth="http://openconfig.net/yang/interfaces/ethernet">oc-eth:SPEED_1GB</port-speed>
</config>
</ethernet>
</interface>
</interfaces>
OcNOS CLI Command
interface xe10
speed 1g
no shutdown
OcNOS NETCONF Payload
<interfaces xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-interface">
<interface>
<name>xe10</name>
<config>
<name>xe10</name>
<enabled>true</enabled>
</config>
<ethernet xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-if-ethernet">
<config>
<port-speed>1g</port-speed>
</config>
</ethernet>
</interface>
</interfaces>
Validation with NETCONF get
<interfaces xmlns="http://openconfig.net/yang/interfaces">
<interface>
<name>xe10</name>
<config>
<name>xe10</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>xe10</name>
<tpid xmlns="http://openconfig.net/yang/vlan-types">TPID_0X8100</tpid>
<logical>false</logical>
<last-change>0</last-change>
<oper-status>DOWN</oper-status>
<admin-status>UP</admin-status>
<ifindex>10010</ifindex>
<counters>
<last-clear>0</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>b86a.9729.abc5</hw-mac-address>
</state>
</ethernet>
<subinterfaces>
<subinterface>
<index>0</index>
<config>
<index>0</index>
</config>
</subinterface>
</subinterfaces>
</interface>
</interfaces>
Restrictions
/interfaces/interface/name
This leaf has been restricted to have at most 32 characters.
/interfaces/interface/ethernet/config/port-speed
This leaf can be used only if the auto-negotiate leaf (../auto-negotiate) is set to false.
-type
Release
This configuration was introduced in OcNOS version 5.0.
Configuration
OpenConfig NETCONF Payload
<interfaces xmlns="http://openconfig.net/yang/interfaces">
<interface>
<name>xe10</name>
<config>
<name>xe10</name>
<enabled>true</enabled>
<type xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ethernetCsmacd</type>
</config>
<tpid xmlns="http://openconfig.net/yang/vlan" xmlns:oc-vlan-types="http://openconfig.net/yang/vlan-types">oc-vlan-types:TPID_0X88A8</tpid>
</interface>
</interfaces>
OcNOS CLI Command
interface xe10
switchport dot1q ethertype 0x88a8
no shutdown
OcNOS NETCONF Payload
<interfaces xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-interface">
<interface>
<name>xe10</name>
<config>
<name>xe10</name>
<enabled>true</enabled>
</config>
<extended xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-if-extended">
<config>
<dot1q-ether-type>0x88a8</dot1q-ether-type>
</config>
</extended>
</interface>
</interfaces>
Validation with NETCONF get
<interfaces xmlns="http://openconfig.net/yang/interfaces">
<interface>
<name>xe10</name>
<config>
<name>xe10</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>xe10</name>
<tpid xmlns="http://openconfig.net/yang/vlan-types">TPID_0X88a8</tpid>
<logical>false</logical>
<last-change>0</last-change>
<oper-status>DOWN</oper-status>
<admin-status>UP</admin-status>
<ifindex>10010</ifindex>
<counters>
<last-clear>0</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>b86a.9729.abc5</hw-mac-address>
</state>
</ethernet>
<subinterfaces>
<subinterface>
<index>0</index>
<config>
<index>0</index>
</config>
</subinterface>
</subinterfaces>
</interface>
</interfaces>
Restrictions
/interfaces/interface/name
This leaf has been restricted to have at most 32 characters.
subinterface with both primary and secondary address
Release
This configuration was introduced in OcNOS version 4.2.
Configuration
Use this XML config to specify both an IP address and a secondary address with their prefix length that will be used by this subinterface.
OpenConfig NETCONF Payload
<interfaces xmlns="http://openconfig.net/yang/interfaces">
<interface>
<name>xe10</name>
<config>
<name>xe10</name>
</config>
<subinterfaces>
<subinterface>
<index>10</index>
<config>
<index>10</index>
</config>
<ipv4 xmlns="http://openconfig.net/yang/interfaces/ip">
<addresses>
<address>
<ip>20.21.22.23</ip>
<config>
<ip>20.21.22.23</ip>
<prefix-length>24</prefix-length>
</config>
</address>
<address>
<ip>24.25.26.27</ip>
<config>
<ip>24.25.26.27</ip>
<prefix-length>24</prefix-length>
</config>
</address>
</addresses>
</ipv4>
</subinterface>
</subinterfaces>
</interface>
</interfaces>
OcNOS CLI Command
interface xe10.10
ip address 20.21.22.23/24
ip address 24.25.26.27/24 secondary
!
OcNOS NETCONF Payload
<interfaces xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-interface">
<interface>
<name>xe10.10</name>
<config>
<name>xe10.10</name>
</config>
<ipv4 xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-if-ip">
<secondary-addresses>
<ip-address>24.25.26.27/24</ip-address>
<config>
<ip-address>24.25.26.27/24</ip-address>
</config>
</secondary-addresses>
<config>
<primary-ip-addr>20.21.22.23/24</primary-ip-addr>
</config>
</ipv4>
</interface>
</interfaces>
Validation with NETCONF get
<interfaces xmlns="http://openconfig.net/yang/interfaces">
<interface>
<name>xe10</name>
<config>
<name>xe10</name>
</config>
<subinterfaces>
<subinterface>
<index>10</index>
<config>
<index>10</index>
</config>
<state>
<name>xe10.10</name>
<logical>true</logical>
<oper-status>DOWN</oper-status>
<ifindex>20500490</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>
<ipv4 xmlns="http://openconfig.net/yang/interfaces/ip">
<addresses>
<address>
<ip>20.21.22.23</ip>
<config>
<ip>20.21.22.23</ip>
<prefix-length>24</prefix-length>
</config>
<state>
<ip>20.21.22.23</ip>
<prefix-length>24</prefix-length>
</state>
</address>
<address>
<ip>24.25.26.27</ip>
<config>
<ip>24.25.26.27</ip>
<prefix-length>24</prefix-length>
</config>This configuration was introduced
<state>
<ip>24.25.26.27</ip>
<prefix-length>24</prefix-length>
</state>
</address>
</addresses>
</ipv4>
</subinterface>
</subinterfaces>
</interface>
</interfaces>
Restrictions
/interfaces/interface/name
This leaf has been restricted to have at most 32 characters.
/interfaces/interface/subinterfaces/subinterface/ipv4/addresses/address
The first entry on that list will be used as the primary address, as OpenConfig does not have this concept.
/interfaces/interface/subinterfaces/subinterface/index:
Although OcNOS CLI allows subinterface name in the form <ifname>.<id>.<id>, it is not supported by OpenConfig.
Hence, when using OpenConfig translation, only the subinterface name in the format <ifname>.<id> must be used