-
Notifications
You must be signed in to change notification settings - Fork 0
Debug
This is usually done via cli. To connect to the NETCONF subsystem of a device:
ssh -s (<user>@)<device_ip_or_hostname> -p <netconf_port_eg.22 or 830> netconf
This assumes that the device NETCONF configuration guidelines have been followed and NETCONF is enabled on the deivce. If that fails, it's possible that you need to review the port at which NETCONF is listening for connections. This is done by changing the "-p " on the above command.
Depending on whether password or ssh key access is configured you may get a password prompt. The successful completion of the process will return a hello message from the device along with its capabilities:
<!-- No zombies were killed during the creation of this user interface -->
<!-- user user, class j-fullrights -->
<hello>
<capabilities>
<capability>urn:ietf:params:xml:ns:netconf:base:1.0</capability>
<capability>urn:ietf:params:xml:ns:netconf:capability:candidate:1.0</capability>
<capability>urn:ietf:params:xml:ns:netconf:capability:confirmed-commit:1.0</capability>
<capability>urn:ietf:params:xml:ns:netconf:capability:validate:1.0</capability>
<capability>urn:ietf:params:xml:ns:netconf:capability:url:1.0?protocol=http,ftp,file</capability>
<capability>http://xml.juniper.net/netconf/junos/1.0</capability>
<capability>http://xml.juniper.net/dmi/system/1.0</capability>
</capabilities>
<session-id>2860</session-id>
</hello>
]]>]]>
At this point you can start issuing NETCONF commands.
Provided the NETCONF session is up (follow previous paragraph), you can get the device configuration:
<rpc>
<get-config>
<source>
<running/>
</source>
</get-config>
</rpc>
You should receive a response from the device with the configuration in XML format:
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/12.1R4/junos">
<data>
<configuration xmlns="http://xml.juniper.net/xnm/1.1/xnm">
<version>12.1R4.7</version>
<system>
<host-name>test.ncclient</host-name>
<domain-name>ncclient.org</domain-name>
<time-zone>Europe/Bern</time-zone>
<no-redirects/>
...
...
</policy-statement>
</policy-options>
</configuration>
</data>
</rpc-reply>