Configuring NCS 1001 Using Data Models

This section includes examples for configuring NCS 1001 using Data models.

Supported YANG Models in NCS 1001

Table 1. Feature History

Feature Name

Release

Description

New Optics Telemetry Bag

Cisco IOS XR Release 7.9.1

The telemetry bag, which maintains the collection of telemetry data, needs to be of an ideal size to stream the data effectively. In this release, the optical telemetry bag size has been optimized by introducing the following exclusive sensor paths for OTS and OTS-OCH controllers:

  • Cisco-IOS-XR-controller-

    ncs1001-ots-och-oper:

    ots-och-oper/ots-och-ports

    /ots-och-port/ots-och-info

  • Cisco-IOS-XR-controller-

    ncs1001-ots-oper:ots-oper/

    ots-ports/ots-port/ots-info

Unlike in previous release, where OTS and OTS-OCH controller's telemetry data was accessed from a single telemetry bag, it is now separated out by the respective sensor paths. The already existing optics-info sensor path now includes only the data of the OPTICS controller. The result is a smaller bag size. Two new native NETCONF yang models are introduced to support the two new sensor paths.

Following is the list of supported configuration YANG models for NCS 1001:

Configuration YANG Models

Cisco-IOS-XR-ncs1001-ots-cfg.yang
Cisco-IOS-XR-ifmgr-cfg.yang
Cisco-IOS-XR-controller-optics-cfg.yang
Cisco-IOS-XR-pmengine-cfg.yang

Following is the list of supported operational YANG models for NCS 1001:

Operational Yang Models
Cisco-IOS-XR-controller-optics-oper.yang
Cisco-IOS-XR-pmengine-oper.yang
Cisco-IOS-XR-plat-chas-invmgr-oper.yang
Cisco-IOS-XR-alarmgr-server-oper.yang
Cisco-IOS-XR-ncs1001-ots-oper.yang
Cisco-IOS-XR-controller-ncs1001-ots-och-oper.yang

openconfig-channel-monitor

Note

 

For R7.9.1 and R7.10.1, name and monitor-port parameter values cannot be modified, which may result in an error message.


Note


To view the Data Models (Native, Unified, OpenConfig) supported in IOS XR platforms and releases, see the Yang Explorer tool. You can explore the data model definitions, locate a specific model, and view the containers and their respective lists, leaves, leaf lists, Xpaths, and much more.


New Telemetry Bag in NCS 1001

From R.7.9.1 onwards, two new sensor paths are introduced to support the two bags of OTS and OTS-OCH controllers in the NCS 1001 platform. This helps separate the parameters of OTS and OTS-OCH controllers, which helps in reducing the size of each telemetry collection. The optics-info sensor path: Cisco-IOS-XR-controller-optics-oper:optics-oper/optics-ports/optics-port/optics-info was used previously to collect data and parameters for optics, which are now collected by the OTS and OTS-OCH controllers together.

The two new sensor paths introduced for OTS and OTS-OCH controllers in NCS 1001 are as given below.

  • Cisco-IOS-XR-controller-ncs1001-ots-och-oper:ots-och-oper/ots-och-ports/ots-och-port/ots-och-info

  • Cisco-IOS-XR-controller-ncs1001-ots-oper:ots-oper/ots-ports/ots-port/ots-info

The two new operational YANG models which support these two new sensor paths are as given below.

  • Cisco-IOS-XR-controller-ncs1001-ots-oper.yang

  • Cisco-IOS-XR-controller-ncs1001-ots-och-oper.yang


Note


  • The total size resulting from the contributions of the three SPs (optics-Info, ots-info, and ots-och-info) is now less than 300 KB for a single data collection resulting in 90 percent reduction.


Configure Amplifier Module

Procedure


Use the Cisco-IOS-XR-ncs1001-ots-cfg.yang YANG model to configure the grid mode parameter of the amplifier module as 100GHz or 50GHz.

Parameter Example
grid-mode

<?xml version="1.0"?>
<rpc message-id="102" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<edit-config>
<target>
<candidate/>
</target>
<config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
<hardware-module xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-ncs1001-ots-cfg">
<node>
<location>0_RP0_CPU0</location>
<slot>
<slot-id>0x2</slot-id>
<amplifier>
<grid-mode >100g-hz</grid-mode>
</amplifier>
</slot>
</node>
</hardware-module>
</config>
</edit-config>
</rpc>

Remove Amplifier Configuration

Procedure


Use the Cisco-IOS-XR-ncs1001-ots-cfg.yang YANG model to remove the amplifier configuration.

Parameter Example
grid-mode

<?xml version="1.0"?>
<rpc message-id="102" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<edit-config>
<target>
<candidate/>
</target>
<config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
<hardware-module xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-ncs1001-ots-cfg">
<node>
<location>0_RP0_CPU0</location>
<slot>
<slot-id>0x2</slot-id>
<amplifier>
<grid-mode xc:operation = "delete">100g-hz</grid-mode>
</amplifier>
</slot>
</node>
</hardware-module>
</config>
</edit-config>
</rpc>

Configure Protection Switching Module

Procedure


Use the Cisco-IOS-XR-ncs1001-ots-cfg.yang YANG model to configure the protection switching module.

Parameter Example
lockout-from

<?xml version="1.0"?>
<rpc message-id="102" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<edit-config>
<target>
<candidate/>
</target>
<config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
<hardware-module xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-ncs1001-ots-cfg">
<node>
<location>0_RP0_CPU0</location>
<slot>
<slot-id>0x3</slot-id>
<psm>
<lockout-from>protected</lockout-from>
</psm>
</slot>
</node>
</hardware-module>
</config>
</edit-config>
</rpc>

Remove Protection Switching Module Configuration

Procedure


Use the Cisco-IOS-XR-ncs1001-ots-cfg.yang YANG model to remove the protection switching module configuration.

Parameter Example
lockout-from

<?xml version="1.0"?>
<rpc message-id="102" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<edit-config>
<target>
<candidate/>
</target>
<config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
<hardware-module xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-ncs1001-ots-cfg">
<node>
<location>0_RP0_CPU0</location>
<slot>
<slot-id>0x3</slot-id>
<psm>
<lockout-from xc:operation = "delete">protected</lockout-from>
</psm>
</slot>
</node>
</hardware-module>
</config>
</edit-config>
</rpc>

Configure OTS Controller

Procedure


Use the Cisco-IOS-XR-controller-optics-cfg.yang YANG model to configure the parameters of the OTS controller such as ampli-control-mode, ampli-channel-power, ampli-gain, ampli-gain-range, ampli-tilt, channel-power-max-delta, osri, safety-control-mode, rx-low-threshold, tx-low-threshold, rx-voa-attenuation, and tx-voa-attenuation.

Parameter Description
ampli-control-mode

<?xml version="1.0"?>
<rpc message-id="102" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <edit-config>
        <target>
        <candidate/>
        </target>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <interface-configurations
      xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-cfg">
      <interface-configuration>
      <active>act</active>
          <interface-name>Ots0/2/0/0</interface-name>
          <optics xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-controller-optics-cfg">
            <optics-ots-amplifier-control-mode>automatic</optics-ots-amplifier-control-mode>
          </optics>
        </interface-configuration>
      </interface-configurations>
    </config>
  </edit-config>
</rpc>
ampli-channel-power

<?xml version="1.0"?>
<rpc message-id="102" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <edit-config>
        <target>
        <candidate/>
        </target>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <interface-configurations
      xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-cfg">
      <interface-configuration>
      <active>act</active>
          <interface-name>Ots0/2/0/0</interface-name>
          <optics xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-controller-optics-cfg">
            <optics-ots-amplifier-channel-power>-200</optics-ots-amplifier-channel-power>
          </optics>
        </interface-configuration>
      </interface-configurations>
    </config>
  </edit-config>
</rpc>
ampli-gain

<?xml version="1.0"?>
<rpc message-id="102" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <edit-config>
        <target>
        <candidate/>
        </target>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <interface-configurations
      xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-cfg">
      <interface-configuration>
      <active>act</active>
          <interface-name>Ots0/2/0/0</interface-name>
          <optics xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-controller-optics-cfg">
            <optics-ots-amplifier-gain>100</optics-ots-amplifier-gain>
          </optics>
        </interface-configuration>
      </interface-configurations>
    </config>
  </edit-config>
</rpc>
ampli-gain-range

<?xml version="1.0"?>
<rpc message-id="102" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <edit-config>
        <target>
        <candidate/>
        </target>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <interface-configurations
      xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-cfg">
      <interface-configuration>
      <active>act</active>
          <interface-name>Ots0/2/0/0</interface-name>
          <optics xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-controller-optics-cfg">
            <optics-ots-amplifier-gain-range>normal</optics-ots-amplifier-gain-range>
          </optics>
        </interface-configuration>
      </interface-configurations>
    </config>
  </edit-config>
</rpc>
ampli-tilt

<?xml version="1.0"?>
<rpc message-id="102" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <edit-config>
        <target>
        <candidate/>
        </target>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <interface-configurations
      xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-cfg">
      <interface-configuration>
      <active>act</active>
          <interface-name>Ots0/2/0/0</interface-name>
          <optics xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-controller-optics-cfg">
            <optics-ots-amplifier-tilt>-35</optics-ots-amplifier-tilt>
          </optics>
        </interface-configuration>
      </interface-configurations>
    </config>
  </edit-config>
</rpc>
channel-power-max-delta

<?xml version="1.0"?>
<rpc message-id="102" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <edit-config>
        <target>
        <candidate/>
        </target>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <interface-configurations
      xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-cfg">
      <interface-configuration>
      <active>act</active>
          <interface-name>Ots0/2/0/0</interface-name>
          <optics xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-controller-optics-cfg">
            <optics-ots-channel-power-max-delta>100</optics-ots-channel-power-max-delta>
          </optics>
        </interface-configuration>
      </interface-configurations>
    </config>
  </edit-config>
</rpc>
osri

<?xml version="1.0"?>
<rpc message-id="102" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <edit-config>
        <target>
        <candidate/>
        </target>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <interface-configurations
      xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-cfg">
      <interface-configuration>
      <active>act</active>
          <interface-name>Ots0/2/0/0</interface-name>
          <optics xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-controller-optics-cfg">
            <optics-ots-osri>true</optics-ots-osri>
          </optics>
        </interface-configuration>
      </interface-configurations>
    </config>
  </edit-config>
</rpc>
safety-control-mode

<?xml version="1.0"?>
<rpc message-id="102" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <edit-config>
        <target>
        <candidate/>
        </target>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <interface-configurations
      xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-cfg">
      <interface-configuration>
      <active>act</active>
          <interface-name>Ots0/2/0/0</interface-name>
          <optics xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-controller-optics-cfg">
            <optics-ots-safety-control-mode>auto</optics-ots-safety-control-mode>
          </optics>
        </interface-configuration>
      </interface-configurations>
    </config>
  </edit-config>
</rpc>
rx-low-threshold

<?xml version="1.0"?>
<rpc message-id="102" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <edit-config>
        <target>
        <candidate/>
        </target>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <interface-configurations
      xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-cfg">
      <interface-configuration>
      <active>act</active>
          <interface-name>Ots0/2/0/0</interface-name>
          <optics xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-controller-optics-cfg">
            <rx-thresholds>
              <rx-threshold>
                <rx-threshold-type>low</rx-threshold-type>
                <rx-threshold>100</rx-threshold>
              </rx-threshold>
            </rx-thresholds>
          </optics>
        </interface-configuration>
      </interface-configurations>
    </config>
  </edit-config>
</rpc>
tx-low-threshold

<?xml version="1.0"?>
<rpc message-id="102" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <edit-config>
        <target>
        <candidate/>
        </target>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <interface-configurations
      xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-cfg">
      <interface-configuration>
      <active>act</active>
          <interface-name>Ots0/2/0/0</interface-name>
          <optics xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-controller-optics-cfg">
            <tx-thresholds>
              <tx-threshold>
                <tx-threshold-type>low</tx-threshold-type>
                <tx-threshold>100</tx-threshold>
              </tx-threshold>
            </tx-thresholds>
          </optics>
        </interface-configuration>
      </interface-configurations>
    </config>
  </edit-config>
</rpc>
rx-voa-attenuation

<?xml version="1.0"?>
<rpc message-id="102" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <edit-config>
        <target>
        <candidate/>
        </target>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <interface-configurations
      xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-cfg">
      <interface-configuration>
      <active>act</active>
          <interface-name>Ots0/3/0/1</interface-name>
          <optics xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-controller-optics-cfg">
            <optics-ots-rx-voa-attenuation>112</optics-ots-rx-voa-attenuation>
          </optics>
        </interface-configuration>
      </interface-configurations>
    </config>
  </edit-config>
</rpc>
tx-voa-attenuation

<?xml version="1.0"?>
<rpc message-id="102" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <edit-config>
        <target>
        <candidate/>
        </target>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <interface-configurations
      xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-cfg">
      <interface-configuration>
      <active>act</active>
          <interface-name>Ots0/3/0/1</interface-name>
          <optics xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-controller-optics-cfg">
            <optics-ots-tx-voa-attenuation>135</optics-ots-tx-voa-attenuation>
          </optics>
        </interface-configuration>
      </interface-configurations>
    </config>
  </edit-config>
</rpc>

Display Parameters of OTS Controllers

Procedure


Use the Cisco-IOS-XR-controller-ncs1001-ots-oper.yang to display the parameters of OTS controllers. (For example: In case of port 0 of EDFA which is equipped in slot number 2).

Parameter Description
show controllers ots 0/2/0/0
<nc:rpc xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:dbff986e-62fb-41e9-aec5-cef6162150bb">
  <nc:get>
    <nc:filter>
      <ots-oper xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-controller-ncs1001-ots-oper">
        <ots-ports>
          <ots-port>
            <name>Ots0/2/0/0</name>
          </ots-port>
        </ots-ports>
      </ots-oper>
    </nc:filter>
  </nc:get>
</nc:rpc>

Display Parameters of OTS OCH Controllers

Procedure


Use the Cisco-IOS-XR-controller-ncs1001-ots-och-oper.yang to display the parameters of OTS OCH controllers. (For example: In case of port 0 channel 1 of EDFA is equipped in slot 2).

Parameter Description

show controllers ots-och 0/2/0/0/1


<nc:rpc xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:f0e8cc35-d8bc-4550-9c6a-7458e6d2af14"><nc:get>
    <nc:filter>
      <ots-och-oper xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-controller-ncs1001-ots-och-oper">
        <ots-och-ports>
          <ots-och-port>
            <name>Ots-Och0/2/0/0/1</name>
            <ots-och-info>
              <lane-data/>
            </ots-och-info>
          </ots-och-port>
        </ots-och-ports>
      </ots-och-oper>
    </nc:filter>
  </nc:get>
</nc:rpc> 

View PM Parameters for OTS Controllers

Procedure


Use the Cisco-IOS-XR-pmengine-oper.yang YANG model to view the performance monitoring parameters for OTS controllers.

Parameter Example
show controllers ots 0/2/0/0 pm current 15-min optics 1

<?xml version="1.0" ?>
<rpc message-id="8566" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<get>
<filter type="subtree">
      <performance-management xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-pmengine-oper">
        <optics>
          <optics-ports>
            <optics-port>
              <optics-current>
                <optics-minute15>
                  <optics-minute15-optics>
                    <optics-minute15-optic>
                      <number>1</number>
                    </optics-minute15-optic>
                  </optics-minute15-optics>
                </optics-minute15>
              </optics-current>
              <name>Ots0/2/0/0</name>
            </optics-port>
          </optics-ports>
        </optics>
      </performance-management>
</filter>
</get>
</rpc>

OC Support for LLDP on Management Port

Enable LLDP on a Specific Management Interface

Table 2. Feature History

Feature Name

Release

Description

OC (Open Configuration) support for LLDP (Link Layer Discovery Protocol) on Management Port

Cisco IOS XR Release 7.3.1

Open Configuration support for configuring LLDP on management port is available. RPC (Remote Procedure Call) Request and Response messages are used to configure LLDP on management port, which is automated using scripts. This makes the task, less time-consuming.

Procedure


You can enable LLDP on a specific management interface such as MgmtEth0/RP0/CPU0/1 using the following code:

Edit-Config
RPC Request

<nc:rpc xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:a3d3c1e9-1cd1-4348-b7ea-4349d1cfcc32"><nc:edit-config>

<nc:target>

<nc:candidate/>

</nc:target>

<nc:config>

<lldp xmlns="http://ops.openconfig.net/branches/models/master/docs/openconfig-lldp.html"

<interfaces>

<interface>

<name>MgmtEth0/RP0/CPU0/1</name>

<config>

<name>MgmtEth0/RP0/CPU0/1</name>

<enabled nc:operation="create">true</enabled>

</config>

</interface>

</interfaces>

</lldp>

</nc:config>

</nc:edit-config>

</nc:rpc>

Edit-Config
RPC Response

<?xml version="1.0" ?>

<rpc-reply message-id="urn:uuid:a3d3c1e9-1cd1-4348-b7ea-4349d1cfcc32" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">

<ok/>

</rpc-reply>


Disable LLDP on a Specific Management Interface

Procedure


You can disable LLDP on a specific management interface such as MgmtEth0/RP0/CPU0/1 using the following code:

Edit-Config
RPC Request

<nc:rpc xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:3d076d9b-2fa9-4930-9f0c-7cbdc463a188"><nc:edit-config>

<nc:target>

<nc:candidate/>

</nc:target>

<nc:config>

<lldp xmlns="http://ops.openconfig.net/branches/models/master/docs/openconfig-lldp.html">

<interfaces>

<interface>

<name>MgmtEth0/RP0/CPU0/1</name>

<config>

<name>MgmtEth0/RP0/CPU0/1</name>

<enabled nc:operation="delete">true</enabled>

</config>

</interface>

</interfaces>

</lldp>

</nc:config>

</nc:edit-config>

</nc:rpc>

Edit-Config
RPC Response

<?xml version="1.0" ?>

<rpc-reply message-id="urn:uuid:3d076d9b-2fa9-4930-9f0c-7cbdc463a188" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">

<ok/>

</rpc-reply>


Enable LLDP Globally

You can enable LLDP globally using the following code:

Procedure


Edit-Config
RPC Request

<nc:rpc xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:a4238d46-3891-48e0-b819-a8f31067d251">

<nc:edit-config>

<nc:target>

<nc:candidate/>

</nc:target>

<nc:config>

<lldp xmlns="http://ops.openconfig.net/branches/models/master/docs/openconfig-lldp.html">

<config>

<enabled nc:operation="create">true</enabled>

</config>

</lldp>

</nc:config>

</nc:edit-config>

</nc:rpc>

Edit-Config
RPC Response

<?XML version="1.0" ?>

<rpc-reply message-id="urn:uuid:a4238d46-3891-48e0-b819-a8f31067d251" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">

<ok/>

</rpc-reply>


Disable LLDP Globally

You can disable LLDP globally using the following code:

Procedure


Edit-Config
RPC Request

<nc:rpc xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:a4238d46-3891-48e0-b819-a8f31067d251">

<nc:edit-config>

<nc:target>

<nc:candidate/>

</nc:target>

<nc:config>

<lldp xmlns="http://ops.openconfig.net/branches/models/master/docs/openconfig-lldp.html">

<config>

<enabled nc:operation="remove">true</enabled>

</config>

</lldp>

</nc:config>

</nc:edit-config>

</nc:rpc>

Edit-Config
RPC Response

<?xml version="1.0" ?>

<rpc-reply message-id="urn:uuid:a4238d46-3891-48e0-b819-a8f31067d251" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">

<ok/>

</rpc-reply>


Get LLDP Configuration

Procedure


You can get the LLDP configuration using the following code:

Get-Config
RPC Request

<nc:rpc xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:f9a226c6-b7d1-4d24-bf76-72b5086a0f35">

<nc:get-config>

<nc:source>

<nc:running/>

</nc:source>

<nc:filter>

<lldp xmlns="http://ops.openconfig.net/branches/models/master/docs/openconfig-lldp.html">

<config>

<enabled>true</enabled>

</config>

</lldp>

</nc:filter>

</nc:get-config>

</nc:rpc>

Get-Config
RPC Response

<?xml version="1.0" ?>

<rpc-reply message-id="urn:uuid:f9a226c6-b7d1-4d24-bf76-72b5086a0f35" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">

<data>

<lldp xmlns="http://ops.openconfig.net/branches/models/master/docs/openconfig-lldp.html">

<config>

<enabled>true</enabled>

<hello-timer>30</hello-timer>

</config>

</lldp>

</data>

</rpc-reply>


Support for Netconf for Read, Write, Execute or Administrative Commands

Table 3. Feature History

Feature Name

Release

Description

NETCONF Support for READ, WRITE, and Execute or Administrative Commands.

Cisco IOS XR Release 7.3.1

Support for IPv4 and IPv6 Ping test using the Cisco-IOS-XR-ping-act YANG model, instead of using CLI commands, is available. RPC (Remote Procedure Call) Request and Response messages are used to do the ping test, which is automated using scripts. This enables you to perform the ping test in a less time-consuming manner and to enhance network scalability.

IPv4 PING Over NETCONF

Procedure


Use the Cisco-IOS-XR-ping-act YANG model to do the ping test to the destination IPv4 addresses.The following example shows the RPC request and RPC response messages for a successful ping test. The destination host is reachable and the success rate is 100%.

YANG Model Example
Cisco-IOS-XR-ping-act.yang

<nc:rpc xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:28170002-365f-45be-a8e1-e1f54d8b64b5"><ping xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-ping-act">

<destination>

<destination>10.127.60.1</destination>

</destination>

</ping>

</nc:rpc>

<rpc-reply xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:28170002-365f-45be-a8e1-e1f54d8b64b5">

<ping-response xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-ping-act">

<ipv4>

<destination>10.127.60.1</destination>

<data-size>100</data-size>

<timeout>2</timeout>

<pattern>abcd</pattern>

<rotate-pattern>false</rotate-pattern>

<replies>

<reply>

<reply-index>1</reply-index>

<result>!</result>

</reply>

<reply>

<reply-index>2</reply-index>

<result>!</result>

</reply>

<reply>

<reply-index>3</reply-index>

<result>!</result>

</reply>

<reply>

<reply-index>4</reply-index>

<result>!</result>

</reply>

<reply>

<reply-index>5</reply-index>

<result>!</result>

</reply>

</replies>

<hits>5</hits>

<total>5</total>

<success-rate>100</success-rate>

<rtt-min>1</rtt-min>

<rtt-avg>1</rtt-avg>

<rtt-max>2</rtt-max>

</ipv4>

</ping-response>

</rpc-reply>

The following example shows the RPC request and RPC response messages for a failure ping test. The destination host is not reachable and the success rate is 0%.

YANG model Example
Cisco-IOS-XR-ping-act.yang

<nc:rpc xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:28170002-365f-45be-a8e1-e1f54d8b64b5"><ping xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-ping-act">

<destination>

<destination>10.127.60.1</destination>

</destination>

</ping>

</nc:rpc>

<rpc-reply xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:02800209-6ebf-4955-8588-f6cdfd6f2750">

<ping-response xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-ping-act">

<ipv4>

<destination>10.127.60.171</destination>

<data-size>100</data-size>

<timeout>2</timeout>

<pattern>abcd</pattern>

<rotate-pattern>false</rotate-pattern>

<replies>

<reply>

<reply-index>1</reply-index>

<result>.</result>

</reply>

<reply>

<reply-index>2</reply-index>

<result>.</result>

</reply>

<reply>

<reply-index>3</reply-index>

<result>.</result>

</reply>

<reply>

<reply-index>4</reply-index>

<result>.</result>

</reply>

<reply>

<reply-index>5</reply-index>

<result>.</result>

</reply>

</replies>

<hits>0</hits>

<total>5</total>

<success-rate>0</success-rate>

</ipv4>

</ping-response>

</rpc-reply>

Note

 

In the above examples, 10.127.60.1 is the IPv4 address of the node.


IPv6 PING Over NETCONF

Before you begin

Table 4. Feature History

Feature Name

Release

Description

NETCONF Support for READ, WRITE, and Execute or Administrative Commands.

Cisco IOS XR Release 7.3.1

Support for IPv4 and IPv6 Ping test using the Cisco-IOS-XR-ping-act YANG model, instead of using CLI commands, is available. RPC (Remote Procedure Call) Request and Response messages are used to do the ping test, which is automated using scripts. This enables you to perform the ping test in a less time-consuming manner and to enhance network scalability.

Procedure


Use the Cisco-IOS-XR-ping-act YANG model to do the ping test to the destination IPv6 addresses. The following example shows the RPC request and RPC response messages for a successful ping test. The destination host is reachable and the success rate is 100%.

YANG model Example
Cisco-IOS-XR-ping-act.yang

<nc:rpc xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:28170002-365f-45be-a8e1-e1f54d8b64b5"><ping xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-ping-act">

<destination>

<destination>2001:420:5446:2014::281:178</destination>

</destination>

</ping>

</nc:rpc>

<rpc-reply xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:15798adc-f9f9-41b2-9aa5-a1c88dd788e8">

<ping-response xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-ping-act">

<ipv6>

<destination>2001:420:5446:2014::281:178</destination>

<repeat-count>50</repeat-count>

<data-size>100</data-size>

<timeout>2</timeout>

<pattern>abcd</pattern>

<rotate-pattern>false</rotate-pattern>

<replies>

<reply>

<reply-index>1</reply-index>

<result>!</result>

</reply>

<reply>

<reply-index>2</reply-index>

<result>!</result>

</reply>

<reply>

<reply-index>3</reply-index>

<result>!</result>

</reply>

<reply>

<reply-index>4</reply-index>

<result>!</result>

</reply>

<reply>

<reply-index>5</reply-index>

<result>!</result>

</reply>

</replies>

<hits>5</hits>

<total>5</total>

<success-rate>100</success-rate>

<rtt-min>1</rtt-min>

<rtt-avg>1</rtt-avg>

<rtt-max>2</rtt-max>

</ipv6>

</ping-response>

</rpc-reply>

The following example shows the RPC request and RPC response messages for a failure ping test. The destination host is not reachable and the success rate is 0%.

YANG model Example
Cisco-IOS-XR-ping-act.yang

<nc:rpc xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:28170002-365f-45be-a8e1-e1f54d8b64b5"><ping xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-ping-act">

<destination>

<destination>2001:420:5446:2014::281:178</destination>

</destination>

</ping>

</nc:rpc>

<rpc-reply xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:02800209-6ebf-4955-8588-f6cdfd6f2750">

<ping-response xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-ping-act">

<ipv6>

<destination>2001:420:5446:2014::281:178</destination>

<data-size>100</data-size>

<timeout>2</timeout>

<pattern>abcd</pattern>

<replies>

<reply>

<reply-index>1</reply-index>

<result>.</result>

</reply>

<reply>

<reply-index>2</reply-index>

<result>.</result>

</reply>

<reply>

<reply-index>3</reply-index>

<result>.</result>

</reply>

<reply>

<reply-index>4</reply-index>

<result>.</result>

</reply>

<reply>

<reply-index>5</reply-index>

<result>.</result>

</reply>

</replies>

<hits>0</hits>

<total>5</total>

<success-rate>0</success-rate>

</ipv6>

</ping-response>

</rpc-reply>

Note

 

In the above examples, 2001:420:5446:2014::281:178 is the IPv6 address of the node.