Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

traceroute 10.10.16.X
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

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

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

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .