09-06-2016 08:08 AM
Hi Folks,
I'm looking for a script that can run traceroutes to multiple IP addresses. I could only find script for ping which works absolutely fine, but need one for trace. Any help will be much appreciated.
Thanks
Prav
09-06-2016 08:38 AM
Hi
This is how you do it , make sure brackets are correct as below or it will fail , I just tested this on my vss it works fine for traces
RouterA(tcl)#foreach address {
+>172.21.33.254
+>172.21.3.254
+>172.21.199.254
+>} { traceroute $address
+>}
09-07-2016 03:00 AM
Hi Mark,
Thanks for your response. Sorry I should've made it clear, the problem I have is with extended traceroute on a specific platforms such as 3750 4500 etc, i.e when you want to use a source address. I came across just one post online which dint work
So I'm looking for something like this which works on most platforms just fine but not on 3750 and most of our distribution/edge devices are 3750/4500
foreach address {
10.10.60.3
10.11.40.2
10.12.20.3} {traceroute $address source <source ip>
}
Also would you know how to redirect a tcl script output to a file.
so I should be able to say this
router#tclsh ping.tcl
and all the output should be stored to a different file in flash.
Thanks
Prav
09-07-2016 03:18 AM
Hi
I have never saved to flash this doc shows how so cant offer much there but the doc may explain it----https://mellowd.co.uk/ccie/?p=2583
but this is how you do trace from source ip just tested it working
xxxxxxx(tcl)#foreach i {
+>172.21.3.254
+>172.21.3.254
+>172.21.33.254
+>} { traceroute $i source 172.21.229.65 }
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide