scripting:netconf
Netconf xml:
Fun facts:
- XML is a superset of HTML
- Netconf is inspired in XML but is not 100% xml
<?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 IOS-XE:
ip https secure-server username <name> privilege 15 password <pass> netconf-yang
Configure netconf in IOS-XR:
crypto key generate rsa ssh server v2 ssh server netconf netconf agent tty netconf-yang agent shh
Other IOS-XR commands:
show commit changes diff rollback configuration last # from the root level
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.txt · Last modified: by 127.0.0.1
