From 55d2ee80dcddfbaae8600f6389088f1d718965a8 Mon Sep 17 00:00:00 2001 From: 3roin Date: Thu, 5 May 2022 12:28:28 +0000 Subject: op-mode: T4416: Rewrite 'traceroute' op-command and expand available options using python --- op-mode-definitions/traceroute.xml.in | 220 ++-------------------------------- 1 file changed, 8 insertions(+), 212 deletions(-) (limited to 'op-mode-definitions') diff --git a/op-mode-definitions/traceroute.xml.in b/op-mode-definitions/traceroute.xml.in index e3217235c..aba0f45e3 100644 --- a/op-mode-definitions/traceroute.xml.in +++ b/op-mode-definitions/traceroute.xml.in @@ -2,226 +2,22 @@ - Track network path to node - - <hostname> <x.x.x.x> <h:h:h:h:h:h:h:h> - - - /usr/bin/traceroute "$2" - - - - Track network path to node + Trace network path to node <hostname> <x.x.x.x> <h:h:h:h:h:h:h:h> + ${vyos_op_scripts_dir}/traceroute.py ${@:2} - + - Explicitly use IPv4 when tracing the path + Traceroute options - <hostname> <x.x.x.x> + - /usr/bin/traceroute -4 "$3" - - - - Route tracing and port detection using TCP - - sudo /usr/bin/tcptraceroute "$3" - - - - TCP port to connect to for path tracing - - 0-65535 - - - sudo /usr/bin/tcptraceroute "$3" $6 - - - - - - - - Explicitly use IPv6 when tracing the path - - <hostname> <h:h:h:h:h:h:h:h> - - - /usr/bin/traceroute -6 "$3" - - - - Use TCP/IPv6 packets to perform a traceroute - - sudo /usr/bin/tcptraceroute6 "$3" - - - - TCP port to connect to for path tracing - - 0-65535 - - - sudo /usr/bin/tcptraceroute6 "$3" $6 - - - - - - - - Track network path to specified node via given VRF - - vrf name - - - - - - - Track network path to specified node via given VRF - - <hostname> <x.x.x.x> <h:h:h:h:h:h:h:h> - - - sudo ip vrf exec "$3" /usr/bin/traceroute "$4" - - - - Explicitly use IPv4 when tracing the path via given VRF - - <hostname> <x.x.x.x> - - - sudo ip vrf exec "$3" /usr/bin/traceroute -4 "$5" - - - - Route tracing and port detection using TCP - - sudo ip vrf exec "$3" /usr/bin/tcptraceroute "$5" - - - - TCP port to connect to for path tracing - - 0-65535 - - - sudo ip vrf exec "$3" /usr/bin/tcptraceroute "$5" $8 - - - - - - - - Explicitly use IPv6 when tracing the path via given VRF - - <hostname> <h:h:h:h:h:h:h:h> - - - sudo ip vrf exec "$3" /usr/bin/traceroute -6 "$5" - - - - Use TCP/IPv6 packets to perform a traceroute - - sudo ip vrf exec "$3" /usr/bin/tcptraceroute6 "$5" - - - - TCP port to connect to for path tracing - - 0-65535 - - - sudo ip vrf exec "$3" /usr/bin/tcptraceroute6 "$5" $8 - - - - - - - - - - - - - - Monitor path to destination in realtime - - <hostname> <x.x.x.x> <h:h:h:h:h:h:h:h> - - - /usr/bin/mtr "$3" - - - - - - IPv4 fully qualified domain name (FQDN) - - <fqdn> - - - /usr/bin/mtr -4 "$4" - - - - IPv6 fully qualified domain name (FQDN) - - <fqdn> - - - /usr/bin/mtr -6 "$4" - - - - Monitor path to destination in realtime via given VRF - - vrf name - - - - - - IPv4 fully qualified domain name (FQDN) - - <fqdn> - - - sudo ip vrf exec "$4" /usr/bin/mtr -4 "$6" - - - - IPv6 fully qualified domain name (FQDN) - - <fqdn> - - - sudo ip vrf exec "$4" /usr/bin/mtr -6 "$6" - - - - Track network path to specified node via given VRF - - <hostname> <x.x.x.x> <h:h:h:h:h:h:h:h> - - - sudo ip vrf exec "$4" /usr/bin/mtr "$5" - - - - - + ${vyos_op_scripts_dir}/traceroute.py ${@:2} + - + -- cgit v1.2.3