0

Can some one please help me in implementing netconf call home using ipv6 in python. Just read some articles about netconf home and tried implementing the same with below code , Can someone please check and tell me if I am heading in the right direction or what's need to be done so that I will receive the signal on my ipv6 when my network device send it.

from netconf_client.connect import connect_tls, CallhomeManager
from netconf_client.ncclient import Manager


with CallhomeManager(port=4335) as call_home_mgr:
    try :
        session = call_home_mgr.accept_one_tls(host='::',port=4335, keyfile='key.pem',
                                           certfile='cert.pem',
                                           ca_certs='cacert.pem', timeout=6000)

        print('session:', session)
    except Exception as e: 
        print(e)

with Manager(session) as mgr:
    print('get_config', mgr.get_config(source='running'))
Mat
  • 202,337
  • 40
  • 393
  • 406
tinks
  • 111
  • 1
  • 2
  • 10
  • How can you receive a signal on an ipv6? Ip (of any version) is a protocol, not a thing – 2e0byo May 26 '23 at 08:54
  • This q needs a clear statement of what you're actually trying to do – 2e0byo May 26 '23 at 08:54
  • Hi @2e0byo : Sorry for not asking the clear question here . The ask is to implement the netconf call home using python and when i wireshark the network traffic all the network devices are using IPV6 and not IPV4 , Can you please guide me how to do it . Any example or link will be appreciated. – tinks May 26 '23 at 09:34
  • Again I don't understand. This code is copied from the `netconf_client` docs. Have you tried running it? What problem do you have with it? netconf *client* is, as the name suggests, a client: the `CallhomeManager` *accepts* callhome requests, it doesn't send them. If you want to send them, you need a netconf *server*, of which [there are several](https://netconf.readthedocs.io/en/master/). Again, what are you trying to do? Netconf is used for a few generally advanced networking setups. Are you just playing, or are you trying to do something else, like send a message over a network? – 2e0byo May 26 '23 at 09:58
  • As a general rule 'will my code work' questions are off topic here. The only way to answer that question is to run it against a thorough test suite. – 2e0byo May 26 '23 at 09:59

0 Answers0