Currently I’m working with confd and I have a question. when I configure a device via netconf protocol, I send a rpc-request to netconf server and get rpc -reply done, it still has to wait about 3 seconds to finish the command, how do i solve it?
It seems that this 3 second delay is implemented by the netconf-console
program, i.e. not by ConfD - and only when you run it with “a file containing a NETCONF XML command session” (see the output of netconf-console -h
). It is probably because in this case, netconf-console
can’t reliably determine when the response from the server is complete, and thus waits upto 3 seconds for additional output before closing the connection, in order to not lose any data.
If you use the options where netconf-console
“controls” the session, e.g. --rpc
or --edit-config
, there is no such delay. But in any case, netconf-console
is basically a development and testing tool, and not suitable as the basis for a production-quality NETCONF client - i.e. there is really nothing to "solve"here.
If you are using :base:1.0 for framing, just insert a “]]>]]>” after the last RPC message too to avoid having to wait for a timeout.
Unfortunately, many of the ConfD example XML files with NETCONF commands seems to be missing that end-of-message character sequence after the last RPC.
That needs to be corrected.
https://tools.ietf.org/html/rfc6242#section-4.3