OcNOS DC : OpenConfig Command Reference : LACP OpenConfig Translation
LACP OpenConfig Translation
Create Static LAG Interface
This XML configuration snippet is used to create a static Link Aggregation Group (LAG) interface with a specified name and configure its settings for a network device.
Release
This configuration was introduced in OcNOS version 5.0.
OpenConfig NetConf Payload
Here is a sample OpenConfig NetConf Payload that configures two Ethernet interfaces to be part of a LAG. The LAG uses the Link Aggregation Control Protocol (LACP) in ACTIVE mode, and it requires a minimum of two member links to be up for the LAG to be operational. Additionally, set the system priority.
<interfaces xmlns="http://openconfig.net/yang/interfaces">
<interface>
<name>sa10</name>
<config>
<name>sa10</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">
<config>
<min-links>2</min-links>
<lag-type>STATIC</lag-type>
</config>
</aggregation>
</interface>
<interface>
<name>xe6</name>
<config>
<name>xe6</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">
<config>
<aggregate-id xmlns="http://openconfig.net/yang/interfaces/aggregate">sa10</aggregate-id>
<lacp-mode xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-oc-if-deviations">ACTIVE</lacp-mode>
</config>
</ethernet>
</interface>
<interface>
<name>xe7</name>
<config>
<name>xe7</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">
<config>
<aggregate-id xmlns="http://openconfig.net/yang/interfaces/aggregate">sa10</aggregate-id>
<lacp-mode xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-oc-if-deviations">ACTIVE</lacp-mode>
</config>
</ethernet>
</interface>
</interfaces>
<lacp xmlns="http://openconfig.net/yang/lacp">
<config>
<system-priority>2</system-priority>
</config>
</lacp>
OcNOS CLI Command
The below CLI commands are used to configure a static LAG interface with a system priority and a minimum required member link count. Ethernet interfaces are also assigned to the static LAG group with the specified identifier.
lacp system-priority 2
!
interface sa10
port-channel min-links 2
!
interface xe6
static-channel-group 10
!
interface xe7
static-channel-group 10
!
OcNOS NetConf Payload
Here is a sample OcNOS NetConf Payload that configures two Ethernet interfaces to be part of a static LAG with the specified identifier. The LAG requires a minimum of two member links to be operational and uses the LACP mode ACTIVE. Additionally, it sets the system priority for LACP.
This payload includes configurations for both OpenConfig and OcNOS YANG models to ensure compatibility between the two.
<interfaces xmlns="http://openconfig.net/yang/interfaces">
<interface>
<name>sa10</name>
<config>
<name>sa10</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">
<config>
<min-links>2</min-links>
<lag-type>STATIC</lag-type>
</config>
</aggregation>
</interface>
<interface>
<name>xe6</name>
<config>
<name>xe6</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">
<config>
<aggregate-id xmlns="http://openconfig.net/yang/interfaces/aggregate">sa10</aggregate-id>
<lacp-mode xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-oc-if-deviations">ACTIVE</lacp-mode>
</config>
</ethernet>
</interface>
<interface>
<name>xe7</name>
<config>
<name>xe7</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">
<config>
<aggregate-id xmlns="http://openconfig.net/yang/interfaces/aggregate">sa10</aggregate-id>
<lacp-mode xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-oc-if-deviations">ACTIVE</lacp-mode>
</config>
</ethernet>
</interface>
</interfaces>
<lacp xmlns="http://openconfig.net/yang/lacp">
<config>
<system-priority>2</system-priority>
</config>
</lacp>
<interfaces xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-interface">
<interface>
<name>sa10</name>
<config>
<name>sa10</name>
</config>
<aggregator xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-if-aggregate">
<config>
<min-links>2</min-links>
</config>
</aggregator>
</interface>
<interface>
<name>xe6</name>
<config>
<name>xe6</name>
</config>
<ethernet xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-if-ethernet">
<config />
</ethernet>
<member-aggregation xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-if-aggregate">
<config>
<agg-type>static</agg-type>
<aggregate-id>10</aggregate-id>
<lacp-mode>active</lacp-mode>
</config>
</member-aggregation>
</interface>
<interface>
<name>xe7</name>
<config>
<name>xe7</name>
</config>
<ethernet xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-if-ethernet">
<config />
</ethernet>
<member-aggregation xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-if-aggregate">
<config>
<agg-type>static</agg-type>
<aggregate-id>10</aggregate-id>
<lacp-mode>active</lacp-mode>
</config>
</member-aggregation>
</interface>
</interfaces>
<lacp xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-lacp">
<global>
<config>
<system-priority>2</system-priority>
</config>
</global>
</lacp>
Validation with NetConf get
Here is a NetConf validation response defines three interfaces, including a static LAG type that requires a minimum of two member links and has an operational status of UP. Both of the Ethernet interfaces are part of this LAG, and they also have UP operational status. The LAG uses LACP in ACTIVE mode, and it sets the system priority for LACP.
<interfaces xmlns="http://openconfig.net/yang/interfaces">
<interface>
<name>sa10</name>
<config>
<name>sa10</name>
<type
xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ieee8023adLag</type>
</config>
<state>
<name>sa10</name>
<logical>false</logical>
<last-change>35600</last-change>
<oper-status>UP</oper-status>
<admin-status>UP</admin-status>
<ifindex>200010</ifindex>
<counters>
<last-clear>0</last-clear>
<out-errors>0</out-errors>
<out-discards>0</out-discards>
<out-multicast-pkts>7</out-multicast-pkts>
<out-broadcast-pkts>0</out-broadcast-pkts>
<out-unicast-pkts>0</out-unicast-pkts>
<out-pkts>7</out-pkts>
<out-octets>774</out-octets>
<in-fcs-errors>0</in-fcs-errors>
<in-errors>0</in-errors>
<in-discards>0</in-discards>
<in-multicast-pkts>7</in-multicast-pkts>
<in-broadcast-pkts>0</in-broadcast-pkts>
<in-unicast-pkts>0</in-unicast-pkts>
<in-pkts>3852605</in-pkts>
<in-octets>130989214</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>b86a.9729.abf2</hw-mac-address>
</state>
</ethernet>
<subinterfaces>
<subinterface>
<index>0</index>
<config>
<index>0</index>
</config>
</subinterface>
</subinterfaces>
<aggregation xmlns="http://openconfig.net/yang/interfaces/aggregate">
<config>
<min-links>2</min-links>
<lag-type>STATIC</lag-type>
</config>
<state>
<min-links>2</min-links>
<lag-type>STATIC</lag-type>
</state>
</aggregation>
</interface>
</interfaces>
<interfaces xmlns="http://openconfig.net/yang/interfaces">
<interface>
<name>xe6</name>
<config>
<name>xe6</name>
<type
xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ethernetCsmacd</type>
</config>
<state>
<name>xe6</name>
<logical>false</logical>
<last-change>35600</last-change>
<oper-status>UP</oper-status>
<admin-status>UP</admin-status>
<ifindex>10006</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>7</in-multicast-pkts>
<in-broadcast-pkts>0</in-broadcast-pkts>
<in-unicast-pkts>0</in-unicast-pkts>
<in-pkts>7</in-pkts>
<in-octets>814</in-octets>
</counters>
<type
xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ethernetCsmacd</type>
</state>
<ethernet xmlns="http://openconfig.net/yang/interfaces/ethernet">
<state>
<negotiated-port-speed
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.abc1</hw-mac-address>
<aggregate-id xmlns="http://openconfig.net/yang/interfaces/aggregate">sa10</aggregate-id>
</state>
<config>
<aggregate-id xmlns="http://openconfig.net/yang/interfaces/aggregate">sa10</aggregate-id>
<lacp-mode xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-oc-if-deviations">ACTIVE</lacp-mode>
</config>
</ethernet>
<subinterfaces>
<subinterface>
<index>0</index>
<config>
<index>0</index>
</config>
</subinterface>
</subinterfaces>
</interface>
</interfaces>
<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>
<state>
<name>xe7</name>
<logical>false</logical>
<last-change>15300</last-change>
<oper-status>UP</oper-status>
<admin-status>UP</admin-status>
<ifindex>10007</ifindex>
<counters>
<last-clear>0</last-clear>
<out-errors>0</out-errors>
<out-discards>0</out-discards>
<out-multicast-pkts>7</out-multicast-pkts>
<out-broadcast-pkts>0</out-broadcast-pkts>
<out-unicast-pkts>0</out-unicast-pkts>
<out-pkts>7</out-pkts>
<out-octets>774</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>4193454</in-pkts>
<in-octets>142577504</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>b86a.9729.abc2</hw-mac-address>
<aggregate-id xmlns="http://openconfig.net/yang/interfaces/aggregate">sa10</aggregate-id>
</state>
<config>
<aggregate-id xmlns="http://openconfig.net/yang/interfaces/aggregate">sa10</aggregate-id>
<lacp-mode xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-oc-if-deviations">ACTIVE</lacp-mode>
</config>
</ethernet>
<subinterfaces>
<subinterface>
<index>0</index>
<config>
<index>0</index>
</config>
</subinterface>
</subinterfaces>
</interface>
</interfaces>
<lacp xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-lacp">
<global>
<config>
<system-priority>2</system-priority>
</config>
<state>
<system-priority>2</system-priority>
<system-id>b8-6a-97-82-11-ba</system-id>
</state>
</global>
</lacp>
Restrictions
The interface name for a static LAG interface should begin with the text sa, followed by a number, such as sa3.
/interfaces/interface/name
The data type of the below leaf has been modified to uint8.
/interfaces/interface/aggregation/config/min-links
The below leaf was not in a supported state.
/lacp/interfaces/interface/config/lacp-mode
Create Dynamic LAG Interface
This XML configuration snippet is used to create a dynamic Link Aggregation Group (LAG) interface with a specified name and configure its settings for a network device.
Release
This configuration was introduced in OcNOS version 5.0.
OpenConfig NetConf Payload
Here is a sample OpenConfig NetConf Payload that configures an Ethernet interfaces to be a part of a LAG with a specified identifier. The LAG uses the LACP in ACTIVE mode, and it requires a minimum of two member links to be operational. Additionally, it sets the system priority for LACP.
<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>
<ethernet xmlns="http://openconfig.net/yang/interfaces/ethernet">/oc-if:interfaces/oc-if:interface/oc-if:config/oc-if:name
<config>
<lacp-mode xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-oc-if-deviations">ACTIVE</lacp-mode>
<aggregate-id xmlns="http://openconfig.net/yang/interfaces/aggregate">po2</aggregate-id>
</config>
</ethernet>
</interface>
<interface>
<name>po2</name>
<config>
<name>po2</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">
<config>
<min-links>2</min-links>
<lag-type>LACP</lag-type>
</config>
</aggregation>
</interface>
</interfaces>
<lacp xmlns="http://openconfig.net/yang/lacp">
<config>
<system-priority>2</system-priority>
</config>
<interfaces>
<interface>
<name>xe10</name>
</interface>
</interfaces>
</lacp>
OcNOS CLI Command
The below CLI commands are used to configure a dynamic LAG interface with a system priority and a minimum required member link count. Ethernet interface is also assigned to the dynamic LAG group with the specified identifier and sets the LACP mode as ACTIVE.
lacp system-priority 2
!
interface po2
port-channel min-links 2
!
interface xe10
channel-group 2 mode active
!
OcNOS NetConf Payload
Here is a sample OcNOS NetConf Payload that configures a dynamic LAG interface with a minimum required member link count and assigns an Ethernet interface to the LAG group with LACP mode ACTIVE. Additionally, it sets the system priority for LACP.
<interfaces xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-interface">
<interface>
<name>xe10</name>
<config>
<name>xe10</name>
</config>
<member-aggregation xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-if-aggregate">
<config>
<lacp-mode>active</lacp-mode>
<aggregate-id>2</aggregate-id>
<agg-type>lacp</agg-type>
</config>
</member-aggregation>
</interface>
<interface>
<name>po2</name>
<config>
<name>po2</name>
</config>
<aggregator xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-if-aggregate">
<config>
<min-links>2</min-links>
</config>
</aggregator>
</interface>
</interfaces>
<lacp xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-lacp">
<global>
<config>
<system-priority>2</system-priority>
</config>
</global>
</lacp>
Validation with NetConf get
Here is a NetConf validation response provides detailed information about the dynamic LAG interface status and configuration, which includes dynamic link aggregation using LACP, minimum member link requirements, operational status, and system priority settings.
<rpc-reply xmlns="urn:ietf:params:xml:ns:NETCONF:base:1.0">
<data>
<interfaces xmlns="http://openconfig.net/yang/interfaces">
<interface>
<name>po2</name>
<config>
<name>po2</name>
<type
xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ieee8023adLag</type>
</config>
<state>
<name>po2</name>
<logical>false</logical>
<last-change>0</last-change>
<oper-status>DOWN</oper-status>
<admin-status>UP</admin-status>
<ifindex>100002</ifindex>
<counters>
<last-clear>0</last-clear>
<out-errors>0</out-errors>
<out-discards>0</out-discards>
<out-multicast-pkts>37</out-multicast-pkts>
<out-broadcast-pkts>0</out-broadcast-pkts>
<out-unicast-pkts>0</out-unicast-pkts>
<out-pkts>37</out-pkts>
<out-octets>4736</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>HALF</negotiated-duplex-mode>
<hw-mac-address>b86a.9729.abf2</hw-mac-address>
</state>
</ethernet>
<subinterfaces>
<subinterface>
<index>0</index>
<config>
<index>0</index>
</config>
</subinterface>
</subinterfaces>
<aggregation xmlns="http://openconfig.net/yang/interfaces/aggregate">
<config>
<min-links>2</min-links>
<lag-type>LACP</lag-type>
</config>
<state>
<min-links>2</min-links>
<lag-type>LACP</lag-type>
</state>
</aggregation>
</interface>
</interfaces>
</data>
</rpc-reply>
Restrictions
The interface name for a dynamic LAG interface should begin with the text po, followed by a number, such as po2.
/interfaces/interface/name
The data type of the below leaf has been modified to uint8.
/interfaces/interface/aggregation/config/min-links
The below leaf was not in a supported state.
/lacp/interfaces/interface/config/lacp-mode