vlvassilev / yuma123

The yuma123 repository
Other
24 stars 26 forks source link

Does Yuma123 support call-home functionality? #74

Open serega911 opened 4 years ago

serega911 commented 4 years ago

Hi all. I'm interested in call-home functionality. I have found nothing related to it in yuma123. Is it true that it is not supported?

Thanks in advance Sergii

vlvassilev commented 4 years ago

rfc8071 call-home functionality can be achieved with a simple script opening tcp connections to the remote client (e.g. port 4334 for NETCONF over SSH) and the local NETCONF server port (e.g. port 830) and forwarding the data until any of the connections closes or times out. The parameters of the script can be passed as command line options:

$ mkfifo fifo0 fifo1 $ nc remote-call-home-client.com 4334 > fifo0 < fifo1 & $ nc localhost 830 > fifo1 < fifo0

This will actually work to prove the concept. A dedicated script handling timeouts and reopening connections should be also trivial:

./call-home --remote-address=12.34.56.78 --remote-port=4334 --local-address=127.0.0.1 --local-port=830 ...

The parameter names should be ideally derived from draft-ietf-netconf-netconf-client-server so that is easy to reuse the script from a SIL.

Such a script can provide call-home functionality to any NETCONF server not only yuma123 netconfd.

serega911 commented 4 years ago

Thank you!

serega911 commented 4 years ago

Hi @vlvassilev I didn't catch your suggestion. As I understood, I had to establish data forwarding. But it seems that I need to make additional changes in client and server source code:

  1. somehow initialize some structures responsible for session establishing.
  2. simulate capabilities exchange procedure.

Could you please clarify whether code change is needed or not?