NETCONF /YANG with a 9800 Part 2: Advanced Netconf Explorer

Now that we have the 9800 setup ready to use Netconf lets look at a nice little tool call the Advanced Netconf Explorer. This tool is really handy to see what calls you can make and what data you get back, much like POSTMAN for REST APIs is used.

I find this tool useful to walk through how I am going to get the data/ what data I can get before I consume it via Python or other programming language.

Ok how to get the Advanced Netconf Explorer installed:

The Explorer runs on a Docker container, so make sure you have Docker installed. Having a Mac I installed the Docker Desktop on MAC

I then cloned the files Advanced Netconf Explorer from GITHUB

git clone https://github.com/cisco-ie/anx.git

Then made sure Docker Desktop was open I ran the following commands

cd anx
docker build -t netconf-explorer .
docker run --name netconf-exlorer -d -p 9269:8080 netconf-explorer

this then sets up the explorer now how to access it? well thats quite simple just go to http://localhost:9269

To login to the controller enter the 9800s IP address : the port number of 830 (unless you changed it in part 1 for some reason then enter that). So for example 10.0.0.10:830. Then add your username and password. And press login.

Now it will take a little while to parse the schema of the 9800

when its completed it will look like this:

Now on the right hand side there is a list of all the YANG models and you can search them, expand them to see whats in them:

When you want to test one of these out click on the model (1) and then press the NETCONF Console button (2)

You will see this

Press the <get> button will prepare the NETCONF GET call and then press the Send Request Button to get the data from the 9800

Now that the data is back in XML format you can start looking for what you might require. Now as i said I use this more to see what information I get back easily to be consumed in a script of some kind.

From this one call the full details we get back are:

<data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <access-point-oper-data xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-wireless-access-point-oper">
    <radio-oper-data>
      <wtp-mac>f8:0f:6f:15:27:e0</wtp-mac>
      <radio-slot-id>0</radio-slot-id>
      <slot-id>0</slot-id>
      <radio-type>radio-80211bg</radio-type>
      <admin-state>enabled</admin-state>
      <oper-state>radio-down</oper-state>
      <radio-mode>radio-mode-local</radio-mode>
      <radio-sub-mode>radio-sub-mode-auto</radio-sub-mode>
      <radio-subtype>ap-radio-subtype-main</radio-subtype>
      <radio-subband>radio-sub-band-all</radio-subband>
      <current-band-id>0</current-band-id>
      <current-active-band>dot11-5-ghz-band</current-active-band>
      <xor-radio-mode>xor-radio-mode-local</xor-radio-mode>
      <phy-ht-cfg>
        <cfg-data>
          <ht-enable>3</ht-enable>
          <phy-ht-cfg-config-type>config-auto</phy-ht-cfg-config-type>
          <curr-freq>1</curr-freq>
          <chan-width>20</chan-width>
          <ext-chan>0</ext-chan>
          <vht-enable>true</vht-enable>
          <rrm-channel-change-reason>chan-change-local</rrm-channel-change-reason>
        </cfg-data>
      </phy-ht-cfg>
      <phy-ht-cap>
        <data>
          <vht-capable>false</vht-capable>
          <ht-capable>true</ht-capable>
        </data>
      </phy-ht-cap>
      <xor-phy-ht-cap>
        <data>
          <vht-capable>false</vht-capable>
          <ht-capable>false</ht-capable>
        </data>
      </xor-phy-ht-cap>
      <phy-he-cap>
        <data>
          <he-enabled>true</he-enabled>
          <he-capable>true</he-capable>
        </data>
      </phy-he-cap>
      <chan-pwr-info>
        <data>
          <antenna-gain>1</antenna-gain>
          <int-antenna-gain>6</int-antenna-gain>
          <ext-antenna-gain>0</ext-antenna-gain>
        </data>
      </chan-pwr-info>
      <antenna-pid>N/A</antenna-pid>
      <radio-band-info>
        <band-id>0</band-id>
        <regulatory-domain>-A</regulatory-domain>
        <phy-tx-pwr-cfg>
          <cfg-data>
            <phy-tx-power-config-type>config-auto</phy-tx-power-config-type>
            <current-tx-power-level>1</current-tx-power-level>
          </cfg-data>
        </phy-tx-pwr-cfg>
        <phy-tx-pwr-lvl-cfg>
          <cfg-data>
            <curr-tx-power-in-dbm>23</curr-tx-power-in-dbm>
          </cfg-data>
        </phy-tx-pwr-lvl-cfg>
        <antenna-cfg>
          <cfg-data>
            <diversity-selection>antenna-diversity-enabled</diversity-selection>
            <antenna-mode>antenna-mode-omni</antenna-mode>
            <num-of-antennas>4</num-of-antennas>
          </cfg-data>
        </antenna-cfg>
        <sia-params>
          <is-rptnc-present>false</is-rptnc-present>
          <is-dart-present>false</is-dart-present>
        </sia-params>
      </radio-band-info>
      <reg-domain-check-status>regulatory-domain-check-status-set</reg-domain-check-status>
      <slot-antenna-type>internal-antenna</slot-antenna-type>
      <dot11n-mcs-rates>dot11n-mcs-rate-zero dot11n-mcs-rate-one dot11n-mcs-rate-two dot11n-mcs-rate-three dot11n-mcs-rate-four dot11n-mcs-rate-five dot11n-mcs-rate-six dot11n-mcs-rate-seven dot11n-mcs-rate-eight dot11n-mcs-rate-nine dot11n-mcs-rate-ten dot11n-mcs-rate-eleven dot11n-mcs-rate-twelve dot11n-mcs-rate-thirteen dot11n-mcs-rate-fourteen dot11n-mcs-rate-fifteen dot11n-mcs-rate-sixteen dot11n-mcs-rate-seventeen dot11n-mcs-rate-eighteen dot11n-mcs-rate-nineteen dot11n-mcs-rate-twenty dot11n-mcs-rate-twenty-one dot11n-mcs-rate-twenty-two dot11n-mcs-rate-twenty-three dot11n-mcs-rate-twenty-four dot11n-mcs-rate-twenty-five dot11n-mcs-rate-twenty-six dot11n-mcs-rate-twenty-seven dot11n-mcs-rate-twenty-eight dot11n-mcs-rate-twenty-nine dot11n-mcs-rate-thirty dot11n-mcs-rate-thirty-one</dot11n-mcs-rates>
    </radio-oper-data>
    <radio-oper-data>
      <wtp-mac>f8:0f:6f:15:27:e0</wtp-mac>
      <radio-slot-id>1</radio-slot-id>
      <slot-id>1</slot-id>
      <radio-type>radio-80211a</radio-type>
      <admin-state>enabled</admin-state>
      <oper-state>radio-down</oper-state>
      <radio-mode>radio-mode-local</radio-mode>
      <radio-sub-mode>radio-sub-mode-auto</radio-sub-mode>
      <radio-subtype>ap-radio-subtype-main</radio-subtype>
      <radio-subband>radio-sub-band-all</radio-subband>
      <current-band-id>1</current-band-id>
      <current-active-band>dot11-5-ghz-band</current-active-band>
      <xor-radio-mode>xor-radio-mode-local</xor-radio-mode>
      <phy-ht-cfg>
        <cfg-data>
          <ht-enable>1</ht-enable>
          <phy-ht-cfg-config-type>config-auto</phy-ht-cfg-config-type>
          <curr-freq>64</curr-freq>
          <chan-width>20</chan-width>
          <ext-chan>0</ext-chan>
          <vht-enable>true</vht-enable>
          <rrm-channel-change-reason>chan-change-local</rrm-channel-change-reason>
        </cfg-data>
      </phy-ht-cfg>
      <phy-ht-cap>
        <data>
          <vht-capable>true</vht-capable>
          <ht-capable>true</ht-capable>
        </data>
      </phy-ht-cap>
      <xor-phy-ht-cap>
        <data>
          <vht-capable>false</vht-capable>
          <ht-capable>false</ht-capable>
        </data>
      </xor-phy-ht-cap>
      <phy-he-cap>
        <data>
          <he-enabled>true</he-enabled>
          <he-capable>true</he-capable>
        </data>
      </phy-he-cap>
      <chan-pwr-info>
        <data>
          <antenna-gain>1</antenna-gain>
          <int-antenna-gain>10</int-antenna-gain>
          <ext-antenna-gain>0</ext-antenna-gain>
        </data>
      </chan-pwr-info>
      <antenna-pid>N/A</antenna-pid>
      <radio-band-info>
        <band-id>1</band-id>
        <regulatory-domain>-B</regulatory-domain>
        <phy-tx-pwr-cfg>
          <cfg-data>
            <phy-tx-power-config-type>config-auto</phy-tx-power-config-type>
            <current-tx-power-level>1</current-tx-power-level>
          </cfg-data>
        </phy-tx-pwr-cfg>
        <phy-tx-pwr-lvl-cfg>
          <cfg-data>
            <curr-tx-power-in-dbm>20</curr-tx-power-in-dbm>
          </cfg-data>
        </phy-tx-pwr-lvl-cfg>
        <antenna-cfg>
          <cfg-data>
            <diversity-selection>antenna-diversity-enabled</diversity-selection>
            <antenna-mode>antenna-mode-omni</antenna-mode>
            <num-of-antennas>4</num-of-antennas>
          </cfg-data>
        </antenna-cfg>
        <sia-params>
          <is-rptnc-present>false</is-rptnc-present>
          <is-dart-present>false</is-dart-present>
        </sia-params>
      </radio-band-info>
      <reg-domain-check-status>regulatory-domain-check-status-set</reg-domain-check-status>
      <slot-antenna-type>internal-antenna</slot-antenna-type>
      <dot11n-mcs-rates>dot11n-mcs-rate-zero dot11n-mcs-rate-one dot11n-mcs-rate-two dot11n-mcs-rate-three dot11n-mcs-rate-four dot11n-mcs-rate-five dot11n-mcs-rate-six dot11n-mcs-rate-seven dot11n-mcs-rate-eight dot11n-mcs-rate-nine dot11n-mcs-rate-ten dot11n-mcs-rate-eleven dot11n-mcs-rate-twelve dot11n-mcs-rate-thirteen dot11n-mcs-rate-fourteen dot11n-mcs-rate-fifteen dot11n-mcs-rate-sixteen dot11n-mcs-rate-seventeen dot11n-mcs-rate-eighteen dot11n-mcs-rate-nineteen dot11n-mcs-rate-twenty dot11n-mcs-rate-twenty-one dot11n-mcs-rate-twenty-two dot11n-mcs-rate-twenty-three dot11n-mcs-rate-twenty-four dot11n-mcs-rate-twenty-five dot11n-mcs-rate-twenty-six dot11n-mcs-rate-twenty-seven dot11n-mcs-rate-twenty-eight dot11n-mcs-rate-twenty-nine dot11n-mcs-rate-thirty dot11n-mcs-rate-thirty-one</dot11n-mcs-rates>
    </radio-oper-data>
    <capwap-data>
      <wtp-mac>f8:0f:6f:15:27:e0</wtp-mac>
      <ip-addr>10.2.0.52</ip-addr>
      <name>APName01</name>
      <device-detail>
        <static-info>
          <board-data>
            <wtp-serial-num>0</wtp-serial-num>
            <wtp-enet-mac>70:69:5a:74:8b:5c</wtp-enet-mac>
          </board-data>
          <board-data-opt>
            <join-priority>1</join-priority>
          </board-data-opt>
          <descriptor-data>
            <encryption-capabilities>true</encryption-capabilities>
          </descriptor-data>
          <ap-prov>
            <is-universal>false</is-universal>
            <universal-prime-status>Unprimed</universal-prime-status>
          </ap-prov>
          <ap-models>
            <model>C9115AXI-B</model>
          </ap-models>
          <num-ports>1</num-ports>
          <num-slots>2</num-slots>
          <wtp-model-type>90</wtp-model-type>
          <ap-capability>bridge-mode-capable cap-three-spatial-streams-capable antenna-selection-restricted-capable avc-cnf-capable rxsop-threshold-capable fabric-capability barbados-internal-antenna-sku-capable remote-lan-capable dot11ac-160mhz-channel-width-capable avc-fnf-fabric-capable ap-cts-capable fips-capable is-dot1x-port-auth-capable ap-tracing-capable ap-wpa3-capable office-extend-capable eth2-rlan-capable ap-mewlc-capable sniffer-mode-capable icap-partial-capable icap-anomaly-detection-capable icp-statistics-capable icap-feature-capable</ap-capability>
          <is-mm-opt>false</is-mm-opt>
        </static-info>
        <dynamic-info>
          <led-state-enabled>true</led-state-enabled>
          <reset-button-state>false</reset-button-state>
        </dynamic-info>
        <wtp-version>
          <sw-ver>
            <version>16</version>
            <release>12</release>
            <maint>3</maint>
            <build>13</build>
          </sw-ver>
        </wtp-version>
      </device-detail>
      <ap-lag-enabled>false</ap-lag-enabled>
      <ap-location>
        <floor>0</floor>
        <location>1933 - WYRDC</location>
      </ap-location>
      <ap-services>
        <monitor-mode-opt-type>mode-type-none</monitor-mode-opt-type>
      </ap-services>
      <tag-info>
        <policy-tag-info>
          <policy-tag-name>default-policy-tag</policy-tag-name>
        </policy-tag-info>
        <site-tag>
          <site-tag-name>default-site-tag</site-tag-name>
        </site-tag>
        <rf-tag>
          <rf-tag-name>default-rf-tag</rf-tag-name>
        </rf-tag>
        <filter-info>
          <filter-name/>
        </filter-info>
      </tag-info>
      <tunnel>
        <preferred-mode>preferred-mode-ipv4</preferred-mode>
      </tunnel>
      <external-module-data>
        <xm-data>
          <is-module-present>false</is-module-present>
        </xm-data>
      </external-module-data>
      <ipv6-joined>0</ipv6-joined>
      <ap-state>
        <ap-admin-state>adminstate-disabled</ap-admin-state>
        <ap-operation-state>registered</ap-operation-state>
      </ap-state>
      <ap-mode-data>
        <ap-sub-mode>ap-sub-mode-none</ap-sub-mode>
        <wtp-mode>local-mode</wtp-mode>
        <ap-fabric-data>
          <is-fabric-ap>false</is-fabric-ap>
        </ap-fabric-data>
      </ap-mode-data>
      <ap-time-info>
        <boot-time>2020-07-14T02:57:31+00:00</boot-time>
        <join-time>2020-07-14T02:58:52.817261+00:00</join-time>
      </ap-time-info>
      <country-code>US </country-code>
      <ap-security-data>
        <cert-type>wireless-cert-mic</cert-type>
      </ap-security-data>
      <num-radio-slots>2</num-radio-slots>
      <dart-is-connected>false</dart-is-connected>
      <is-master>false</is-master>
      <cdp-enable>true</cdp-enable>
      <ap-stationing-type>indoor-ap</ap-stationing-type>
      <reboot-stats>
        <reboot-reason>ap-reboot-reason-none</reboot-reason>
      </reboot-stats>
    </capwap-data>
    <ap-name-mac-map>
      <wtp-name>APName01</wtp-name>
      <wtp-mac>f8:0f:6f:15:27:e0</wtp-mac>
      <eth-mac>70:69:5a:74:8b:5c</eth-mac>
    </ap-name-mac-map>
    <ethernet-mac-wtp-mac-map>
      <ethernet-mac>70:69:5a:74:8b:5c</ethernet-mac>
      <wtp-mac>f8:0f:6f:15:27:e0</wtp-mac>
    </ethernet-mac-wtp-mac-map>
    <radio-oper-stats>
      <ap-mac>f8:0f:6f:15:27:e0</ap-mac>
      <slot-id>0</slot-id>
      <aid-user-list>0</aid-user-list>
      <tx-fragment-count>0</tx-fragment-count>
      <failed-count>0</failed-count>
      <rx-fragment-count>0</rx-fragment-count>
      <tx-frame-count>0</tx-frame-count>
    </radio-oper-stats>
    <radio-oper-stats>
      <ap-mac>f8:0f:6f:15:27:e0</ap-mac>
      <slot-id>1</slot-id>
      <aid-user-list>0</aid-user-list>
      <tx-fragment-count>0</tx-fragment-count>
      <failed-count>0</failed-count>
      <rx-fragment-count>0</rx-fragment-count>
      <tx-frame-count>0</tx-frame-count>
    </radio-oper-stats>
    <ethernet-if-stats>
      <wtp-mac>f8:0f:6f:15:27:e0</wtp-mac>
      <if-index>0</if-index>
      <if-name>GigabitEthernet0</if-name>
      <rx-pkts>286</rx-pkts>
      <tx-pkts>58</tx-pkts>
    </ethernet-if-stats>
    <qos-global-stats>
      <qos-client-voice-stats>
        <total-num-of-tspec-rcvd>0</total-num-of-tspec-rcvd>
        <new-tspec-from-assoc-req>0</new-tspec-from-assoc-req>
        <tspec-renewal-from-assoc-req>0</tspec-renewal-from-assoc-req>
        <new-tspec-as-add-ts>0</new-tspec-as-add-ts>
        <tspec-renewal-from-add-ts>0</tspec-renewal-from-add-ts>
        <tspec-process-failed-get-rec>0</tspec-process-failed-get-rec>
        <total-sip-invite-on-caller>0</total-sip-invite-on-caller>
        <total-sip-invite-on-callee>0</total-sip-invite-on-callee>
        <total-num-of-call-report>0</total-num-of-call-report>
        <total-sip-failure-trap-send>0</total-sip-failure-trap-send>
        <num-of-calls-accepted>0</num-of-calls-accepted>
        <num-of-calls-rejected-insuf-bw>0</num-of-calls-rejected-insuf-bw>
        <num-of-calls-rejected-qos>0</num-of-calls-rejected-qos>
        <num-of-calls-rejected-phy-rate>0</num-of-calls-rejected-phy-rate>
        <num-of-calls-rej-invalid-tspec>0</num-of-calls-rej-invalid-tspec>
        <num-of-roam-calls-accepted>0</num-of-roam-calls-accepted>
        <num-of-roam-calls-rejected>0</num-of-roam-calls-rejected>
        <num-of-active-sip-calls>0</num-of-active-sip-calls>
        <num-of-active-tspec-calls>0</num-of-active-tspec-calls>
      </qos-client-voice-stats>
    </qos-global-stats>
    <oper-data>
      <wtp-mac>f8:0f:6f:15:27:e0</wtp-mac>
      <ap-antenna-band-mode>ant-band-mode-unknown</ap-antenna-band-mode>
      <link-encryption-enabled>false</link-encryption-enabled>
      <ap-ip-data>
        <ap-prefix>0</ap-prefix>
        <mtu>1485</mtu>
        <is-static-ap-ipaddr>false</is-static-ap-ipaddr>
        <domain-name/>
        <ap-ip-addr>10.2.0.52</ap-ip-addr>
        <ap-ipv6-addr>::</ap-ipv6-addr>
        <ap-ip-netmask>255.255.255.0</ap-ip-netmask>
        <ap-ip-gateway>10.2.0.1</ap-ip-gateway>
        <ap-ipv6-gateway>::</ap-ipv6-gateway>
        <ap-name-server-type>unknown</ap-name-server-type>
        <ap-ipv6-method>unknown-method</ap-ipv6-method>
      </ap-ip-data>
      <ap-prime-info>
        <primary-controller-name>ec1entwlc036</primary-controller-name>
        <secondary-controller-name>eq4entwlc036</secondary-controller-name>
        <primary-controller-ip-addr>10.114.152.12</primary-controller-ip-addr>
        <secondary-controller-ip-addr>10.115.152.12</secondary-controller-ip-addr>
        <tertiary-controller-name/>
        <tertiary-controller-ip-addr>0.0.0.0</tertiary-controller-ip-addr>
        <fallback-enabled>true</fallback-enabled>
      </ap-prime-info>
      <ap-mgmt>
        <is-telnet-enabled>false</is-telnet-enabled>
        <is-ssh-enabled>true</is-ssh-enabled>
      </ap-mgmt>
      <ap-pow>
        <power-injector-sel>pwrinj-selection-unknown</power-injector-sel>
        <power-injector-macaddr>00:00:00:00:00:00</power-injector-macaddr>
        <pre-std-switch-enabled>false</pre-std-switch-enabled>
        <power-injector-enabled>false</power-injector-enabled>
        <power-mode>dot11-set-high-pwr</power-mode>
      </ap-pow>
      <ap-sys-stats>
        <cpu-usage>0</cpu-usage>
        <memory-usage>0</memory-usage>
      </ap-sys-stats>
      <ipv4-tcp-mss>
        <tcp-adjust-mss-size>1250</tcp-adjust-mss-size>
      </ipv4-tcp-mss>
      <ipv6-tcp-mss>
        <tcp-adjust-mss-size>1250</tcp-adjust-mss-size>
      </ipv6-tcp-mss>
      <link-audit>
        <linkaudit-delay-time>0</linkaudit-delay-time>
        <linkaudit-max-time>0</linkaudit-max-time>
        <linkaudit-min-time>0</linkaudit-min-time>
      </link-audit>
      <retransmit>
        <count>5</count>
      </retransmit>
      <ap-ntp-server-info-cfg>
        <ntp-server-address>0.0.0.0</ntp-server-address>
      </ap-ntp-server-info-cfg>
    </oper-data>
    <cdp-cache-data>
      <mac-addr>f8:0f:6f:15:27:e0</mac-addr>
      <cdp-cache-device-id>3456fe2d4c8b</cdp-cache-device-id>
      <ap-name>APName01</ap-name>
      <version>2</version>
      <cdp-cache-ap-address>10.2.0.52</cdp-cache-ap-address>
      <ip-address>
        <ip-address-value>192.168.1.161</ip-address-value>
      </ip-address>
      <wtp-mac-addr>f8:0f:6f:15:27:e0</wtp-mac-addr>
      <device-index>1</device-index>
    </cdp-cache-data>
  </access-point-oper-data>
</data>

In the next post we will look at how we get this data from the 9800 via a simple python script.

One thought on “NETCONF /YANG with a 9800 Part 2: Advanced Netconf Explorer

  1. Pingback: NETCONF /YANG with a 9800 Controller – THE WLAN

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s