Python - Opening socket in VRF
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2022 11:37 AM
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?
- Labels:
-
IOS-XR
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2022 11:10 AM
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-01-2022 04:13 AM
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
