User Tools

Site Tools


scripting:netconf

This is an old revision of the document!


Netconf xml:
Fun facts:

  • XML is a superset of HTML
  • Netconf is inspired in XML but is not 100% xml

http://www.cisco.com/c/en/us/td/docs/switches/datacenter/sw/nx-os/xml/user/guide/nxos_xml_interface/using.html

<?xml version="1.0"?>
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"xmlns:cpi="http://www.cisco.com/cpi_10/schema" 
message-id="101">
 <get-config> 
      <source> 
           <running/> 
       </source> 
        <filter> 
            <config-format-text-cmd>
             <text-filter-spec>
      interface Loopback113
               </text-filter-spec>
            </config-format-text-cmd> 
        </filter> 
    </get-config> 
</rpc>]]>]]>

BASIC NETCONF TEST:
To test netconf from a linux client:

(client)# 
python -m pip install netconf-console
netconf-console --host=<ip> --port=830 --user=<user> --password=<pass>

Configure netconf in IOX-XE:

ip https secure-server
username <name> privilege 15 password <pass>
netconf-yang

Configure netconf in IOX-XR:

crypto key generate rsa
ssh server v2
ssh server netconf
netconf agent tty
netconf-yang agent shh

YANG visualization

  • DevNet yangexplorer (legacy)
  • Advanced NETCONF Explorer (anx) (new)

NETCONF on IOS-XE using ncclient


RESTCONF

  • Restconf is json and uses https as transport.
  • So to test restconf I just use postman
  • The resource part normally has /restconf/
scripting/netconf.1668590397.txt.gz · Last modified: (external edit)