cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2346
Views
0
Helpful
6
Replies

NETCONF Functionality in Cisco ISR 2911

adampavlidis1
Level 1
Level 1

Hello,

I am trying to experiment with NETCONF on a Cisco ISR 2911 (IOS Version 15.4(1)T1) .

I enabled ssh2 and configured netconf as described here.

Afterwards it is possible to initiate a netconf session by invoking the netconf subsystem (ssh -2 <host>@<ip> -s netconf).

Immediately after, a HELLO in XML format is sent from the device.

However any other type of XML NETCONF messages (e.g.<get-config>) i am trying to send manually results in the session being terminated (connection closed by remote host "<IP>").

i am only able to receive a reply from the device for HELLO messages (other than the initial).


Is there a chance this is a device or IOS issue?

Should i try another IOS version?

Thank you in advance,

Adam Pavlidis

6 Replies 6

mstb.petrov
Level 1
Level 1

Did you solve the problem?

I am running into same thing as you.  I get the netconf hello but cannot get futher.  I googled but only found this video on youtube.  This video show he eabled XML agent.  The cisco router I have 2911 doesn't have xml agent. The router supporting xml agent are the service providers running the IOS XR software. Anyone has gotten netconf to work on the 2911?? Any help/suggestion is appreciated.

https://www.youtube.com/watch?v=L62V6p4EwHA

Hello Daniel,

to be honest i was not aware of a disabled XML agent. It was an error on my part because i was not sending the proper <HELLO> message thus the switch was terminating the connection. Please find more details on my answer above.

Cheers,

Adam

I send a hello back from SSH client to the router. But I am not seeing back reply from router. The router has no response.  The cursor just stay there. 

 Can you post an sample txt session screen dump of netconf session with the router ? Thanks, Daniel

Hello,

Unfortunately for quite some time i have not access to the router in question.

First I configured NETCONF over SSH using the instructions provided online from CISCO (something like this https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/cns/configuration/xe-3s/cns-xe-3s-book/netconf-sshv2.pdf) .

after that i could invoke the NETCONF subsystem using a command like
ssh -2 <user>@<ip> -s netconf

at this point i was getting back something like this:

<hello xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
     <capabilities>
       <capability>
         urn:ietf:params:netconf:base:1.0
       </capability>
       <capability>
         urn:ietf:params:netconf:capability:candidate:1.0
       </capability>
     </capabilities>
     <session-id>4</session-id>
</hello>]]>]]>

so i just copy the message minus the <session-id> and paste it back. after that i could perform the NETCONF operations supported by the device.

Cheers,

Adam

Yes i did solve it. Mainly it consisted of me not sending back the proper Hello. Essentially you have to copy the hello message sent by the switch. Remove the <Session-Id> tags and paste it back to the switch. Dont forget to include the ]]>]]>

After that you can perform the Operations supported by your NETCONF schema.

Review Cisco Networking for a $25 gift card