Git Product home page Git Product logo

Comments (9)

abligh avatar abligh commented on July 23, 2024

With this patch:

diff --git a/jnc/src/com/tailf/jnc/NetconfSession.java b/jnc/src/com/tailf/jnc/NetconfSession.java
index 0d25abe..60a4124 100644
--- a/jnc/src/com/tailf/jnc/NetconfSession.java
+++ b/jnc/src/com/tailf/jnc/NetconfSession.java
@@ -1559,6 +1559,7 @@ public class NetconfSession {
      * side are the base NETCONF capability.
      */
     void encode_hello(Transport out) {
+       out.print("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
         out.print("<hello xmlns=\"" + Capabilities.NS_NETCONF + "\">");
         out.print("<capabilities>");
         out.println("<capability>" + Capabilities.NETCONF_BASE_CAPABILITY

It will negotiate a hello.

However, it then dies as follows:

*NetconfSession: reply= 
<?xml version="1.0" encoding="UTF-8"?><rpc-reply xmlns="urn:ietf:params:netconf:base:1.0"><rpc-error><error-type>rpc</error-type><error-tag>missing-element</error-tag><error-severity>error</error-severity><error-info><bad-element>xml</bad-element></error-info></rpc-error></rpc-reply>
[Fatal Error] :2:6: The processing instruction target matching "[xX][mM][lL]" is not allowed.
Exception in thread "main" Parse error: parse error: org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed.
    at com.tailf.jnc.XMLParser.parse(XMLParser.java:139)
    at com.tailf.jnc.XMLParser.parse(XMLParser.java:154)
    at com.tailf.jnc.NetconfSession.recv_rpc_reply(NetconfSession.java:1483)
    at com.tailf.jnc.NetconfSession.recv_rpc_reply_data(NetconfSession.java:1460)
    at com.tailf.jnc.NetconfSession.getConfig(NetconfSession.java:443)
    at com.tailf.jnc.NetconfSession.getConfig(NetconfSession.java:433)
    at testnetconf.TestNetconf.main(TestNetconf.java:46)

It looks like JNC really neither wants to send or receive <?xml ... ?> but the Cisco insists on it. Who is right here?

from jnc.

abligh avatar abligh commented on July 23, 2024

Apparently both JNC and the Cisco are broken.

From RFC 6241 section 3:

A NETCONF message MAY begin with an XML declaration (see Section 2.8 of [W3C.REC-xml-20001006]).

MAY in RFC terms means this is optional. The Cisco is therefore at fault for requiring it on Netconf commands received. JNC is also at fault in refusing to accept responses containing it.

from jnc.

klacke avatar klacke commented on July 23, 2024

The Cisco CSR1000v doesn't have a working netconf impl.
that can be used. No need to pursue that ...

/klacke

On 16/11/14 23:00, Alex Bligh wrote:

Apparently both JNC and the Cisco are broken.

From RFC 6241 section 3:

A NETCONF message MAY begin with an XML declaration (see Section 2.8
of [W3C.REC-xml-20001006]).

|MAY| in RFC terms means this is optional. The Cisco is therefore at
fault for requiring it on Netconf commands received. JNC is also at
fault in refusing to accept responses containing it.


Reply to this email directly or view it on GitHub
#38 (comment).

from jnc.

t-anh avatar t-anh commented on July 23, 2024

Dear @klacke
can you give me the document which describe "The Cisco CSR1000v doesn't have a working netconf impl." Thanks

from jnc.

klacke avatar klacke commented on July 23, 2024

Don't have such a doc, I just know this. XR has working
netconf by now, not IOS.

They have something, but it's not NETCONF, just NETCONFish.

/klacke

On 03/12/14 01:09, t-anh wrote:

Dear @klacke https://github.com/klacke

can you give me the document which describe "The Cisco CSR1000v doesn't
have a working netconf impl." Thanks


Reply to this email directly or view it on GitHub
#38 (comment).

from jnc.

t-anh avatar t-anh commented on July 23, 2024

Now I'm using Cisco CSR 1000v 3.11s, and it support NETCONF.

from jnc.

SaidJunior avatar SaidJunior commented on July 23, 2024

Hello ,

Can i have the whole list on devices that support NETCONF ?

thank you

2014-12-04 11:10 GMT+01:00 t-anh [email protected]:

Now I'm using Cisco CSR 1000v 3.11s, and it support NETCONF.


Reply to this email directly or view it on GitHub
#38 (comment).

[image: UBIqube Solutions] http://www.ubiqube.com

Said MALAH / R&D Apprentice Enginner
+33 (0)7 53 65 01 75/ [email protected]

UBIqube Solutions Office: +33 438 498 364 / Fax: +33 438 498 361
Parc Sud Galaxie 5, rue des Tropiques 38130 Échirolles France
www.ubiqube.com

[image: Facebook] http://www.facebook.com/saiid.junior [image:
Twitter] http://www.twitter.com/Saiid.juni0r [image: Instagram]
http://instagram.com/Said_Malah [image: Skype]
http://skype.com/SAID+MALAH

from jnc.

abligh avatar abligh commented on July 23, 2024

t-anh: I opened this issue precisely because neither Cisco CSR 1000v (3.12) nor JNC appear to follow the Netconf standard:

Apparently both JNC and the Cisco are broken.

From RFC 6241 section 3:

A NETCONF message MAY begin with an XML declaration (see Section 2.8 of [W3C.REC-xml-20001006]).

MAY in RFC terms means this is optional. The Cisco is therefore at fault for requiring it on Netconf commands received. JNC is also at fault in refusing to accept responses containing it.

from jnc.

klacke avatar klacke commented on July 23, 2024

I agree that the <?xml header should be both sent and received by JNC. Needs to be fixed.

As for the NETCONF impl on CSR 1000v , maybe you know more than me here, but
last time I looked it was completely worthless. You're stumbling on the <?xml header, if
you were to get pass that, the list of anomalies continues forever. Furthermore, the payload
was just CLI commands wrapped in garbled XML.
The CSR 1000v NETCONF is probably just there to fill a tickmark in some RFQ.

from jnc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.