cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1201
Views
0
Helpful
2
Replies

Python - Opening socket in VRF

omarbognanno
Level 1
Level 1

Hello everyone,

 

I'm trying to develop a script to run on IOS XR 6.6 (32 bits, QNX based) to perform a single ping to a large number of destinations in a short time.

I found this script to perform such operation: GitHub - romana/multi-ping: Python library to monitor one or many IP addresses via ICMP echo (ping) requests

To run the script, I copy it in "/sdk/python/." and run it through "python run <script_name>".

 

The script opens a number of sockets, crafts the ICMP packets and parses the IP packets on the way back (it works).

However, I would need to ping destinations in different VRFs, and I cannot find anywhere some documentation to attach the socket to the right device.

 

The ping command, callable from both the CLI and the KSH, is able to perform the same operation, so I would be confident that the functionality could be achieved using sockets from a python script.

 

Any idea?

2 Replies 2

Alexander Stevenson
Cisco Employee
Cisco Employee

 

Hi @omarbognanno,

 

I would open an issue with the repo where the script was found to ask their opinion:

 

https://github.com/romana/multi-ping/issues

 

For related information can check this discussion also -https://community.cisco.com/t5/routing/unable-to-ping-over-vrf-to-gateway-on-same-device/td-p/3734775