Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am trying to trace the routes to all live hosts in a subnet. How would one design the command? I've tried the commands below, to no avail. Man pages does not make me any wiser.

mtr -c 1 --report 10.10.16.X
mtr -c 1 --report 10.10.16.0/24

traceroute 10.10.16.X
traceroute 10.10.16.0/24
share|improve this question
    
By definition, all hosts in a local subnet can be contacted directly with no routing involved. For a remote subnet, the route would be the same for all addresses in that subnet. traceroute should display the route even for a target that is unallocated or turned off. –  RedGrittyBrick Feb 15 '11 at 16:53
add comment

1 Answer 1

There is no such thing available. Almost always all IPs in same block are using same routes (typical routing works with subnet masks).

In Linux, you can use short script, for example

for i in $(seq 1 255); do
 traceroute 10.10.16.$i
done

This prints route to each address, and do not include any comparing functions to detect different routes to different addresses.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.