TCL scripts to verify reachability

Example 1

foreach address {
10.0.1.1
10.0.1.2
10.0.1.3
10.0.1.n
} { ping $address
}

Example 2

for {set i 1} {$i < n} {incr i} { 
  ping 10.0.1.$i re 1 time 1
}